pink.engine
*hardware-buffer-size*
dynamic
audio-events
(audio-events eng args)
(audio-events eng x & args)
Takes an engine and series of events, wrapping the events as audio-events.
If single arg given, assumes it is a list of events.
doubles->byte-buffer
(doubles->byte-buffer dbls buf)
Write output from doubles array into ByteBuffer.
Maps -1.0,1.0 to Short/MIN_VALUE,Short/MAX_VALUE, truncating
values outside of -1.0,1.0.
engine->buffer
(engine->buffer engine)
Runs engine and writes output to memory, returning double[]. Engine should be single-channel.
This will run the engine until all audio functions added to it are complete.
Warning: Be careful not to render with an engine setup with infinite
duration!
engine->disk
(engine->disk engine filename)
Runs engine and writes output to disk. This will run the engine until all
audio functions added to it are complete.
Warning: Be careful not to render with an engine setup with infinite
duration!
engine-add-afunc
(engine-add-afunc engine f)
engine-add-events
(engine-add-events engine events)
engine-add-post-cfunc
(engine-add-post-cfunc engine f)
engine-add-pre-cfunc
(engine-add-pre-cfunc engine f)
engine-clear
(engine-clear engine)
engine-clear-events
(engine-clear-events engine)
engine-create
(engine-create & {:keys [sample-rate nchnls buffer-size], :or {sample-rate 44100, nchnls 1, buffer-size 64}})
engine-get-tempo
(engine-get-tempo engine)
engine-kill-all
(engine-kill-all)
Kills all engines and clears them
engine-remove-afunc
(engine-remove-afunc engine f)
engine-remove-post-cfunc
(engine-remove-post-cfunc engine f)
engine-remove-pre-cfunc
(engine-remove-pre-cfunc engine f)
engine-run
(engine-run engine)
Main realtime engine running function. Called within a thread from
engine-start.
engine-set-tempo
(engine-set-tempo engine tempo)
engine-start
(engine-start engine)
engine-status
(engine-status engine)
engine-stop
(engine-stop engine)
engines-clear
(engines-clear)
Kills all engines and clears global engines list. Useful for development in REPL, but user must be
careful after clearing not to use existing engines.
fire-audio-event
(fire-audio-event eng evt)
create an instance of an audio function and adds to the engine
wrap-audio-event
(wrap-audio-event eng evt)