Csound is an open source programming language created in 1985.
#555on PLDB | 39Years Old | 50Repos |
Csound is a computer programming language for sound, also known as a sound compiler or an audio programming language, or more precisely, an audio DSL. It is called Csound because it is written in C, as opposed to some of its predecessors. It is free software, available under the LGPL. Read more on Wikipedia...
sr = 44100
kr = 44100
ksmps = 1
nchnls = 2
; pvanal -n 512 -w 8 allglass1-L.wav allglass1-L.pvc
; pvanal -n 512 -w 8 allglass1-R.wav allglass1-R.pvc
instr 1
ktime line 0, p3, 17.5018
arL pvoc ktime, 1, "allglass1-L.pvc"
arR pvoc ktime, 1, "allglass1-R.pvc"
out arL, arR
endin
<CsoundSynthesizer>
<CsOptions>
csound -W -d -o tone.wav
</CsOptions>
<CsInstruments>
sr = 96000 ; Sample rate.
kr = 9600 ; Control signal rate.
ksmps = 10 ; Samples per control signal.
nchnls = 1 ; Number of output channels.
instr 1
a1 oscil p4, p5, 1 ; Oscillator: p4 and p5 are the arguments from the score, 1 is the table number.
out a1 ; Output.
endin
</CsInstruments>
<CsScore>
f1 0 8192 10 1 ; Table containing a sine wave. Built-in generator 10 produces a sum of sinusoids, here only one.
i1 0 1 20000 1000 ; Play one second of one kHz at amplitude 20000.
e
</CsScore>
</CsoundSynthesizer>
Feature | Supported | Example | Token |
---|---|---|---|
MultiLine Comments | ✓ | ||
Comments | ✓ | ; A comment | |
Line Comments | ✓ | ; A comment | ; |
Semantic Indentation | X |