Skip to content

Commit 02cfc95

Browse files
committed
readme
1 parent 6fc462f commit 02cfc95

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,22 @@ The same is true for the [MidiStreamIn](https://pschatzmann.github.io/arduino-mi
5252
```
5353
#include "Midi.h"
5454
55-
MyEventHandler handler
56-
MidiStreamIn in(Serial, handler);
55+
MidiCallbackAction action;
56+
MidiStreamIn in(Serial, &action);
57+
58+
void onNoteOn(uint8_t channel, uint8_t note, uint8_t velocity) {
59+
Serial.print("onNoteOn: ");
60+
Serial.println(note);
61+
}
62+
63+
void onNoteOff(uint8_t channel, uint8_t note, uint8_t velocity) {
64+
Serial.print("onNoteOff: ");
65+
Serial.println(note);
66+
}
5767
5868
void setup() {
5969
Serial.begin(115200);
70+
action.setCallbacks(onNoteOn, onNoteOff);
6071
}
6172
6273
void loop() {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=audio-tools midi
2-
version=0.1
2+
version=0.8
33
author=Phil Schatzmann
44
maintainer=Phil Schatzmann <[email protected]>
55
sentence=Arduino Audio Tools - Midi Support

0 commit comments

Comments
 (0)