summaryrefslogtreecommitdiff
path: root/arduino
diff options
context:
space:
mode:
authorerdgeist <erdgeist@bauklotz.fritz.box>2018-04-16 15:36:14 +0200
committererdgeist <erdgeist@bauklotz.fritz.box>2018-04-16 15:36:14 +0200
commit8c978328b0d69216a1e60c3330c07d83c1408e12 (patch)
treed15e231961a57e0b9a84bd500bab69fcfe56e625 /arduino
parent1b07b4d2ea8f716bef832b84bd38a2d0cdabb9b4 (diff)
Add velocity code
Diffstat (limited to 'arduino')
-rw-r--r--arduino/Laserharfe/Laserharfe.ino4
1 files changed, 2 insertions, 2 deletions
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) {
262 Serial.println("- MIDI SENT"); 262 Serial.println("- MIDI SENT");
263} 263}
264 264
265void midi_playnote(int channel, int note, int octave_offset ) { 265void midi_playnote(int channel, int note, int octave_offset, int velocity ) {
266 midi_pitchbend(channel, 0); 266 midi_pitchbend(channel, 0);
267 midiEventPacket_t p = { 0x9, 0x90 | channel, note + 12 * octave_offset, 0x7f }; 267 midiEventPacket_t p = { 0x9, 0x90 | channel, note + 12 * octave_offset, velocity };
268 MidiUSB.sendMIDI(p); 268 MidiUSB.sendMIDI(p);
269} 269}
270 270