P-Code is a language for live coding that evolved from the idea of describing rhythm machine patterns in text form and incorporated elements of programming. The code is interpreted from left to right, divided into numbers and other symbols, and executed. All numbers are processed as frequencies, and all symbols that cannot be interpreted are treated as white noise.
|NUMBER||Set frequency (Hz)|
Numbers and Symbols
The number means the frequency. One symbol becomes a unit of time (1/30 sec).
Sine wave at 441Hz.
11025Hz square wave
Decimals can also be used for numbers.
Triangular wave at 123.456Hz.
To keep playing the same sound, make the same symbols in succession.
Sawtooth wave duration of 882Hz (0.5 seconds).
The same thing can be written over and over again. Repeat the part sandwiched by
2^ (number of nests) repeated in the nest of
882N 882<N> 882<<N>> 882<<<N>>> 882<<<<N>>>>
In this way, the length of the sound doubles. Also, if parentheses are missing, they are completed at the end.
All but unreserved characters (symbols) are interpreted as white noise.
Intermittent noise (repetition of noise and mute (rest))
The frequency can be used to calculate the addition and division.
1550Hz square wave
A number without an operation symbol is considered to be an absolute value.
Intermittent repetition of 441Hz and 882Hz sine waves
The above code can also be written as follows.
I can use repetition to create different rhythms.
The frequency can also be continuously changed.
Sine wave sweep (linear)
Inverse sweep of sine wave (linear)
Sweep of sine wave (logarithmic)
Inverse sweep of the sine wave (logarithmic)
Rhythmic patterns with a combination of repetition and mute
I'm going to code what looks like a formula.
No matter what code you write, it's not an error.
A code of silence.
I can also shoot a distress signal (SOS).
P-Code is not an error, no matter what code you write. Don't be afraid to write the chords (by hand) and let us hear some amazing sounds that are beyond our imagination.