From 8c978328b0d69216a1e60c3330c07d83c1408e12 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 16 Apr 2018 15:36:14 +0200 Subject: Add velocity code --- arduino/Laserharfe/Laserharfe.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arduino/Laserharfe') diff --git a/arduino/Laserharfe/Laserharfe.ino b/arduino/Laserharfe/Laserharfe.ino index 1d7adeb..b219951 100644 --- a/arduino/Laserharfe/Laserharfe.ino +++ b/arduino/Laserharfe/Laserharfe.ino @@ -262,9 +262,9 @@ void handle_midi(char *command) { Serial.println("- MIDI SENT"); } -void midi_playnote(int channel, int note, int octave_offset ) { +void midi_playnote(int channel, int note, int octave_offset, int velocity ) { midi_pitchbend(channel, 0); - midiEventPacket_t p = { 0x9, 0x90 | channel, note + 12 * octave_offset, 0x7f }; + midiEventPacket_t p = { 0x9, 0x90 | channel, note + 12 * octave_offset, velocity }; MidiUSB.sendMIDI(p); } -- cgit v1.2.3