MOVE
[note: This documentation is taken from the earlier cmix
disk-based documentation. I believe that most of it is accurate
for PLACE, but it looks like Doug has added several new
additional scorefile commands for use with this
instrument: oldmatrix and matrix and
param.
I have no idea what they do. -- BGG]
MOVE
is Doug Scott's moving sound simulation instrument, which simulates the acoustic space of a room and let's the user define the trajectory of a
soundfile moving through space within the room, relative to the listener's position.
This is similar to Doug's other room-simulation program,
PLACE,
the difference being the ability to specify a moving sound source.
MOVE is a bit more computationally expensive than PLACE.
The instrument has optional parameters for microphone placement and the computation of inter-aural delays.
MOVE requires stereo output.
Syntax:
(taken from Doug Scott's documentation)
to define an acoustic space:
space (dist_to_front, dist_to_right, -dist_to_back, -dist_to_left, height, abs_fact, rvbtime)
space is the setup call for the room in which the sound will appear. Since the listener (YOU) is at point (0,0) coordinate-wise, the locations of the 4 walls are specified like in an x,y coordinate system:
y
|
-x---0---x
|
-y
Therefore the distance to the back and left walls must be specified as negative. All, including height, are in feet. Abs_fac is a number between 0 (min) and 10 (max) that determines how reflective the walls are.
Rvbtime is the approximate length of reverb in
seconds (max depends on roomsize).
to setup microphones:
mikes(mike_angle, pattern_factor) /* optionally this... */
mikes_off() /* or this */
mikes is an optional setup call for times when you wish to simulate microphone recording (most of the time, actually). The arguments are mike_angle, which is the angle *each* microphone makes with a line drawn between them (i.e., 45 puts them at a 90 degree angle FROM EACH OTHER). pattern_factor is a value between 0 and one; 0 produces an omnidirectional mike, 1 produces a hypocardioid pattern, 0.5 produced the familiar cardioid pattern. If this call is left out, the pattern will be omnidirectional.
mikes_off() is used following a previous call to mikes(), in order to cancel mike mode in the event that you wish to use binaural mode (see below), or default to omnidirectional.
to define a trajectory for a soundfile:
path(time0,distance0,angle0, time1,distance1,angle1, ..., timeN,distN,angleN)
or:
cpath(time0,xcoord0,ycoord0, time1,xcoord1,ycoord1, ..., timeN,xcoordN,ycoordN)
or even something like this:
makegen(-1, 9, 1024, 1, 30, 0) /* x dimension = 1 +- 30 ft sine */
makegen(-2, 9, 1024, 1, 20, 30) /* y dimension = 1 +- 20 ft sine 30 deg. */
cparam(1, 2) /* combined, these produce a 20 x 30 foot elliptical path */
path allows you to specify the trajectory of the sound source as triplets
representing relative time (as in setline), distance (in feet), and angle (in
degrees).
0.0 source
| /
| /
| /
| /
|/
you
Be sure to stay inside bounds of the room (it may take a bit of trigonometry
[or guessing] to do that).
If you prefer cartesian coordinates, use cpath instead, entering triplets of
time, x coordinate (left-right), y coordinate (front-back).
source
|
|
|
|
| (y dist.)
|
(x dist.) |
you-------------
cparam allows you to parametrically specify the changes in x and y location as a function of time. For example, to have your sound move in a 50 foot circle, once over the course of the sound, create two gen functions as shown in the example, one with 0 degrees phase (sine) and one with 90 degrees phase (cosine). If the harmonic number is set to numbers above 1, the sound will cycle back and forth in that dimension (x or y) a number of times equal to the harmonic number. The amplitude of the functions represents the displacement (plus and minus) in feet on either side of the center line. Be sure to use the negative slot numbers to avoid rescaling the values (see manpage for makegen).
to control update times:
threshold(reset_distance)
threshold allows you to determine how often the program updates the location
of the source. A typical value is 0.01 (feet). Smaller values give somewhat
smoother results at the cost of run time (which can go as high as 600 to 1!!).
and finally:
MOVE (outskip, inskip, dur, amp, dist_between_mikes, rvb_amp)
MOVE has its first 3 args the same as mix, etc.
amp: amplitude factor for input signal (done before any of the processing).
dist_between_mikes: remember that this simulates a stereo image. Your 'mikes' should be anywhere from 1 to, say, 10 feet apart depending on the size of the room. If set to less than 1 foot (< 1.0), and if mikes() has not been called (or mikes_off() has been called), the program will be in binaural mode, which simulates the filtering effects of human ears. This mode is substantially slower, but produces dramatic results when listened to through headphones.
The last number is a global amp factor that affects all reflections and reverb
equally, but not the direct signal. This is usually set to 1.0.
in comment form:
/* MOVE -- Doug Scott's room simulator with moving sound sources
*
* space (dist_to_front, dist_to_right, -dist_to_back, -dist_to_left, height, abs_fact, rvbtime)
*
* mikes(mike_angle, pattern_factor)
* mikes_off()
*
* path(time0,distance0,angle0, time1,distance1,angle1, ..., timeN,distN,angleN)
* or:
* cpath(time0,xcoord0,ycoord0, time1,xcoord1,ycoord1, ..., timeN,xcoordN,ycoordN)
* or:
* makegen(-1, 9, 1024, 1, 30, 0)
* makegen(-2, 9, 1024, 1, 20, 30)
* cparam(1, 2)
*
* threshold(reset_distance)
*
* MOVE (outskip, inskip, dur, amp, dist_between_mikes, rvb_amp)
*
*/
An example score:
rtsetparams(44100, 2)
load("move")
rtinput("/sndh/bob.dole.snd")
rtoutput("/sndh/bob.dole.bigroom.snd")
space(50, 50, -750, -80, 25, 1, 3)
mikes_off()
path(0, 25, 0, 3, 15, 90)
MOVE(0, 0, 5, 1, 0, 1)