// Example .aud file for "pinball" demo. // // Source code: sonifications/pinball/pinball.c // .aud file: sonifications/pinball/*.aud // Documentation: sonifications/pinball/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 0; LoadDSO msgGroup.so; LoadDSO samp.so; LoadDSO fm.so; // Bumper mBumper = Create MessageGroup; hB = Create SampleActor; SetDirectory hB "."; SetAmp hB .5; LoadFile hB "drip.aiff"; AddMessage mBumper PlaySample hB "drip.aiff"; // Randomizer mRandomizer = Create MessageGroup; hR = Create SampleActor; SetDirectory hR "."; SetAmp hR .75; LoadFile hR "Sonar.aiff"; AddMessage mRandomizer PlaySample hR "Sonar.aiff"; // Accelerator mAccelerator = Create MessageGroup; hA = Create SampleActor; SetDirectory hA "."; SetAmp hA .25; LoadFile hA "tractorbeam.aiff"; 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; nBallY = BeginSound hBall SetAmp 0.2 SetCarFreq 1 SetCMratio .333; AddMessage mBall SetCarFreq nBallY *0 .05; AddMessage mBall SetModIndex nBallY *1 .05; // sounds like a dentist drill! AddMessage mBall SetAmp nBall1 *2 .05; AddMessage mBall SetAmp nBall2 *2 .05; 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 1;