xmuseq - MIDI Sequencer
[Source Code]
Introduction
xmuseq is a full functional MIDI editor/sequencer
which uses the UNIX Sound System device drivers. It uses the Yamaha
FM synthesizer interface to output music. It can also send sequences to
an external synthesizer via the MIDI port.
xmuseq provides simple point-and-click operations for MIDI editing.
Following is a description of the mouse button functions:
- left button - Add events to the staff
- right button - Delete events from the staff
- middle button - Shows event info. Step Button has been pressed, clicking
the middle button on a Note Event will sound the note. To quit Step Mode,
press Stop
File Menu
- New - Create a blank staff and initialize parameters.
- Open - Open MIDI files. The directory set to current directory.
You may change this in the app-defaults file AWSEQ by changing the line
Open*dirMask: to point to where you store MIDI files. Currently this value
is set to /tmp
- Save - Save MIDI files. You may change the save directory by
changing the line Save*dirMask: to point to the directory you want to save
file. Currently this value is set to /tmp/
- Quit - Quit program
Edit Menu
- Undo - Undo previous deletes and cuts. Events are pasted back
to their original locations.
- Clear - Clears all the events from the staff.
- Copy - Copy events from the staff. When you select the Copy
option from the Edit menu, you must hold the left mouse button down and
drag it to create a "copy" region. The “copy” region is described
by a rectangle drawn with dash lines. Dragging the mouse around increases
or decreases the “Copy” region. Releasing the mouse, copies the notes to
an internal clipboard.
- Cut - Cuts events from staff. To “cut” events from the staff,
press the Edit menu button and select Cut from the menu. Note that the
Mode indicator changes to “Cut”. You must hold the left mouse button down
and drag it to create a "cut" region. This region is described
by a rectangle drawn with dash lines. Dragging the mouse around increases
or decreases the “Cut” region. Releasing the mouse deletes the notes from
the region and copies the notes to an internal clipboard.
- Paste - Paste notes from the internal clipboard to a specified
location. Select the Paste option from the Edit menu button. A popup panel
appears in which you must enter the location to paste the events. The location
has the format "xxx:yyy" where xxx is the time index and yyy
is the offset. yyy must always be less than the current Time Base.
- Refresh - Refresh the screen.
Window Menu
- Tracks - This provides access to tracks.
When MIDI files are "Opened", the track information is stored
here. Toggling on the track button will post events to the staff. If you
are creating a new MIDI file, the toggling on a track will let you automatically
enter all notes on that track. Toggling off the button will delete all
the events on that track.
- Channels - This provides access to
the MIDI channels. When MIDI files are "Opened", the instrument
information is store here. Toggling the Channel button will post all notes
on a particular channel to the staff. This is useful when several tracks
use the same channel and you want to edit all notes on a channel. If you
are creating a new file, then toggling on a channel will cause all notes
to be entered on that channel. Toggling off the button will delete all
notes on that channel.
- Faders - This provides access to the
volume and pan characteristics of each channel. Setting volume on a particular
channel causes the notes on that channel to have a default setting. Setting
the pan positions, causes the channels to sound notes on left, middle or
right output channels. FM synthesizer only provides 3 pan positions. Hence
all control change parameters for controller 10 must be 0-45 left, 46-90
middle, 91-127 right.
- Event List - This window shows the
MIDI events in text format. They are listed with the MIDI values in decimal
format. Each event is color coded with the graphic colors.
Note Menu
- This menu displays the note length to enter on the staff. The notes
go from 32nd to Full Sharp. The length of the note will depend on the current
Time Base.
Events Menu
Note: All events are entered on the current track number. To change
track numbers you must select a different track from the Track Window.
- NoteOn - Enter a Note On event. Enter Notes based on current
Note, current Channel, current track, current Volume. It is assumed that
there is going to be a Note-Off event after the duration of the note.
- Pressure - Enter a Key Pressure (after touch) Event. After entering
the event using the Left mouse button, you may fill in the values by pressing
the Middle mouse button. After touch requires a velocity value ranging
from 0-127.
- Controller - Enter a Controller Event. After entering the event
using the Left mouse button, you may fill in the values by pressing the
Middle mouse button. Controller events require a controller number and
a value from 0-127.
- Pitch Bend - Enter a Pitch Bend Event. After entering the event
using the Left mouse button, you may fill in the values by pressing the
Middle mouse button. Pitch Bend events require a value for the 7bit LSB
and the 7bit MSB.
- Program - Enter a Program Change Event. To enter a Program Change
event and set a channel first make sure that you are in the Insert Mode
(press the Stop button to get out of any other mode). Next, select program
from the Events Menu. Then click the left mouse button to enter the event
on the staff. Now press the middle mouse button to pop up the Event Information.
Press the Patches button to get a list of Patches or enter the patch number.
Press the OK button. This will set the instrument on that channel. If you
wish to load custom patches make sure that you have a "sbi.def"
file in the current directory. Press the Load button the load new patches.
The format for "sbi.def" is :
<patch #> <patch name> <patch file>
example:
10 WierdSound /u/demo/wierd.sbi
12 Marimba2 /tmp/marimba2.sbi
- ChanPressure - Enter a Channel Pressure(after touch for channel)
Event. After entering the event using the Left mouse button, you may fill
in the values by pressing the Middle mouse button. Channel Pressure events
requires a velocity parameter ranging from 0 to 127.
- SysEx - Enter System Exclusive Messages. You have to enter the
length and the message bytes manually. · Digital Audio - Enter digital
audio trigger event. After entering the event using the Left mouse button,
you may fill in the values by pressing the Middle mouse button. You must
specify the digital audio file path name.
Track Menu
- Quantize Track - Quantize Tracks based on a quantization value
and a quantization method. This menu option displays a panel consisting
of:
- Unaffected: The note length is unaffected but the start times
are aligned to the quantization value.
- Aligned: The note length is quantized and the start time is
aligned to the quantization value.
- Equal: The note length is quantized but the start time is unaffected.
·
- Track: Specifies the track number to quantize. If All Tracks
is toggled on, all tracks are quantized.
- Unit: The Quantization value. The unit must always be less than
the current Division.
- Division: The Time Base of the MIDI file.
- Filter Events - Filter events from the track. Toggling "on"
events will delete events from the staff. You may delete events from a
track or all tracks.
- Move Track - Moves all events on a track to a specified location.
Format for time is xxx:yyy.
- Change Volume - Changes the volume of all Note On events on
a track or all tracks.
- Change Channel - Change the channel number of all events on
a track.
- Key Transpose - Transpose all notes by specified number of semitones.
Select the semitone by pressing the arrow buttons. Transpose affects a
selected track or all tracks.
- Oct Transpose - Transpose all notes by specifed number of octaves.
Select the octave by pressing arrow buttons. The default is 5 which is
the center of the MIDI octave range.
Devices Menu
- FM_PORT - MIDI bytes are written to the FM port; Sound is heard
on the FM synthesizer.
- MIDI_PORT - MIDI bytes are written to the MIDI port. Sound is
heard on an external synthesizer attached to the MIDI port. If you have
the Wave Table daughter card, then sound is played through the Wave Table
Synthesizer. Note that WAV events cannot be heard when MIDI_PORT is selected
since the Digital Audio and MIDI share the DSP.
Buttons
- Record - Record MIDI events using the MIDI-In port on the soundcard.
Before recording MIDI events, you must set a Track in the Track window.
Use the Track Window or Channel Window to post notes on the staff.
- Rewind - Rewind MIDI notes currently posted on the staff. The
cursor and the time window are updated to reflect the current position.
- Play - Play all notes on the staff.
- Forward - Fast forward events on the staff. The cursor and the
time window are updated to reflect the current position in the MIDI file.
- Stop - Stop playing the MIDI events. If the Step mode is turned
on, pressing Stop will turn off the Step mode.
- Repeat - Rewinds the song to the start.
- Step - When you press the Step Button, pressing the middle mouse
button on a note will sound the note on a channel. (You must enter a Program
Change event before you can hear any thing. Please refer to the section
on Program Change Events above).
Other Controls
- Tempo: Sets the tempo of the song. Sliding it right will make
the song go faster.
- Time Base: Sets the time base of each measure. If the Time Base
is 120 then the cursor positions are tracked from 0 to 120 in each measure.
Look at the Time display to get the position of the cursor.
- Digital Counter: Tracks the song position only when it is playing
fast-forwarding or rewinding.
- Scroll Staff: Enables automatic scrolling of the staff window
when the song is playing. On slower machines, this may cause delays in
the song due to redrawing the screen.
- Scroll Event: Enables automatic scrolling of the event window
when the song is playing. On slower machines, this may cause delays in
the song due to redrawing the screen.
- Volume: Controls the total volume of the song.
Merging two or more MIDI files
Open a MIDI file and post all notes to the staff. Open a second MIDI
file and post all notes to the staff. Then play the notes on the staff.
A Typical MIDI editing Session
1. run xmuseq from an x-term window.
2. Click on the File menu and select Open
3. Select a MIDI file (with a “.mid” extension) and press OK
4. Click on the Window menu and select Tracks
5. From the Tracks window, press any/all Track toggle buttons which
have an valid channel.
6. Now you are ready to edit!
7. To save the the file, click on the File menu and select Save.
8. Enter the name of the file and press OK.