Csound Csound-dev Csound-tekno Search About

[Cs-dev] named instruments not working...

Date2010-01-06 16:38
FromAndres 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:






sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1


instr op2
aout oscil 0.2, 440, 1
outs aout, aout
endin



f 1 0 1024 10 1
i "op2" 0 20
e





Is this due to the new parser?

Cheers,
Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 16:41
FromRory Walsh
SubjectRe: [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 :
> Hi all,
>
> It seems the usage of named instruments is not working properly:
>
>          B  0.000 - note deleted. instr op2" undefined
>
> for:
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 128
> nchnls = 2
> 0dbfs = 1
>
>
> instr op2
> aout oscil 0.2, 440, 1
> outs aout, aout
> endin
>
> 
> 
> f 1 0 1024 10 1
> i "op2" 0 20
> e
>
> 
> 
>
>
> Is this due to the new parser?
>
> Cheers,
> Andrés
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 16:46
FromPeiman Khosravi
SubjectRe: [Cs-dev] named instruments not working...
AttachmentsNone  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:

Hi all,

It seems the usage of named instruments is not working properly:

 B  0.000 - note deleted. instr op2" undefined

for:

<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1


instr op2
aout oscil 0.2, 440, 1
outs aout, aout
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1
i "op2" 0 20
e

</CsScore>
</CsoundSynthesizer>


Is this due to the new parser?

Cheers,
Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2010-01-06 16:48
FromSteven Yi
SubjectRe: [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
 wrote:
> 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:
>
> Hi all,
>
> It seems the usage of named instruments is not working properly:
>
>  B  0.000 - note deleted. instr op2" undefined
>
> for:
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 128
> nchnls = 2
> 0dbfs = 1
>
>
> instr op2
> aout oscil 0.2, 440, 1
> outs aout, aout
> endin
>
> 
> 
> f 1 0 1024 10 1
> i "op2" 0 20
> e
>
> 
> 
>
>
> Is this due to the new parser?
>
> Cheers,
> Andrés
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 16:51
FromSteven Yi
SubjectRe: [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  wrote:
> 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
>  wrote:
>> 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:
>>
>> Hi all,
>>
>> It seems the usage of named instruments is not working properly:
>>
>>  B  0.000 - note deleted. instr op2" undefined
>>
>> for:
>>
>> 
>> 
>> 
>> 
>>
>> sr = 44100
>> ksmps = 128
>> nchnls = 2
>> 0dbfs = 1
>>
>>
>> instr op2
>> aout oscil 0.2, 440, 1
>> outs aout, aout
>> endin
>>
>> 
>> 
>> f 1 0 1024 10 1
>> i "op2" 0 20
>> e
>>
>> 
>> 
>>
>>
>> Is this due to the new parser?
>>
>> Cheers,
>> Andrés
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 17:46
FromSteven Yi
SubjectRe: [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  wrote:
> It works here but I'm only using 5.10..I should really update!
>
> 2010/1/6 Andres Cabrera :
>> Hi all,
>>
>> It seems the usage of named instruments is not working properly:
>>
>>          B  0.000 - note deleted. instr op2" undefined
>>
>> for:
>>
>> 
>> 
>> 
>> 
>>
>> sr = 44100
>> ksmps = 128
>> nchnls = 2
>> 0dbfs = 1
>>
>>
>> instr op2
>> aout oscil 0.2, 440, 1
>> outs aout, aout
>> endin
>>
>> 
>> 
>> f 1 0 1024 10 1
>> i "op2" 0 20
>> e
>>
>> 
>> 
>>
>>
>> Is this due to the new parser?
>>
>> Cheers,
>> Andrés
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 17:57
Fromjpff@cs.bath.ac.uk
SubjectRe: [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  wrote:
>> It works here but I'm only using 5.10..I should really update!
>>
>> 2010/1/6 Andres Cabrera :
>>> Hi all,
>>>
>>> It seems the usage of named instruments is not working properly:
>>>
>>>          B  0.000 - note deleted. instr op2" undefined
>>>
>>> for:
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> sr = 44100
>>> ksmps = 128
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>>
>>> instr op2
>>> aout oscil 0.2, 440, 1
>>> outs aout, aout
>>> endin
>>>
>>> 
>>> 
>>> f 1 0 1024 10 1
>>> i "op2" 0 20
>>> e
>>>
>>> 
>>> 
>>>
>>>
>>> Is this due to the new parser?
>>>
>>> Cheers,
>>> Andrés
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 18:59
FromSteven Yi
SubjectRe: [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,   wrote:
> 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  wrote:
>>> It works here but I'm only using 5.10..I should really update!
>>>
>>> 2010/1/6 Andres Cabrera :
>>>> Hi all,
>>>>
>>>> It seems the usage of named instruments is not working properly:
>>>>
>>>>          B  0.000 - note deleted. instr op2" undefined
>>>>
>>>> for:
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> sr = 44100
>>>> ksmps = 128
>>>> nchnls = 2
>>>> 0dbfs = 1
>>>>
>>>>
>>>> instr op2
>>>> aout oscil 0.2, 440, 1
>>>> outs aout, aout
>>>> endin
>>>>
>>>> 
>>>> 
>>>> f 1 0 1024 10 1
>>>> i "op2" 0 20
>>>> e
>>>>
>>>> 
>>>> 
>>>>
>>>>
>>>> Is this due to the new parser?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>> Take advantage of Verizon's best-in-class app development support
>>>> A streamlined, 14 day to market process makes app distribution fast and
>>>> easy
>>>> Join now and get one step closer to millions of Verizon customers
>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 19:14
FromMichael Gogins
SubjectRe: [Cs-dev] named instruments not working...
That is an excellent idea.

Regards,
Mike

On 1/6/10, Steven Yi  wrote:
> 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,   wrote:
>> 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  wrote:
>>>> It works here but I'm only using 5.10..I should really update!
>>>>
>>>> 2010/1/6 Andres Cabrera :
>>>>> Hi all,
>>>>>
>>>>> It seems the usage of named instruments is not working properly:
>>>>>
>>>>>          B  0.000 - note deleted. instr op2" undefined
>>>>>
>>>>> for:
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>
>>>>> sr = 44100
>>>>> ksmps = 128
>>>>> nchnls = 2
>>>>> 0dbfs = 1
>>>>>
>>>>>
>>>>> instr op2
>>>>> aout oscil 0.2, 440, 1
>>>>> outs aout, aout
>>>>> endin
>>>>>
>>>>> 
>>>>> 
>>>>> f 1 0 1024 10 1
>>>>> i "op2" 0 20
>>>>> e
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>>
>>>>> Is this due to the new parser?
>>>>>
>>>>> Cheers,
>>>>> Andrés
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>>> Take advantage of Verizon's best-in-class app development support
>>>>> A streamlined, 14 day to market process makes app distribution fast and
>>>>> easy
>>>>> Join now and get one step closer to millions of Verizon customers
>>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>> Take advantage of Verizon's best-in-class app development support
>>>> A streamlined, 14 day to market process makes app distribution fast and
>>>> easy
>>>> Join now and get one step closer to millions of Verizon customers
>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 20:50
FromAndres Cabrera
SubjectRe: [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  wrote:
> 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  wrote:
>> It works here but I'm only using 5.10..I should really update!
>>
>> 2010/1/6 Andres Cabrera :
>>> Hi all,
>>>
>>> It seems the usage of named instruments is not working properly:
>>>
>>>          B  0.000 - note deleted. instr op2" undefined
>>>
>>> for:
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> sr = 44100
>>> ksmps = 128
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>>
>>> instr op2
>>> aout oscil 0.2, 440, 1
>>> outs aout, aout
>>> endin
>>>
>>> 
>>> 
>>> f 1 0 1024 10 1
>>> i "op2" 0 20
>>> e
>>>
>>> 
>>> 
>>>
>>>
>>> Is this due to the new parser?
>>>
>>> Cheers,
>>> Andrés
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and
>> easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-- 


Andrés

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-01-06 20:56
FromSteven Yi
SubjectRe: [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  wrote:
> Hi Steven,
>
> Thanks very much for the quick fix, this is working.
>
> Cheers,
> Andres
>
> On 1/6/10, Steven Yi  wrote:
>> 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  wrote:
>>> It works here but I'm only using 5.10..I should really update!
>>>
>>> 2010/1/6 Andres Cabrera :
>>>> Hi all,
>>>>
>>>> It seems the usage of named instruments is not working properly:
>>>>
>>>>          B  0.000 - note deleted. instr op2" undefined
>>>>
>>>> for:
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>
>>>> sr = 44100
>>>> ksmps = 128
>>>> nchnls = 2
>>>> 0dbfs = 1
>>>>
>>>>
>>>> instr op2
>>>> aout oscil 0.2, 440, 1
>>>> outs aout, aout
>>>> endin
>>>>
>>>> 
>>>> 
>>>> f 1 0 1024 10 1
>>>> i "op2" 0 20
>>>> e
>>>>
>>>> 
>>>> 
>>>>
>>>>
>>>> Is this due to the new parser?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>> ------------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Verizon Developer Community
>>>> Take advantage of Verizon's best-in-class app development support
>>>> A streamlined, 14 day to market process makes app distribution fast and
>>>> easy
>>>> Join now and get one step closer to millions of Verizon customers
>>>> http://p.sf.net/sfu/verizon-dev2dev
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Verizon Developer Community
>>> Take advantage of Verizon's best-in-class app development support
>>> A streamlined, 14 day to market process makes app distribution fast and
>>> easy
>>> Join now and get one step closer to millions of Verizon customers
>>> http://p.sf.net/sfu/verizon-dev2dev
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> --
>
>
> Andrés
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net