1 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook V4.1//EN">
5 <application>smfsh
</application>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo>smfsh
1.2</refmiscinfo>
12 <application>smfsh
</application>
20 <command>smfsh
</command>
21 <arg><option>-V
</option></arg>
22 <arg><replaceable class=
"parameter">file
</replaceable></arg>
26 <title>OPTIONS
</title>
32 Print libsmf version and exit.
37 <term><replaceable>file
</replaceable></term>
47 <title>DESCRIPTION
</title>
49 <command>smfsh
</command>, an
"SMF shell", is an interactive, command-driven frontend
50 to libsmf, useful for modifying MIDI files by hand. It started its life as a debugging aid
54 There are four groups of commands: SMF level, track level, event level, and others.
59 <title>SMF LEVEL COMMANDS
</title>
61 SMF level commands display or change properties of smf (i.e. the MIDI file) as a whole.
65 <term>save
<replaceable class=
"parameter">file
</replaceable></term>
68 Save a file. If the
<replaceable class=
"parameter">file
</replaceable>
69 name is not given, the last file name is used.
72 Note that this will not ask for confirmation.
78 <term>load
<replaceable class=
"parameter">file
</replaceable></term>
81 Load a file. If the
<replaceable class=
"parameter">file
</replaceable>
82 name is not given, the last file name is used.
85 Instead of using
"load", you can pass the file name on the command line.
90 <term>ppqn
<replaceable class=
"parameter">new-ppqn
</replaceable></term>
93 Show (if used without parameter) or change PPQN (Pulses Per Quarter Note, aka Division).
98 <term>format
<replaceable class=
"parameter">new-format
</replaceable></term>
101 Show (if used without parameter) or change format.
109 Show tempo map. Tempo map is computed automatically from the SMF contents - to modify
110 a tempo, just add a Tempo Change event using
"add" command.
118 Show total length of the song. Just like the tempo map, file length is computed
119 from the SMF contents.
127 <title>TRACK LEVEL COMMANDS
</title>
129 Track level commands display or change properties of tracks. SMF may contain one or more tracks.
136 Show the list of tracks in the SMF.
141 <term>track
<replaceable class=
"parameter">track-number
</replaceable></term>
144 Show details of a track (if called without parameter), or select track
145 with a given number - for example in order to display (
"events") the events it contains.
150 <term>trackadd
</term>
158 <term>trackrm
<replaceable class=
"parameter">track-number
</replaceable></term>
161 Remove the track. If the track number is not given, this will remove the track currently selected.
169 <title>EVENT LEVEL COMMANDS
</title>
171 Event level commands display or change properties of events. Events are grouped into tracks.
172 Track may contain any number of events, including zero.
179 Show the list of events in the current track.
184 <term>event
<replaceable class=
"parameter">event-number
</replaceable></term>
187 Show information about a current event (if used without parameter)
193 <term>add
<replaceable class=
"parameter">time-in-seconds
</replaceable> <replaceable class=
"parameter">midi-message-as-hex
</replaceable></term>
196 Add new event to the currently selected track.
201 <term>rm
<replaceable class=
"parameter">event-number
</replaceable></term>
204 Remove the event. If the event number is not given, this will remove the event currently selected.
212 <title>OTHER COMMANDS
</title>
214 There are three commands in the
"other" category -
"help",
"version",
215 and
"exit". Their meaning should be self expanatory.