[Cs-dev] named instruments not working...
Date | 2010-01-06 16:38 |
From | Andres Cabrera |
Subject | [Cs-dev] named instruments not working... |
Hi all, It seems the usage of named instruments is not working properly: B 0.000 - note deleted. instr op2" undefined for: |
Date | 2010-01-06 16:41 |
From | Rory Walsh |
Subject | Re: [Cs-dev] named instruments not working... |
It works here but I'm only using 5.10..I should really update! 2010/1/6 Andres Cabrera |
Date | 2010-01-06 16:46 |
From | Peiman Khosravi |
Subject | Re: [Cs-dev] named instruments not working... |
Attachments | None None |
Hello, It's working here using Csound 5.11. Best, Peiman orch compiler: 12 lines read instr op2 instr op2 uses instrument number 1 Elapsed time at end of orchestra compile: real: 0.031s, CPU: 0.004s sorting score ... ... done Elapsed time at end of score sort: real: 0.032s, CPU: 0.004s Csound version 5.11 (float samples) Sep 24 2009 0dBFS level = 1.0 orch now loaded audio buffered in 1024 sample-frame blocks CoreAudio module: sr set to 44100 with 2 audio channels CoreAudio module: device open with 4 buffers of 2048 frames ========================================================== reading 4096-byte blks of shorts from adc (RAW) writing 4096-byte blks of shorts to dac SECTION 1: ftable 1: new alloc for instr 1: inactive allocs returned to freespace end of score. overall amps: 0.20000 0.20000 overall samples out of range: 0 0 0 errors in performance On 6 Jan 2010, at 16:38, Andres Cabrera wrote:
|
Date | 2010-01-06 16:48 |
From | Steven Yi |
Subject | Re: [Cs-dev] named instruments not working... |
The new parser is only for ORC code and not SCO, so that shouldn't be an issue. Is it maybe that the quote is one of those that is rounded like in a Word doc and not a " (straight up down)? On Wed, Jan 6, 2010 at 11:46 AM, Peiman Khosravi |
Date | 2010-01-06 16:51 |
From | Steven Yi |
Subject | Re: [Cs-dev] named instruments not working... |
Nevermind, I just tried it here and it's broken. Using latest from CVS. I think I remember someone did do changes to handle some kind of quoting of quotes; anyone remember what the change is and what file changed? On Wed, Jan 6, 2010 at 11:48 AM, Steven Yi |
Date | 2010-01-06 17:46 |
From | Steven Yi |
Subject | Re: [Cs-dev] named instruments not working... |
Looking at history for rdscor.c, the was a change by John on 12/11/2009. My guess is that there's something off. The old code was: while ((c = getc(xx)) != '"') *sstrp++ = c; and the new code is: do { c = getc(xx); if (c=='\\') c = getc(xx); *sstrp++ = c; /* copy the characters */ } while (c!='"'); It looks like the change has made it go one further than the quote so that the quote gets added to the string. I've changed it to: while ((c = getc(xx)) != '"') { if (c=='\\') c = getc(xx); *sstrp++ = c; } and testing here it seems to work. I'm committing the fix now. If someone could please test to make sure that this still works for escaped double quotes, that'd be great. Thanks! steven On Wed, Jan 6, 2010 at 11:41 AM, Rory Walsh |
Date | 2010-01-06 17:57 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] named instruments not working... |
Mea Culpa; I did notice an oddity fter the change but I thought it was something else, and then things interfered. ==John > Looking at history for rdscor.c, the was a change by John on > 12/11/2009. My guess is that there's something off. The old code > was: > > while ((c = getc(xx)) != '"') > *sstrp++ = c; > > and the new code is: > > do { > c = getc(xx); > if (c=='\\') c = getc(xx); > *sstrp++ = c; /* copy the characters > */ > } while (c!='"'); > > It looks like the change has made it go one further than the quote so > that the quote gets added to the string. > > I've changed it to: > > while ((c = getc(xx)) != '"') { > if (c=='\\') c = getc(xx); > *sstrp++ = c; > } > > and testing here it seems to work. I'm committing the fix now. If > someone could please test to make sure that this still works for > escaped double quotes, that'd be great. > > Thanks! > steven > > On Wed, Jan 6, 2010 at 11:41 AM, Rory Walsh |
Date | 2010-01-06 18:59 |
From | Steven Yi |
Subject | Re: [Cs-dev] named instruments not working... |
No worries! BTW: we should probably add a test to the test suite whenever we find a problem like this to build up the suite. Currently the test suite hardcodes using the new parser with --new-parser, but we can change it optionally use old or new. That might be of benefit to test behavior changes between old and new parsers. Also, the test suite has been made to test specifically the parser and each test adds some aspect of the parser to test. We should just open it up so that the test suite is for any feature and not necessarily just parser so that we can catch issues. It'd be nice if we could follow a policy that when there's a bug like this, we create a simple test.csd and add it to the suite before fixing and then rerunning the full suite to make sure when we fix things we don't break other things. Does this sound good to everyone? On Wed, Jan 6, 2010 at 12:57 PM, |
Date | 2010-01-06 19:14 |
From | Michael Gogins |
Subject | Re: [Cs-dev] named instruments not working... |
That is an excellent idea. Regards, Mike On 1/6/10, Steven Yi |
Date | 2010-01-06 20:50 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] named instruments not working... |
Hi Steven, Thanks very much for the quick fix, this is working. Cheers, Andres On 1/6/10, Steven Yi |
Date | 2010-01-06 20:56 |
From | Steven Yi |
Subject | Re: [Cs-dev] named instruments not working... |
Awesome! Sidenote, I added your test example to the test suite as test33.csd, so we should be able to test in future. Thanks! steven On Wed, Jan 6, 2010 at 3:50 PM, Andres Cabrera |