Csound Csound-dev Csound-tekno Search About

Re: [Csnd] presets file format

Date2020-04-17 12:09
FromMikoláš Štrajt
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.


Cabbage presets system has two major drawbacks:


1) there is no way how to name presets from UI

2) you cannot share your presets - each instrument has one instrument.snaps file and you cannot somehow add presets shared by others without editing file itself

 

TONITORMX, the creator of ToneZ presented his own Csound based preset system here. It's pretty robust.


this looks really usable. I will probably go this way.

 

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.  


These looks very usable too. fileToStr and strToArray looks like they can be used to actually read CSV. I will probably use these in some situation where file format is more structured.


Anyway. Thanks for help.


--

Severak

 

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