Csound Csound-dev Csound-tekno Search About

[Csnd] Writing and Reading from a .txt file

Date2025-03-27 19:35
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] Writing and Reading from a .txt file
Hello everybody,

i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
Also i need a opcode for reading from a specific line and extracting some values from these lines.

Does something like this exists already in Csound?

Greetings,
Philipp

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

Date2025-03-27 20:38
Fromjoachim heintz
SubjectRe: [Csnd] Writing and Reading from a .txt file
hi philipp -

i'd look into fprints for writing and readf for reading, but i don't 
know if this satisfies your needs ...

best -
	joachim


On 27/03/2025 20:35, Philipp Neumann wrote:
> Hello everybody,
> 
> i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
> Also i need a opcode for reading from a specific line and extracting some values from these lines.
> 
> Does something like this exists already in Csound?
> 
> Greetings,
> Philipp
> 
> 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

Date2025-03-27 21:18
FromTarmo Johannes
SubjectRe: [Csnd] Writing and Reading from a .txt file
Hi!

Or can you use python opcodes pyinit, pycall etc - it could be way easier in python.

Tarmo

N, 27. märts 2025 22:38 joachim heintz <jh@joachimheintz.de> kirjutas:
hi philipp -

i'd look into fprints for writing and readf for reading, but i don't
know if this satisfies your needs ...

best -
        joachim


On 27/03/2025 20:35, Philipp Neumann wrote:
> Hello everybody,
>
> i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
> Also i need a opcode for reading from a specific line and extracting some values from these lines.
>
> Does something like this exists already in Csound?
>
> Greetings,
> Philipp
>
> 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

Date2025-04-03 15:06
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Writing and Reading from a .txt file
Hey all,

Both solutions don’t work for my needs.

Can i instead write to a ft and save the data from the ft as txt?

Philipp von Neumann (He/Him)
Composition | Computer Music | Programming

📧 philipp@von-neumann.com
📞 +49 159 01 20 71 03
🌐 von-neumann.com
🔊 SoundCloud: https://soundcloud.com/phvon
🌿 Bluesky: https://bsky.app/profile/von-neumann.com
🦣 Mastodon: https://mastodon.social/@PvN


> Am 27.03.2025 um 21:38 schrieb joachim heintz :
> 
> hi philipp -
> 
> i'd look into fprints for writing and readf for reading, but i don't know if this satisfies your needs ...
> 
> best -
> joachim
> 
> 
> On 27/03/2025 20:35, Philipp Neumann wrote:
>> Hello everybody,
>> i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
>> Also i need a opcode for reading from a specific line and extracting some values from these lines.
>> Does something like this exists already in Csound?
>> Greetings,
>> Philipp
>> 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

Date2025-04-03 20:33
Fromjoachim heintz
SubjectRe: [Csnd] Writing and Reading from a .txt file
yes: https://csound.com/docs/manual/ftsave.html
(or ftsavek)

On 03/04/2025 16:06, Philipp Neumann wrote:
> Hey all,
> 
> Both solutions don’t work for my needs.
> 
> Can i instead write to a ft and save the data from the ft as txt?
> 
> Philipp von Neumann (He/Him)
> Composition | Computer Music | Programming
> 
> 📧 philipp@von-neumann.com
> 📞 +49 159 01 20 71 03
> 🌐 von-neumann.com
> 🔊 SoundCloud: https://soundcloud.com/phvon
> 🌿 Bluesky: https://bsky.app/profile/von-neumann.com
> 🦣 Mastodon: https://mastodon.social/@PvN
> 
> 
>> Am 27.03.2025 um 21:38 schrieb joachim heintz :
>>
>> hi philipp -
>>
>> i'd look into fprints for writing and readf for reading, but i don't know if this satisfies your needs ...
>>
>> best -
>> joachim
>>
>>
>> On 27/03/2025 20:35, Philipp Neumann wrote:
>>> Hello everybody,
>>> i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
>>> Also i need a opcode for reading from a specific line and extracting some values from these lines.
>>> Does something like this exists already in Csound?
>>> Greetings,
>>> Philipp
>>> 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

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

Date2025-04-04 10:42
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Writing and Reading from a .txt file
Thanks Joachim!
This works for my purpose!

Philipp von Neumann (He/Him)
Composition | Computer Music | Programming

📧 philipp@von-neumann.com
📞 +49 159 01 20 71 03
🌐 von-neumann.com
🔊 SoundCloud: https://soundcloud.com/phvon
🌿 Bluesky: https://bsky.app/profile/von-neumann.com
🦣 Mastodon: https://mastodon.social/@PvN


> Am 03.04.2025 um 21:33 schrieb joachim heintz :
> 
> yes: https://csound.com/docs/manual/ftsave.html
> (or ftsavek)
> 
> On 03/04/2025 16:06, Philipp Neumann wrote:
>> Hey all,
>> Both solutions don’t work for my needs.
>> Can i instead write to a ft and save the data from the ft as txt?
>> Philipp von Neumann (He/Him)
>> Composition | Computer Music | Programming
>> 📧 philipp@von-neumann.com
>> 📞 +49 159 01 20 71 03
>> 🌐 von-neumann.com
>> 🔊 SoundCloud: https://soundcloud.com/phvon
>> 🌿 Bluesky: https://bsky.app/profile/von-neumann.com
>> 🦣 Mastodon: https://mastodon.social/@PvN
>>> Am 27.03.2025 um 21:38 schrieb joachim heintz :
>>> 
>>> hi philipp -
>>> 
>>> i'd look into fprints for writing and readf for reading, but i don't know if this satisfies your needs ...
>>> 
>>> best -
>>> joachim
>>> 
>>> 
>>> On 27/03/2025 20:35, Philipp Neumann wrote:
>>>> Hello everybody,
>>>> i’m searching a opcode which allows writing to a .txt file with specific row number and line formatting.
>>>> Also i need a opcode for reading from a specific line and extracting some values from these lines.
>>>> Does something like this exists already in Csound?
>>>> Greetings,
>>>> Philipp
>>>> 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
> 
> 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