| hi art -
i am pretty sure that the new parser has not yet included as default in
any binary, because it needs more tests and is just for people who build
csound from sources. so your description confirms this, if i understand
it correctly.
best -
joachim
Am 20.07.2011 23:38, schrieb Art Hunkins:
> Thanks for checking, John. I hadn't thought about a possible
> new-parser/old-parser issue here.
>
> But there is one; I've done further testing with the test csd, and come
> up with results different from yours (if I understand what you are saying).
>
> Basically, the *new* cursor works; the old one produces an error
> (remember, I'm using the Windows doubles binary, 5.13.2):
>
> With no parser specification in csoptions:
> error: "input arg '1' of type const not allowed when expecting S, line 15"
> ivld filevalid 1 (all my tests here are using this line)
>
> Specifying --old-parser in csoptions:
> same error result as above
>
> Specifying --new-parser in csoptions:
> no error (works correctly)
> "Audiofile does not exist" (which is correct result)
>
> Why --new-parser works and --old-parser doesn't baffles me. And I had
> thought that the Windows binary defaulted to --new-parser, though the
> above results suggest the opposite. I checked .csoundrc, and there is no
> parser flag.
>
> I'm (as is often the case) rather completely confused. Can anyone make
> sense of this?
>
> Art Hunkins
>
> ----- Original Message ----- From:
> To:
> Sent: Wednesday, July 20, 2011 4:21 AM
> Subject: Re: Fw: [Csnd] Re: "file exists" opcode?
>
>
>> As they say... works for me (in old parser). There is a problem with the
>> new parser I think, but with your code
>>
>> SECTION 1:
>> new alloc for instr 1:
>> Audiofile does exist!
>> B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.00000 0.00000
>>
>>
>> and also works with does not exist
>>
>> ==John ff
>>
>>
>>
>>> Having had no response to my inquiry concerning a possible bug in the
>>> filevalid opcode (see message below), I'm assuming that it will not work
>>> for
>>> my purposes.
>>>
>>> In addition, for several reasons, I'd like to use such an opcode in
>>> versions
>>> of Csound predating 5.13 (the first in which filevalid appears).
>>>
>>> So, does anyone know of a filevalid-style *UDO* (or could anyone
>>> construct
>>> one for me) that accomplishes the following more limited objectives:
>>> 1) searches only the current directory;
>>> 2) searches only soundin.x files (with x being the input parameter to
>>> the
>>> UDO)
>>> 3) (optionally) runs at k-rate (I *can* presumably put the UDO into a
>>> reinitialization routine if necessary; I'm already doing that with
>>> filelen)
>>>
>>> This needs to work cross-platform.
>>>
>>> FWIW, I'm not convinced that a UDO is possible here; the cross-platform
>>> requirement may well rule it (and the system opcode) out. If that's the
>>> case, it seems even more important that the apparent filevalid bug
>>> (limitation?) be corrected.
>>>
>>> Art Hunkins
>>>
>>> ----- Original Message -----
>>> From: "Art Hunkins"
>>> To:
>>> Sent: Monday, July 18, 2011 3:59 PM
>>> Subject: Re: [Csnd] Re: "file exists" opcode?
>>>
>>>
>>>> Menno,
>>>>
>>>> Thanks for your new example.
>>>>
>>>> I have tried filevalid in Csound 5.13.2 (Windows install, which is
>>>> doubles), and there seems to be a bug. The input variable, ifilcod, is
>>>> supposed to take a filename string *or* a number corresponding to the
>>>> end
>>>> of a soundin.x file (e.g., 1 for soundin.1). It doesn't do the latter.
>>>>
>>>> Modifying your file (below), there is no error message as written, but
>>>> when the commented line is substituted, csound complains that the input
>>>> is
>>>> not an S variable.
>>>>
>>>> FWIW, filelen (which also uses ifilcod) works fine (as it should)
>>>> with a
>>>> single digit following filelen.
>>>>
>>>> Could you and others please take a look at this?
>>>>
>>>> Art Hunkins
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> sr = 44100
>>>> ksmps = 32
>>>> nchnls = 2
>>>> 0dbfs = 1
>>>>
>>>> instr 1
>>>>
>>>> ivld filevalid "soundin.1"
>>>> ;ivld filevalid 1
>>>>
>>>> if ivld>0 then
>>>> puts "Audiofile does exist!", 1
>>>> else
>>>> puts "Audiofile does not exist!", 1
>>>> endif
>>>> endin
>>>>
>>>>
>>>>
>>>>
>>>> i 1 0 1
>>>>
>>>> e
>>>>
>>>>
>>>>
>>>> ----- Original Message -----
>>>> From: "menno"
>>>> To:
>>>> Sent: Monday, July 18, 2011 12:23 PM
>>>> Subject: [Csnd] Re: "file exists" opcode?
>>>>
>>>>
>>>>> this is already fixed in git.
>>>>> And a new example of filevalid can be found here:
>>>>> http://members.home.nl/mag.knevel/csound_betamanual/filevalid.html
>>>>>
>>>>> greetings
>>>>> Menno
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://csound.1045644.n5.nabble.com/file-exists-opcode-tp4599987p4600195.html
>>>>>
>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|