Copyright (c) 1998 by Randy Wilson
(randy@axon.cs.byu.edu)
Midi JukeBox (formerly Square Dance) is a program for the Macintosh
which plays standard MIDI files, and provides animated "dancing squares" to
accompany the music. It also provides several options to make it possible to
customize songs to your particular MIDI setup. In particular, Midi JukeBox
allows you to:
ftp://axon.cs.byu.edu/pub/randy/midi/jukebox/You can download any of the archives there now:
Midi JukeBox is shareware. You are welcome to try it out for two weeks for free. If you use it after that, you should send $15 ($5 for students) to:
Registered owners will receive the latest version of Midi JukeBox
and free upgrades to future versions of the program.
Be sure to include your e-mail address, and (optionally) your postal address.
If you have any questions or comments, please contact me by e-mail at:
randy@axon.cs.byu.edu.
For information on the latest version of Midi JukeBox, see the Midi JukeBox
web page at http://axon.cs.byu.edu/~randy/jukebox.html.
Midi drivers: Midi JukeBox has a built-in Midi driver. It also supports Apple's MidiManager, if you have it. (If you know of anywhere on the Internet where this is freely available, and Apple's ok with that, please let me know so I can provide a link to it.) (If you do not have it, it can be downloaded via anonymous ftp from ftp.apple.com. Note that background playback is limited using the built-in driver, because the interrupt-driven playback conflicts with the built-in driver and crashes. Using Apple's MidiManager(TM) will provide smoother background playback.
Sound Hardware (or software): Midi JukeBox will work best if you have a MIDI sound module or keyboard of some sort (preferably General-MIDI compatible), and a MIDI interface to go from your Mac's modem or printer port to your synthesizer. If you don't have any MIDI hardware, you can still make sound through your Mac's speaker (see "QuickTime Music" at the bottom of this document), but be warned that it probably won't sound too wonderful.
Mac Hardware & Software: Midi JukeBox has worked fine under System 6.0.5
and System 7.1, and has worked on a Mac SE, SE/30, II, and Quadra 840AV. Let
me know if there is a configuration that it won't work on. Most of the
problems reported so far have been an inability to sign in to the Midi Manager.
In several cases this was simply because the Midi Manager was not installed
properly. Hopefully the built-in driver will take care of most of those
problems.
During playback, you can change the tempo by adjusting the scroll bar at the bottom of the playback screen. Clicking on the arrows changes the tempo by 1 quarter note per minute, while clicking in the bar changes the tempo by 10 q./min. Notes are actually posted to the Midi driver about 1/2 a second before they are really played, so changes in tempo will not take effect until after that duration.
If you find that you don't usually need the tempo bar and would rather not look at it, you can deselect the "Display Tempo Bar" option under the Options menu.
If you want to make this change in tempo permanent, select "Fix Tempo..."
under the Edit menu. This will make it so that when you save the file, all
tempo settings will be adjusted by the amount shown. Of course, the change
will still not be permanent if you do not save the file. (See Editing,
below).
Text events occurring at time 0 in each track are displayed beneath the track on the playback screen. Text events include instrument names (e.g., acoustic guitar, grand piano, snare drum), track names (e.g., Soprano, melody, lead), and other miscellaneous text events, such as the title and author of the song, the name and e-mail address of the person who sequenced it, and copyright notices.
Track 0 is the tempo track and does not have channel messages such as note on/off events. It can, however, have text events, so these are displayed centered at the bottom of the screen. When there are multiple text events associated with any of the visible tracks, the text will be separated by a semicolon. Unfortunately, there is no truly standard way to do text events, so sometimes the text will look a little funny.
If there are too many tracks for large text to fit on the screen, the font
size is reduced. If there still isn't room for all the text, the "visible"
track text events are not displayed. If there still isn't room, then the track
0 text is also hidden, so no text will be displayed. If you want all the text
to be displayed in such situations, enlarge the window. If your monitor isn't
big enough, bummer.
Text events for track 0 can be edited using the "Edit track 0..." option under the Edit menu. This dialog allows you to edit four text events and a copyright event.
I have personally adopted the practice of using text events in track 0 to specify the title, composer, and other such information that applies to the entire song, while using text events on individual tracks to specify instrument assignment and other information that applies specifically to the track. That way the title and other information about the song as a whole appears centered at the bottom of the screen, and the information on each track doesn't get confused with the title, author, etc.
One drawback of this scheme is that some programs will look at track 0 text events as cues, and they will be all smashed together in the same place. Oh, well, that's what we get for having loosely-defined standards.
As a side note, many sequencers only allow 31 or fewer characters in a text
event, so if you need more than that, make sure you're done sequencing it
before you put too much time into documenting your song via Midi JukeBox.
The text events on the "visible" tracks (1..n) can be edited using the "Edit visible track..." dialog under the edit window. You can switch between tracks by using the buttons next to the track number at the top. The "<<" and ">>" buttons change by steps of five.
Editing Track Text. There are separate text boxes for instrument names, track names and miscellaneous text events. I personally like to make sure that I give an instrument name for each track so that those trying to play my file on another setup have some hope of choosing the right instruments. I use track names for comments that don't really have to do with the instrument, such as "melody", "lead", "alto part", etc.
To make it easy to assign GMIDI instrument names, the GMIDI instrument name for the current program change number is always displayed by the "Copy GMIDI Name" button. Changing the program change number updates the name shown, and clicking on this button copies the current name into the instrument name editing window.
Editing Channel Assignments. The MIDI channel number of the first channel event found in the track is shown in the channel text edit box. A zero or "-" indicates that there were no channel messages in the track. There may be other channels used in the track besides that shown, but if you make any changes to the track (text/channel#/program#), the channel of every event in the track will be set to the one shown. These are supposed to be single-channel tracks, so usually this shouldn't actually change anything. If you know that a song has a multi-channel track in it, you can leave channels alone while making other changes by setting the channel number to "-" (or zero) on each track that you don't want the channel to change on.
It is often desirable to change the channel such as when you have a synthesizer with less available channels than the song you're trying to play. In such cases, you can assign several tracks with similar instruments to the same channel (this can also be done automatically. See "Funneling", below). If you want ALL the tracks to be assigned to the same channel temporarily, you can use a filter instead (see "Filters", below).
Editing Program Changes. In a similar fashion, the first program change event occurring in each track is displayed, and its GMIDI instrument assignment is shown by the "Copy GMIDI Name" button, as explained above. Changing the program number automatically changes the name displayed there. Clicking on the copy button copies the GMIDI name into the instrument name edit box. If "-" is displayed, then there were no program changes in that track.
Again, there may be more than one program change on a single track, and while I don't think this is against the rules of MIDI files (especially when different instruments are used at different times in a song but on the same channel), it doesn't seem like a great idea. However, if you know that there are several program changes in a single track and you don't want them to change, set the program number to 0 or "-" and it will not change, even if other changes are made to the track.
If the program number is non-zero, a single program change will be inserted at the beginning of the track, and all others will be stripped off. If you want to strip off all program changes in a track without inserting another program change at the beginning, you can use the value "-1" for the program number.
Empty Tracks. Some tracks are used only for text events. When changes are made to the file, any tracks that contain no text or data will be removed. Thus, if you want to get rid of tracks that do nothing but hold text, you can delete the text, and the track will be automatically removed when changes take effect. If you want to move the text (such as a title or author) to the track 0 text instead, click the "Move to Track 0" button. Then the title will be nicely centered at the bottom instead of sitting under an unused tracks.
Making Changes Effective. Many of the changes (such as text, channel,
and program changes) seem to take effect immediately, but some (such as
deleting empty tracks) require a conversion process that can take several
seconds on slow computers and/or large files. In order to avoid doing the
conversion more often than necessary, changes are really made to the data only
when (1) "Make changes now" is selected from the Edit menu, or (2) when the
file is saved. If you have any doubt as to how your file is going to look or
behave after it is saved and reloaded, you can do one of these two things and
the data will be converted and reinitialized.
Midi JukeBox converts type 0 MIDI files (single track) into type 1
files (multiple tracks), so it can be used as a type 0->type 1 converter.
During such conversions, each channel occurring in the type 0 file is put into
its own track in the type 1 file, and track 0 is reserved as the tempo track
with no channel messages. To make the conversion permanent, simply "Open" the
file in Midi Jukebox and then "Save" it again (usually with a different file
name).
Midi JukeBox will usually open only files of type "Midi". However, by deselecting the option "Display only Midi Files" under the "File" menu, you can open files of any type. Songs will always be saved with a file type of "Midi", so it can be used to make downloaded files visible to other programs (like MasterTrax or QuickTime) that require the file to be of type "Midi". Simply "Open" the file in Midi JukeBox, and then "Save" it again, with either the same or a different file name.
The catch to this is, of course, that you can accidentally open non-midi files. Fortunately, all standard MIDI files begin with a special sequence of characters that identifies it, so if you pick the wrong kind of file, you'll see an error message and the file will not be opened.
Note: there are better ways to change the file type if you download songs on a
regular basis. For example, a shareware program called
``Midi Typer'' allows you
to drag & drop files onto it, and it will change all of the files to the
type and creator of your choice. Also, preferences in programs such as Fetch,
Netscape, StuffIt Expander, Unzip 2.0, uuUndo, and other utilities you may use
to download, convert, and/or decompress your Midi files have an "Extension
Mapping" option. This option allows you to set the file type and creator of
files that end with, for example '.mid' or '.MID'. However, just in case a
file doesn't end in that extension or you somehow got a file that wasn't so
mapped, you can use Midi JukeBox to set the file type.
When the "Use filters" option under the Options menu is checked, filters can be used to cause certain events to be ignored. For example, if you would like to avoid any program change events from being sent to your synthesizer, you can select "no program changes" from the "Filter Settings..." dialog. You can also filter out other events such as pitch bend, control change, etc.
I found that certain control changes trashed my keyboard's entire memory because they were not supported by my keyboard. You can now select which (if any) control changes to allow under the "Filter Settings..." dialog. If there just a few you want to allow, list the control change numbers (you may need to see the Midi Implementation Chart for your synth to see which control changes it recognizes) and select "Do only these..." If, on the other hand, your synth handles most control changes, but you just want to filter out a few of them, list those numbers, and select "Do all but these..."
You can also filter out drums, which I found essential in trying to play songs on a non-multi-timbral synth like a Roland D-50. Drum events are supposed to be sent to channel 10, but if for some reason your drums are on a different channel, you can change the drum channel. This option actually allows you to avoid any channel (even if it isn't the drum channel).
You can also force all notes to be played to the same channel, which I also found useful on a non-multi-timbral setup. This comes in handy, too, if you want to preview a song by having all the notes play to the piano (for example), before assigning instrument numbers to each track. For such activities, set "no program changes," "Play all events to channel 1", and select "except drums" (so drums will still be played on channel 10) or "no drums" (so drums won't be played at all).
Note that filters do not change the actual MIDI data, but they are used during playback to decide which events to pass on to the Midi driver, and may alter the channel of certain events.
Also note that filters will only work when the "Use Filters" option is checked
under the option menu.
Sometimes songs are just played in the wrong octave for your setup. Other times, you might want to sing or play along with a song, but it is out of your range or in the wrong key. You can use the "Transpose Settings..." dialog to decide how many half-steps up or down to transpose an entire song. Since drums usually use a different note for each different sound, transposing drums can be very unpleasant, so "except drums" should be checked in most cases.
Again, the song will be transposed only when "Transpose" is checked under the
"Options" menu. Transposing does not change the actual MIDI data, but is done
in real time during playback.
The "Combine Tracks" command under the Edit menu can be used to combine two or more tracks into one track with the same channel and program numbers. When a song has several tracks that all play the same instrument, it slows down the playback, and makes the display more crowded. Combining tracks can alleviate this.
Combining tracks alters the actual MIDI data, so it is usually a good idea to
save the file under a different name if you save it, in case you decide you
liked it better when it was split up.
The "Delete Tracks" command under the Edit menu can be used to delete
one or more tracks. Any tracks that have no midi events or text events will
automatically be checked for deletion, though you can uncheck the boxes
manually. I have noticed that several MIDI files have two copies of each
track, which of course takes more CPU power to play. Deleting redundant tracks
can speed things up. Also, empty tracks clutter the display window.
The "Funnel" is used when a song uses more channels that your synth setup responds to. For example, my Roland U-20 only has six levels of multi-timbral capabilities (plus drums), so songs that use 8 different channels won't play correctly. If you have a GMIDI synth that responds to all 16 channels, on the other hand, you don't need a funnel at all.
To use the funnel, you first need to edit the "Funnel settings..." under the Option menu. There, you check the box by all the channels your MIDI setup responds to, and click on the radio button to mark which of these channels is the drum channel (usually 10). For my U-20 setup, I checked numbers 1 through 6 and 10, and selected the radio button on channel 10.
You can check the "Automatic Funnel" option under the Options menu to cause funneling to take place automatically upon opening a MIDI file, or you can turn that option off and use "Funnel Now" to perform the funnel on a file you have already opened.
The funnel does not immediately alter the MIDI data, but changes to the channel and program number assignments WILL be retained if any changes are made to the file via the Edit menu commands.
The funnel takes the following steps to try to make the song work better on your setup. If after any step all tracks are using only `available' (i.e., checked) channels, then the subsequent steps are not taken:
1. First see if funnel is needed for this song (if not, do nothing).
2. If there are any available channels that no track uses, move channel assignments to "fill in the holes".
3. If there are any tracks that use the same program number (instrument), but different channels, combine their channels.
4. If there are any sound effects, swap them out so they don't use any `available' channels.
5. Combine the most `similar' instruments until we are only using available channels. The similarity of instruments to each other is determined by a hierarchical division of GMIDI program numbers.
This process may seem confusing, but it makes it much easier for those with
limited multi-timbral capability to listen to someone else's GMIDI file. Of
course, step 5 assumes that you have your instruments set up in GMIDI order, so
this still might not help some people.
Midi JukeBox originally supported only Apple's MidiManager(TM). The current version includes a built-in Midi driver for those who don't have the Midi Manager. However, as Macintosh hardware and system software continues to evolve, this driver may become incompatible. Also, the built-in driver does not allow interrupt-driven playback, so you will get lag occasionally when cruising the menus, dragging windows, or using another application.
I am not allowed to distribute the Midi Manager with my program, but it is
available on the internet at various sites, including the Lime demo site given
above. Earlier versions (up to 2.1) of Midi Jukebox (and Square Dance) had
trouble signing in to the Midi Manager on many systems. Beginning with
version 2.2, the program should be able to sign in to the Midi Manager
automatically. If not, it will allow you to make a manual connection using
the PatchBay program. The next time you run Midi Jukbox, the connections you
made should be re-established automatically.
Midi JukeBox allows you to create lists of songs and play them in a variety of ways.
Creating Lists. To create a song list, choose "New Song List" from the "Song List" menu. This will open a blank, untitled song list. You can then add the currently-opened song to the list by choosing "Add Current to List".
Adding Songs. To add more than one song to the current list, choose "Add Files to List..." This will bring up a dialog box similar to that used to open files. Select individual Midi files and click the "Add" button to add them to the list. To add all of the Midi files in a folder (including all sub-folders), open the desired folder, and click on "Scan & Add All". Unfortunately, there is nothing on the screen to indicate which files have already been added to the list. However, you can delete any duplicates that appear in your list. You can also add files to a list using drag & drag support (see below).
Deleting Songs. To delete songs from the list, select the songs you want to delete and then hit the "delete" key or choose "Delete Selected" from the song list menu.
Playing Songs. Options from the song list menu allow you to play the entire song list in order or in random order, or to play the list in order beginning from the first selected song. That option is useful when you stop playing a list in the middle, and then want to continue. If you select the "Continuous playback" option, then the song list will be played over and over until you select stop. When playing in random order, a new random order is used each time through the list.
To play a single song, select it and hit return.
Midi JukeBox allows you to drag & drop Midi files onto it for immediate playback. A similar result can be achieved by selecting one or more files and then double-clicking one of them.
If only one file is selected, it will be opened & played immediately. If more than one file is selected, they will all be added to a song list (the current list, if one is open, or else a new list), and then played in the order received.
In System 6, only the double-clicking is supported (of course), and then only
when Midi JukeBox is not yet running. In System 7, however, you can use
double-clicking and/or drag & drop either before or after Midi JukeBox is
running. Be aware that double-clicking will only work if the files have "Midi
JukeBox" as their creator, but any Midi files can be dragged onto the Midi
JukeBox icon and be played.
The "Window" menu allows you to bring the song window or the list window to the front. It also allows you to hide either or both windows in case you don't want them to be displayed. In addition, it provides an option to hide the song window when Midi JukeBox is running in the background. This makes it so that you can listen to songs in the background without being distracted by the animation, but causes the animation to reappear when Midi JukeBox is running in the foreground.
Finally, you can also hide the list window while songs are playing, and cause
it to reappear again whenever you stop playing a song (so that you can, for
example, choose another song to play from the list).
QuickTime Music
Playing music without a synthesizer.
It is possible to use Apple's Midi Manager, QuickTime 2.0 and QuickTime Musical Instruments to play Midi files through your Mac's built-in speaker using Midi JukeBox. Obviously the sound quality is fairly lame compared to having a real synthesizer available, and it is a pain to do, but if you don't have a synthesizer, then this may be your only option. Here's how you do it:
1. Get Apple's Midi Manager (please let me know if you know where to get it legally). Put the "Midi Manager" in your Extensions folder (in the System folder), put the "Midi Driver" in the System folder, and put the "PatchBay" application somewhere where you can find it (like the Apple Menu Items folder).
2. Get QuickTime 2.0, and put it in your system's "Extensions" folder.
3. Get QuickTime Musical Instruments, and put it in the "Extensions" folder, too.
4. Get QuickTime MIDI Player 1.3 (Note: this is someone else's $15 shareware program. If you continue to use it, please pay their shareware fee, too).
5. Reboot. The above steps only need to be done once, but the rest must be done each time you want to play songs through your speaker.
6. Run Midi JukeBox, and make sure Midi Manager is selected as the Midi Driver.
7. Run QuickTime MIDI Player.
8. Run the PatchBay application, and connect the output of "Midi JukeBox" into the input of QuickTime. Also, disconnect the output of "Midi JukeBox" from the input of Apple Midi Driver. You can quit the PatchBay application, but you must leave the QuickTime MIDI Player running in order to play the music.
9. Now, play songs from Midi JukeBox, and they should come out your speaker.
The faster your Mac is the better!
Please send reports of bugs to me at:
randy@axon.cs.byu.eduIt would be helpful if you could be as specific as possible about the bug. If you have a particular MIDI file that you know is O.K., but which Midi JukeBox chokes on, I might want the file, too, so I can repeat the error and find out what is wrong. A bug that is not repeatable is really hard to track down.
Midi JukeBox is distributed "as is." I make no guarantees or
warranties on the quality of the product and I cannot be held liable for any
problems that this software may create. In particular, if you are doing
something important on your computer while playing songs in the background, I
would strongly caution you to save your work often in case the interrupts go
haywire. The built-in MIDI driver is someone else's code, and may not be
compatible with all models of Macintosh computers.
I hope you enjoy Midi JukeBox. Drop me an e-mail note--I'd love to hear from
you.
Randy Wilson
randy@axon.cs.byu.edu
http://axon.cs.byu.edu/~randy
Please send e-mail to randy@axon.cs.byu.edu