(close-midi-sequencer! audio-ctx)
Closes the MIDI sequencer in the audio context.
Closes the MIDI sequencer in the audio context.
(close-midi-synth! audio-ctx)
Closes the MIDI synth in the audio context.
Closes the MIDI synth in the audio context.
(get-midi-sequencer! audio-ctx)
If there isn't already a :midi-sequencer in the audio context, creates a MIDI sequencer and adds it.
If there isn't already a :midi-sequencer in the audio context, creates a MIDI sequencer and adds it.
(get-midi-synth)
If the global midi-synth has been initialized, then that's the synth you get whenever you call this function.
Otherwise, takes a MIDI synth instance from the pool and makes sure the pool is more-or-less topped off.
If the global *midi-synth* has been initialized, then that's the synth you get whenever you call this function. Otherwise, takes a MIDI synth instance from the pool and makes sure the pool is more-or-less topped off.
(get-midi-synth! audio-ctx)
If there isn't already a :midi-synth in the audio context, finds an available MIDI synth and adds it.
If there isn't already a :midi-synth in the audio context, finds an available MIDI synth and adds it.
(ids->channels {:keys [instruments] :as score})
Inspects a score and generates a map of instrument IDs to MIDI channels. The channel values are maps with keys :channel (the channel number) and :patch (the General MIDI patch number).
Inspects a score and generates a map of instrument IDs to MIDI channels. The channel values are maps with keys :channel (the channel number) and :patch (the General MIDI patch number).
(load-instruments! audio-ctx score & [receiver])
Load instruments into audio-ctx's synth, or receiver instead if provided.
If receiver is provided, audio-ctx is not used at all.
Load instruments into audio-ctx's synth, or receiver instead if provided. If receiver is provided, audio-ctx is not used at all.
(note-reserved? audio-ctx note)
Returns true if there is ANOTHER note with the same MIDI note number that is currently playing. If this is the case, then we will NOT stop the note, and instead wait for the other note to stop it.
Returns true if there is ANOTHER note with the same MIDI note number that is currently playing. If this is the case, then we will NOT stop the note, and instead wait for the other note to stop it.
(play-note! audio-ctx
{:keys [midi-note instrument volume track-volume panning] :as note})
(play-sequence! audio-ctx sequence promise!)
Plays a sequence on a java midi sequencer.
Execute callback when sequence is done.
Plays a sequence on a java midi sequencer. Execute callback when sequence is done.
(protect-note! audio-ctx note)
Makes a note in the audio context that this note is playing.
This prevents other notes that have the same MIDI note number from stopping this note.
Makes a note in the audio context that this note is playing. This prevents other notes that have the same MIDI note number from stopping this note.
(protection-key-for {:keys [instrument offset duration midi-note] :as note}
{:keys [midi-channels] :as audio-ctx})
(unprotect-note! audio-ctx note)
Removes protection from this note so that it can be stopped.
Removes protection from this note so that it can be stopped.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close