How to use MidiSwing 0.3.3b?
MidiSwing lets you play and compose music using the midi format. As an introduction, I will say a few words about the midi format and how it is managed in MidiSwing. If you find it boring, you can go directly to the section “how to listen to a midi file”.What is Midi?
First of all, what is Midi? It is a loosely defined geographical area consisting of the regions of France that border the Atlantic Ocean south of the Gironde, Spain, the Mediterranean Sea, Italy, and Switzerland south of the Jura. It also happens to refer to Musical Instrument Digital Interface, which is a communication protocol designed to exchange musical data between digital instruments (music notes, but also the information about how to play them, with how much intensity, with which kind of instruments, etc). This protocol has been around for more than 20 years and is used by almost all digitial musical instruments. Traditionally, data are sent over 16 “channels” which are numbered from 1 to 16. Let's say, in general, that a channel can send data to a particular midi device (which can for instance generate a piano sound, a flute sound, etc).
Midi files store musical data according to the Midi protocol. They are, as it were, music scores for digital instruments. There are two main types of midi files: standard midifile type 0 (SMF0) and standard midifile type 1 (SMF1).
- File types 0 have only one track : this track contains various musical data for several channels.
- File types 1 may have several tracks (as many as you wish). In principle, each track can contain data for several midi channels, but in this case, it is unclear which if a channel addressed in one track is the same as the same channel adressed in another track. To make things simple, MidiSwing assumes that a track corresponds to a channel and vice-versa. You can therefore consider that within MidiSwing tracks and channels are almost the same thing. when you create a track, it is automatically associated to the first unused channel found by MidiSwing. Conversely, when you select a channel, you also select the corresponding track.
Oh, one last point: the first track of a SMF1 file is in general reserved for tempo and rythm data. You can put other kind of data there if you really want to, but it is not recommended. In MidiSwing, the first track is named Tempo Track, and the others Track 1, Track 2, etc... but you can change these names by using the command Rename Current Track in the menu Track.
How to listen to an existing midi file?
Very simple: open it from the menu Open. If everything goes well, the content of the file will display in the form of a “player piano roll”. Then, click on the play button. Note that a green vertical line (the scrub) moves to indicate the position in the tune. The default tool is the “play” tool. With this tool, you can click anywhere on the piano roll, and the scrub will position right there. You can then start playing from that point. Note that you can use the space bar as a shortcut to start and stop the music. With the other tools you can move the scrub only by clicking on the ruler at the top of the piano roll.

Altering the sounds
It is possible to enable or disable the tracks/channels. To do so, click on the coloured button corresponding to that track/channel. Only the enabled tracks/channels will be played and displayed on the screen. Note that channel 10 is special: it is (by convention) the drum channel.

By default on Macintosh, the sounds are generated by the QuickTime Instruments. The default sound generator on other systems is the Java Sound Synthesizer. You can choose the sound output using the Output menu: QuickTime Instruments, Java Sound Synthesizer, or any other midi device able to generate sounds and connected to your computer (in principle, it should be displayed in the menu Output (or at least the output port of the midi interface to wich it is connected). Your selection will apply to all the tracks (all the channels).
You can also choose a sound bank/external device for each track individually. To do so, select one track (selecting a track is done by either using the scrolling menu with the track names or by clicking below one of the coloured buttons corresponding to the channels). Then choose the output you want to use in the scrolling menu below the name of the track. This menu is similar to the Output menu. On the Macintosh, this menu contains all the sound banks (.SF2 ou .DLS) found in the directory:
~/Library/Audio/Sounds/BanksNote that the path to the chosen output will be memorized in the midi file, so that the output will be selected automatically when you re-open the file. However, if you move or change the name of one of these outputs, you'll have to apply it again to the track.
Playing a selection, and looping back
If a part of the tune is selected, MidiSwing will play only that selected part. To create a selection, use the editing tool (arrow), then click somewhere on the piano roll where you want the selection to start; while keeping the mouse button pressed, drag the mouse to the point where you want the selection to end (a shaded box appears), then release the button. A shaded area indicated the selected part; now, MidiSwing will only play this part. You can adjust the beginning and the end of the selection by clicking and dragging the vertical bars at the edges of the selection. To remove the selection, just click anywhere on the background of the piano roll.
It is also possible to loop over the selection. To do this, select the loop button in the control panel

Changing the tempo
The tempo, ie how fast the tune is played, is indicated below the control panel. You can adjust its value using the slider below the control panel.

You can change the tempo in real time, as the music is played. However, the tempo is modified while you hold the mouse over the tempo slider; when you release the mouse button, the tempo returns to its normal value. To maintain the tempo to a new value, press the ALT key while you are releasing the mouse button. To come back to the normal tempo, click the slider again and release it. Note that this modification only affects the playing, it does not modify the tempo in the midi file. If you really want to alter the tempo in the midi file, click on the button next to the tempo value. This will fix the tempo to this value, starting from the point where the scrub is located. For more control of the tempo over time, use the tempo panel (see below editing other data)
How to record?
You have a midi instrument, for instance a digital piano, and you wish to record in MidiSwing the notes you play on your instrument. You should be able to see your instrument in the Input menu (or the input port of the interface to which it is connected). Select your instrument in the Input menu. If it works, the keys of the MidiSwing keyboard should highlight when you play a note on your external instrument, and the corresponding should be heard on the output you've chosen (QuickTime Instruments, Java Sound Synthesizer, or any other output).
Note: If your output device is also you input device, there is a risk that two sounds are produced simultaneously when you play a note: the sound usually produced by your instrument when you play a note, and the sound coming from MidiSwing asking to play that same note. To avoid such as situation, MidiSwing sends a midi signal to the midi device not generate sound locally when the user hits the keys. Unfortunately, this signal is not recognised by all instruments (not mine anyway!).
Once you've made sure that your instrument sends data to MidiSwing when you play, select a track/channel. By default when you launch MidiSwing, the track associated to channel 1 is selected. Click on the record button (red dot), then when you are ready to play, click on the play button (or press the space bar). The recording starts in the track you selected. To stop the recording, click on the stop button, or press the space bar. Note that the record mode is deactivated automatically..

You can also make a step by step recording. To achieve this, click on the record button, position the scrub where you wish to insert notes. Play the notes on your external instrument. By default notes of standard length are inserted. Move the scrub to insert notes at other places.
How to edit or create music?
Editing the notes
The notes in the midi file are displayed in the form of a piano roll. The horizontal axis corresponds to time, and the vertical axis corresponds to the note pitch (note that you can adjust the scale of both axes by use of the sliders on the sides of the roll). Every note is represented by a little rectangle. You can edit notes by interacting with these rectangles.

There are 3 modes in MidiSwing, corresponding respectively to the 3 following buttons:
The playing mode (speaker), the editing mode (arrow) and the inserting mode (pen) :
- The playing mode is the default mode and doesn't let you do anything but position the scrub and play the music..
- The editing mode lets you select one or several notes, move them, change their intensity (velocity) or their duration:
- Move the notes by clicking right in the middle of one of them
- Change their intensity by clicking on the left side of one of them and dragging upwards or downwards. Note that their opacity changes as a function of their intensity.
- Change their duration by clicking on the right side and drag to the left or right.
- The inserting mode lets you add new notes on the piano roll by clicking at the desired location. In this mode, you can also use the keys of the MidiSwing keyboard to insert notes.
Note 2: by double-clicking a note, you invoke a dialog box letting you modify the properties of the note, such as its intensity or the text (lyrics) associated to it.
Editing other musical data
Your tune doesn't consist of only a sequence of notes. You can also specify other musical data, like the instrument to use to play these notes, the sound volume of that instrument, etc. These data are displayed in the panel located under the piano roll. By default this panel displays a keyboard, but using the scrolling menu on the left of the tool buttons (shortcut : Command-Arrow Up/Down), you can display other “controllers”. In version 0.3.3b the available controllers are:
- Keyboard
- Instruments
- Volume
- Pitch bend
- Pan Position
- Reverberation
- Hold Pedal
- Tempo
- Time Signature
Selecting and editing instruments
Select the Instrument controller. You can create a new selection of instrument (“program change”) with the inserting tool (pen): a scrolling menu appears, letting you choose one from the 128 General Midi Instruments. The selection of this instrument will apply only for the currently selected channel. You can insert other selections of instruments at later times for the same channel: the sound will change when the scrub will go through these new selections. To adjust the beginning of a selection, use the editing tool, click on the left edge and drag it. To change the instrument of a selection, click on the name of the instrument: the scrolling menu appears, letting you choose a new instrument. To suppress a selection of instrument, click also on the name and choose Delete in the menu.
Editing other kinds of data
The other data are generally numerical quantity varying as a function of time. They are represented by curves or graphs that you can create and edit by drawing lines with the inserting tool (pen).
How to add lyrics / Karaoké
You can add lyrics to your tune. To do that, you can import a text file containing the lyrics, via the menu Import lyrics.... The text to imported must conform to the STF format in order to be understood. MidiSwing then asks you which track you wish to apply these lyrics to. The track that you choose is supposed to correspond to the voice melody. The syllables are therefore displayed above each note of the melody track. It is possible that the number of syllables does not match the number of notes in the track. Check that your notes and lyrics are consistent. MidiSwing tells you if they do not match.
You can also edit the lyrics directly by hand: by double-clicking each note, you open a dialog box where you can add or modify the text of the note.

Note that as soon as you add lyrics, MidiSwing adds two new tracks: Words and Soft Karaoke, to conform to the format .kar (karaoké midi files). You can then save your file with the extension .kar and it will be readable by most of Karaoké Midi Player which display lyrics in real time along with the music. Note that the Midi format or .kar doesn't associate the lyrics to the notes. So when you close and re-open your midi file in MidiSwing, MidiSwing will notice the lyrics and ask you to associate them to a melody track again.
Useful shortcuts
- Space bar : plays or stops the music
- Command Key (Apple on the Mac) : switches between the editing tool (arrow) and the inserting tool (pen) (and conversely) as long as the key is being pressed
- T : lets you select the next tool/mode (playing -> editing -> inserting)
- Arrow Up/Bottom/Left/Right : moves the selected notes
- Command + Up Arrow : select the previous controller
- Command + Bottom Arrow : select the next controller
- Command + Left Arrow : select the previous track/channel
- Command + Right Arrow : select the next track/channel
- SHIFT : adds to the selection when you're selecting notes
- ALT : removes from the selection when you're selecting notes (with the editing tool)
- ALT : duplicate the current selection (with the inserting tool)
- ALT : rescales the selected notes when the selection area is stretched - note that the area becomes pink
- ALT : maintains tempo when the tempo slider is moved (otherwise, it comes back to its original position when the mouse button is released)
- H : hides/grey out other tracks
Menu References
MidiSwing Menu
Mac OS X onlyAbout MidiSwing
Quit MidiSwing
File Menu
New SMF0
Opens a new midi file having the SMF0 format.New SMF1 (Command-N)
Opens a new midi file having the SMF1 format.Open (Command-O)
Opens a midi file. By default, MidiSwing only display files whose extension is .mid or .karOpen in new window
Opens a midi file in a new windowClose (Command-W)
Closes the current documentSave (Command-S)
Saves the current documentSave as
Saves the current document as a new name. Think about giving the extension .mid or .kar so that it can be recognised by MidiSwing.Convert to SMF0
Convert to SMF1
These two commands lets you convert a type 0 file to a type 1 file and conversely. When converting from SMF0 -> SMF1, the various channels are distributed over as many tracks. When converting from SMF1 -> SMF0, the tracks are merged into a single one.Edit Menu
Undo (Command-Z)
Undoes the previous action(s). This command may not undo exactly what you expect. For example, if you have added several notes (without moving them), the undo command will remove them all (and not just the last one). There is no multi-level cancellation, sorry!Cut (Command-X)
Cuts the selected notesCopy (Command-C)
Copies the selected notesPaste (Command-V)
Pastes the copied notes (and data if the option Attach data to notes was enabled)Delete (Delete Key)
Deletes the selected notes.Select All
Select all notes in every track, or only the current track if the option Grey out other tracks has been checked in the Options menu.Unselect All
As it says.Quantize notes
This command sets the beginning of each note to a beat of the music. The precision to which they are shifted (beats, half-beats, fourth-beats, etc) depends on the level of zoom in the piano roll.Options Menu
Animate piano-roll
Lets you activate or deactivate the motion of the green scrub, as the tune is being played.Animate keyboard
Lets you activate or deactivate the highlighting of the keys when a tune is being played.Attach data to notes
When this option is activated, data about the hold pedal, volume, stereo, pitchbend and reverberation follow the notes when they are moved or copied/pasted. When the option is deactivated, the data are not affected by the editing of the notes.Look for updates
This command tells you whether you have the latest MidiSwing version (which requires to be connected to the Internet, obviously).Send a comment...
You are using MidiSwing, and you find a bug, think a nice and useful feature not yet implemented, or anything else? Don't bother to look for your e-mail client, or even your browser: use directly this command in MidiSwing, and a dialog box will let you send me a message (and yes, I am a real person who tries to reply to messages, not a computer-generated virtual transdimensional figment of your cyber-imagination (... or am I?)).Track Menu
Add Track
For SMF1 files only: adds a track to the tuneDelete current Track
For SMF1 files only: deletes the currently selected trackRename current Track
Let's you rename the currently selected trackImport lyrics...
Lets you import lyrics from a text file. The text should be formatted according to the STF format.Grey out other tracks
For SMF1 files only: when this option is activated, all the other tracks than the current track are greyed out and no more editable. You can still change the current track, but only one track at a time wil be editable. When the option is deactivated, all tracks appear with their colours, and can be edited at the same time (for instance, notes from different tracks can be selected).Output Menu
This menu depends on your midi configuration. When MidiSwing is launched, it puts in this menu the list of all software synthesizers and external midi devices connected to your computer, and which may render your tune. You can choose which one will play your tune. In this list two elements are always present:Java Sound Synthesizer
This is the standard Java Synthesizer - either the one installed on your system, or the one included in MidiSwing.QuickTime Musical Instruments
Mac OS X only: these are the musical instruments by default on Mac OS X. The audio system on Mac OS X lets you also use SF2 and DLS sound banks. These banks are automatically looked for in your directory~/Library/Audio/Sounds/Banks
![[fr]](images/fr.jpg)
![[en]](images/en.jpg)