mimic-sussex / Maximilian

Audio and Music DSP Library
http://www.maximilian.strangeloop.co.uk
9 stars 5 forks source link

Add sample playing #24

Closed chriskiefer closed 5 years ago

chriskiefer commented 5 years ago
  1. add a special 'sample name' string type to the language. This will be a string, starting with "\", e.g. \kickdrum.
  2. this will convert automatically to a sample player e.g. {{1}sqr}\kickdrum

will convert to (very roughly)

setup: x= new maxiSample(); loadSample(x, "kickdrum.wav"); y= new maxiOsc(); loop: if (zeroCrossing(y.square(1)) {x.trigger()}; return x.playOnce();