ElectroTechnique / TSynth-Teensy4.1

TSynth for Teensy 4.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typo in voice1On? Re-Read please

callimero opened this issue · comments

In voic1One there is

voiceMixer1.gain(0, VELOCITY[velocitySens][velocity] * level);

In all other voices it is:

voiceMixer1.gain(1, VELOCITY[velocitySens][velocity] * VOICEMIXERLEVEL);

`
void voice1On(byte note, byte velocity, float level) {
keytracking1.amplitude(note * DIV127 * keytrackingAmount);
voices[0].note = note;
voices[0].timeOn = millis();
voiceMixer1.gain(0, VELOCITY[velocitySens][velocity] * level);
filterEnvelope1.noteOn();
ampEnvelope1.noteOn();
voices[0].voiceOn = 1;
if (glideSpeed > 0 && note != prevNote) {
glide1.amplitude((prevNote - note) * DIV24); //Set glide to previous note frequency (limited to 1 octave max)
glide1.amplitude(0, glideSpeed * GLIDEFACTOR); //Glide to current note
}
if (unison == 0)prevNote = note;
}

void voice2On(byte note, byte velocity, float level) {
keytracking2.amplitude(note * DIV127 * keytrackingAmount);
voices[1].note = note;
voices[1].timeOn = millis();
voiceMixer1.gain(1, VELOCITY[velocitySens][velocity] * VOICEMIXERLEVEL);
filterEnvelope2.noteOn();
ampEnvelope2.noteOn();
voices[1].voiceOn = 1;
if (glideSpeed > 0 && note != prevNote) {
glide2.amplitude((prevNote - note) * DIV24); //Set glide to previous note frequency (limited to 1 octave max)
glide2.amplitude(0, glideSpeed * GLIDEFACTOR); //Glide to current note
}
if (unison == 0)prevNote = note;
}

`

Maybe I did not communicate very good:

On Voice one it is

voiceMixer1.gain(0, VELOCITY[velocitySens][velocity] * level);

On all other voices it is

voiceMixer1.gain(1, VELOCITY[velocitySens][velocity] * VOICEMIXERLEVEL);

So Voice 1 uses the level parameter, all others using the Constant VOICEMIXERLEVEL

Thats something I don't get.

Yes, sorry you're right it's 'level' and should be applied to all voices. That'll be why the unison still sounded too loud... I'll put out a fix soon with some other fixes.

Fixed in V2.02