;------------------------------------------------------------------------------------------------------------ ; The Onslaught ; ; COSC 4P98 ; Assignment 2 Part 2 ; Michael Smith ; 2706844 ; March 18, 2007 ; Version 1.0 ;------------------------------------------------------------------------------------------------------------ ; Functions 1 and 3 are used to generate tables for use with the grain opcode. ; Functions 20-23 are used for generating an f-table function from one or more linear function segments. Used for wind instrument. ; Functions 6-9 uses the GEN01 subroutine to read in an AIF audio file. ; F-Statements ( Function Statements ): ;f f-number loadtime table-size GEN-Routine parameter(s)... f 1 0 4096 10 1 f 3 0 4097 20 2 1 ; "Tool_Jambi_Riff.aif" : Small sample of a guitar riff from the song Jambi off of the Tool - 10000 Days album I own, modified. I used Adobe Audition v2.0 to obtain the sound clip. ; "tight_kick_021.aif" : Obtained from http://www.users.bigpond.com/prodigalson/drum.htm for free use. ; "aaa.aif" : Obtained from http://www.shockwave-sound.com/sound-effects/scream_sounds.html for free use. ; "kick2.aif" : Obtained from http://www.users.bigpond.com/prodigalson/drum.htm for free use. f 6 0 0 1 "Tool_Jambi_Riff.aif" 0 4 0 ; 4 -> 16 bits. f 7 0 0 1 "tight_kick_021.aif" 0 4 0 f 8 0 0 1 "aaa.aif" 0 4 0 f 9 0 0 1 "kick2.aif" 0 4 0 f 20 0 1024 -7 0 256 1000 256 1000 256 500 256 0 f 21 0 1024 -7 400 256 800 256 800 256 200 256 500 f 22 0 1024 -7 800 256 1000 256 500 256 1500 256 1000 f 23 0 1024 7 1 512 0 512 1 ;------------------------------------------------------------------------------------------------------------ ; Notes: ; Others. ; i instrument #(p1) start-time (p2) duration(p3) amplitude(p4) frequency(p5) wave-table(p6) attack(p7) release(p8) attack(p9) release(p10) ; Wind. ; i instrument #(p1) start-time(p2) duration(p3) amp. table freq. table1 freq. table2 pan table ampdivisor ; Distorted guitar riff from grain. ( Wind and distance of the sound of a nearing army distort what one may hear clearly otherwise ) i 2 0 12 3000 440 6 10 10 ; Wind ( A little louder amplitude than regular ) i 4 0 8 20 21 22 23 0.75 i 4 3 2 20 22 21 23 0.75 i 4 6 8 20 21 22 23 0.75 i 4 9 6 20 22 21 23 0.75 i 4 12 4 20 21 22 23 0.75 ; Low Drum Beat. i 1 10 10 15000 300 7 20 10 ; Guitar Riff Linear Attack and Release. ( Not very loud, slow moving, far ). i 1 15 10 7000 340 6 10 10 ; 0 means no release. ; Wind ( Lower amplitude, wind is fading and battle is nearing and coming through more ) i 4 20 10 20 21 22 23 1 i 4 23 4 20 22 21 23 1 i 4 26 7 20 21 22 23 1 i 4 27 6 20 22 21 23 1 i 4 30 3 20 21 22 23 1 ; Low Drum Beat. i 1 25 10 25000 440 7 35 15 ; Guitar Riff Linear Attack and Release. ( A little louder, little quicker moving, closer ). i 1 30 15 10000 380 6 10 10 ; Wind ( Lower amplitude, wind is fading even more ) i 4 40 6 20 21 22 23 1.25 i 4 42 4 20 22 21 23 1.25 i 4 45 10 20 21 22 23 1.25 i 4 49 5 20 22 21 23 1.25 i 4 51 10 20 21 22 23 1.25 ; Thundering Drum Beats. i 3 48 3 25000 440 9 i 3 48.1 3 25000 500 9 i 3 48.2 3 25000 400 9 ; Guitar Riff Linear Attack and Sustain, then Quick Release at very end. i 10 50 40 20000 440 6 50 1 20 0 ; Thundering Drum Beats. i 3 60 3 25000 440 9 i 3 60.1 3 23000 500 9 i 3 60.2 3 21000 400 9 i 3 60.25 3 26000 380 9 i 3 60.27 3 23000 520 9 i 3 60.29 3 20000 440 9 ; Wind ( Higher amplitude, wind picks up again as battle is about to ensue ) i 4 60 10 20 21 22 23 0.5 i 4 63 15 20 22 21 23 0.5 i 4 65 13 20 21 22 23 0.5 i 4 70 9 20 22 21 23 0.5 i 4 75 13 20 21 22 23 0.5 ; Drum Beat Linear Attack and Sustain, then Quick Release at end. i 10 61 29 30000 640 7 35 1 20 0 ; War-Battle Screams. i 3 85 2.5 5000 440 8 i 3 86 3 10000 340 8 i 3 86 2 12000 500 8 i 3 88 2 3000 535 8 i 3 86.5 3.5 25000 300 8 i 3 87 2 8000 380 8 i 3 87.5 2.5 20000 440 8 i 3 87 3 15000 340 8 i 3 88 2 10000 510 8 i 3 88.5 1.5 20000 440 8 e ; End of the score. ;------------------------------------------------------------------------------------------------------------