SoX Synths Generator

This is the web version of the SoXMusicGen.pm Perl 5 module. You can input your notes here to generate either a list of Sound eXchange pipes to xargs to your own copy of SoX, or an audio encoded in Ogg Vorbis.

How to use

You first fill up the parameters for tempo in beats per minute (must be >= 2), the number of audio channels to use, and what built-in SoX synths to be used. The number of synths used must match the number of channels used; if you want to make stereo audio, you have to use two synths, with each synth delimited by a space, like sine sine and square triangle. Refer to the SoX man page to see all synth choices.

Then you input the notes in the following format:

$duration:NOTE

Keep the sigil (or dollar sign if you prefer). NOTE can be in scientific pitch notation, a semitone relative to middle A (aka "A4" or 440 Hz) like %-5 and %+8, or a custom frequency value in Hz.

If you want multiple notes to play at the same time, put forward slashes in between NOTEs, like $qu:C4/G3/F2. In this case you have to use 3 channels and therefore three synths.

Durations

The following duration values are supported (calculations rounded down to 3 decimal points):

Of course, if the calculated value doesn't cut it, you can use your own numbers (up to 3 decimal points), like 1.8:G#4. Don't forget to remove the sigil if you do.

Example

With a tempo of 126 BPM, 1 audio channel, pluck synth, and the following notes:

$qu:G4 $qu:A4 $qu:B4 $qu:D5 $fu:A4 $qu:G5 $qu:F#5 $qu:E5 $qu:B4 $fu:D5

The following xargs-able pipes are produced:

"|sox -r 48000 -n -p synth 0.476 pluck G4" "|sox -r 48000 -n -p synth 0.476 pluck A4" "|sox -r 48000 -n -p synth 0.476 pluck B4" "|sox -r 48000 -n -p synth 0.476 pluck D5" "|sox -r 48000 -n -p synth 1.904 pluck A4" "|sox -r 48000 -n -p synth 0.476 pluck G5" "|sox -r 48000 -n -p synth 0.476 pluck F#5" "|sox -r 48000 -n -p synth 0.476 pluck E5" "|sox -r 48000 -n -p synth 0.476 pluck B4" "|sox -r 48000 -n -p synth 1.904 pluck D5"

And Vorbis audio:

Parameters

Tempo:
Number of channels:
Synths:
Generate:

Notes



Output