< Back to IRCAM Forum

Help with my library lisp code problems

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)

))

Hi. Great project!

vs. the method, it seems you define the 'factor arg as a number in the lambda-list, but in the initvals it is given as a list.

Looking forward to test the Messiaen things!

-anders

Dear Anders,

Thank you very much, I have removed the parenthesis in initvals (from (250) to 250), and now I think the problem is resolved, the function runs correctly. A refuse from some pasting operation I suppose… (“All copy and paste and no play makes Fabio a dull boy”).

I think today or tomorrow to publish the update on my courses site dedicated page, I will advice in forum discussion.

You and Karim were already included in thanks since first version (see FDSDB_XXth_CT.lisp file, line 12). You give me always good suggestions and support, thank you.

Ciao

Fabio

1 Like

And Thanks also in read me file, I was forgotten…

Dear Fabio,

Just a note: Anders is Anders Vinjar one of the dev team of OM. OM’s port to linux is due to his great skills. He is also a composer.

Best
K

Dear Karim,

Sorry for misunderstanding, thank you for the correction. I add him in thanks and I will reload the library.

Thank you, I apologize for the error.

Ciao

Fabio

No apologies needed. We all do mistakes :slight_smile:

…You and Karim were already included in thanks

Hi Fabio. Will check the lib.

If you’re referring to the responses and contributions from me, I
think you should check the names in the various places around in
the lib, and int the web page you’re referring to.

-anders

Dear Anders,

Thank you for advising me, I have added you also on the web page (ITA and ENG) from which to download the library.
I have searched around the code and the patches of my library, I think it is all right. Torsten Anders is mentioned, too, because he helped me with some code and suggestions. It is not a refuse.
Please, if something was missed, tell me without any problem.
Thank you all again for support, I hope you will enjoy this my contribution.

Ciao

Fabio