< Back to IRCAM Forum

Hybrid syntax and errata corrige for documentation

Hello again everyone,
since Modalisp documentation is old and poorly explained and the syntax in the documentation doesn’t work for hybrid object (and other stuff) I decided to reverse engineering the kernel’s header of modalisp which is contained in init.lisp inside components folder.
This eventually helped me to understand the exact arguments needed to build up, in the console, our .lisp patches.
I figured out that calling a function for creating hybrid accesses “make-tri-hybrid-access” is wrong.
The right spelling is actually “make-access-tri-hybrid” , in this way modalisp now can understand all the syntax.
I attached the header kernel where i found out the right syntax, hope the programmers will correct the documentation.

Also the envelope controller doesn’t have the right dimension in the example and to make it work i builded up a 3 dimension dynamic controller to put on the accesses
(setf FRANCO (make-controller 'dynamic 3 -1 (list 1. 1. 1.)))

So the example in documentation now must be:

(setq my-string1 (make-object 'mono-string))

(setq my-string2 (make-object 'mono-string))

(setq my-string3 (make-object 'mono-string))

(set-pitch my-string1 'length 220.)

(set-pitch my-string2 'length 440.)

(set-pitch my-string3 'length 660.)

(setq my-str1-acc (make-access my-string1 (const .315) 'trans0))

(setq my-str2-acc (make-access my-string2 (const .315) 'trans0))

(setq my-str3-acc (make-access my-string3 (const .315) 'trans0))

(setq my-str1-out (make-access my-string1 (const .6) 'trans0))

(setq my-str2-out (make-access my-string2 (const .6) 'trans0))

(setq my-str3-out (make-access my-string3 (const .6) 'trans0))

(setf FRANCO (make-controller 'dynamic 3 -1 (list 1. 1. 1.)))

(setq my-hybrid (make-object 'tri-hybrid my-string1 my-string2 my-string3 FRANCO ))

(setq my-hybrid-acc (make-access-tri-hybrid my-hybrid my-str1-acc my-str2-acc my-str3-acc))

Hope it helps other people that had issues with the creation of hybrid objects.
Cheers!

PS: The same error can be found in hybrid-access section where the function is not (make-hybrid-access hybrid_object_reference access_ref1 access_ref2) but (make-access-hybrid hybrid_object_reference access_ref1 access_ref2) instead.