Liking cljdoc? Tell your friends :D

alda.sound.midi


*midi-synth*clj

source

*midi-synth-pool*clj

source

close-midi-synth!clj

(close-midi-synth! audio-ctx)

Closes the MIDI synth in the audio context.

Closes the MIDI synth in the audio context.
sourceraw docstring

drain-excess-midi-synths!clj

(drain-excess-midi-synths!)
source

fill-midi-synth-pool!clj

(fill-midi-synth-pool!)
source

get-midi-synthclj

(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.
sourceraw docstring

get-midi-synth!clj

(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.
sourceraw docstring

ids->channelsclj

(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).
sourceraw docstring

load-instruments!clj

(load-instruments! audio-ctx score)
source

midi-synth-available?clj

(midi-synth-available?)
source

MIDI-SYNTH-POOL-SIZEclj

source

new-midi-synthclj

(new-midi-synth)
source

note-reserved?clj

(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.
sourceraw docstring

open-midi-synth!clj

(open-midi-synth!)
source

play-note!clj

(play-note! audio-ctx
            {:keys [midi-note instrument volume track-volume panning] :as note})
source

protect-note!clj

(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.
sourceraw docstring

protection-key-forclj

(protection-key-for {:keys [instrument offset duration midi-note] :as note}
                    {:keys [midi-channels] :as audio-ctx})
source

stop-note!clj

(stop-note! audio-ctx {:keys [midi-note instrument] :as note})
source

unprotect-note!clj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close