This allows to alter the spectrum of an object dynamically.
The (set-spectral-diffraction... ) function can be called using the following Lisp syntax:
(set-spectral-diffraction object_reference controller)
The (set-spectral-diffraction ... ) function requires two arguments:
The spectral diffraction contracts or dilates the spectrum of an object and can be used to explore object's timbre alteration, for example to add some slight inharmonicity.
Like the cent pitch adjustment, the spectral diffraction 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 (so it is very CPU-efficient.)
If {fi} are the object's mode frequencies, with f0 the fundamental, the effect of a spectral diffraction ρ is:
fi' = (fi – f0)∙len(ρ(e-1)+1) + f0
with fi' the resulting mode frequency.
So ρ = 1 ⇒ no diffraction, ρ = 0 ⇒ spectrum completely folded onto f0.
;;; dynamic spectral diffraction:
(setq my-string (make-object 'mono-string))
(setq my-diffraction (make-controller 'envelope 1
(list (list 0.00 1.)
(list 2.0 1.3))))
(set-spectral-diffraction my-string my-diffraction) ;;; "spectral glissando" up over 2 sec.
There are no special options for this function.