[incudine-devel] New DOVOICES macro to iterate over the allocated voices
Status: Beta
Brought to you by:
titola
|
From: Tito L. <tit...@gm...> - 2025-07-15 08:20:12
|
The syntax is
voicer:dovoices (tag-var voicer &optional result) &body body
>From the documentation:
Iterate over the allocated voices of the given VOICER, in allocation order,
with TAG-VAR bound to each identifier tag, then RESULT form is evaluated.
Note: the iteration occurs in rt-thread before or after trigger/release,
therefore the audio cycle is possibly blocked during BODY.
See INCUDINE:NRT-FUNCALL to call a function from audio-nrt-thread.
Example:
;; The voices are allocated with a numerical tag where the LSB
;; is the keynum and the MSB is an exclusive group number.
;; A voice is released if the exclusive group number is 3.
(voicer:dovoices (tag v)
(if (= 3 (ash tag -8)) (voicer:release v tag)))
|