Panda
code algorithmic soundmaking application
code
1 What is Panda?
2 Quickstart
3 General Usage
Panda-objects, Items and the Timeline
pandac~ and pandac~mixer
Generating Multiple Items
Quantisation
Performance Mode
4 List of Panda-objects
Sound Objects
soundplay~
|
A sample player. Outputs stereo sound via pandac~ and to [r~ {itemname}-1] / [r~ {itemname}-2]
Arguments: name, path to wav-file, amplitude (0 to 1), initial offset (in milliseconds), loop duration (in milliseconds), playback speed (1=normal speed, 0,5=half speed, -1=reverse, etc.) |
sinewave~
|
A simple sinewave generator. Outputs stereo sound via pandac~ and to [r~ {itemname}-1] / [r~ {itemname}-2]
Arguments: name, frequency (in Hertz), amplitude (0 to 1), panning (-1 to 1) |
squarewave~
|
A simple squarewave generator. Outputs stereo sound via pandac~ and to [r~ {itemname}-1] / [r~ {itemname}-2]
Arguments: name, frequency (in Hertz), amplitude (0 to 1), panning (-1 to 1) |
Data Objects
tempo
|
Changes the playback tempo automatically.
Arguments: name, value (pixels/second) |
setnumber
|
Sends its name a specified number in a specified interval.
Arguments: name, value, interval (0=only set number at start of item) |
randomnumber
|
Generates random floats (resolution: 1000 steps per integer) in a given range.
Arguments: name, min, max, interval (0=only generate a number at start of item) |
collector
|
Receives number-streams and hands them on to all receives of the same name.
Arguments: name, number1, number2, …, number n |
sequence
|
Takes an arbitrary amount of number/milliseconds pairs and outputs the first number, waits, ouputs seconds, and so forth. The sequence starts again when finised.
Arguments: name, number1, delay2 (in milliseconds), number2, delay2, …, numberX, delayX (until restart of sequence) |
activator
|
Activates multiple objects at once.
Arguments: name, name of object1, name of object2, …, name of object n |
5 List of other abstractions
item
|
The item-object is used to turn a normal pd-abstraction into a Panda-object. (It must always be defined as [item $1] in order to tell Panda the correct name of the instance when the abstraction is used in a project.)
|
pandac~
|
The pandac~-object is used to send the output of a Panda-object to Pandas main audio output: the pandac~. (It must always be defined as [pandac~ $1] in order to tell Panda the correct name of the instance when the abstraction is used in a project.)
|
pandaswitch~
|
The pandaswitch~-object is used to turn audio output of a Panda-object on and off, depending on its activity: Its left inlet takes in sound and outputs it only when its right input is toggled on (usually by the output value of the corresponding item-object). Its right outlet can be safely connected to a switch-object to turn off DSP for the abstraction, because it is delayed in order to prevent clicks.
|
rorf
|
„rorf“ stands for: receive or float. The object can either take a number or a symbol as argument. If a number is given, it will output that number when loaded (as an initial value). If a symbol is given, it will behave just like a receive object and output values sent to it. Using this abstraction, arguments of Panda-objects can take either be set to a static value or linked to any other data coming in via the given receive channel.
|
6 List of available keyboard-shortcuts
Ctrl+Space
|
toggle playback on / off
|
Space
|
stop playback
|
Arrow left
|
move timeline position backwards
|
Arrow right
|
move timeline position forward
|
Ctrl+Arrow left
|
jump to position 0
|
Ctrl+Shift (left)
|
toggle loop on / off
|
7 List of Panda messages
new-project
|
Start a new Panda project.
|
timeline-position
|
Set the current position of the timeline cursor.
|
tempo
|
Set the current tempo in pixels per second.
|
length
|
Set the the total length (= pixels in timeline) of the current project.
|
play
|
Start/stop playback.
|
loop
|
If set to 1: Start at beginning when end of project is reached during playback.
|
volume
|
Set the main output volume of pandac~ (0 to 1).
|
mute
|
Mute the output of pandac~ (0/1).
|
pandac~test
|
Trigger pandac~ testsound.
|
[name]-volume
|
Set volume of object called name in pandac~ mixer. (Only for sound-objects.)
|
[name]-mute
|
Set mute (0/1) of object called name in pandac~ mixer. (Only for sound-objects.)
|
[name]-solo
|
Set solo (0/1) of object called name in pandac~ mixer. (Only for sound-objects.)
|
[name] active
|
Set [name] to active/inactive manually.
|
[name]-always active
|
If set to 1, the corresponding object will always be active during playback, also if it is not referenced by an item in the timeline.
|
record
|
Start/stop recording to output-file. If recording is started, playback will also be started.
|
browse-for-output-file
|
Send a bang to browse for an output-file.
|
output-file
|
Specify an output-file-path (.wav) for recording (symbol).
|
performance-mode
|
Turn performance mode on/off.
|
scanline-position
|
Set y-position of scanline in performance-mode.
|
add
|
Add a new item. Arguents: name, length (in pix.), x-position, y-position. Without arguments, current default values (as displayed in Panda-window) will be used.
|
item-name
|
Set name of object to add items for.
|
item-length
|
Set length of items to add.
|
add-multiple-amount
|
Set amount of multiple items to add.
|
add-multiple-y
|
Set y-position of items to add (when adding multiple).
|
add-multiple1
|
Sent bang to add items using add-multiple1.
|
add-multiple1-gap
|
Set gap between items for add-multiple1.
|
add-multiple1-length-inc
|
Set length increment per item for add-multiple1.
|
add-multiple1-gap-inc
|
Set gap increment per item for add-multiple1.
|
add-multiple2
|
Sent bang to add items using add-multiple2.
|
add-multiple2-xform
|
Set formula to use for computing x positions of items using add-multiple2 (symbol).
|
add-multiple2-lenform
|
Set formula to use for computing lengths of items using add-multiple2 (symbol).
|
quantise
|
Sent bang to quantise items to nearest qlines.
|
add-qline
|
Add a new q-line (quantisation-line). Arguents: position on x-Axis (default: 0).
|
qline-stickiness
|
Maximum amount of pixels between a q-line and an item for the q-line to be effective when quantising.
|
add-qlines-amount
|
Set amount of qlines to add via add-qlines1 or add-qlines2.
|
add-qlines1-gap
|
Set gap between qlines when adding via add-qlines1.
|
add-qlines1-gap-inc
|
Set increment of gap per qline when adding via add-qlines1.
|
add-qlines1
|
Sent bang to add qlines using add-qlines1.
|
add-qlines2-form
|
Set formula to use for positions of qlines when using add-qlines2 (symbol).
|
add-qlines2
|
Sent bang to add qlines using add-qlines2.
|
show-main-win
|
Open the main window of the current project.
|
show-setup-win
|
Open the setup window.
|
show-quantise-win
|
Open the quantisation window.
|
show-pandac~mixer
|
Open the pandac mixer of the current project.
|
show-timeline
|
Show a numeric timeline in main-win.
|
timeline-marker-height
|
Set the height of the timeline-marker
|
show-item-positions
|
Display the position of each item (in pixels) above it in main-win.
|
show-item-lengths
|
Display the length of each item (in pixels) above it in main-win.
|
set-fade-in-duration
|
Set duration for fade-in in pandaswitch~.
|
set-fade-out-duration
|
Set duration for fade-out in pandaswitch~.
|
debug
|
Print all Panda messages for debugging.
|
8 Creating new objects for Panda
- The first argument ($1) of any Panda-object is always a unique name (symbol).
- The unique name is passed to an [item]-object (-> [item $1]). The output of [item] indicates, if the Panda-object is active.
- Controlrate-objects may have any number of inlets and outlets, but will usually have none.
- Signalrate-objects usually have two (or more) signal outlets (and any number of control inlets and outlets, but usually none too).
- All numeric values passed as arguments should be taken as numbers or receive symbols of number streams (see [rorf]-object).
- Each signal-rate outlet MUST be preceded by a [pandaswitch~]. Its left outlet outputs the audio signal of its left inlet or – if inactive – silence. Its right inlet should be connected to the outlet of [item]. One right [pandaswitch~]-outlet per patch should be connected to a [switch~] object, turning off DSP when the object is inactive. This practice prevents clicks when objects are toggled on and off.