Rob Toulson
/
RealTimeLab06_MIDIoutput
Real Time Lab Program
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "USBMIDI.h" 00003 00004 USBMIDI midi; // initialise MIDI interface 00005 00006 int i; 00007 00008 int main() { 00009 while (1) { 00010 for(i=48; i<72; i++) { // step through notes 48 to 120 00011 midi.write(MIDIMessage::NoteOn(i)); // note on 00012 wait(0.2); // pause 00013 midi.write(MIDIMessage::NoteOff(i)); // note off 00014 wait(0.2); // pause 00015 } 00016 } 00017 }
Generated on Sun Jul 24 2022 10:19:29 by 1.7.2