wav2gig(1)

πŸ“¦
version 4.5.2 Β· 3 versions
, in nixos 26.05, ubuntu resolute, ubuntu stonking

✨ wav2gig(1) ✨

okay so bestie, welcome to wav2gig β€” it's one of the libgig tools, and it's about to turn your pile of WAVs into a whole GigaStudio file. no cap. πŸŽ€


πŸ’– NAME πŸ’–

wav2gig β€” create a GigaStudio (.gig) file from a set of WAV files. literally that's the whole job and she does it flawlessly. πŸ¦‹


🌸 SYNOPSIS 🌸

wav2gig [ OPTIONS ] GIG_FILE WAV_FILE_OR_DIR_1 [ WAV_FILE_OR_DIR_2 ... ]

✨ DESCRIPTION ✨

So here's the tea πŸ“: you hand her a list of wave (.wav) files and/or directories that contain wave files as argument(s), and she creates one new GigaStudio / GigaSampler (.gig) file holding all those samples. one file. all the samples. iconic. πŸ‘‘

The created GigaStudio (.gig) file will contain the given input samples. And the samples' meta information (as far as available) β€” like root note (a.k.a. 'unity note'), fine tune, loop points, loop type and loop play count β€” gets automatically extracted from the input wave (.wav) files and applied accordingly. she reads the vibes straight out of the file, no manual labor. πŸ’…

On top of that, this tool creates exactly one instrument inside the newly created GigaStudio (.gig) file, and she tries to automatically map the samples in a meaningful way to that instrument. now here's the catch πŸ™ˆ: the wave (.wav) format currently does not support many of the meta information required for this particular task, so this tool tries to extract the required (missing) information from the individual sample's file name so it can map the samples accordingly. peek at SAMPLE NAMES below for the assumed naming scheme for input sample files, and for how to override that default naming scheme by providing custom regular expression patterns. ✨


πŸŽ€ OPTIONS πŸŽ€

  • GIG_FILE β€” the GigaStudio / GigaSampler (.gig) filename to be created. your main character file. πŸ’–
  • WAV_FILE_OR_DIR_1 β€” filename or directory containing wave (.wav) file(s).
  • WAV_FILE_OR_DIR_2 β€” filename or directory containing wave (.wav) file(s). yes you can keep stacking them, she's not gonna stop you. 🫢
  • -r β€” recurse through all subdirectories of provided input WAV directories. dig deep bestie. 🧚
  • -f β€” overwrite output GigaStudio (.gig) file in case it already exists. (rude but necessary πŸ’€)
  • -v β€” print version and exit.
  • --dry-run β€” scan input sample (.wav) files, but exit before creating any .gig file. it's giving window shopping. πŸ›οΈ
  • --verbose β€” increase amount of info being shown. she will yap (affectionately). πŸ—£οΈ
  • --regex-name1 PATTERN β€” regular expression for overriding the NAME1 part of the input sample file name scheme.
    • Defaults to '([^-\]+) - [^-]+ - [^-]+ - [^-]+ - [^.]+'
  • --regex-name2 PATTERN β€” regular expression for overriding the NAME2 part of the input sample file name scheme.
    • Defaults to '[^-\]+ - ([^-]+) - [^-]+ - [^-]+ - [^.]+'
  • --regex-velocity-nr PATTERN β€” regular expression for overriding the VELOCITY_NR part of the input sample file name scheme.
    • Defaults to '[^-\]+ - [^-]+ - ([^-]+) - [^-]+ - [^.]+'
  • --regex-note-nr PATTERN β€” regular expression for overriding the NOTE_NR part of the input sample file name scheme.
    • Defaults to '[^-\]+ - [^-]+ - [^-]+ - ([^-]+) - [^.]+'
  • --regex-note-name PATTERN β€” regular expression for overriding the NOTE_NAME part of the input sample file name scheme.
    • Defaults to '[^-\]+ - [^-]+ - [^-]+ - [^-]+ - ([^.]+)'

πŸ¦‹ SAMPLE NAMES πŸ¦‹

By default this tool assumes the following input sample file naming scheme for automatically mapping samples to regions on the keyboard, as well as mapping them to velocity splits adequately. she's reading your filenames like they're a text message. πŸ“±

'NAME1 - NAME2 - VELOCITY_NR - NOTE_NR - NOTE_NAME.wav'

Which are interpreted in the following way, bestie, one by one:

  • NAME1 β€” primary name of the sample (e.g. "Violin").
    • This is not interpreted for sample mapping, but it will be used to assemble the final sample name inside the GigaStudio (.gig) file.
    • You may use --regex-name1 to override this part of the naming scheme.
  • NAME2 β€” secondary name of the sample (e.g. "Cresc").
    • This is currently ignored, but might be used in future.
    • You may use --regex-name2 to override this part of the naming scheme.
  • VELOCITY_NR β€” MIDI Velocity number of the sample (e.g. "18").
    • This information will be used to automatically create velocity splits.
    • You may use --regex-velocity-nr to override this part of the naming scheme.
  • NOTE_NR β€” MIDI Note number of the sample (e.g. "021" for note a-1).
    • This information will be used to automatically map the sample to a region on the 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 NOTE_NR is used as root note as well.
    • You may use --regex-note-nr to override this part of the naming scheme.
  • NOTE_NAME β€” note name of the sample (e.g. "a-1").
    • This is not interpreted for sample mapping, but it will be used to assemble the final sample name inside the GigaStudio (.gig) file.
    • You may use --regex-note-name to override this part of the naming scheme.

This tool utilizes the 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 --regex-* options must contain exactly one active RegEx 'capture group', which is denoted in regular expressions by a pair of round brackets like:

(PATTERN)

So the 'capture group' marks the portion in the overall filename string that is going to be extracted 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:

(?: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:
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. it's basically a queue bestie, one at a time. πŸ§šβ€β™€οΈ


🌈 SEE ALSO 🌈

go read the whole friend group, they all slay. πŸ’–


πŸ’€ BUGS πŸ’€

Check and report bugs at http://bugs.linuxsampler.org β€” please actually report them, not just screenshot them for the group chat. πŸ™


πŸ‘‘ Author πŸ‘‘

Application and manual page written by Christian Schoenebeck <cuse@users.sf.net>. absolute icon, we love to see it. πŸ’œ


and that's a wrap on wav2gig(1) β€” this page is part of libgig 4.5.2, dated 30 Jun 2025. periodt. πŸ’…βœ¨πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from