This shows you the differences between two versions of the page.
sending_20and_20receiving_20midi_20data [2018/03/31 13:19]
sending_20and_20receiving_20midi_20data [2018/03/31 13:19] (current)
|Line 1:||Line 1:|
|+||=====Sending and receiving MIDI data=====|
|+||//by Richard Russell, December 2010//\\ \\ MIDI (**M**usical **I**nstrument **D**igital **I**nterface) is a standard means of communicating with a digital musical instrument, whether an input device like a keyboard or an output device like a synthesiser.\\ \\ To output data to a MIDI device you can adapt the example program **MIDITEST** listed [[http://www.bbcbasic.co.uk/bbcwin/examples/miditest.html|here]]. Note that the routine **PROCsblast** opens the default MIDI output device; if you have more than one MIDI output device you may need to change the parameter -1 (signifying **MIDI_MAPPER**) to the appropriate device number.\\ \\ To input data from a MIDI device you can adapt the example program **MIDIIN** which can be downloaded from [[http://groups.yahoo.com/group/bb4w/files/Multimedia/MIDIIN.BBC|here]]. This program 'loops' the MIDI input to the MIDI output in software, but you should be able to see how to adapt it to utilise the received data for other purposes. The program opens MIDI input device 0 so if necessary change the device number in the **midiInOpen** call.|