diff options
Diffstat (limited to 'src/engine/ActionFactory.cpp')
-rw-r--r-- | src/engine/ActionFactory.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/engine/ActionFactory.cpp b/src/engine/ActionFactory.cpp index 4b63e92..4ca1a3e 100644 --- a/src/engine/ActionFactory.cpp +++ b/src/engine/ActionFactory.cpp @@ -24,22 +24,24 @@ namespace Machina { SharedPtr<Action> ActionFactory::note_on(unsigned char note) { - unsigned char buf[2]; + unsigned char buf[3]; buf[0] = 0x90; buf[1] = note; + buf[2] = 0x40; - return SharedPtr<Action>(new MidiAction(2, buf)); + return SharedPtr<Action>(new MidiAction(3, buf)); } SharedPtr<Action> ActionFactory::note_off(unsigned char note) { - unsigned char buf[2]; + unsigned char buf[3]; buf[0] = 0x80; buf[1] = note; + buf[2] = 0x40; - return SharedPtr<Action>(new MidiAction(2, buf)); + return SharedPtr<Action>(new MidiAction(3, buf)); } |