Let's face it, non-realtime audio is as important as realtime audio.
UDSP's are a great offline alternative to realtime plugins, which allow for polyglot-scriptable synth & fx-chains.
$ ./myudsp[.exe] [-o out.wav] [-n 60] [in1.wav in2.wav ..] # on unix/mac/linux
^^
midinote
$ ./myudsp -o out.wav /tmp/in.wav /tmp/clipboard.wav /tmp/envelope.wav
Usecase: an audio application (wave-editor/moduletracker/daw e.g.) can pass a sample
in.wav
(exported from internal memory, or envelope e.g.) to the UD, and import the processed version (output.wav
) after succesful UDSP execution. Optionally it can pass a second input (-2 clipboard.wav
) which the UD can use as a second input (to vocode, use as envelope e.g.).
Optionally a midinote can be passed to hint the UDSP (which might indirectly use a vst/ladspa plugin) to play a synthesized sound at a certain pitch.
- in case
mydsp
is a synthesizer note-generator,input.wav
indicates the length of the output.
Instead of binaries, a script-file can be a UDSP too if:
- the first 2 (ascii) characters of the file are
#!
- optional: '%s' format-string occurences (to pass the files)
Example flanger UD fx with shebang:
#!ffmpeg -i %s -af flanger %s
Example synth UD with shebang:
#!synth --note %s --samples %s %s
- default output (piping/files): mono 44100hz 16bits signed integers (little endian)
- default midinote is 60
- (longest) length of input is assumed as output length
- mono is assumed, or when inputs are provided: the input with the highest nchannels decide output nchannels)
- should support min 1 inputs, max 10 inputs (cli args:
-0 ...
until-9 ...
) - output and input(s) are RIFF wave-files
-n
argument for midinote (optional)-r
argument for samplerate (optiona)-
argument to pipe audio- use stderr for info (
fprintf(stderr,..)
e.g.) o it won't interfere with pipes/chaining
- unix philosophy
- offline dsp is easy to develop (in contrast to native plugins)