File: smfsh-ref.sgml

package info (click to toggle)
libsmf 1.3-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,580 kB
  • sloc: sh: 9,820; ansic: 3,262; makefile: 17
file content (219 lines) | stat: -rw-r--r-- 5,980 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry>
	<refmeta>
		<refentrytitle>
			<application>smfsh</application>
		</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo>smfsh 1.3</refmiscinfo>
	</refmeta>
	<refnamediv>
		<refname>
			<application>smfsh</application>
		</refname>
		<refpurpose>
			SMF shell
		</refpurpose>
	</refnamediv>
	<refsynopsisdiv>
		<cmdsynopsis>
			<command>smfsh</command>
			<arg><option>-V</option></arg>
			<arg><replaceable class="parameter">file</replaceable></arg>
		</cmdsynopsis>
	</refsynopsisdiv>
	<refsect1>
		<title>OPTIONS</title>
		<variablelist>
			<varlistentry>
				<term>-V</term>
				<listitem>
					<para>
						Print libsmf version and exit.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term><replaceable>file</replaceable></term>
				<listitem>
					<para>
						Load the file.
					</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsect1>
	<refsect1>
		<title>DESCRIPTION</title>
		<para>
			<command>smfsh</command>, an "SMF shell", is an interactive, command-driven frontend
			to libsmf, useful for modifying MIDI files by hand.  It started its life as a debugging aid
			for libsmf.
		</para>
		<para>
			There are four groups of commands: SMF level, track level, event level, and others.
		</para>
	</refsect1>

	<refsect1>
		<title>SMF LEVEL COMMANDS</title>
		<para>
		SMF level commands display or change properties of smf (i.e. the MIDI file) as a whole.
		</para>
		<variablelist>
			<varlistentry>
				<term>save <replaceable class="parameter">file</replaceable></term>
				<listitem>
					<para>
						Save a file.  If the <replaceable class="parameter">file</replaceable>
						name is not given, the last file name is used.
					</para>
					<para>
						Note that this will not ask for confirmation.
					</para>
				</listitem>
			</varlistentry>
						
			<varlistentry>
				<term>load <replaceable class="parameter">file</replaceable></term>
				<listitem>
					<para>
						Load a file.  If the <replaceable class="parameter">file</replaceable>
						name is not given, the last file name is used.
					</para>
					<para>
						Instead of using "load", you can pass the file name on the command line.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>ppqn <replaceable class="parameter">new-ppqn</replaceable></term>
				<listitem>
					<para>
						Show (if used without parameter) or change PPQN (Pulses Per Quarter Note, aka Division).
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>format <replaceable class="parameter">new-format</replaceable></term>
				<listitem>
					<para>
						Show (if used without parameter) or change format.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>tempo</term>
				<listitem>
					<para>
						Show tempo map.  Tempo map is computed automatically from the SMF contents - to modify
						a tempo, just add a Tempo Change event using "add" command.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>length</term>
				<listitem>
					<para>
						Show total length of the song.  Just like the tempo map, file length is computed
						from the SMF contents.
					</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsect1>

	<refsect1>
		<title>TRACK LEVEL COMMANDS</title>
		<para>
			Track level commands display or change properties of tracks.  SMF may contain one or more tracks.
		</para>
		<variablelist>
			<varlistentry>
				<term>tracks</term>
				<listitem>
					<para>
						Show the list of tracks in the SMF.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>track <replaceable class="parameter">track-number</replaceable></term>
				<listitem>
					<para>
						Show details of a track (if called without parameter), or select track
						with a given number - for example in order to display ("events") the events it contains.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>trackadd</term>
				<listitem>
					<para>
						Create new track.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>trackrm <replaceable class="parameter">track-number</replaceable></term>
				<listitem>
					<para>
						Remove the track.  If the track number is not given, this will remove the track currently selected.
					</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsect1>

	<refsect1>
		<title>EVENT LEVEL COMMANDS</title>
		<para>
			Event level commands display or change properties of events.  Events are grouped into tracks.
			Track may contain any number of events, including zero.
		</para>
		<variablelist>
			<varlistentry>
				<term>events</term>
				<listitem>
					<para>
						Show the list of events in the current track.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>event <replaceable class="parameter">event-number</replaceable></term>
				<listitem>
					<para>
						Show information about a current event (if used without parameter)
						or select the event.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>add <replaceable class="parameter">time-in-seconds</replaceable> <replaceable class="parameter">midi-message-as-hex</replaceable></term>
				<listitem>
					<para>
						Add new event to the currently selected track.
					</para>
				</listitem>
			</varlistentry>
			<varlistentry>
				<term>rm <replaceable class="parameter">event-number</replaceable></term>
				<listitem>
					<para>
						Remove the event.  If the event number is not given, this will remove the event currently selected.
					</para>
				</listitem>
			</varlistentry>
		</variablelist>
	</refsect1>

	<refsect1>
		<title>OTHER COMMANDS</title>
		<para>
			There are three commands in the "other" category - "help", "version",
			and "exit".  Their meaning should be self expanatory.
		</para>
	</refsect1>
</refentry>