// 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, // and the loudness of the collision depends on the ball's speed. SetPrintCommands 0; LoadDSO msgGroup.so; LoadDSO samp.so; LoadDSO fm.so; // Bumper mBumper = Create MessageGroup; hB = Create SampleActor; SetDirectory hB "."; LoadFile hB "drip.aiff"; AddMessage mBumper SetAmp hB *0; AddMessage mBumper PlaySample hB "drip.aiff"; // Randomizer mRandomizer = Create MessageGroup; hR = Create SampleActor; SetDirectory hR "."; LoadFile hR "Sonar.aiff"; AddMessage mRandomizer SetAmp hR *0; AddMessage mRandomizer PlaySample hR "Sonar.aiff"; // Accelerator mAccelerator = Create MessageGroup; hA = Create SampleActor; SetDirectory hA "."; LoadFile hA "tractorbeam.aiff"; AddMessage mAccelerator SetAmp hA *0; AddMessage mAccelerator PlaySample hA "tractorbeam.aiff"; // Ball -- speed, height, vertical speed mBall = Create MessageGroup; hBall = Create FmActor; nBall1 = BeginSound hBall SetAmp 0.01 SetCarFreq 1300; nBall2 = BeginSound hBall SetAmp 0.01 SetCarFreq 1304; AddMessage mBall SetCarFreq nBall1 *5 .09; AddMessage mBall SetCarFreq nBall2 *6 .09; AddMessage mBall SetAmp nBall1 *2 .02; AddMessage mBall SetAmp nBall2 *2 .02; AddMessage mBall SetModIndex nBall1 *3 .05; AddMessage mBall SetModIndex nBall2 *3 .05; AddMessage mBall SetCMratio nBall1 *4 .05; AddMessage mBall SetCMratio nBall2 *4 .05; SetPrintCommands 0;