>>I've been playing around doing something like a Shepherd tone scale using multiple band pass filters to create the illusion of a constantly rising filter. It occurred to me that someone has probably already done this? I've been using between 4 and 8 bandpass filter all moving upwards, fading in from around 100hz and fading out at about 6KHz. I'm having a lot of trouble getting it to loop properly without audible glitches. I read something about this a long time ago but I don't remember where so I've been sort of making it up as I go along. Has anyone got any example scores/orchestras they could let me have? >> it's synchronicitous that you bring this up: I just last night got the configuration correct for compiling such an instrument as you mention. It's related to the shepard tones, but developed by Risset to manifest a glissando rather than discrete scale members, hence, an endless glissando. It's given in Dodge/Jerse, p95 in flowchart form, and offered in csound code by prof Pinkston, in one or another of the many example files available for Csound. It uses a method different than yours, basically, it appears, an additive synthesis algorithm. herewith are the orc and sco files (a rather large message, I hope no one minds): ==================================================== the bell shaped curve specified by Risset in Dodge must be compiled first: =========================== ; bellfunc.orc ; ; Even though csound only provides a limited number of stock gen subroutines, ; it includes one (gen 1) which can read in an external file. Hence, you ; can use a standalone program to generate functions that aren't standard. ; In fact, as this example shows, you can use csound itself to create them. ; You just have to remember to perf with the floating point option (-f)... ; ; This orchestra will generate a bell-shaped function with max amp of 1.0 -- ; required by endless.orc for an amplitude control function. ; Say "perf -f bellfunc.orc bellfunc.sco" to run it, then rename the output ; test.sf file to soundin.10 so that endless.sco can read it in via Gen 1. rp ; sr = 1 ;N.B. we're not generating audio here, just... kr = 1 ;a bunch of values for an array, so the... ksmps = 1 ;sr and kr don't really matter. However,... ksmps = 1 ;it's convenient to make them = 1, so that... nchnls = 1 ;p3 can be used to specify the number of... ;values to compute directly. instr 1 ipi = 3.14159 isize = p3-1 ;since sr=1, p3 has number of locs to generate kx init 0 ; Risset's formula (from Dodge): exp(-4.8283*(1-cos(2*pi*(x-255.5)/511))) aval = exp(-4.8283*(1-cos(2*ipi*(kx-(isize*.5))/isize))) kx = kx+1 display aval,p3*.5 display aval,p3 out aval endin ======================= ;score to generate bell function in p3 locations i01 0 2048 e ;=========================================================================; ; ; ; Risset's Endless Glissando Instrument ; ;________________________________________________________________________ ; ; ; ; This classic instrument is described in Dodge's Computer Music text ; ; ; ;=========================================================================; ; Coded by Professor Russell Pinkston - University of Texas at Austin ; ;=========================================================================; ; from the Csound Anthology of Instruments, Orchestras, and Scores (1990) ; ; compiled and edited by Dr. Richard Boulanger ; ;=========================================================================; sr = 44100 kr = 2205 ksmps = 20 nchnls = 1 instr 1 ifreq = p5 if (ifreq >= 20) igoto continue ifreq = cpspch(p5) ;p5 must be in oct.pch continue: ;All "kamp" tables use soundin.6 kphase phasor 1/p6 ;a floating point bell shaped kenvlp linen p4,1,p3,1 ;function specified by Risset: ;exp(-4.8283*(1-cos(2*pi*(x-255.5)/511))) kamp1 table kphase,3,1,0,1 kcps1 tablei kphase,4,1,0,1 asig1 oscili kamp1,kcps1*ifreq,1 kamp2 table kphase+.1,3,1,0,1 kcps2 tablei kphase+.1,4,1,0,1 asig2 oscili kamp2,kcps2*ifreq,1 kamp3 table kphase+.2,3,1,0,1 kcps3 tablei kphase+.2,4,1,0,1 asig3 oscili kamp3,kcps3*ifreq,1 kamp4 table kphase+.3,3,1,0,1 kcps4 tablei kphase+.3,4,1,0,1 asig4 oscili kamp4,kcps4*ifreq,1 kamp5 table kphase+.4,3,1,0,1 kcps5 tablei kphase+.4,4,1,0,1 asig5 oscili kamp5,kcps5*ifreq,1 kamp6 table kphase+.5,3,1,0,1 kcps6 tablei kphase+.5,4,1,0,1 asig6 oscili kamp6,kcps6*ifreq,1 kamp7 table kphase+.6,3,1,0,1 kcps7 tablei kphase+.6,4,1,0,1 asig7 oscili kamp7,kcps7*ifreq,1 kamp8 table kphase+.7,3,1,0,1 kcps8 tablei kphase+.7,4,1,0,1 asig8 oscili kamp8,kcps8*ifreq,1 kamp9 table kphase+.8,3,1,0,1 kcps9 tablei kphase+.8,4,1,0,1 asig9 oscili kamp9,kcps9*ifreq,1 kamp10 table kphase+.9,3,1,0,1 kcps10 tablei kphase+.9,4,1,0,1 asig10 oscili kamp10,kcps10*ifreq,1 asum = asig1+asig2+asig3+asig4+asig5+asig6+asig7+asig8+asig9+asig10 out asum*kenvlp endin ======================================== ;the sco file ; Generate x seconds (ip2)of endless glissando with a x second cycle time (ip5) ; Function 03 reads soundin.6 the bell shaped curve specified by Risset in Dodge f01 0 512 10 1 f02 0 513 7 0 512 1 f03 0 2049 1 6 0 1 1 2 f04 0 513 5 1 512 .0009766 i01 0 60 10000 5000 120 e ======================================================== I changed the code slightly to be correct . . that is, the original code wouldn't compile, the orc looking for a bell shaped function by a different name than the docs suggested. If you have your environment SET correct though, the above should work for you (pc). oh yeah, I've lurked this list for *years* but never introduced myself: I bring a lot of musical experience to the study of csound, but little else: I have a couple of degrees in music theory, and mucho time playing keyboards, all styles, jazz to bartok, many megs of midi files played live if you want it, and I consider myself a perpetual beginner at csound. Hope all the above is helpful. I think the key to the difference in approach between yours and Rissets is the use of phase offsets for eleminating the 'glitch' you point out. I'm up for correction on that though. Jim