[Csnd-dev] a-rate loopseg
Date | 2016-12-14 04:51 |
From | Peter Burgess |
Subject | [Csnd-dev] a-rate loopseg |
Attachments | uggab.c uggab.h |
Hi! I've been trying to change the loopseg opcode to work at a-rate, but I'm failing to get any output signal. I have built it successfully into Csound, I have printed the audio sample values out to the terminal while it runs to double check they are being created correctly and I have checked and double checked my code. I can't spot the problem so far... Any chance anyone could have a glance at the source? The only thing I can think that I might have done wrong is allocating the memory for the audio output array. Bellow are the a-rate loopseg functions I wrote, which are just modifications of the original loopseg functions from uggab.c, and the entry in the OENTRY localops[]. I have also attached my new modified source files. static int loopseg_a_set(CSOUND *csound, LOOPSEG *p) { p->nsegs = p->INOCOUNT-3; // Should check this is even if (UNLIKELY((p->nsegs&1)!=0)) csound->Warning(csound, Str("loop opcode: wrong argument count")); p->args[0] = FL(0.0); p->phs = *p->iphase; // Allocate memory for the output array MYFLT *aOut= p->out; uint32_t offset = p->h.insdshead->ksmps_offset; uint32_t early = p->h.insdshead->ksmps_no_end; uint32_t nsmps = CS_KSMPS; if (UNLIKELY(offset)) memset(aOut, '\0', offset*sizeof(MYFLT)); if (UNLIKELY(early)) { nsmps -= early; memset(&aOut[nsmps], '\0', early*sizeof(MYFLT)); } return OK; } static int loopseg_a(CSOUND *csound, LOOPSEG *p) { MYFLT *argp=p->args; MYFLT beg_seg=FL(0.0), end_seg, durtot=FL(0.0); double phs, si=*p->freq*CS_ONEDKR; int nsegs=p->nsegs+1; int j; uint32_t offset = p->h.insdshead->ksmps_offset; uint32_t early = p->h.insdshead->ksmps_no_end; uint32_t n, nsmps = CS_KSMPS; // Calculate the normalised phase per a-rate sample double aPhsPerSamp = *p->freq * csound->onedsr; MYFLT aOut[nsmps]; if (*p->retrig) phs=p->phs=*p->iphase; else phs=p->phs; for (j=1; j |
Date | 2016-12-14 12:34 |
From | Peter Burgess |
Subject | Fwd: a-rate loopseg |
Attachments | uggab.c uggab.h |
I posted this in the Dev list last night, but I figured it might get a wider audience here... Hi! I've been trying to change the loopseg opcode to work at a-rate, |
Date | 2016-12-14 19:36 |
From | jpff |
Subject | Re: [Csnd-dev] a-rate loopseg |
On Wed, 14 Dec 2016, Peter Burgess wrote: > Hi! I've been trying to change the loopseg opcode to work at a-rate, > but I'm failing to get any output signal. I have built it successfully > into Csound, I have printed the audio sample values out to the > terminal while it runs to double check they are being created > correctly and I have checked and double checked my code. I can't spot > the problem so far... > > Any chance anyone could have a glance at the source? The only thing I > can think that I might have done wrong is allocating the memory for > the audio output array. > > Bellow are the a-rate loopseg functions I wrote, which are just > modifications of the original loopseg functions from uggab.c, and the > entry in the OENTRY localops[]. > > I have also attached my new modified source files. This is wrong. Thee is no need to write to aOut at init time as the main code writes to it. Also no allocation of memory for output is needed --- and is wrong > > static int loopseg_a_set(CSOUND *csound, LOOPSEG *p) > { > p->nsegs = p->INOCOUNT-3; > // Should check this is even > if (UNLIKELY((p->nsegs&1)!=0)) > csound->Warning(csound, Str("loop opcode: wrong argument count")); > p->args[0] = FL(0.0); > p->phs = *p->iphase; > > // Allocate memory for the output array > MYFLT *aOut= p->out; > uint32_t offset = p->h.insdshead->ksmps_offset; > uint32_t early = p->h.insdshead->ksmps_no_end; > uint32_t nsmps = CS_KSMPS; > > if (UNLIKELY(offset)) memset(aOut, '\0', offset*sizeof(MYFLT)); > if (UNLIKELY(early)) { > nsmps -= early; > memset(&aOut[nsmps], '\0', early*sizeof(MYFLT)); > } > return OK; > } > |
Date | 2016-12-14 19:45 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Thanks for casting your eye over it! Ok, so I should scrap that init function and stick with the original loopseg_set? Which is this: static int loopseg_set(CSOUND *csound, LOOPSEG *p) { p->nsegs = p->INOCOUNT-3; // Should check this is even if (UNLIKELY((p->nsegs&1)!=0)) csound->Warning(csound, Str("loop opcode: wrong argument count")); p->args[0] = FL(0.0); p->phs = *p->iphase; return OK; } The other function is an a-rate version of loopseg. I've just piggybacked off the k-rate version. When it figures out which segment of the looped envelope it is in (using the phs, as with the k-rate loopseg), it proceeds to calculate ksmps worth of samples, and keeps track of which segment it is in as it does so. Would it help if I commented up the original k-rate version and posted that along with my new version? It did take me a while to decipher what the original was doing On Wed, Dec 14, 2016 at 7:36 PM, jpff |
Date | 2016-12-14 20:08 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
I've just looked through other source I've written. Some of that extra stuff I added to the init function is for the sample accurate mechanism, my mistake! When writing pluggin opcodes though, I've been advised to use things like this to allocate memory: csound->AuxAlloc(csound, nsmps * sizeof(MYFLT), &p->aux1); p->aOut = (MYFLT*)p->aux1.auxp;//Also zeros it Is that necessary? Or is that just for pluggins? Or have I got the wrong end of the stick about that? On Wed, Dec 14, 2016 at 7:45 PM, Peter Burgess |
Date | 2016-12-14 20:22 |
From | jpff |
Subject | Re: [Csnd-dev] a-rate loopseg |
On Wed, 14 Dec 2016, Peter Burgess wrote: > I've just looked through other source I've written. Some of that extra > stuff I added to the init function is for the sample accurate > mechanism, my mistake! > > When writing pluggin opcodes though, I've been advised to use things > like this to allocate memory: > > csound->AuxAlloc(csound, nsmps * sizeof(MYFLT), &p->aux1); > p->aOut = (MYFLT*)p->aux1.auxp;//Also zeros it > > Is that necessary? Or is that just for pluggins? Or have I got the > wrong end of the stick about that? DO NOT ALLOCATE MEMORY FR RESULTS!!!!! If you need a local persistant array for performance then yes that is how |
Date | 2016-12-14 20:31 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
So, I am using the loopseg opcode, which as you probably already know, is a looped envelope that allows for krate modulation of the envelope segments. Currently it only supports k-rate output of the envelope, and I am getting a lot of noise when there are steep rising or falling segments in the loop. I know this can be caused by using k-rate modulations instead of a-rate, so I thought I would see if I could implement an a-rate version myself. Also, it seemed like a good challenge to undertake, especially as the source for the original hasn't got any comments, so I had to figure out what the hell was going on ;) There are other good reasons I can think of for an a-rate version too. It would essentially turn it into a really excitable and experimental oscillator, in which you could tweak the line segments... a bit like a k-rate controlled GEN07 ftable, but one in which you don't need to worry about table size, as it always re-normalises the total segement length and cycles it at the given cps. I think it could be a lot of fun! I have figured out what the original loopseg is doing now, and I have made what I thought would be the correct modifications, but I get no sound! It builds fine, and runs without error, but for some reason it isn't outputting anything. I have done a little printf()ing for debug purposes, and it is definately generating the numbers. I'm not sure what I've missed! I was hoping looking at the code after some sleep, and not at 5am, might help me spot my mistake, but I've been at it for |
Date | 2016-12-14 20:33 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Ok right, I think I'm with you now. So only if I need to store an array from k-cycle to k-cycle do I need to allocate memory like that. Does that include saving the last k-cycles output? Does that get cleared each k-cycle, or is that still there the next pass round? On Wed, Dec 14, 2016 at 8:31 PM, Peter Burgess |
Date | 2016-12-15 09:02 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] a-rate loopseg |
Attachments | developing_opcodes_updated.pdf |
This might help
======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 14 Dec 2016, at 20:33, Peter Burgess <pete.soundtechnician@gmail.com> wrote: > > Ok right, I think I'm with you now. So only if I need to store an > array from k-cycle to k-cycle do I need to allocate memory like that. > Does that include saving the last k-cycles output? Does that get > cleared each k-cycle, or is that still there the next pass round? > > On Wed, Dec 14, 2016 at 8:31 PM, Peter Burgess > <pete.soundtechnician@gmail.com> wrote: >> So, I am using the loopseg opcode, which as you probably already know, >> is a looped envelope that allows for krate modulation of the envelope >> segments. Currently it only supports k-rate output of the envelope, >> and I am getting a lot of noise when there are steep rising or falling >> segments in the loop. I know this can be caused by using k-rate >> modulations instead of a-rate, so I thought I would see if I could >> implement an a-rate version myself. Also, it seemed like a good >> challenge to undertake, especially as the source for the original >> hasn't got any comments, so I had to figure out what the hell was >> going on ;) >> >> There are other good reasons I can think of for an a-rate version too. >> It would essentially turn it into a really excitable and experimental >> oscillator, in which you could tweak the line segments... a bit like a >> k-rate controlled GEN07 ftable, but one in which you don't need to >> worry about table size, as it always re-normalises the total segement >> length and cycles it at the given cps. I think it could be a lot of >> fun! >> >> I have figured out what the original loopseg is doing now, and I have >> made what I thought would be the correct modifications, but I get no >> sound! It builds fine, and runs without error, but for some reason it >> isn't outputting anything. I have done a little printf()ing for debug >> purposes, and it is definately generating the numbers. I'm not sure >> what I've missed! I was hoping looking at the code after some sleep, >> and not at 5am, might help me spot my mistake, but I've been at it for >> another hour today, and I can't see it > > > > -- > http://algorythmradio.com > https://soundcloud.com/algorythmradio |
Date | 2016-12-15 21:17 |
From | joachim heintz |
Subject | Re: [Csnd-dev] a-rate loopseg |
i started to update the text in http://write.flossmanuals.net/csound/extending-csound/ with the version you attached. then i saw that at page 4 of the pdf the example does not contain any more the sample accurate version which the flossmanual text has. should this be changed in the flossmanual text, too, or did you miss it in the pdf? joachim On 15/12/16 10:02, Victor Lazzarini wrote: > This might help > > > ======================== > Prof. Victor Lazzarini > Dean of Arts, Celtic Studies, and Philosophy, > Maynooth University, > Maynooth, Co Kildare, Ireland > Tel: 00 353 7086936 > Fax: 00 353 1 7086952 > >> On 14 Dec 2016, at 20:33, Peter Burgess |
Date | 2016-12-15 21:20 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] a-rate loopseg |
The sample accurate absolutely must be in the documentation. Best, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Dec 15, 2016 at 4:17 PM, joachim heintz |
Date | 2016-12-15 21:31 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] a-rate loopseg |
this might not be the most complete version of the document actually, so don't worry about it. I might have deleted the section to simplify things for use in class (or god knows what I was thinking then...) Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 15 Dec 2016, at 21:17, joachim heintz |
Date | 2016-12-15 21:58 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Thanks very much guys! I will have a look through that and see what I can figure it out. The opcode is very nearly working. I am managing to build it and use it, it's just not spitting out my audio rate data, despite the fact I know it is generating the audio vector in the opcode. I have created other successful opcodes, including audio rate ones. My code is clearly just arrey somewhere, I will have to keep looking over the code to find the error. I'm pretty sure I can simplify what I've written too, there is a section that isn't really nessacary, I just left it in so it was similar to the k-rate version, but that's not really a good reason to leave that in. On Thu, Dec 15, 2016 at 9:31 PM, Victor Lazzarini |
Date | 2016-12-16 15:44 |
From | joachim heintz |
Subject | Re: [Csnd-dev] a-rate loopseg |
ok — so i leave the floss example as it is now. any time you have a new version which you like to see at the floss manual, just send me and i'll update. joachim On 15/12/16 22:31, Victor Lazzarini wrote: > this might not be the most complete version of the document actually, so don't worry about it. > I might have deleted the section to simplify > things for use in class (or god knows what > I was thinking then...) > > Victor Lazzarini > Dean of Arts, Celtic Studies, and Philosophy > Maynooth University > Ireland > >> On 15 Dec 2016, at 21:17, joachim heintz |
Date | 2016-12-16 23:14 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Alright, I've discovered something odd about the a-rate loopseg opcode I've been writing... I've written a bunch of printf() instances to help figure things out. They ONLY appear in my audio rate loopseg function, which is named loopseg_a (the k-rate version is just loopseg). My oentry listings for both the k-rate and a-rate version looks like this: { "loopseg", S(LOOPSEG), 0,3, "k", "kkiz", (SUBR)loopseg_set, (SUBR)loopseg, NULL}, { "loopseg.a",S(LOOPSEG), 0,5, "a", "kkiz", (SUBR)loopseg_set, NULL, (SUBR)loopseg_a}, As you can see, only the k-rate function should be called by the k-rate loopseg, and only the a-rate function should be called by the a-rate loopseg, however, when I call the k-rate version, everything works normally apart from all the printf() statements from the a-rate function are still happening. What's more, if I use the a-rate loopseg, the console output strongly suggests that there are TWO instances of the a-rate function being called every k-frame, and I get no audio output if I multiply the audio signal anything by the loopseg_a envelope that is created. If I do not apply the envelope to the audio signal, the note sounds briefly and then cuts out before it should. Any ideas on what the hell is going on here? How on earth is it calling my a-rate function when using the k-rate version? And how is it calling it twice when I am purposely using the a-rate version? On Fri, Dec 16, 2016 at 3:44 PM, joachim heintz |
Date | 2016-12-17 14:20 |
From | John ff |
Subject | Re: [Csnd-dev] a-rate loopseg |
Run with a -v option to see what was parsed. I f you do not understand the output send it to me
Sent from TypeApp
On 16 Dec 2016, at 23:15, Peter Burgess <pete.soundtechnician@GMAIL.COM> wrote: Alright, I've discovered something odd about the a-rate loopseg opcode |
Date | 2016-12-17 15:13 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Thanks! I forgot about the verbose output, but probably because I don't understand it, haha. I'll give that a go tonight anyway. Out if interest, I chose debug mode when I built Csound last week, but I'm not really sure what is meant to change, or what I need to do to utilise it. Are there breakpoints or something I can use in debug mode? On 17 Dec 2016 2:20 p.m., "John ff" <jpff@codemist.co.uk> wrote:
|
Date | 2016-12-17 16:56 |
From | jpff |
Subject | Re: [Csnd-dev] a-rate loopseg |
Debug enables -g compilation so gdb can be used. Ta gives symbolic debugging, breakpoints, watches etc. If you are serious about developing code either be lucky or learn gdb (and valgrind) ==John On Sat, 17 Dec 2016, Peter Burgess wrote: > Thanks! I forgot about the verbose output, but probably because I don't > understand it, haha. I'll give that a go tonight anyway. > Out if interest, I chose debug mode when I built Csound last week, but I'm not > really sure what is meant to change, or what I need to do to utilise it. Are > there breakpoints or something I can use in debug mode? > > On 17 Dec 2016 2:20 p.m., "John ff" |
Date | 2016-12-17 17:17 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] a-rate loopseg |
GIve my blog post about coding a read. It's not about programming languages, it is about the workflow and thought processes involved in writing good code. http://michaelgogins.tumblr.com/How_to_Program Best, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sat, Dec 17, 2016 at 10:13 AM, Peter Burgess |
Date | 2016-12-17 17:58 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
I believe I had a read of that a while back actually mic, was very useful! I might give it another read though. I can't actually remember what it said now, aside from using very verbose variable names. That has since become part of my usual programming style, and I've been all the better for it! I have to admit, my only knowledge of debuggers is in an IDE. Do I need to debug from the command line to debug Csound code? It might be easier just to keep and printf()ing until I figure it out ;) On 17 Dec 2016 5:17 p.m., "Michael Gogins" <michael.gogins@gmail.com> wrote: GIve my blog post about coding a read. It's not about programming |
Date | 2016-12-17 18:56 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] a-rate loopseg |
There are visual debuggers for GDB on Windows. I currently use CodeLite (https://codelite.org/). I used to use Emacs (https://www.gnu.org/software/emacs/). Both are cross-platform. But as I say in my post, I try to avoid the debugger. But of course, that's not always possible! Don't think I never use it! The main thing I say in my post is to write code that is really, really easy to understand, ideally there are no comments but it is still clear what is going on. Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sat, Dec 17, 2016 at 12:58 PM, Peter Burgess |
Date | 2016-12-17 19:20 |
From | jpff |
Subject | Re: [Csnd-dev] a-rate loopseg |
Perhaps I should add that whenever I use gdb I feel I have failed, either to write corecct code or to understand it Never use a graphical fe to gdb though On Sat, 17 Dec 2016, Michael Gogins wrote: > There are visual debuggers for GDB on Windows. I currently use > CodeLite (https://codelite.org/). I used to use Emacs > (https://www.gnu.org/software/emacs/). Both are cross-platform. But as > I say in my post, I try to avoid the debugger. But of course, that's > not always possible! Don't think I never use it! > > The main thing I say in my post is to write code that is really, > really easy to understand, ideally there are no comments but it is > still clear what is going on. > > Regards, > Mike |
Date | 2016-12-17 20:00 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] a-rate loopseg |
It's true that 90% of the time, gdb only points out mistakes that are obvious and could have fixed by looking carefully at the code. The other 10% is made up of things that are not obvious and that gdb gives no clue about whatsoever... Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 17 Dec 2016, at 19:20, jpff |
Date | 2016-12-17 20:53 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Haha, yeah, actually that has been part of my experience too. But with really complex programs, I have found it very useful at times On 17 Dec 2016 8:01 p.m., "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote: It's true that 90% of the time, gdb only points out mistakes that are obvious and could have fixed by looking carefully at the code. The other 10% is made up of things that are not obvious and that gdb gives no clue about whatsoever... |
Date | 2016-12-17 20:57 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
GBD does have the useful ability to show you any variable value that's in scope though, and seeing the full stack listed and being able to move up and down it to check what's happened in different parts if the stack can be pretty Damn useful On 17 Dec 2016 8:53 p.m., "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
|
Date | 2016-12-18 22:20 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
John: I've ran a super simple version with -v option, it is literally just the audio rate loopseg opcode going for 2 seconds (theoretically). How much of the output should I paste here? It's obviously pretty damn long. If you need all the first stuff too, let me know. I don't understand most of it until it gets to this bit: -> $$ = nterm orcfile () Stack now 0 Entering state 20 Now at end of input. Shifting token $end () Entering state 72 Stack now 0 20 72 Cleanup: popping token $end () Cleanup: popping nterm orcfile () Semantic Analysis (0x1bdfb20)Instr: 1 read(0x1be1cf0): { } write:(0x1be1ca0) { } read_write(0x1bdfb80): { } Semantic Analysis Ends Parsing successful! /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 0 esr = 44100.0, ekr = 100.0, ksmps = 441, nchnls = 2 0dbfs = 1.0 Arg: kStutCps Arg: kBlank Arg: iPhase Arg: kStutValue0 Arg: kStutValue1 Arg: kStutValue2 Arg: kStutTime0 Arg: kStutTime1 Arg: kStutTime2 Arg: aLfo init.k args: kStutCps 5 init.k args: kBlank 0 init.i args: iPhase 0 init.k args: kStutValue0 5 init.k args: kStutValue1 5 init.k args: kStutValue2 5 init.k args: kStutTime0 1 init.k args: kStutTime1 1 init.k args: kStutTime2 1 loopseg.a args: aLfo kStutCps kBlank iPhase kStutValue0 kStutTime0 kStutValue1 kStutTime1 kStutValue2 kStutTime2 Compile State: String Pool: 0) instr 1) kBlank 2) kStutTime2 3) kStutTime1 4) kStutTime0 5) aLfo 6) init.k 7) init.i 8) loopseg.a 9) kStutValue2 10) kStutValue1 11) kStutValue0 12) kStutCps 13) "" 14) iPhase 15) endin 16) 5 17) 1 18) 0 Constants Pool: 0) 0.000000 1) 44100.000000 2) 441.000000 3) 2.000000 4) 1.000000 5) 5.000000 Global Variables: 0) sr:r 1) kr:r 2) ksmps:r 3) nchnls:r 4) nchnls_i:r 5) 0dbfs:r 6) $sr:r 7) $kr:r 8) $ksmps:r Instrument 0 0x1bfb0a0 0x1bfb9a0 Variables Instrument 1 0x1bfb9a0 (nil) Variables 0) kStutCps:k 1) kBlank:k 2) iPhase:i 3) kStutValue0:k 4) kStutValue1:k 5) kStutValue2:k 6) kStutTime0:k 7) kStutTime1:k 8) kStutTime2:k 9) aLfo:a 10) ksmps:r 11) kr:r Elapsed time at end of orchestra compile: real: 0.015s, CPU: 0.010s sorting score ... ... done Elapsed time at end of score sort: real: 0.015s, CPU: 0.010s Create barrier 4 => 0x1bfd330 (0) Create barrier 4 => 0x1be1b90 (0) Multithread performance: insno: -1 thread 0 of 4 starting. --Csound version 6.07 (double samples) Dec 14 2016 Creating search path cache for 'SNAPDIR': Creating search path cache for 'SFDIR;SSDIR;INCDIR': 1: "/home/pete/Documents/Csound Projects/Algorythmic Composition/Ambient Melody/" Creating search path cache for 'SFDIR': Creating search path cache for 'SADIR': 1: "/home/pete/Documents/Csound Projects/Algorythmic Composition/Ambient Melody/" Creating search path cache for 'SFDIR;SSDIR': 1: "/home/pete/Documents/Csound Projects/Algorythmic Composition/Ambient Melody/" graphics suppressed, ascii substituted 0dBFS level = 1.0 Multithread performance: insno: -1 thread 2 of 4 starting. instance(): tp->act_instance = 0x1be0a10 instr 0 allocated at 0x1be0a10 lclbas 0x1be0ba0, opds 0x1be0ba0 orch now loaded audio buffered in 512 sample-frame blocks Multithread performance: insno: -1 thread 1 of 4 starting. Cannot lock down 82274202 byte memory area (Cannot allocate memory) system sr: 44100.000000 Cannot use real-time scheduling (RR/5)(1: Operation not permitted) JackClient::AcquireSelfRealTime error 0: dac:system:playback_ (system:playback_) 1: dac:PulseAudio JACK Source:front-left (PulseAudio JACK Source:front-left) 2: dac:PulseAudio JACK Source:front-right (PulseAudio JACK Source:front-right) writing 1024 sample blks of 64-bit floats to dac SECTION 1: new event: 0.0000000000000 0.0000000000000 activating instr 1 at 0 new alloc for instr 1: instance(): tp->act_instance = 0x1c2ae60 instr 1 allocated at 0x1c2ae60 lclbas 0x1c2aff0, opds 0x1c2be70 op (init.k) allocated at 0x1c2be70 op (init.k) allocated at 0x1c2c020 op (init.i) allocated at 0x1c2c1d0 op (init.k) allocated at 0x1c2c380 op (init.k) allocated at 0x1c2c530 op (init.k) allocated at 0x1c2c6e0 op (init.k) allocated at 0x1c2c890 op (init.k) allocated at 0x1c2ca40 op (init.k) allocated at 0x1c2cbf0 op (loopseg.a) allocated at 0x1c2cda0 opadr = 0x7f3d4449fb92 insert(): tp->act_instance = 0x1c2ae60 psave beg at 0x1c2afc8 ending at 0x1c2afc8 init init.k: init init.k: init init.i: init init.k: init init.k: init init.k: init init.k: init init.k: init init.k: init loopseg.a: instr 1 now active: insno instanc nxtinst prvinst nxtact prvact nxtoff actflg offtim 0 0x1be0a10 (nil) (nil) (nil) (nil) (nil) 1 0.0 1 0x1c2ae60 (nil) (nil) (nil) 0x1a57330 (nil) 1 2.0 dag_num_active = 1 Who depends on 0 (instr 1)? *** 1 tasks 0(1): status=AVAILABLE (watchList ) DAG REINIT************************ WARNING: rtjack: xrun in real time audio DAG REINIT************************ DAG REINIT************************ DAG REINIT************************ DAG REINIT************************ DAG REINIT************************ On Sat, Dec 17, 2016 at 8:57 PM, Peter Burgess |
Date | 2016-12-18 22:37 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
Wait, it's silly to assume you don't need some of it when I don't understand it... here's the whole thing: Starting parse Entering state 0 Reading a token: Next token is token NEWLINE () Shifting token NEWLINE () Entering state 1 Reducing stack by rule 47 (line 496): $1 = token NEWLINE () -> $$ = nterm statement () Stack now 0 Entering state 25 Reducing stack by rule 30 (line 317): $1 = nterm statement () -> $$ = nterm topstatement () Stack now 0 Entering state 24 Reducing stack by rule 5 (line 197): $1 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token SRATE_TOKEN () Shifting token SRATE_TOKEN () Entering state 11 Reducing stack by rule 162 (line 784): $1 = token SRATE_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 7 -> $$ = nterm rident () Stack now 0 21 Entering state 30 Reading a token: Next token is token '=' () Shifting token '=' () Entering state 96 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 7 -> $$ = nterm constant () Stack now 0 21 30 96 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 30 96 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 30 96 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 30 96 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 30 96 Entering state 176 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 250 Reducing stack by rule 29 (line 309): $1 = nterm rident () $2 = token '=' () $3 = nterm expr () $4 = token NEWLINE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 8 -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token KSMPS_TOKEN () Shifting token KSMPS_TOKEN () Entering state 13 Reducing stack by rule 164 (line 788): $1 = token KSMPS_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 8 -> $$ = nterm rident () Stack now 0 21 Entering state 30 Reading a token: Next token is token '=' () Shifting token '=' () Entering state 96 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 8 -> $$ = nterm constant () Stack now 0 21 30 96 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 30 96 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 30 96 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 30 96 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 30 96 Entering state 176 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 250 Reducing stack by rule 29 (line 309): $1 = nterm rident () $2 = token '=' () $3 = nterm expr () $4 = token NEWLINE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 9 -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token NCHNLS_TOKEN () Shifting token NCHNLS_TOKEN () Entering state 14 Reducing stack by rule 165 (line 790): $1 = token NCHNLS_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 9 -> $$ = nterm rident () Stack now 0 21 Entering state 30 Reading a token: Next token is token '=' () Shifting token '=' () Entering state 96 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 9 -> $$ = nterm constant () Stack now 0 21 30 96 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 30 96 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 30 96 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 30 96 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 30 96 Entering state 176 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 250 Reducing stack by rule 29 (line 309): $1 = nterm rident () $2 = token '=' () $3 = nterm expr () $4 = token NEWLINE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 10 -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token ZERODBFS_TOKEN () Shifting token ZERODBFS_TOKEN () Entering state 16 Reducing stack by rule 167 (line 794): $1 = token ZERODBFS_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 10 -> $$ = nterm rident () Stack now 0 21 Entering state 30 Reading a token: Next token is token '=' () Shifting token '=' () Entering state 96 Reading a token: Next token is token NUMBER_TOKEN () Shifting token NUMBER_TOKEN () Entering state 49 Reducing stack by rule 173 (line 814): $1 = token NUMBER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 10 -> $$ = nterm constant () Stack now 0 21 30 96 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 30 96 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 30 96 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 30 96 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 30 96 Entering state 176 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 250 Reducing stack by rule 29 (line 309): $1 = nterm rident () $2 = token '=' () $3 = nterm expr () $4 = token NEWLINE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 11 -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token NEWLINE () Shifting token NEWLINE () Entering state 1 Reducing stack by rule 47 (line 496): $1 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 Entering state 25 Reducing stack by rule 30 (line 317): $1 = nterm statement () -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token INSTR_TOKEN () Shifting token INSTR_TOKEN () Entering state 7 Reading a token: Next token is token INTEGER_TOKEN () Reducing stack by rule 14 (line 231): -> $$ = nterm $@1 () Stack now 0 21 7 Entering state 68 Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 161 Reading a token: Next token is token NEWLINE () Reducing stack by rule 12 (line 225): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 13 -> $$ = nterm instlist () Stack now 0 21 7 68 Entering state 163 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 242 Reducing stack by rule 15 (line 233): -> $$ = nterm $@2 () Stack now 0 21 7 68 163 242 Entering state 274 Reducing stack by rule 28 (line 306): -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 13 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 13 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 13 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 14 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 14 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 14 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 15 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 15 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 15 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 16 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 16 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 16 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 17 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 17 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 17 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 18 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 18 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 18 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 19 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 19 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 19 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 20 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 20 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 20 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 21 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 21 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token INTEGER_TOKEN () Shifting token INTEGER_TOKEN () Entering state 48 Reducing stack by rule 172 (line 812): $1 = token INTEGER_TOKEN () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 21 -> $$ = nterm constant () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 63 Reducing stack by rule 140 (line 731): $1 = nterm constant () -> $$ = nterm ifac () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 60 Reducing stack by rule 138 (line 727): $1 = nterm ifac () -> $$ = nterm iterm () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 59 Reducing stack by rule 129 (line 716): $1 = nterm iterm () -> $$ = nterm iexp () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 58 Reading a token: Next token is token NEWLINE () Reducing stack by rule 120 (line 699): $1 = nterm iexp () -> $$ = nterm expr () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 110 Next token is token NEWLINE () Reducing stack by rule 89 (line 660): $1 = nterm expr () -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 17 Reading a token: Next token is token T_OPCODE () Reducing stack by rule 170 (line 809): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm ident () Stack now 0 21 7 68 163 242 274 289 Entering state 32 Next token is token T_OPCODE () Reducing stack by rule 48 (line 498): $1 = nterm ident () -> $$ = nterm ans () Stack now 0 21 7 68 163 242 274 289 Entering state 26 Next token is token T_OPCODE () Shifting token T_OPCODE () Entering state 35 Reducing stack by rule 183 (line 854): $1 = token T_OPCODE () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm opcode () Stack now 0 21 7 68 163 242 274 289 26 Entering state 77 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 107 Reading a token: Next token is token ',' () Reducing stack by rule 91 (line 662): $1 = token T_IDENT () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token ',' () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 22 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token ',' () Shifting token ',' () Entering state 187 Reading a token: Next token is token T_IDENT () Shifting token T_IDENT () Entering state 261 Reading a token: Next token is token NEWLINE () Reducing stack by rule 74 (line 631): $1 = token T_IDENT () -> $$ = nterm label () Stack now 0 21 7 68 163 242 274 289 26 77 171 187 Entering state 263 Reducing stack by rule 87 (line 652): $1 = nterm exprlist () $2 = token ',' () $3 = nterm label () /home/pete/csound/Engine/csound_orc_semantics.c(1969) line = 23 -> $$ = nterm exprlist () Stack now 0 21 7 68 163 242 274 289 26 77 Entering state 171 Next token is token NEWLINE () Shifting token NEWLINE () Entering state 247 Reducing stack by rule 38 (line 417): $1 = nterm ans () $2 = nterm opcode () $3 = nterm exprlist () $4 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 7 68 163 242 274 289 Entering state 277 Reducing stack by rule 27 (line 301): $1 = nterm statementlist () $2 = nterm statement () -> $$ = nterm statementlist () Stack now 0 21 7 68 163 242 274 Entering state 289 Reading a token: Next token is token ENDIN_TOKEN () Shifting token ENDIN_TOKEN () Entering state 297 Reading a token: Next token is token NEWLINE () Shifting token NEWLINE () Entering state 303 Reducing stack by rule 16 (line 230): $1 = token INSTR_TOKEN () $2 = nterm $@1 () $3 = nterm instlist () $4 = token NEWLINE () $5 = nterm $@2 () $6 = nterm statementlist () $7 = token ENDIN_TOKEN () $8 = token NEWLINE () -> $$ = nterm instrdecl () Stack now 0 21 Entering state 73 Reducing stack by rule 3 (line 189): $1 = nterm rootstatement () $2 = nterm instrdecl () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token NEWLINE () Shifting token NEWLINE () Entering state 1 Reducing stack by rule 47 (line 496): $1 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 Entering state 25 Reducing stack by rule 30 (line 317): $1 = nterm statement () -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Next token is token NEWLINE () Shifting token NEWLINE () Entering state 1 Reducing stack by rule 47 (line 496): $1 = token NEWLINE () -> $$ = nterm statement () Stack now 0 21 Entering state 25 Reducing stack by rule 30 (line 317): $1 = nterm statement () -> $$ = nterm topstatement () Stack now 0 21 Entering state 75 Reducing stack by rule 2 (line 185): $1 = nterm rootstatement () $2 = nterm topstatement () -> $$ = nterm rootstatement () Stack now 0 Entering state 21 Reading a token: Now at end of input. Reducing stack by rule 1 (line 175): $1 = nterm rootstatement () ALL |
Date | 2016-12-18 22:39 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
I've also got another clue. If I run it at ksmps = 1, my a-rate loopseg works... I don't know what that means yet, but I guess it means the fault is in my loop somewhere On Sun, Dec 18, 2016 at 10:37 PM, Peter Burgess |
Date | 2016-12-19 12:52 |
From | Peter Burgess |
Subject | Re: [Csnd-dev] a-rate loopseg |
I've fixed the main problem! I figured out what I was doing wrong. I was using an array that I was creating within my function to store the audio samples, and then setting the pointer p->out to point at it. Obviously, once the function is finished, the original array goes out of scope and disappears, so p->out wasn't pointing to anything, hence no output! I've still got to figure out why it breaks down after a 1/3 of a second unless I use ksmps = 1. But at least it's spitting out numbers now! Thanks for your help all! I'll keep you posted on my progress. On 18 Dec 2016 10:39 p.m., "Peter Burgess" <pete.soundtechnician@gmail.com> wrote: I've also got another clue. If I run it at ksmps = 1, my a-rate loopseg works... |