Back to Silas S. Brown's home page
Mac MIDI player utilitymac-playmidi.c is a small public-domain C program to play MIDI files on a Mac from the command line. (Here is a binary for MacOS 10.7+ if you don't want to compile it yourself.)
If an external MIDI device (such as a MIDI keyboard) is connected to the Mac via a MIDI-over-USB connection, then the MIDI file will be played on the first such device found; if this is not possible then the Mac's own synthesis will be used. The program should compile on all versions of Mac OS X (including older ones), and it has command-line options for changing the tempo and for starting and ending at specific times (which might be useful for example if you're using the MIDI file to try and help you learn to play something on the keyboard).
Other methods of playing to MIDI devicesAside from my command-line utility above, you might prefer to use a more graphical method of playing to your MIDI device, e.g.:
- Aria Maestosa (GPL-licensed). Can both play to and record from a MIDI device. But the latest version that still works with MacOS 10.7 is 1.4.10, and this has a bug whereby playback to external MIDI somehow configures it to transpose down a tone. This state can be reset by opening an existing MIDI file in MuseScore and playing a little.
- MuseScore (GPL-licensed). Can play to a MIDI device, but recording is step-time only, at least in Version 2.3.2 which is the last one available for MacOS 10.7.
- VirtualBox (non-Vagrant) with the USB-MIDI controller added under Settings/Ports/USB (it must be connected before entering Settings, but the setting then persists across disconnections). Once this is set up, you should be able to use for example Rosegarden on Ubuntu GNU/Linux, which can both play to and record from a MIDI device and is probably the most flexible application listed here. Note however that non-VirtualBox programs cannot then access the MIDI device any time the set-up VirtualBox is running (whether or not it's accessing MIDI) unless you delete the USB controller from its settings. I'm not aware of a version of Rosegarden that can run on the Mac without VirtualBox.
- DOSBox, e.g. in "Library/
Preferences/ DOSBox 0.74 Preferences" under
mididevice=coremidithen use a DOS-based MIDI player of your choice (Manuscript Writer /PLAY /MIDI works, or use DOSMid with progs\dosmid\dosmid /mpu but it has no tempo control)
GarageBandThe Apple-provided "GarageBand" application can record from an external MIDI device, but playback is always to the Mac (at least on the version that comes with Mac OS 10.7; if you have a newer Mac you might find it can play back over MIDI---I haven't been able to check). The Mac's synthesizer itself is reasonable, but being able to play only from the Mac means you might have a logistical problem if you'd like the sound to come from near the MIDI keyboard (for example to mix with something else you're playing) and if it's not feasible to move the Mac's speakers appropriately (which may be the case if you're using passive hi-fi speakers).
To record in GarageBand '11 6.0.5 on MacOS 10.7.5: new track (Cmd-Shift-N or bottom-left "+" icon), record (if all red and doesn't go green, may hv to reset the MIDI connection, especially if going via a hub). If you want to multi-track, you can join the tracks via Edit / Select All (cmd-A), Edit / Join (cmd-J). Then to save, do Edit / Add to loop library, then run this script.
For fun with ground-bass loops if you don't mind playback being via the Mac: GarageBand / Preferences / General: "Cycle Recording (Automatically merge Software Instrument recordings when using the cycle region)", then record, then add a loop with Control / Snap to Grid (Cmd-G) switched OFF, then record again to add layers to the loop.
All material © Silas S. Brown unless otherwise stated.
Apple is a trademark of Apple Inc.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Mac is a trademark of Apple Inc.
VirtualBox is a trademark registered by Oracle in various countries.
Any other trademarks I mentioned without realising are trademarks of their respective holders.