diff options
author | Volker Fischer <corrados@users.noreply.github.com> | 2022-01-09 13:53:11 +0100 |
---|---|---|
committer | Volker Fischer <corrados@users.noreply.github.com> | 2022-01-09 13:53:11 +0100 |
commit | f76c527674e5611abe29701fa20dfada72af7bb8 (patch) | |
tree | 469243a6ec754c7eaef1aa739de18148c9b46e06 | |
parent | 9ac7be28a312e72bce3b8b2dde782f3b24118b02 (diff) |
added optional Edrumulus debugging output for velocity and positional sensing values of received MIDI input
-rw-r--r-- | src/audioinputenginemidi.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/audioinputenginemidi.cc b/src/audioinputenginemidi.cc index 503a5c3..4f8ff1f 100644 --- a/src/audioinputenginemidi.cc +++ b/src/audioinputenginemidi.cc @@ -123,6 +123,24 @@ void AudioInputEngineMidi::processNote(const std::uint8_t* midi_buffer, return; } +const bool use_edrumulus_debugging_output = false; +if(use_edrumulus_debugging_output) +{ + auto type = midi_buffer[0] & TypeMask; + auto key = midi_buffer[1]; + auto velocity = midi_buffer[2]; + if((type == ControlChange) && (key == 16)) + { + std::string bar = "--------------------"; + bar[static_cast<int>(static_cast<float>(velocity) / 128 * 20)] = '*'; + printf(std::string(" " + bar + "\n").c_str()); + } + else + { + printf("key: %d, velocity: %d\n", key, velocity); + } +} + switch(midi_buffer[0] & TypeMask) { case NoteOff: |