Hi All,
I am working to an update of my library, and I would like to use :menuins characteristic. I have this code that runs good in preliminary lisp box in a OM patch, but adding menuins I receive the error:
Error while evaluating the box CHORD+FADE 2 : Undefined operator fdsdb_xxth_ct::voices in form (fdsdb_xxth_ct::voices fdsdb_xxth_ct::finalfig)
or, commenting :menuins, the error
No method is defined for these types in box CHORD+FADE 2
Here is the code:
(om::defmethod! chord+fade ((mc list) (fade string) (fig string) (sorting string) (dur number) (quant number) (forbid list) (duratt number))
:initvals '(nil “in” “figures” '> 4000 8 nil 1/32 4000) ; an initial values list
:indoc '(“Chord midicent list” “Fade-in or fade-out” “Function figures or figures2” “Ascending or descending ordering” “Overall duration (ms.)” “Quantization” “Forbidden values” “Duration of attack”) ; an string list with short docs
:icon 125 ; the icon
:doc “chord+fade.
Realize a texture composed by a chord as attack of the same chord in fade out form, or a fade in chord that has a bvrief chord as attack of its delay…”
:menuins '((1 ((“in” 'in) (“out” 'out))) (2 ((“figures” 'figures) (“figures2” 'figures2))) (3 ((">" ‘’>) ("<" '<))))
(let*
(
(in-chord (om::sort-list mc :test sorting))
(finalfade (if (equal fade “in”) '(0 1 100) '(0 99 100)))
(finalfig (if (equal fig 'figures) (fdsdb_xxth_ct::figures-nograce finalfade (length in-chord) dur quant forbid) (fdsdb_xxth_ct::figures-nograce finalfade (length in-chord) dur quant forbid)))
(finalfig-voices (om::voices finalfig))
(fade-voices (loop for i in in-chord for k in finalfig-voices collect (om::make-instance 'voice :tree (tree k) :chords (list i))))
(ratiodur (tree2ratio (tree (first fade-voices))))
(attvoicechorddur (loop for i in ratiodur collect (om::omif (plusp i) duratt i)))
(attack (make-instance 'voice :tree attvoicechorddur :chords (list in-chord)))
)
(x-append attack fade-voices)
))
I have read the page Writing Code for OM | OpenMusic, so any help will be appreciated, thanks in advancer.
Ciao
Fabio