Merge pull request #3 from MrDham/MrDham-patch-1

Add files via upload
pull/4/head
MrDham 7 years ago committed by GitHub
commit 63667c97b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      Open_Theremin_V3/application.cpp

@ -725,26 +725,32 @@ void Application::midi_calibrate ()
// Pitch bend range and associated distance between notes jumps use "Pitch" pot. // Pitch bend range and associated distance between notes jumps use "Pitch" pot.
// The user shall set synth's pitch bend range acordingly to the selected Theremin's pitch bend range: // The user shall set synth's pitch bend range acordingly to the selected Theremin's pitch bend range:
// 1 semitone, 7 semitones (a fifth), 12 semitones (an octave) or 24 semitones (two octaves). // 1 semitone, 2 semitones (standard), 7 semitones (a fifth), 12 semitones (an octave) or 24 semitones (two octaves).
// The "1 semitone" setting blocks pitch bend generation (use portamento on the synth) // The "1 semitone" setting blocks pitch bend generation (use portamento on the synth)
pot_bend_range = analogRead(PITCH_POT); pot_bend_range = analogRead(PITCH_POT);
bend_range_scale = pot_bend_range >> 8; bend_range_scale = pot_bend_range >> 7;
if (bend_range_scale == 0) switch (bend_range_scale)
{ {
case 0:
midi_bend_range = 1; midi_bend_range = 1;
} break;
else if (bend_range_scale == 1) case 1:
{ case 2:
midi_bend_range = 2;
break;
case 3:
case 4:
midi_bend_range = 7; midi_bend_range = 7;
} break;
else if (bend_range_scale == 2) case 5:
{ case 6:
midi_bend_range = 12; midi_bend_range = 12;
} break;
else default:
{
midi_bend_range = 24; midi_bend_range = 24;
break;
} }
EEPROM.put(13,midi_bend_range); EEPROM.put(13,midi_bend_range);
// Volume trigger uses "Volume" pot // Volume trigger uses "Volume" pot

Loading…
Cancel
Save