--- libgig/trunk/man/wav2gig.1.in 2021/08/30 20:14:15 3990 +++ libgig/trunk/man/wav2gig.1.in 2021/09/03 15:06:10 3995 @@ -1,4 +1,4 @@ -.TH "wav2gig" "1" "30 Aug 2021" "libgig @VERSION@" "libgig tools" +.TH "wav2gig" "1" "03 Sep 2021" "libgig @VERSION@" "libgig tools" .SH NAME wav2gig \- Create GigaStudio (.gig) file from a set of WAV files. .SH SYNOPSIS @@ -19,8 +19,8 @@ GigaStudio (.gig) file and tries to automatically map the samples in a meaningful way to that instrument. As the wave (.wav) format currently does not support many of the meta information required for this particular task, this -tool tries to guess the required information from the individual sample's name -for mapping the samples accordingly. See +tool tries to extract the required (missing) information from the individual +sample's file name for being able to map the samples accordingly. See .BR SAMPLE .BR NAMES below for details on the assumed naming scheme for input sample files and how @@ -47,12 +47,18 @@ .B \ -v Print version and exit. .TP +.B \ --dry-run +Scan input sample (.wav) files, but exit before creating any .gig file. +.TP +.B \ --verbose +Increase amount of info being shown. +.TP .B \ --regex-name1 PATTERN Regular expression for overriding the .BR NAME1 part of the input sample file name scheme. -Defaults to '^([^-]+) - [^-]+ - [^-]+ - [^-]+ - [^.]+'. +Defaults to '([^-\/\\]+) - [^-]+ - [^-]+ - [^-]+ - [^.]+'. .TP .B \ --regex-name2 PATTERN @@ -60,7 +66,7 @@ .BR NAME2 part of the input sample file name scheme. -Defaults to '^[^-]+ - ([^-]+) - [^-]+ - [^-]+ - [^.]+'. +Defaults to '[^-\/\\]+ - ([^-]+) - [^-]+ - [^-]+ - [^.]+'. .TP .B \ --regex-velocity-nr PATTERN @@ -68,7 +74,7 @@ .BR VELOCITY_NR part of the input sample file name scheme. -Defaults to '^[^-]+ - [^-]+ - ([^-]+) - [^-]+ - [^.]+'. +Defaults to '[^-\/\\]+ - [^-]+ - ([^-]+) - [^-]+ - [^.]+'. .TP .B \ --regex-note-nr PATTERN @@ -76,7 +82,7 @@ .BR NOTE_NR part of the input sample file name scheme. -Defaults to '^[^-]+ - [^-]+ - [^-]+ - ([^-]+) - [^.]+'. +Defaults to '[^-\/\\]+ - [^-]+ - [^-]+ - ([^-]+) - [^.]+'. .TP .B \ --regex-note-name PATTERN @@ -84,7 +90,7 @@ .BR NOTE_NAME part of the input sample file name scheme. -Defaults to '^[^-]+ - [^-]+ - [^-]+ - [^-]+ - ([^.]+)'. +Defaults to '[^-\/\\]+ - [^-]+ - [^-]+ - [^-]+ - ([^.]+)'. .SH SAMPLE NAMES By default this tool assumes the following input sample file naming scheme for @@ -131,7 +137,11 @@ MIDI Note number of the sample (e.g. "021" for note a-1). This informtion will be used to automatically map the sample to a region on the -keyboard. +keyboard. The sample's root note (a.k.a. "unity note") is taken directly from +the .wav file content, however if the .wav file content does not contain a root +note information then +.B \ NOTE_NR +is used as root note as well. You may use .BR --regex-note-nr @@ -148,6 +158,46 @@ .BR --regex-note-name to override this part of the naming scheme. +.PP +This tool utilizes the +.I regular expressions +library provided by C++ (introduced with the C++11 standard revision). +Each custom regular expression (abbreviated as 'RegEx' from now on below) +passed to one of the +.BR --regex-* +options must contain +.B +exactly one +active RegEx 'capture group' which is denoted in regular expressions by a pair +of round brackets like: + +.B (PATTERN) + +So the 'capture group' marks the portion in the overall filename string that is +going to be exctracted for the respective component of the filename schema. +If additional RegEx group(s) are needed to build the overall RegEx pattern, then +those other group(s) must be defined as 'passive groups' denoted in RegEx +patterns by an additional question mark and colon like this: + +.B (?:PATTERN) + +Keep in mind that RegEx scanners behave 'greedy' by default, which means by +default they try to match the longest string possible according to your defined +RegEx pattern. If that's not desired then you may either override the required +parts of your RegEx pattern to behave 'non-greedy' such that those parts would +match for the shortest string possible instead, or alternatively consider using +the RegEx 'alternation' +operator, which is denoted in regular expressions by a vertical bar character +like: + +.B PATTERN1|PATTERN2|PATTERN3 + +The RegEx 'alternation' operator is sometimes more intuitive, because it tries +to match the provided patterns strictly in order from left to right. So it +would first try to match the first pattern, and only if no match with the first +pattern was possible (independent of string length) it would then try to match +the second pattern, and so on. + .SH "SEE ALSO" .BR gig2mono(1), .BR gigextract(1),