1 2// speedt.saol 3// Tests speedt opcode and templates 4// Written by John Lazzaro 5// 6// 7// Both samples from analogue2@aol.com's collection 8// of Moog Rogue samples. 9// 10 11global { 12 13srate 44100; 14krate 100; 15outchannels 1; 16table noise(sample,-1,"noise.wav"); 17table bass(sample,-1,"bass.wav"); 18 19} 20 21// 22// Noise played at three sizes 23// 24 25template <noise, twicenoise, halfnoise> () 26map {factor, size} with { <1, 381952>, <2, 2*381952+1>, <0.5, 190976> } 27 28{ 29 30imports exports table noise; 31table newnoise (empty,size); 32 33speedt(noise,newnoise,factor); 34output(0.4*doscil(newnoise)); 35 36} 37 38// 39// Bass played at three sizes 40// 41 42template <bass, twicebass, halfbass> () 43map {factor, size} with { <1, 110848>, <2, 2*110848+1>, <0.5, 55424> } 44 45{ 46 47imports exports table bass; 48table newbass (empty,size); 49 50speedt(bass,newbass,factor); 51output(0.4*doscil(newbass)); 52 53} 54