.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SMFSH" "1" "21 March 2010" "smfsh 1.3" "" .SH NAME smfsh \- SMF shell .SH SYNOPSIS \fBsmfsh\fR [ \fB-V\fR ] [ \fB\fIfile\fB\fR ] .SH "OPTIONS" .TP \fB-V\fR Print libsmf version and exit. .TP \fB\fIfile\fB\fR Load the file. .SH "DESCRIPTION" .PP \fBsmfsh\fR, 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. .PP There are four groups of commands: SMF level, track level, event level, and others. .SH "SMF LEVEL COMMANDS" .PP SMF level commands display or change properties of smf (i.e. the MIDI file) as a whole. .TP \fBsave \fIfile\fB\fR Save a file. If the \fIfile\fR name is not given, the last file name is used. Note that this will not ask for confirmation. .TP \fBload \fIfile\fB\fR Load a file. If the \fIfile\fR name is not given, the last file name is used. Instead of using "load", you can pass the file name on the command line. .TP \fBppqn \fInew-ppqn\fB\fR Show (if used without parameter) or change PPQN (Pulses Per Quarter Note, aka Division). .TP \fBformat \fInew-format\fB\fR Show (if used without parameter) or change format. .TP \fBtempo\fR 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. .TP \fBlength\fR Show total length of the song. Just like the tempo map, file length is computed from the SMF contents. .SH "TRACK LEVEL COMMANDS" .PP Track level commands display or change properties of tracks. SMF may contain one or more tracks. .TP \fBtracks\fR Show the list of tracks in the SMF. .TP \fBtrack \fItrack-number\fB\fR 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. .TP \fBtrackadd\fR Create new track. .TP \fBtrackrm \fItrack-number\fB\fR Remove the track. If the track number is not given, this will remove the track currently selected. .SH "EVENT LEVEL COMMANDS" .PP Event level commands display or change properties of events. Events are grouped into tracks. Track may contain any number of events, including zero. .TP \fBevents\fR Show the list of events in the current track. .TP \fBevent \fIevent-number\fB\fR Show information about a current event (if used without parameter) or select the event. .TP \fBadd \fItime-in-seconds\fB \fImidi-message-as-hex\fB\fR Add new event to the currently selected track. .TP \fBrm \fIevent-number\fB\fR Remove the event. If the event number is not given, this will remove the event currently selected. .SH "OTHER COMMANDS" .PP There are three commands in the "other" category - "help", "version", and "exit". Their meaning should be self expanatory.