Skip to content

String (or Rod) - Bi-directional

Description

Any string or rod, fixed at its endpoints, that vibrates in two transverse directions (side-to-side, up-and-down). This is generally used for bowed interactions.

Syntax and Default Values

A 'bi-string can be created using the following Lisp syntax (the default values are shown for each of the physical parameters):

(make-object 'bi-string
             (modes 40)
             (length 1)
             (tension 100)
             (density 1000)
             (radius .001)
             (young 1e9)
             (freq-loss 1)
             (const-loss 1))

Parameters

The arguments for the physical parameters can be either numerical values or Modalys controllers (either dynamic or constant). If a given parameter is not supplied when using the Lisp syntax, the default parameter value will be used.

  • modes: number of modes.
  • length: in meters.
  • tension: in Newtons.
  • density: in kg/m3. See chart of material properties for appropriate values.
  • radius: in meters.
  • young: Young's modulus, in N/m2. See chart of material properties for appropriate values.
  • freq-loss, const-loss: loss coefficients. See General object information.

Accesses

The bi-string can be accessed in either of its two dimensions: 'trans0 (horizontal direction) or 'trans1 (vertical direction).

The following makes a side-to-side access at a point along the length of my-string specified by my-controller.

(make-access my-string my-controller 'trans0)
The following makes an up-and-down access at a point along the length of my-string defined by my-controller.

(make-access my-string my-controller 'trans1)
The value of my-controller must be between zero and one. Note that, because the string is "fixed" at its endpoints, the actual values 0 and 1 will not actually access the vibrating part of the string.

The bi-string is intended for physical interactions which require two directions of vibration: namely the 'bow connection. The bi-string is basically just a double mono-string, so you could alternately use two mono-strings, one to represent the "horizontal" direction and the other to represent the "vertical" direction. However, for simplicity and efficiency you will generally want to use a 'bi-string.

Options

Controllers

The physical parameters can optionally be controllers instead of numerical values. Therefore, it is possible to modify the physical characteristics of an object, including its pitch, during synthesis. The following example creates a string which varies in length from 1 meter to 50 cm in 2 seconds:

(setq my-ctrl (make-controller 'envelope 1 '((0 1.0) (2 0.5)) ))
(make-object 'mono-string (length my-ctrl))

Tuning

A mono-string can be tuned to a specific pitch, using the (set-pitch ...) function, by adjusting one of the following physical parameters:

  • 'length
  • 'tension
  • 'density
  • 'young

For example:

(setq my-string (make-object 'mono-string))
(set-pitch my-string 'length 330)
You could also use a controller to re-adjust the pitch dynamically, however this is extremely costly in terms of CPU usage, since the entire modal object must be re-computed for every sample. The following example makes a glissando from 220Hz to 440Hz over 2 seconds:

(setq my-string (make-object 'mono-string))
(set-pitch my-string 'length (make-controller 'envelope 1 '((0 220.) (2 440.)) ))
Because of the intense amount of calculation required to compute an object based on a given pitch, hybrid objects can be used as a far more efficient way of making a continuous pitch change (glissando).

When using Modalys in real-time contexts, you can use messages to change the pitch of an object, instead of input signal controllers.

Example

The following example shows a basic use of a bi-string with a bow interaction.

;;;-*-Mode: Lisp; Package: MODALYS -*-
;;; Modalys, simple bowed string example
;;;----------------------------------------------------------------------
;;;
;;; clear the instrument-building workspace :
(new)
;;;
;;; make bi-directional string and bow :
(setq my-string (make-object 'bi-string (length 0.5)))
(setq my-bow (make-object 'bi-two-mass))
;;;
;;; make bowed connection :
(setq my-bow-h-bpt (make-access my-bow 1 'trans0))
(setq my-bow-v-bpt (make-access my-bow 1 'trans1))
(setq my-string-h-bpt (make-access my-string .1 'trans0))
(setq my-string-v-bpt (make-access my-string .1 'trans1))
(setq bc (make-connection 'bow
         my-bow-v-bpt my-bow-h-bpt .01
         my-string-v-bpt my-string-h-bpt 0
         '(2 10 5 4)))
;;;
;;; push the bow (speed and vertical position) :
(setq my-bow-h-mov (make-access my-bow (const 0) 'trans0))
(setq my-bow-v-mov (make-access my-bow (const 0) 'trans1))
(make-connection 'speed my-bow-h-mov  
         (make-controller 'envelope 1 '((0 1) (1 2) (2 1))))
(make-connection 'position my-bow-v-mov 
         (make-controller 'envelope 1 '((0.0 0.010) (0.2 -0.001) (1.5 -0.001) (3 0.010))))
;;;
;;; make output on horizontal direction of string :
(make-point-output (make-access my-string (const .6) 'trans0))
;;;
;;; make samples and play sound :
(run 5)
(play)

★     ★