babo stands for ball-within-the-box. It is a physical model reverberator based on the paper by Davide Rocchesso "The Ball within the Box: a sound-processing metaphor", Computer Music Journal, Vol 19, N.4, pp.45-47, Winter 1995.
The resonator geometry can be defined, along with some response characteristics, the position of the listener within the resonator, and the position of the sound source.
babo2 was introduced to fix the issue of the direct sound parameter (see expert parameters), which is a non-op in the original opcode.
irx, iry, irz -- the coordinates of the geometry of the resonator (length of the edges in meters)
idiff -- is the coefficient of diffusion at the walls, which regulates the amount of diffusion (0-1, where 0 = no diffusion, 1 = maximum diffusion - default: 1)
ifno -- expert values function: a function number that holds all the additional parameters of the resonator. This is typically a GEN2--type function used in non-rescaling mode. They are as follows:
decay -- main decay of the resonator (default: 0.99)
hydecay -- high frequency decay of the resonator (default: 0.1)
rcvx, rcvy, rcvz -- the coordinates of the position of the receiver (the listener) (in meters; 0,0,0 is the resonator center)
rdistance -- the distance in meters between the two pickups (your ears, for example - default: 0.3)
direct -- the attenuation of the direct signal (0-1, default: 0.5). This is a non-op in babo, but has been introduced in babo2.
early_diff -- the attenuation coefficient of the early reflections (0-1, default: 0.8)
Performance
asig -- the input signal
ksrcx, ksrcy, ksrcz -- the virtual coordinates of the source of sound (the input signal). These are allowed to move at k-rate and provide all the necessary variations in terms of response of the resonator.
Examples
Here is a simple example of the babo opcode. It uses the file babo.csd, and drumsMlp.wav.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o babo.wav -W ;;; for file output any platform</CsOptions><CsInstruments>/* Written by Nicola Bernardini */sr=44100ksmps=32nchnls=2; minimal babo instrument;instr1ix=p4; x position of sourceiy=p5; y position of sourceiz=p6; z position of sourceixsize=p7; width of the resonatoriysize=p8; depth of the resonatorizsize=p9; height of the resonatorainputsoundin"drumsMlp.wav"al,arbaboainput*0.7,ix,iy,iz,ixsize,iysize,izsizeoutsal,arendin</CsInstruments><CsScore>/* Written by Nicola Bernardini */; simple babo usage:;;p4 : x position of source;p5 : y position of source;p6 : z position of source;p7 : width of the resonator;p8 : depth of the resonator;p9 : height of the resonator;i102064314.3911.8610; ^^^^^^^ ^^^^^^^^^^^^^^; ||||||| ++++++++++++++: optimal room dims according to; ||||||| Milner and Bernard JASA 85(2), 1989; +++++++++: source positione</CsScore></CsoundSynthesizer>
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o babo_expert.wav -W ;;; for file output any platform</CsOptions><CsInstruments>/* Written by Nicola Bernardini */sr=44100ksmps=32nchnls=2; full blown babo instrument with movement;instr2ixstart=p4; start x position of source (left-right)ixend=p7; end x position of sourceiystart=p5; start y position of source (front-back)iyend=p8; end y position of sourceizstart=p6; start z position of source (up-down)izend=p9; end z position of sourceixsize=p10; width of the resonatoriysize=p11; depth of the resonatorizsize=p12; height of the resonatoridiff=p13; diffusion coefficientiexpert=p14; power user values stored in this functionainputsoundin"drumsMlp.wav"ksource_xlineixstart,p3,ixendksource_ylineiystart,p3,iyendksource_zlineizstart,p3,izendal,arbaboainput*0.7,ksource_x,ksource_y,ksource_z,ixsize,iysize,izsize,idiff,iexpertoutsal,arendin</CsInstruments><CsScore>/* Written by Nicola Bernardini */; full blown instrument;p4 : start x position of source (left-right);p5 : end x position of source;p6 : start y position of source (front-back);p7 : end y position of source;p8 : start z position of source (up-down);p9 : end z position of source;p10 : width of the resonator;p11 : depth of the resonator;p12 : height of the resonator;p13 : diffusion coefficient;p14 : power user values stored in this function; decay hidecay rx ry rz rdistance direct early_difff108-20.950.950000.30.50.8; brighterf208-20.950.50000.30.50.8; default (to be set as)f308-20.950.010000.30.50.8; darkerf408-20.950.70000.30.10.4; to hear the effect of diffusionf508-20.90.50000.32.00.98; to hear the movementf608-20.990.10000.30.50.8; default vals; ^; ----- gen. number: negative to avoid rescalingi201064364314.3911.861016; defaultsi2+464364314.3911.861011; hear brightness 1i2+4643-6-4314.3911.861012; hear brightness 2i2+4643-6-4314.3911.861013; hear brightness 3i2+3.6.4.3-.6-.4.31.4391.1861.00.04; hear diffusion 1i2+3.6.4.3-.6-.4.31.4391.1861.01.04; hear diffusion 2i2+41243-12-4-324.3921.862015; hear movement;i2+464364314.3911.861011; hear brightness 1i2+4643-6-4314.3911.861012; hear brightness 2i2+4643-6-4314.3911.861013; hear brightness 3i2+3.6.4.3-.6-.4.31.4391.1861.00.04; hear diffusion 1i2+3.6.4.3-.6-.4.31.4391.1861.01.04; hear diffusion 2i2+41243-12-4-324.3921.862015; hear movement; ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^ ^; ||||||||||||||||||| ||||||||||||||||| | --: expert values function; ||||||||||||||||||| ||||||||||||||||| +--: diffusion; ||||||||||||||||||| ----------------: optimal room dims according to Milner and Bernard JASA 85(2), 1989; |||||||||||||||||||; --------------------: source position start and ende</CsScore></CsoundSynthesizer>