Xsrc and ysrc specify the position of the sound source in terms of a fraction of the x and y dimensions. The arguments .5, .5 for xsrc and ysrc will position a sound source in the middle of the roomset space while .9, .1 will position it at the right front.
Xwall_lft and ywall_lft specify the point at which the left
wall becomes the back wall in terms of a fraction of the
left side of the room only. Xwall_lft is thus a fraction of
the x dimension/2. The arguments .1, .9 for xwall_lft and
ywall_lft will form almost a square corner for the left side
of the room, while .5, .5 will make the left side a straight
line from (0,0) to (x-dimension/2,y-dimension). This will
create a triangular room if it is repeated for the
xwall_right and ywall_right arguments. The right wall arguments
The absorption factor (absrpt) specifies how much the signal
will have decayed by the time it reaches the listener (positioned at (x-dimension/2,0). An absorption factor of 2 will
approximate an average room while 3 will be rather dry, .5
will be highly reverberant and 0 will create the effect of
no absorption at all. A negative absorption factor will
actually cause the sound to get louder as a function of
increased distance.
The thirteen reflection points along the walls are chosen
randomly. The random number generator may be reseeded with
the optional tenth argument, rnd.
rtsetparams(44100, 2) load("ROOM") rtinput("/tmp/1stmove.snd") if (0) { set_option("clobber_on", "audio_off") rtoutput("ROOM1.snd", "sun", "float") } x = 300 y = 200 xsrc = .9 ysrc = .1 xlwall = .1 ylwall = .9 xrwall = .1 yrwall = .9 absorb = 2 seed = .1730 roomset(x, y, xsrc, ysrc, xlwall, ylwall, xrwall, yrwall, absorb, seed) outskip = 0 inskip = 13 dur = 9.0 amp = 3.0 inchan = 0 setline(0,0, 1,1, 9,1, 10,0) ROOM(outskip, inskip, dur, amp, inchan)