programextensions/audio/demos/synth.xtl

A synthesizer made of arrays: X_eTaL computes every sample of a little piece -- notes from equal temperament, harmonics, envelopes, chords, stereo (the instruments are in Instruments.xtl, beside this file) -- and the audio extension plays them as they are made. Run: just demo audio synth

source · imports au: extensions/audio/lib/Audio.xtl; in: extensions/audio/demos/Instruments.xtl

v : Int

value · line 10
v ← ᵃᵘo̲utput ⁱⁿrate
Used in: ᵘp̲lay, c

ᵘp̲lay : Int -> Int

function · line 13

play eight bars, each made while the one before is sounding

ᵘp̲lay ← { b →
  s ← v ᵃᵘq̲ueue! ⁱⁿb̲ar b
  w ← v ᵃᵘw̲ait! 0.5
  b + 1
}
Used in: last

last : Int

value · line 18
last ← 8 'ᵘp̲lay p̲ower 1

c : Int

value · line 19
c ← ᵃᵘc̲lose! v