Csound Csound-dev Csound-tekno Search About

[Csnd] two more requests ...

Date2012-07-16 20:20
Fromjoachim heintz
Subject[Csnd] two more requests ...
while working on csound examples for INScore (inscore.sf.net), i am 
missing two features:

1. an opcode which returns a string with the working directory (like the 
shell pwd):
Sdir pwd
(or is this already possible in csound?)

2. an opcode which reads a textfile and returns the lines as strings:
Sline readf Sfile, iLineNum
or something like this.

request 1) is necessary for setting root directories for examples, 
request 2) would make it possible to use for instance a pd qlist or any 
general textfile instead of generating a csound score.

thanks for considering -

	joachim

Date2012-07-19 09:02
Fromjoachim heintz
SubjectRe: [Csnd] two more requests ...
anyone sees a chance to implement these two features (get the working 
directory as a string, and be able to read a textfile)?
thanks -
	joachim


Am 16.07.2012 21:20, schrieb joachim heintz:
> while working on csound examples for INScore (inscore.sf.net), i am
> missing two features:
>
> 1. an opcode which returns a string with the working directory (like the
> shell pwd):
> Sdir pwd
> (or is this already possible in csound?)
>
> 2. an opcode which reads a textfile and returns the lines as strings:
> Sline readf Sfile, iLineNum
> or something like this.
>
> request 1) is necessary for setting root directories for examples,
> request 2) would make it possible to use for instance a pd qlist or any
> general textfile instead of generating a csound score.
>
> thanks for considering -
>
>      joachim
>
>
> 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"
>
>

Date2012-07-20 12:15
FromVictor Lazzarini
SubjectRe: [Csnd] two more requests ...
I will take a look at this next week.
On 19 Jul 2012, at 09:02, joachim heintz wrote:

> anyone sees a chance to implement these two features (get the working directory as a string, and be able to read a textfile)?
> thanks -
> 	joachim
> 
> 
> Am 16.07.2012 21:20, schrieb joachim heintz:
>> while working on csound examples for INScore (inscore.sf.net), i am
>> missing two features:
>> 
>> 1. an opcode which returns a string with the working directory (like the
>> shell pwd):
>> Sdir pwd
>> (or is this already possible in csound?)
>> 
>> 2. an opcode which reads a textfile and returns the lines as strings:
>> Sline readf Sfile, iLineNum
>> or something like this.
>> 
>> request 1) is necessary for setting root directories for examples,
>> request 2) would make it possible to use for instance a pd qlist or any
>> general textfile instead of generating a csound score.
>> 
>> thanks for considering -
>> 
>>     joachim
>> 
>> 
>> 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"
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2012-07-20 15:22
Fromjoachim heintz
SubjectRe: [Csnd] two more requests ...
that's great, thank you.


Am 20.07.2012 13:15, schrieb Victor Lazzarini:
> I will take a look at this next week.
> On 19 Jul 2012, at 09:02, joachim heintz wrote:
>
>> anyone sees a chance to implement these two features (get the working directory as a string, and be able to read a textfile)?
>> thanks -
>> 	joachim
>>
>>
>> Am 16.07.2012 21:20, schrieb joachim heintz:
>>> while working on csound examples for INScore (inscore.sf.net), i am
>>> missing two features:
>>>
>>> 1. an opcode which returns a string with the working directory (like the
>>> shell pwd):
>>> Sdir pwd
>>> (or is this already possible in csound?)
>>>
>>> 2. an opcode which reads a textfile and returns the lines as strings:
>>> Sline readf Sfile, iLineNum
>>> or something like this.
>>>
>>> request 1) is necessary for setting root directories for examples,
>>> request 2) would make it possible to use for instance a pd qlist or any
>>> general textfile instead of generating a csound score.
>>>
>>> thanks for considering -
>>>
>>>      joachim
>>>
>>>
>>> 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"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> 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"
>
>

Date2012-07-20 18:19
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] two more requests ...
getting the current directory is easy in Linux and I assume so on OSX.  No
idea on Windows

Reading lines of text is easy -- just wrapping of fgets

May have time this weekend unless Victor wants to do it?

==John ff

> I will take a look at this next week.
> On 19 Jul 2012, at 09:02, joachim heintz wrote:
>
>> anyone sees a chance to implement these two features (get the working
>> directory as a string, and be able to read a textfile)?
>> thanks -
>> 	joachim
>>
>>
>> Am 16.07.2012 21:20, schrieb joachim heintz:
>>> while working on csound examples for INScore (inscore.sf.net), i am
>>> missing two features:
>>>
>>> 1. an opcode which returns a string with the working directory (like
>>> the
>>> shell pwd):
>>> Sdir pwd
>>> (or is this already possible in csound?)
>>>
>>> 2. an opcode which reads a textfile and returns the lines as strings:
>>> Sline readf Sfile, iLineNum
>>> or something like this.
>>>
>>> request 1) is necessary for setting root directories for examples,
>>> request 2) would make it possible to use for instance a pd qlist or any
>>> general textfile instead of generating a csound score.
>>>
>>> thanks for considering -
>>>
>>>     joachim
>>>
>>>
>>> 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"
>>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
>
> 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"
>
>
>
>



Date2012-07-20 18:53
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] two more requests ...
> getting the current directory is easy in Linux and I assume so on OSX.  No
> idea on Windows
>

Written -- and I think OK on Windows but will check

Now for the line reading

==John ff




Date2012-07-24 17:58
Fromjoachim heintz
SubjectRe: [Csnd] two more requests ...
thanks a lot, john. i would love to try. is it
Swd pwd
or did you decide another name?
best -
	joachim


Am 20.07.2012 19:53, schrieb jpff@cs.bath.ac.uk:
>> getting the current directory is easy in Linux and I assume so on OSX.  No
>> idea on Windows
>>
>
> Written -- and I think OK on Windows but will check
>
> Now for the line reading
>
> ==John ff
>
>
>
>
>
> 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"
>
>

Date2012-07-24 18:24
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] two more requests ...
This is my test prgram

==John




instr 1
  Ss  pwd
  prints Ss
endin



i1 0 1
e




> thanks a lot, john. i would love to try. is it
> Swd pwd
> or did you decide another name?
> best -
> 	joachim
>
>
> Am 20.07.2012 19:53, schrieb jpff@cs.bath.ac.uk:
>>> getting the current directory is easy in Linux and I assume so on OSX.
>>> No
>>> idea on Windows
>>>
>>
>> Written -- and I think OK on Windows but will check
>>
>> Now for the line reading
>>
>> ==John ff
>>
>>
>>
>>
>>
>> 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"
>
>
>
>



Date2012-07-24 18:27
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] two more requests ...
PS

readf also exists with one String argument, without your suggested lineno
Reads a line each k-cycle

NOT TESTED!