Hitchhiker's Guide to Openbsd
- How do I use my MIDI instruments?
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
13.7 - How do I use my MIDI instruments?
The Musical Instrument Digital Interface (MIDI) protocol provides a standardized and efficient means to represent musical performance information as electronic data. A MIDI data contain only instructions needed by a synthesizer to play the sounds, rather than the sounds. More information: Tutorial on MIDI and Music Synthesis . To play MIDI data, a synthesizer connected to a MIDI port of the machine is required. Similarly, to record a MIDI data a MIDI instrument is required (eg. a MIDI keyboard). Certain sound cards contain embedded MIDI synthesizers that are attached as MIDI ports. Advanced MIDI instruments may contain multiple subparts (synthesizers, keyboards, control surfaces, etc...), they appear as multiple MIDI ports on OpenBSD. When you already have OpenBSD running, look for MIDI ports in the output of the dmesg(8) command. An example of MIDI ports in a dmesg output is: umidi0 at uhub2 port 2 configuration 1 interface 0 "Roland Roland XV-2020" rev 1.10/1.00 addr 2 midi0 at umidi0: umidi1 at uhub1 port 2 configuration 1 interface 1 "Evolution Electronics Ltd. USB Keystation 61es" rev 1.00/1.25 addr 3 midi1 at umidi1: It shows three MIDI ports, corresponding to: ● /dev/rmidi0 - synthesizer connected by USB http://www.openbsd.org/faq/faq13.html (12 of 25)9/4/2011 10:02:21 AM 13 - Multimedia ● /dev/rmidi1 - a MIDI master keyboard These devices are known by sndio(7) as rmidi:0 and rmidi:1 . To test your MIDI keyboard, you can use the hexdump(1) utility to display MIDI data you're playing on it: $ midicat -q rmidi:1 -o - | hexdump -e '1/1 "%02x\n"' 90 3c 71 ... The output of the keyboard can be connected to the input of the synthesizer, as follows: $ midicat -q rmidi:0 -q rmidi:1 Now you can hear on the synthesizer what you're playing on the MIDI keyboard. Refer to the midicat(1) manual page for further information. The main utility to play standard MIDI files is midiplay(1) . Playing a standard MIDI file, in this example through the synthesizer, is as easy as: $ midiplay -f rmidi:0 file.mid To record MIDI files, you can use the smfrec utility bundled in the audio/midish port, for instance: $ smfrec -d rmidi:0 -i rmidi:1 file.mid will record what is played on the keyboard ( rmidi:1 ) while sending it in real-time on the synthesizer ( rmidi:0 ) so you can hear what you're playing. More complicated operations like editing, routing, mixing and transforming MIDI data, can be achieved using the rmidish utility bundled in the audio/ midish port. Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling