Csound Csound-dev Csound-tekno Search About

[Csnd] Error with directory opcode

Date2021-03-19 17:38
From"Jeanette C."
Subject[Csnd] Error with directory opcode
Hey hey,
I think I have just found an error with the directory opcode. With directories 
up to two letters the files list contains the filenames as they are inside the 
directory. When a directory has three or more letters, the directory name is 
included in the filenames.
i.e.
Sfiles[] directory "x/", ".wav"
Sfiles[0]: a.wav
Sfiles2[] directory "xyz/", ".wav"
Sfiles2[0] = xyz/a.wav

I accidentally discovered that by using my m_samplebank opcodes with a proper 
realworld directory name.
http://juliencoder.de/sound/m_samplebank-1.0.zip

I am running the arch package of Csound version 6.15 (September 7 2020)

Can someone verify that behaviour? Is it to a degree intentional?

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I'm not that innocent... <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-03-19 19:10
FromRory Walsh
SubjectRe: [Csnd] Error with directory opcode
Definitely not intentional! I will sort it out when I get a chance.

On Fri, 19 Mar 2021 at 17:38, Jeanette C. <julien@mail.upb.de> wrote:
Hey hey,
I think I have just found an error with the directory opcode. With directories
up to two letters the files list contains the filenames as they are inside the
directory. When a directory has three or more letters, the directory name is
included in the filenames.
i.e.
Sfiles[] directory "x/", ".wav"
Sfiles[0]: a.wav
Sfiles2[] directory "xyz/", ".wav"
Sfiles2[0] = xyz/a.wav

I accidentally discovered that by using my m_samplebank opcodes with a proper
realworld directory name.
http://juliencoder.de/sound/m_samplebank-1.0.zip

I am running the arch package of Csound version 6.15 (September 7 2020)

Can someone verify that behaviour? Is it to a degree intentional?

Best wishes,

Jeanette

--
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I'm not that innocent... <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-03-19 19:15
From"Jeanette C."
SubjectRe: [Csnd] Error with directory opcode
Mar 19 2021, Rory Walsh has written:

> Definitely not intentional! I will sort it out when I get a chance.
Many thanks! No hurry on my account. I've worked around it for now. :)

Best wishes,

Jeanette
>
> On Fri, 19 Mar 2021 at 17:38, Jeanette C.  wrote:
>
>> Hey hey,
>> I think I have just found an error with the directory opcode. With
>> directories
>> up to two letters the files list contains the filenames as they are inside
>> the
>> directory. When a directory has three or more letters, the directory name
>> is
>> included in the filenames.
>> i.e.
>> Sfiles[] directory "x/", ".wav"
>> Sfiles[0]: a.wav
>> Sfiles2[] directory "xyz/", ".wav"
>> Sfiles2[0] = xyz/a.wav
>>
>> I accidentally discovered that by using my m_samplebank opcodes with a
>> proper
>> realworld directory name.
>> http://juliencoder.de/sound/m_samplebank-1.0.zip
>>
>> I am running the arch package of Csound version 6.15 (September 7 2020)
>>
>> Can someone verify that behaviour? Is it to a degree intentional?
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --
>>   * Website: http://juliencoder.de - for summer is a state of sound
>>   * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>>   * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>>   * GitHub: https://github.com/jeanette-c
>>
>> I'm not that innocent... <3
>> (Britney Spears)
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I'm not that innocent... <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-03-19 19:19
Fromjoachim heintz
SubjectRe: [Csnd] Error with directory opcode
you may have thought: if there are less than two beers, it is not worth 
mentioning?


On 19/03/2021 20:10, Rory Walsh wrote:
> Definitely not intentional! I will sort it out when I get a chance.
> 
> On Fri, 19 Mar 2021 at 17:38, Jeanette C.  > wrote:
> 
>     Hey hey,
>     I think I have just found an error with the directory opcode. With
>     directories
>     up to two letters the files list contains the filenames as they are
>     inside the
>     directory. When a directory has three or more letters, the directory
>     name is
>     included in the filenames.
>     i.e.
>     Sfiles[] directory "x/", ".wav"
>     Sfiles[0]: a.wav
>     Sfiles2[] directory "xyz/", ".wav"
>     Sfiles2[0] = xyz/a.wav
> 
>     I accidentally discovered that by using my m_samplebank opcodes with
>     a proper
>     realworld directory name.
>     http://juliencoder.de/sound/m_samplebank-1.0.zip
> 
>     I am running the arch package of Csound version 6.15 (September 7 2020)
> 
>     Can someone verify that behaviour? Is it to a degree intentional?
> 
>     Best wishes,
> 
>     Jeanette
> 
>     -- 
>        * Website: http://juliencoder.de - for summer is a state of sound
>        * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>        * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>        * GitHub: https://github.com/jeanette-c
> 
>     I'm not that innocent... <3
>     (Britney Spears)
> 
>     Csound mailing list
>     Csound@listserv.heanet.ie 
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     Discussions of bugs and features can be posted here
> 
> Csound mailing list Csound@listserv.heanet.ie 
>  
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 
> https://github.com/csound/csound/issues Discussions of bugs and features 
> can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-03-19 19:51
FromRory Walsh
SubjectRe: [Csnd] Error with directory opcode
That's a fair point. It does make a lot of sense! 

On Fri, 19 Mar 2021 at 19:19, joachim heintz <jh@joachimheintz.de> wrote:
you may have thought: if there are less than two beers, it is not worth
mentioning?


On 19/03/2021 20:10, Rory Walsh wrote:
> Definitely not intentional! I will sort it out when I get a chance.
>
> On Fri, 19 Mar 2021 at 17:38, Jeanette C. <julien@mail.upb.de
> <mailto:julien@mail.upb.de>> wrote:
>
>     Hey hey,
>     I think I have just found an error with the directory opcode. With
>     directories
>     up to two letters the files list contains the filenames as they are
>     inside the
>     directory. When a directory has three or more letters, the directory
>     name is
>     included in the filenames.
>     i.e.
>     Sfiles[] directory "x/", ".wav"
>     Sfiles[0]: a.wav
>     Sfiles2[] directory "xyz/", ".wav"
>     Sfiles2[0] = xyz/a.wav
>
>     I accidentally discovered that by using my m_samplebank opcodes with
>     a proper
>     realworld directory name.
>     http://juliencoder.de/sound/m_samplebank-1.0.zip
>
>     I am running the arch package of Csound version 6.15 (September 7 2020)
>
>     Can someone verify that behaviour? Is it to a degree intentional?
>
>     Best wishes,
>
>     Jeanette
>
>     --
>        * Website: http://juliencoder.de - for summer is a state of sound
>        * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>        * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>        * GitHub: https://github.com/jeanette-c
>
>     I'm not that innocent... <3
>     (Britney Spears)
>
>     Csound mailing list
>     Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     Discussions of bugs and features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie
> <mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features
> can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-03-19 20:47
FromPete Goodeve
SubjectRe: [Csnd] Error with directory opcode
AttachmentsNone  

Date2021-03-19 20:50
FromRory Walsh
SubjectRe: [Csnd] Error with directory opcode
I just pushed a possible fix. Sorry, I didn't have time to test. Can you pull and build again, and let me know if things have improved? 

On Fri, 19 Mar 2021 at 19:51, Rory Walsh <rorywalsh@ear.ie> wrote:
That's a fair point. It does make a lot of sense! 

On Fri, 19 Mar 2021 at 19:19, joachim heintz <jh@joachimheintz.de> wrote:
you may have thought: if there are less than two beers, it is not worth
mentioning?


On 19/03/2021 20:10, Rory Walsh wrote:
> Definitely not intentional! I will sort it out when I get a chance.
>
> On Fri, 19 Mar 2021 at 17:38, Jeanette C. <julien@mail.upb.de
> <mailto:julien@mail.upb.de>> wrote:
>
>     Hey hey,
>     I think I have just found an error with the directory opcode. With
>     directories
>     up to two letters the files list contains the filenames as they are
>     inside the
>     directory. When a directory has three or more letters, the directory
>     name is
>     included in the filenames.
>     i.e.
>     Sfiles[] directory "x/", ".wav"
>     Sfiles[0]: a.wav
>     Sfiles2[] directory "xyz/", ".wav"
>     Sfiles2[0] = xyz/a.wav
>
>     I accidentally discovered that by using my m_samplebank opcodes with
>     a proper
>     realworld directory name.
>     http://juliencoder.de/sound/m_samplebank-1.0.zip
>
>     I am running the arch package of Csound version 6.15 (September 7 2020)
>
>     Can someone verify that behaviour? Is it to a degree intentional?
>
>     Best wishes,
>
>     Jeanette
>
>     --
>        * Website: http://juliencoder.de - for summer is a state of sound
>        * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>        * Audiobombs: https://www.audiobombs.com/users/jeanette_c
>        * GitHub: https://github.com/jeanette-c
>
>     I'm not that innocent... <3
>     (Britney Spears)
>
>     Csound mailing list
>     Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     Discussions of bugs and features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie
> <mailto:Csound@listserv.heanet.ie>
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features
> can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-03-19 20:57
From"Jeanette C."
SubjectRe: [Csnd] Error with directory opcode
Mar 19 2021, Pete Goodeve has written:
...
> Also I'm not clear on the difference (if any) between "Sname = p4"and
> "Sname strget p4".  They seem to behave the same here.
...
Not sure if there is a difference between them now. the manual DID say
at some point that you can only directly assign a string from p4, for
further p-fields you should use strget. Though a lot has happened to
strings.

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I'm not that innocent... <3
(Britney Spears)

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-03-19 21:11
FromPete Goodeve
SubjectRe: [Csnd] Error with directory opcode
AttachmentsNone  

Date2021-03-20 08:23
Fromjoachim heintz
SubjectRe: [Csnd] Error with directory opcode
i think this should work:
	Sfiles[] directory strget(p4)

as i understand it, we have to tell csound that p4 is a string, and 
that's what strget does.  so it is probably most safe and clear.

	j



On 19/03/2021 21:47, Pete Goodeve wrote:
> On Fri, Mar 19, 2021 at 06:38:41PM +0100, Jeanette C. wrote:
>> Hey hey,
>> I think I have just found an error with the directory opcode. With
>> directories up to two letters the files list contains the filenames as they
>> are inside the directory. When a directory has three or more letters, the
>> directory name is included in the filenames.
>> i.e.
>> Sfiles[] directory "x/", ".wav"
>> Sfiles[0]: a.wav
>> Sfiles2[] directory "xyz/", ".wav"
>> Sfiles2[0] = xyz/a.wav
> 
> Hi,
> I was going to report that I can verify this, but Isee there have been
> several replies in the meantime! (:-))  It took me a while, because I was
> mightily confused by the fact that, e.g. "Sfiles[] directory p4" doesn't work!
> OTOH, this does:
> 
>     Sdir = p4
>     Sfiles[] directory Sdir
> 
> In fact, "prints p4" doesn't work if p4 is a string.  I see in the manual
> "String Variables" section that "The string p-field can be used by many
> orchestra opcodes directly,"  Is there any logic as to which ones?
> 
> Also I'm not clear on the difference (if any) between "Sname = p4"and
> "Sname strget p4".  They seem to behave the same here.
> 
> Getting back to the directory opcode, I'm not sure whether by default
> it's better to include the directory name in the output or not.  I'd actually
> think not, because it should be trivial to prepend if you want.
> 
> 	-- Pete --
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-03-20 17:26
FromPete Goodeve
SubjectRe: [Csnd] Error with directory opcode
AttachmentsNone