Add files via upload

pull/27/head
MrDham 4 years ago committed by GitHub
parent 36e0e7dc62
commit 1108c54b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      Open_Theremin_V3/application.cpp

@ -542,6 +542,7 @@ void Application::midi_msg_send(uint8_t channel, uint8_t midi_cmd1, uint8_t midi
// Calibrate pitch bend and other parameters accordingly to the receiver synth (see midi_calibrate). // Calibrate pitch bend and other parameters accordingly to the receiver synth (see midi_calibrate).
// New notes won't be generated as long as pitch bend will do the job. // New notes won't be generated as long as pitch bend will do the job.
// The bigger is synth's pitch bend range the beter is the effect. // The bigger is synth's pitch bend range the beter is the effect.
// If pitch bend range = 1 no picth bend is generated (portamento will do a better job)
void Application::midi_application () void Application::midi_application ()
{ {
double delta_loop_cc_val = 0; double delta_loop_cc_val = 0;
@ -600,11 +601,11 @@ void Application::midi_application ()
{ {
if (rod_midi_cc != 255) if (rod_midi_cc != 255)
{ {
midi_msg_send(midi_channel, 0xB0, rod_midi_cc, (uint8_t)(new_midi_rod_cc_val >> 7));
if (rod_midi_cc_lo != 255) if (rod_midi_cc_lo != 255)
{ {
midi_msg_send(midi_channel, 0xB0, rod_midi_cc_lo, (uint8_t)(new_midi_rod_cc_val & 0x007F)); midi_msg_send(midi_channel, 0xB0, rod_midi_cc_lo, (uint8_t)(new_midi_rod_cc_val & 0x007F));
} }
midi_msg_send(midi_channel, 0xB0, rod_midi_cc, (uint8_t)(new_midi_rod_cc_val >> 7));
} }
old_midi_rod_cc_val = new_midi_rod_cc_val; old_midi_rod_cc_val = new_midi_rod_cc_val;
} }
@ -668,11 +669,11 @@ void Application::midi_application ()
{ {
if (rod_midi_cc != 255) if (rod_midi_cc != 255)
{ {
midi_msg_send(midi_channel, 0xB0, rod_midi_cc, (uint8_t)(new_midi_rod_cc_val >> 7));
if (rod_midi_cc_lo != 255) if (rod_midi_cc_lo != 255)
{ {
midi_msg_send(midi_channel, 0xB0, rod_midi_cc_lo, (uint8_t)(new_midi_rod_cc_val & 0x007F)); midi_msg_send(midi_channel, 0xB0, rod_midi_cc_lo, (uint8_t)(new_midi_rod_cc_val & 0x007F));
} }
midi_msg_send(midi_channel, 0xB0, rod_midi_cc, (uint8_t)(new_midi_rod_cc_val >> 7));
} }
old_midi_rod_cc_val = new_midi_rod_cc_val; old_midi_rod_cc_val = new_midi_rod_cc_val;
} }

Loading…
Cancel
Save