Skip to content

Set Cents Pitchbend

Description

This allows to alter the global pitch of an object dynamically, in cents.

(set-cents-pitchbend ... )

Lisp Syntax and Default Values

The (set-cents-pitchbend... ) function can be called using the following Lisp syntax:

(set-cents-pitchbend object_reference controller)

Parameters

The (set-cents-pitchbend ... ) function requires two arguments:

  • object_reference: name of the object whose pitchbend will be altered.
  • controller: a 1-dimensional controller used to set the pitchbend. This can be either dynamic or constant.

Discussion

This function bends the pitch for all mode frequencies accordingly, and is very efficient CPU-wise. It can be a very convincing alternative to physical parameters (dimension, young modulus etc.) for varying pitch, especially in real time.

Like the spectral diffraction, the cents pitch bend is a « pseudo-physical » parameter in Modalys. Unlike « real » physical parameters, pseudo-physical parameters have a direct action on the object spectrum, i.e. on the modal frequencies and loss, without having to recalculate everything each time.

;;; static pitchbend:
(setq my-string (make-object 'mono-string))
(set-cents-pitchbend my-string -25) ;;; down by a quarter tone
;;; dynamic pitchbend:
(setq my-string (make-object 'mono-string))
(setq my-bend (make-controller 'envelope 1
                       (list (list 0.00 .0)
                              (list 2.0 -100.))))
(set-cents-pitchbend my-string my-bend) ;;; glissando down a whole over 2 sec.

Options

There are no special options for this function.