PAPR Audio Processor Runtime is an application for creating real-time signal processors for both audio-rate and control-rate signals with a DSP scripting language.
In order to use PAPR, you currently are required to have JACK Audio Connection Kit installed and running.
Open your favorite text editor, and type/paste the following:
graph Main {
() -> (@dac0)
~ {
@dac0 = @SineOsc(0.1, 440);
}
}
Save it as hello.papr
. Now open a terminal and run: papr ./hello.papr
You should hear a sine tone!
graph
indicates a new audio- or control-rate graph definition (or graphdef).
Main
is the name of our new graphdef. (Every script run on the command line MUST have a "Main" graphdef!)
() -> (@dac0)
specifies the signature of our graphdef.
()
means we have no inputs.-> (@dac0)
means that we have one output, named@dac0
.- The
@
indicates that this is an audio-rate output. - Any output with
dac
in its name will be interpreted as something you will hear out of your speakers, and connected accordingly.
- The
~ {
indicates the beginning of a list of statements, which are typically just connections from a number of inputs to a number of outputs.
@dac0 = @SineOsc(0.1, 440.0);
is a statement that connects the output of a sine wave osscilator to the output @dac0
.
- Again, the
@
indicates that the sine oscillator will operate at audio-rate. - The two numbers in parentheses are simply the inputs to the sine oscillator. In this particular case, they correspond to the amplitude and frequency inputs.
Licensed under dual Apache 2.0 / MIT license. See LICENSE-APACHE.txt and LICENSE-MIT.txt for more information.