How about Pitchbend? [solved] #12
Replies: 4 comments 9 replies
-
|
Hi Erich, I've some code I could merge into the project from a current one which does allow pitchbend. For pitchbend the addVal value can be calculated by changing the midi parameter. Also modulation would be possible. In that case the parameter should be refreshed continously. This may reduce the max supported polyphony. Multiply by 0.5 goes one octave down, multply by 2 one octave up. I can merge the code soon if you like. Best regards, |
Beta Was this translation helpful? Give feedback.
-
|
Works :) Added one global variable in esp32_basic_synth.ino Added Pitchbendcontroller in my modified midi_interface.ino: ( based on Arduino MIDI Library) void handlePitchBend( byte channel, int bend ){ // Pitchbend is not a CC! and it is 14Bit! Serial.printf("Pitchbend %X %d\n", channel, bend); if( bend < 0){ Serial.printf("GlobalBend %X %3f\n", channel, globalBend ); // Or someting if pitch is negativ and something else if the bend is positiv ... } Then changed lines in easySynth.ino: |
Beta Was this translation helpful? Give feedback.
-
|
Hi Marcel, |
Beta Was this translation helpful? Give feedback.
-
|
Hi Marcel,
I did not recognise any effect on it.
I dropped some lines of debug-messages which where specially in my code.
As my code is not the same as Yours,
oscillatorT *osc = &oscPlayer[i];
{
// portamento has to be calculated per Oscillator by incrementing from old osc->addVal to the curreent addVal.
osc->samplePos += (uint32_t) ( ( 1 + ( lfo_sig * lfo_matrix_to_pitch )) * globalBend * osc->addVal );
As my loo_sig and Leo_matrix_to_pitch are botch small positiv/negative floats, it is implemented as a multiplier.
Low notes are bended less from the numeric perspective and higher notes are bended more .. as I did ist as a multiplier.
As both values could be positiv or negative I had to add 1 see ( 1 + ( flo… )
It works without pow.
In my code I had implemented some „matrix“ - variables to be able to connect the LFO as a Source to different destinations .. .probably Attack, Delay etc.
But not only a few are implemented.
I also tested with a high frequency for LFO and it sounded a bit as a crappy FM :)
My Version ist here:
https://github.com/ErichHeinemann/esp32_basic_synth/blob/main/easySynth.ino
Best Regards
Erich
… Am 25.04.2021 um 15:02 schrieb Marcel ***@***.***>:
How is the max polphony affected in your case adding the multiplier (globalBend) ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Marcel,
today I started to look into that code.
I would like to combine it with a crappy sampleplayer to mix these sounds.
In Samplerbox(.org) they have a working pitchbend.
How could we add a global pitchbend? Any idea to fake a wrong "samplefrequency" ? Or we change the osc->samplepos ?
+/-12 Tones are mostly the normal range.
Velocity and a global Volume is missing too.
I will check Your code in the next days, perhaps I am able to understand it a bit better. :)
.. or do You think You could manage this in Your code?
Best Regards
Erich
Beta Was this translation helpful? Give feedback.
All reactions