Anyhow, one the first things we did was to check out the Karplus-Strong algorithm using the RTcmix instrument STRUM. We used the following scorefile to generate a single note:
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ START(0, 3.5, 8.00, 3.5, 2.1, 20000, 1)
rtoutput("somefilename.aiff")into the scorefile after the rtsetparams() line.
We then went on to test the "squish" parameter using a simple algorithmic procedure in the following scorefile:
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ sttime = 0 squish = 0 for (i = 0; i < 20; i = i + 1) { START(sttime, 1.5, 8.00, 3.5, 2.1, 20000, squish) sttime = sttime + 0.5 squish = squish + 0.5 }
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ makegen(1, 2, 7, 0) 7.00 8.00 8.05 8.07 8.09 9.00 9.03 start = 0 for (i = 0; i < 7; i = i + 1) { pitch = sampfunc(1, i) START(start, 3.5, pitch, 3.5, 3.1, 4000, 1) }
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ makegen(1, 2, 7, 0) 7.00 8.00 8.05 8.07 8.09 9.00 9.03 start = 0 for (i = 0; i < 7; i = i + 1) { pitch = sampfunc(1, i) START(start, 3.5, pitch, 3.5, 3.1, 4000, 1) start = start + 0.02 }
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ makegen(1, 2, 7, 0) 7.00 8.00 8.05 8.07 8.09 9.00 9.03 start = 0 for (i = 0; i < 7; i = i + 1) { pitch = sampfunc(1, i) START(start, 3.5, pitch, 3.5, 3.1, 4000, 1) startadd = (random() * 0.03) + 0.015 start = start + startadd }
rtsetparams(22050, 1) /* START(start, dur, pitch (oct.pc), fundamental decay, nyquist decay, amp, squish (0-10), [opt.] stereo, [opt.] delete flag) */ makegen(1, 2, 7, 0) 7.00 8.00 8.05 8.07 8.09 9.00 9.03 start = 0 for(j = 0; j < 10; j = j + 1) { for (i = 0; i < 7; i = i + 1) { pitch = sampfunc(1, i) START(start, 1.0, pitch, 3.5, 3.1, 4000, 1) startadd = (random() * 0.01) + 0.005 start = start + startadd } startadd = (random() * 0.02) + 0.005 start = start + 0.12 + startadd for (i = 6; i >= 0; i = i - 1) { pitch = sampfunc(1, i) START(start, 1.0, pitch, 3.5, 3.1, 4000, 1) startadd = (random() * 0.01) + 0.005 start = start + startadd } startadd = (random() * 0.02) + 0.005 start = start + 0.12 + startadd }
Next we tried to model the whomping sounds of the Warrior Drums of
Burundi. To do this, I pounded on a chair and used magical
close-miking techniques to reproduce a nice, fakey-burundi-drum sound.
After capturing the sound in the soundeditor program and saving it to a soundfile (called "bmono.snd" in the scorefile examples below), we then used the soundeditor program to find the starting times of each of the recorded hits. The times for the down-hits were (Chris thought they sounded like up-hits!):
0.918 1.731 2.500 3.274 4.139 4.937 5.711
7.105 7.874 8.672 9.514 10.312 11.1 11.917
rtsetparams(22050, 2) rtinput("bmono.snd") setline(0,0, 0.002,1, 0.1,1, 0.2,0) reset(22050) makegen(4, 2, 7, 0) 0.918 1.731 2.500 3.274 4.139 4.937 5.711 makegen(5, 2, 7, 0) 7.105 7.874 8.672 9.514 10.312 11.1 11.917 start = 0; for(i = 0; i < 7; i = i + 1) { insk = sampfunc(4, i) STEREO(start, insk, 0.2, 1.0, 0.5) start = start + 0.5 }
Next we created a scorefile that generated a single hit of a group of "burundi drummers" -- this was why we recorded a whole set of different hits; so that we would have a range of similar-yet-different drum-hit sounds to draw upon. The following scorefile sets up 5 "burundi drummers":
rtsetparams(22050, 2) rtinput("bmono.snd") setline(0,0, 0.002,1, 0.1,1, 0.2,0) reset(22050) makegen(4, 2, 7, 0) 0.918 1.731 2.500 3.274 4.139 4.937 5.711 makegen(5, 2, 7, 0) 7.105 7.874 8.672 9.514 10.312 11.1 11.917 for(i = 0; i < 5; i = i + 1) { index = random() * 7 insk = sampfunc(4, index) STEREO(0, insk, 0.2, 0.2, 0.5) }
rtsetparams(22050, 2) rtinput("bmono.snd") setline(0,0, 0.002,1, 0.1,1, 0.2,0) reset(22050) makegen(4, 2, 7, 0) 0.918 1.731 2.500 3.274 4.139 4.937 5.711 makegen(5, 2, 7, 0) 7.105 7.874 8.672 9.514 10.312 11.1 11.917 start = 0; for(i = 0; i < 17; i = i + 1) { for(j = 0; j < 5; j = j + 1) { index = random() * 7 insk = sampfunc(4, index) STEREO(start, insk, 0.2, 0.2, random()) } start = start + 0.15 + (random()*0.01) for(j = 0; j < 5; j = j + 1) { index = random() * 7 insk = sampfunc(5, index) STEREO(start, insk, 0.2, 0.2, random()) } start = start + 0.11 + (random()*0.01) }
rtsetparams(22050, 2) rtinput("bmono.snd") setline(0,0, 0.002,1, 0.1,1, 0.2,0) reset(22050) makegen(4, 2, 7, 0) 0.918 1.731 2.500 3.274 4.139 4.937 5.711 makegen(5, 2, 7, 0) 7.105 7.874 8.672 9.514 10.312 11.1 11.917 start = 0 slowness = 0.01 add1 = 0.22 add2 = 0.17 for(i = 0; i < 17; i = i + 1) { for(j = 0; j < 5; j = j + 1) { index = random() * 7 insk = sampfunc(4, index) STEREO(start, insk, 0.2, 0.2, random()) } start = start + add1 + (random()*0.01) add1 = add1 + slowness for(j = 0; j < 5; j = j + 1) { index = random() * 7 insk = sampfunc(5, index) STEREO(start, insk, 0.2, 0.2, random()) } start = start + add2 + (random()*0.01) add2 = add2 + slowness }
2. Find some other plucked-string strumming style and try to model it.
3. One of the most annoying aspects of the Burundi drum exercise is going through to find the start times of each digitized drum-hit 'by-hand' -- how could you automate this?