Recherche Google
ModalysAccesses > Using Compiled Accesses
page précédentepage suivante

Using Compiled Accesses

Description

Allows one to create a membrane or plate object with a limited number of fixed, immovable accesses. This operation saves lots of memory if you are using objects with a lot of modes.

(with-compiled-accesses ... )

Lisp Syntax and Default Values

A compiled access can be created using the following Lisp syntax:

(with-compiled-accesses

         (list    (list x-or-radius y-or-angle)

                  (list x-or-radius y-or-angle)

                  ...etc... )

         (make-object ... ))

Parameters

the with-compiled-accesses function requires a list of lists containing 2-dimensional access locations with the following parameters:

  • x-or-radius, y-or-angle : 2-dimensional access locations to be computed at object creation time

This marks the access locations to be computed at the creation of the object. The units for this parameter depend on the whether the plate or membrane is square or round. If it is square, each list element will contain an x and a y . If it is round, each list element will contain a location along the radius (between 0 and 1) and an angle. (For more information about accesses on plates and membranes, see their specific object reference entries.)

Options

Accessing Compiled Accesses

To make an access on an object which has compiled accesses, you must use (make-access ... 'decoded). The access locations stay in the same order as the above list. Thus, if your list of accesses has three elements, use:

(make-access my-comp-mem (const 1 0 0) 'decoded)

to refer to the first access,

(make-access my-comp-mem (const 0 1 0) 'decoded)

to refer to the second, etc. If you like, you can ask for an access which is a weighted combination of the three points by writing:

(make-access my-comp-mem (const .1 .6 .3) 'decoded)

The reason for using compiled accesses is to save memory. With normal accesses, the amount of memory taken by a plate or membrane is roughly the number of modes squared. With a plate which has 40 or 80 modes, there is no memory problem. If your plate has a thousand modes however, memory becomes a very big problem. Compiled accesses reduce memory consumption to the number of modes in the list times the total number of modes. A big difference indeed! (Of course as computers get faster and have larger amounts of memory this is less of a concern...)

page précédentepage suivante
A propos...©IRCAM 2014Réalisé avec Scenari