Set Mode Freq
Description
This allows the pitch of an individual mode to be altered dynamically.
(set-mode-freq ... )
Syntax and Default Values
The (set-mode-freq ... ) function can be called using the following Lisp syntax:
(set-mode-freq object_reference mode_number value)
(set-mode-freq object_reference mode_number controller)
Parameters
The (set-mode-freq ... ) function requires three arguments:
- object_reference: name of the object whose specified mode frequency will be controlled.
- mode_number: the mode number whose pitch will be altered (starting from mode 0)
- value, controller: a numerical value or a Modalys controller used to determine the pitch of the given mode(in Hz).
The mode-number must lie between zero and the number of modes in the object minus one.
Discussion
This function is used to set the frequency of a mode to a new value. The following example shows how you can use (get-info 'mode-frequency ... ) to obtain the frequency of a given mode, and then scale it dynamically using (set-mode-freq ... ):
(setq orig-freq-mode0 (get-info 'mode-frequency my-string 0))
(setq freq-env-mode0 (make-controller 'envelope 1
(list (list 0 orig-freq-mode0)
(list 1 (* 1.9 orig-freq-mode0))
(list 2 orig-freq-mode0))))
(set-mode-freq my-string 0 freq-env-mode0)
(set-info 'mode-frequency my-string 1 800)
Options
Retro-Compatibility
Modalys also has an older syntax for this function:
(set-mode-freq! object_reference mode_number value)