A Clojure implementation of an Alda sound engine.
alda.sound namespace functions as a library focused on playing a fully realized Alda score map.
alda.now namespace provides convenient helper functions/macros that make it easy to use Alda within a Clojure program. For more information, see the
alda.sound namespace handles the implementation details of playing the score.
There is an "audio type" abstraction which refers to different ways to generate audio, e.g. MIDI, waveform synthesis, samples, etc. Adding a new audio type is as simple as providing an implementation for each of the multimethods in this namespace, i.e.
play! function handles playing an entire Alda score. It does this by using a JSyn SynthesisEngine to schedule all of the note events to be played in realtime. The time that each event starts and stops is determined by its
What happens, exactly, at the beginning and end of an event, is determined by the
stop-event! implementations for each instrument type. For example, for MIDI instruments,
start-event! sets parameters such as volume and panning and sends a MIDI note-on message at the beginning of the score plus
:offset milliseconds, and
stop-event! sends a note-off message
:duration milliseconds later.
Copyright © 2012-2018 Dave Yarwood et al
Distributed under the Eclipse Public License version 1.0.
Edit on GitHub