Hi All,
I have almost finished my library update, but I have a strange phenomenon that I can not explain nor resolve.
I have created some code for Messiaen’s composition techniques, as in his first treatise, and one of these, “talea”, ran perfectly, but standing from a certain moment it does not run. If I evaluate it I receive an error: “No method is defined for these types in box TALEA”.
I am working on Linux Fedora 32, OM last version. I have not still tested on my OsX El capitan.
The strange thing is that in a folder of my workspace I created for the patches to be copied in online folder of my library (for using “t” on my obiects to visualize an example), the function “talea” runs without errors. Also if I create a nre one. But if I create it in every each other place in my workspace it gives me the above mentioned errror.
I have tried to evaluate lisp documents in my library, rebuilt OM preferences, but nothing good happens.
Every help is welcome, thank you in advance. I paste the code of the function after my signature. For what is my competence, I have controlled it various times, it seems correct.
Ciao
Fabio
Code:
(om::defmethod! talea ((durs1 list) (durs2 list) (factor number) (quantization number) (forbidden list) (grace-offset number) (precision number))
:initvals '((3 3 2 2) (2 1 1 1 2 2) (250) 8 nil 0 0.5) ; an initial values list
:indoc '(“First duration series (proportions)” “Second duration series (proportions)” “Multiplication factor (ms.)” “Quantization” “Forbidden list” “Grace-offset” “Precision”) ; an string list with short docs
:icon 120 ; the icon
:doc "talea
Superposition of rhythms of different lengths.
See Olivier Messiaen, Tecnica del mio linguaggio musicale,
Parigi, Leduc, 1999, Italian translation by Lucia Ronchetti, p. 18, example n. 35"
(let*
((reduce1 (om::reduce #’+ durs1))
(reduce2 (om::reduce #’+ durs2))
(n1 (om::om/ (om::lcm reduce1 reduce2) reduce1))
(n2 (om::om/ (om::lcm reduce1 reduce2) reduce2))
(rep1 (om::repeat-n durs1 n1))
(rep2 (om::repeat-n durs2 n2))
(durations1 (om::om* factor (flat rep1)))
(durations2 (om::om* factor (flat rep2)))
(durlist (list durations1 durations2))
(voices (loop for i in
(loop for i in durlist collect (om::omquantify i 60 '(4 4) quantization forbidden grace-offset precision))
collect (make-instance 'voice :tree i)))
)
(make-instance 'poly :voices voices)
))