// Example .aud file for "pinball" demo. // // Source code: tut/pinball.c // Documentation: tut/pinball.html // // Two FM tones, slightly detuned, beat against each other for the // ball's sound; soundfiles are played when the ball collides with things. SetPrintCommands 1; LoadDSO msgGroup.so; LoadDSO pnoise.so; LoadDSO add.so; LoadDSO later.so; // This actor is for terminating notes started in message groups, below. hLater = Create LaterActor; // Bumper mBumper = Create MessageGroup; hB = Create PseudoNoiseActor; SetModIndex hB 5; AddMessage mBumper BeginSound hB SetAmp .4; AddMessage mBumper AddMessage hLater .15 SetAmp *? 0 .08; AddMessage mBumper AddMessage hLater .25 Delete *?; // Randomizer mRandomizer = Create MessageGroup; hR = Create PseudoNoiseActor; SetModIndex hB .05; AddMessage mRandomizer BeginSound hB SetAmp .2; AddMessage mRandomizer AddMessage hLater .90 SetAmp *? 0 .04; AddMessage mRandomizer AddMessage hLater .95 Delete *?; // Accelerator mAccelerator = Create MessageGroup; hA = Create AddActor; AddMessage mAccelerator BeginSound hA SetFreq 220 SetAmp *0; AddMessage mAccelerator SetAmplPartials *? [.07 .05 0 *0]; AddMessage mAccelerator SetFreq *? 660 .3; // ramp down volume AddMessage mAccelerator AddMessage hLater .2 SetAmp *? 0 .1; // turn the note off a moment later AddMessage mAccelerator AddMessage hLater .32 Delete *?; // Ball -- height (*0), vertical velocity (*1) mBall = Create MessageGroup; hBall = Create AddActor; nBallY = BeginSound hBall SetAmp 0.02 SetFreq 1; SetAmplPartials nBallY [0 .2 .5 .2]; AddMessage mBall SetFreq nBallY *0 .05; AddMessage mBall SetIthAmpl nBallY 5 *1 .05; SetPrintCommands 0;