Csound Csound-dev Csound-tekno Search About

[Csnd] presets file format

Date2020-04-17 10:55
FromMikoláš Štrajt
Subject[Csnd] presets file format
I am creating an [1] synth with Cabbage framework.

I am going to add presets system to it. I would like to have some human readable file format for it. Ideally something like CSV, INI or something like that. TXT with lot of numbers separated spaces is not OK, because it's hard to check which number is which (in CSV you can use Excel to find out column number).

Are there any UDOs, opcodes, examples or tips how to work with human-readable file formats?


--
Severak

Date2020-04-17 11:07
FromRichard
SubjectRe: [Csnd] presets file format

I would recommend JSON format...

Richard

On 17/04/2020 11:55, Mikoláš Štrajt wrote:
I am creating an [1] synth with Cabbage framework.

I am going to add presets system to it. I would like to have some human readable file format for it. Ideally something like CSV, INI or something like that. TXT with lot of numbers separated spaces is not OK, because it's hard to check which number is which (in CSV you can use Excel to find out column number).

Are there any UDOs, opcodes, examples or tips how to work with human-readable file formats?


--
Severak
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

Date2020-04-17 11:12
FromRory Walsh
SubjectRe: [Csnd] presets file format
The preset system in Cabbage writes data as xml, which is pretty readable IMO, and you don't need to write any Csound code to use it. Simple add a preset combo. There are no native Csound opcodes that will write data in one of these formats. You'll just have to format the text yourself as your write it. TONITORMX, the creator of ToneZ presented his own Csound based preset system here. It's pretty robust.

Finally, I wrote a pair of plugin opcodes for Csound a while back that will let you read and write Csound channel data to a JSON file. More information and binaries are available here.   



On Fri, 17 Apr 2020 at 10:56, Mikoláš Štrajt <strajt9@seznam.cz> wrote:
I am creating an [1] synth with Cabbage framework.

I am going to add presets system to it. I would like to have some human readable file format for it. Ideally something like CSV, INI or something like that. TXT with lot of numbers separated spaces is not OK, because it's hard to check which number is which (in CSV you can use Excel to find out column number).

Are there any UDOs, opcodes, examples or tips how to work with human-readable file formats?


--
Severak
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