Restructure help

* Allow actions (dump, render*, upgrade) without minuses
* Restructure help in CLI
* Restructure help in man pages
This commit is contained in:
Johannes Lorenz
2018-08-29 19:35:06 +02:00
committed by Johannes Lorenz
parent f37ca49e6d
commit a5a13b1256
2 changed files with 109 additions and 158 deletions

View File

@@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH LMMS 1 "June 15, 2017"
.TH LMMS 1 "September 10, 2018"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -19,125 +19,83 @@
lmms \- software for easy music production
.SH SYNOPSIS
.B lmms
.RB "[ \--\fBallowroot\fP ]"
.RB "[\fBglobal options...\fP] [\fBaction\fP [\fBaction parameters\fP...]]
.br
.B lmms
.RB "[ \--\fBbitrate\fP \fIbitrate\fP ]"
.br
.B lmms
.RB "[ \--\fBconfig\fP \fIconfigfile\fP ]"
.br
.B lmms
.RB "[ \--\fBdump\fP \fIin\fP ]"
.br
.B lmms
.RB "[ \--\fBfloat\fP ]"
.br
.B lmms
.RB "[ \--\fBformat\fP \fIformat\fP ]"
.br
.B lmms
.RB "[ \--\fBgeometry\fP \fIgeometry\fP ]"
.br
.B lmms
.RB "[ \--\fBhelp\fP ]"
.br
.B lmms
.RB "[ \--\interpolation\fP \fImethod\fP ]"
.br
.B lmms
.RB "[ \--\fBimport\fP \fIin\fP [ \-e ] ]"
.br
.B lmms
.RB "[ \--\fBloop\fP ]"
.br
.B lmms
.RB "[ \--\fBmode\fP \fIstereomode\fP ]"
.br
.B lmms
.RB "[ \--\fBoutput\fP \fIpath\fP ]"
.br
.B lmms
.RB "[ \--\fBoversampling\fP \fIvalue\fP ]"
.br
.B lmms
.RB "[ \--\fBprofile\fP \fIout\fP ]"
.br
.B lmms
.RB "[ \--\fBrender\fP \fIfile\fP ] [options]"
.br
.B lmms
.RB "[ \--\fBsamplerate\fP \fIsamplerate\fP ]"
.br
.B lmms
.RB "[ \--\fBupgrade\fP \fIin\fP \fIout\fP ]"
.br
.B lmms
.RB "[ \--\fBversion\fP ]"
.br
.B lmms
.RI "[ file ]"
.SH DESCRIPTION
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.B LMMS
LMMS is a free cross-platform alternative to commercial programs like FL Studio®, which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.
is a free cross-platform alternative to commercial programs like FL Studio®, which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.
LMMS features components such as a Song Editor, a Beat+Bassline Editor, a Piano Roll, an FX Mixer as well as many powerful instruments and effects.
.SH OPTIONS
.IP "\fB\-a, --float\fP
32bit float bit depth
.IP "\fB\-b, --bitrate\fP \fIbitrate\fP
Specify output bitrate in KBit/s (for OGG encoding only), default is 160
.SH ACTIONS
.IP "<no action> [\fIoptions\fP...] [\fIproject\fP]
Start LMMS in normal GUI mode.
.IP "\fBdump\fP \fIin\fP
Dump XML of compressed (MMPZ) file \fIin\fP.
.IP "\fBrender\fP \fIproject\fP [\fIoptions\fP...]
Render given project file.
.IP "\fBrendertracks\fP \fIproject\fP [\fIoptions\fP...]
Render each track to a different file.
.IP "\fBupgrade\fP \fIin\fP [\fIout\fP]
Upgrade file \fIin\fP and save as \fIout\fP. Standard out is used if no output file is specifed.
.SH GLOBAL OPTIONS
.IP "\fB\ --allowroot
Bypass root user startup check (use with caution).
.IP "\fB\-c, --config\fP \fIconfigfile\fP
Get the configuration from \fIconfigfile\fP instead of ~/.lmmsrc.xml (default)
.IP "\fB\-d, --dump\fP \fIin\fP
Dump XML of compressed file \fIin\fP (i.e. MMPZ-file)
.IP "\fB\-f, --format\fP \fIformat\fP
Specify format of render-output where \fIformat\fP is either 'wav', 'ogg' or 'mp3'.
.IP "\fB\ --geometry\fP \fIgeometry\fP
Specify the prefered size and position of the main window
.br
\fIgeometry\fP syntax is <\fIxsize\fPx\fIysize\fP+\fIxoffset\fP+\fIyoffset\fP>.
.br
Default: full screen
Get the configuration from \fIconfigfile\fP instead of ~/.lmmsrc.xml (default).
.IP "\fB\-h, --help\fP
Show usage information and exit.
.IP "\fB\-i, --interpolation\fP \fImethod\fP
Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP
.IP "\fB\ --import\fP \fIin\fP \fB\-e\fP
Import MIDI file \fIin\fP
.IP "\fB\-v, --version
Show version information and exit.
.SH OPTIONS IF NO ACTION IS GIVEN
.IP "\fB\ --geometry\fP \fIgeometry\fP
Specify the prefered size and position of the main window.
.br
\fIgeometry\fP syntax is \fIxsize\fPx\fIysize\fP+\fIxoffset\fP+\fIyoffset\fP.
.br
Default: full screen.
.IP "\fB\ --import\fP \fIin\fP \fB\-e\fP
Import MIDI or Hydrogen file \fIin\fP.
.br
.SH OPTIONS FOR RENDER AND RENDERTRACKS
.IP "\fB\-a, --float\fP
Use 32bit float bit depth.
.IP "\fB\-b, --bitrate\fP \fIbitrate\fP
Specify output bitrate in KBit/s (for OGG encoding only), default is 160.
.IP "\fB\-f, --format\fP \fIformat\fP
Specify format of render-output where \fIformat\fP is either 'wav', 'ogg' or 'mp3'.
.IP "\fB\-i, --interpolation\fP \fImethod\fP
Specify interpolation method - possible values are \fIlinear\fP, \fIsincfastest\fP (default), \fIsincmedium\fP, \fIsincbest\fP.
If -e is specified lmms exits after importing the file.
.IP "\fB\-l, --loop
Render the given file as a loop, i.e. stop rendering at exactly the end of the song. Additional silence or reverb tails at the end of the song are not rendered.
.IP "\fB\-m, --mode\fP \fIstereomode\fP
Set the stereo mode used for the MP3 export. \fIstereomode\fP can be either 's' (stereo mode), 'j' (joint stereo) or 'm' (mono). If no mode is given 'j' is used as the default.
.IP "\fB\-o, --output\fP \fIpath\fP
Render into \fIpath\fP
Render into \fIpath\fP.
.br
For --render, this is interpreted as a file path.
.br
For --render-tracks, this is interpreted as a path to an existing directory.
IP "\fB\-p, --profile\fP \fIout\fP
Dump profiling information to file \fIout\fP
.IP "\fB\-r, --render\fP \fIproject-file\fP
Render given file to either a wav\- or ogg\-file. See \fB\-f\fP for details
.IP "\fB\-r, --rendertracks\fP \fIproject-file\fP
Render each track into a separate wav\- or ogg\-file. See \fB\-f\fP for details
.IP "\fB\-p, --profile\fP \fIout\fP
Dump profiling information to file \fIout\fP.
.IP "\fB\-s, --samplerate\fP \fIsamplerate\fP
Specify output samplerate in Hz - range is 44100 (default) to 192000
.IP "\fB\-u, --upgrade\fP \fIin\fP \fIout\fP
Upgrade file \fIin\fP and save as \fIout\fP
.IP "\fB\-v, --version
Show version information and exit.
Specify output samplerate in Hz - range is 44100 (default) to 192000.
.IP "\fB\-x, --oversampling\fP \fIvalue\fP
Specify oversampling, possible values: 1, 2 (default), 4, 8
.IP "\fB\ --allowroot
Bypass root user startup check (use with caution).
Specify oversampling, possible values: 1, 2 (default), 4, 8.
.SH SEE ALSO
.BR https://lmms.io/
.BR https://lmms.io/documentation/

View File

@@ -113,65 +113,57 @@ void printHelp()
{
printf( "LMMS %s\n"
"Copyright (c) %s\n\n"
"Usage: lmms [ -a ]\n"
" [ -b <bitrate> ]\n"
" [ -c <configfile> ]\n"
" [ -d <in> ]\n"
" [ -f <format> ]\n"
" [ --geometry <geometry> ]\n"
" [ -h ]\n"
" [ -i <method> ]\n"
" [ --import <in> [-e]]\n"
" [ -l ]\n"
" [ -m <mode>]\n"
" [ -o <path> ]\n"
" [ -p <out> ]\n"
" [ -r <project file> ] [ options ]\n"
" [ -s <samplerate> ]\n"
" [ -u <in> <out> ]\n"
" [ -v ]\n"
" [ -x <value> ]\n"
" [ <file to load> ]\n\n"
"-a, --float 32bit float bit depth\n"
"-b, --bitrate <bitrate> Specify output bitrate in KBit/s\n"
" Default: 160.\n"
"-c, --config <configfile> Get the configuration from <configfile>\n"
"-d, --dump <in> Dump XML of compressed file <in>\n"
"-f, --format <format> Specify format of render-output where\n"
" Format is either 'wav', 'ogg' or 'mp3'.\n"
" --geometry <geometry> Specify the size and position of the main window\n"
" geometry is <xsizexysize+xoffset+yoffsety>.\n"
"-h, --help Show this usage information and exit.\n"
"-i, --interpolation <method> Specify interpolation method\n"
" Possible values:\n"
" - linear\n"
" - sincfastest (default)\n"
" - sincmedium\n"
" - sincbest\n"
" --import <in> [-e] Import MIDI file <in>.\n"
" If -e is specified lmms exits after importing the file.\n"
"-l, --loop Render as a loop\n"
"-m, --mode Stereo mode used for MP3 export\n"
" Possible values: s, j, m\n"
" s: Stereo\n"
" j: Joint Stereo\n"
" m: Mono\n"
" Default: j\n"
"-o, --output <path> Render into <path>\n"
" For --render, provide a file path\n"
" For --rendertracks, provide a directory path\n"
"-p, --profile <out> Dump profiling information to file <out>\n"
"-r, --render <project file> Render given project file\n"
" --rendertracks <project> Render each track to a different file\n"
"-s, --samplerate <samplerate> Specify output samplerate in Hz\n"
" Range: 44100 (default) to 192000\n"
"-u, --upgrade <in> [out] Upgrade file <in> and save as <out>\n"
" Standard out is used if no output file is specifed\n"
"-v, --version Show version information and exit.\n"
" --allowroot Bypass root user startup check (use with caution).\n"
"-x, --oversampling <value> Specify oversampling\n"
" Possible values: 1, 2, 4, 8\n"
" Default: 2\n\n",
"Usage: lmms [global options...] [<action> [action parameters...]]\n\n"
"Actions:\n"
" <no action> [options...] [<project>] Start LMMS in normal GUI mode\n"
" dump <in> Dump XML of compressed file <in>\n"
" render <project> [options...] Render given project file\n"
" rendertracks <project> [options...] Render each track to a different file\n"
" upgrade <in> [out] Upgrade file <in> and save as <out>\n"
" Standard out is used if no output file\n"
" is specifed\n"
"\nGlobal options:\n"
" --allowroot Bypass root user startup check (use with\n"
" caution).\n"
" -c, --config <configfile> Get the configuration from <configfile>\n"
" -h, --help Show this usage information and exit.\n"
" -v, --version Show version information and exit.\n"
"\nOptions if no action is given:\n"
" --geometry <geometry> Specify the size and position of\n"
" the main window\n"
" geometry is <xsizexysize+xoffset+yoffsety>.\n"
" --import <in> [-e] Import MIDI or Hydrogen file <in>.\n"
" If -e is specified lmms exits after importing the file.\n"
"\nOptions for \"render\" and \"rendertracks\":\n"
" -a, --float Use 32bit float bit depth\n"
" -b, --bitrate <bitrate> Specify output bitrate in KBit/s\n"
" Default: 160.\n"
" -f, --format <format> Specify format of render-output where\n"
" Format is either 'wav', 'flac', 'ogg' or 'mp3'.\n"
" -i, --interpolation <method> Specify interpolation method\n"
" Possible values:\n"
" - linear\n"
" - sincfastest (default)\n"
" - sincmedium\n"
" - sincbest\n"
" -l, --loop Render as a loop\n"
" -m, --mode Stereo mode used for MP3 export\n"
" Possible values: s, j, m\n"
" s: Stereo\n"
" j: Joint Stereo\n"
" m: Mono\n"
" Default: j\n"
" -o, --output <path> Render into <path>\n"
" For \"render\", provide a file path\n"
" For \"rendertracks\", provide a directory path\n"
" If not specified, render will overwrite the input file\n"
" For \"rendertracks\", this might be required\n"
" -p, --profile <out> Dump profiling information to file <out>\n"
" -s, --samplerate <samplerate> Specify output samplerate in Hz\n"
" Range: 44100 (default) to 192000\n"
" -x, --oversampling <value> Specify oversampling\n"
" Possible values: 1, 2, 4, 8\n"
" Default: 2\n\n",
LMMS_VERSION, LMMS_PROJECT_COPYRIGHT );
}
@@ -224,11 +216,11 @@ int main( int argc, char * * argv )
if( arg == "--help" || arg == "-h" ||
arg == "--version" || arg == "-v" ||
arg == "--render" || arg == "-r" )
arg == "render" || arg == "--render" || arg == "-r" )
{
coreOnly = true;
}
else if( arg == "--rendertracks" )
else if( arg == "rendertracks" || arg == "--rendertracks" )
{
coreOnly = true;
renderTracks = true;
@@ -283,7 +275,7 @@ int main( int argc, char * * argv )
printHelp();
return EXIT_SUCCESS;
}
else if( arg == "--upgrade" || arg == "-u" )
else if( arg == "upgrade" || arg == "--upgrade" || arg == "-u")
{
++i;
@@ -321,7 +313,7 @@ int main( int argc, char * * argv )
#endif
}
else if( arg == "--dump" || arg == "-d" )
else if( arg == "dump" || arg == "--dump" || arg == "-d" )
{
++i;
@@ -340,7 +332,8 @@ int main( int argc, char * * argv )
return EXIT_SUCCESS;
}
else if( arg == "--render" || arg == "-r" || arg == "--rendertracks" )
else if( arg == "render" || arg == "--render" || arg == "-r" ||
arg == "rendertracks" || arg == "--rendertracks" )
{
++i;