Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 /* Program Example 12.6: MIDI messaging with variable scroll speed 00002 */ 00003 #include "mbed.h" 00004 #include "USBMIDI.h” 00005 USBMIDI midi; // initialise MIDI interface 00006 AnalogIn Ain(p19); // create analog input 00007 00008 int main() { 00009 while (1) { 00010 for(int i=48; i<72; i++) { // step through notes 00011 midi.write(MIDIMessage::NoteOn(i)); // note on 00012 wait(Ain); // pause 00013 midi.write(MIDIMessage::NoteOff(i)); // note off 00014 wait(2*Ain); // pause 00015 } 00016 } 00017 } 00018
Generated on Fri Jul 29 2022 13:32:03 by
1.7.2