Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Language specification

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.

Symbol Meaning
~ Sign Wave
^ Trianglar Wave
N Sawtooth Wave
[ Square Wave
= Mute (Rest)
<CODE> Iterate CODE
NUMBER Set frequency (Hz)
+NUMBER Adding NUMBER to set frequency
-NUMBER Substructing NUMBER to set frequency
*NUMBER Multiply NUMBER to set frequency
/NUMBER Devide NUMBER to set frequency


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 < >.


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)


Sample Code

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.

Hello, world!

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.