[Csnd] : wrap mode in tablew
Date | 2020-03-13 03:50 |
From | Michael McConney |
Subject | [Csnd] : wrap mode in tablew |
Hi All, I was wondering if someone could help me with a simple problem. I have been trying to use the wrap mode in tablew without any success and I am wondering how I am using it wrong. As you can see in the code below that I set the iwgmode to 1 for wrap mode but the program closes after the table input gets to the guardpoint. Is this because of how I have created the pointer? I have also tried making the pointer two times as long to see if it doubles my play time but this does not work. I also tried to enable the wrap mode in pvstanal, but this also did not seem to work. My code is below, I am programming in python with the API. If anyone has suggestions I would appreciate it. Regards, Mike my code: import csnd6 from multiprocessing import Process import multiprocessing orc = """ sr=44100 ksmps=128 nchnls=2 0dbfs=1 gistorageR ftgen 0,0,441000,-7,0 ;AUDIO DATA STORAGE SPACE (10 seconds) gitablelen = ftlen(gistorageR) ;TABLE LENGTH instr 1 gkVol init 3 ainL, ainR ins aRecNdx line 0,gitablelen/sr,1 ;CREATE A POINTER FOR WRITING TO TABLE - FREQUENCY OF POINTER IS DEPENDENT UPON TABLE LENGTH AND SAMPLE RATE aRecNdx = aRecNdx*gitablelen ;RESCALE POINTER ACCORDING TO LENGTH OF FUNCTION TABLE tablew ainR, aRecNdx, gistorageR, 0, 0, 1;WRITE *GATED* AUDIO TO AUDIO STORAGE TABLE fsigR pvstanal 0.9, 0.9, 1, gistorageR ainRT pvsynth fsigR outs ainRT*gkVol, ainRT*gkVol ; endin""" sco = "i1 0 3600" def ecaudio(): c = csnd6.Csound() c.SetOption("-iadc") # Set option for Csound c.SetOption("-odac") c.SetOption("-b128") c.SetOption("-dm0") c.CompileOrc(orc) # Compile the Csound Orchestra string c.ReadScore(sco) # Compile the Csound SCO String c.Start() c.Perform() if __name__== '__main__': p2 = multiprocessing.Process(target=ecaudio) p2.start() |