Quantcast
Channel: KVR Audio
Viewing all articles
Browse latest Browse all 3328

Instruments • Re: Anacreon Synthesizer | Anacreon 2.5 Released

$
0
0
Just a quick update - my next big hurdle is to create a parser to handle config files, internal messaging between the GUI and the processor, and preset files. I've never written a parser before, but my college buddy Alex knows how to write full-on compilers so I expect that he'll be able to bring me up to speed on the comparatively basic parsing I need.
I'm not up to date on this, but there used to be no end of nifty parser-generating tools. And I bet things have got better over time, not worse :-) The reason why you write parsers in college is to demonstrate that you know the theory, not because writing parsers is a thing you need to do in the real world. Just pick up something off the shelf.

The main task is to design or choose a simple grammar for your config file. Ideally something human-readable, so that your nerdier users can hack it in a text editor. So please not XML. Last time I checked, the cool kids were using JSON, which is pretty easy to read and edit by hand, and has lots of nice libraries for parsing. Or old-fashioned "key=value" pairs are good too, if you can make it work that way. Either way, once you've got the grammar, the parsing should be the easy part.

Have fun! (I found this to be the most fun part of my old magic metronome project.) I'll check it out once you've done the Linux port ;-)
I'm currently using JSON but I need to actually encode instructions and such. Syntactically it's not difficult, but because I'm using C++, there's a fundamental introspection problem where I'm going to have to do a lot of boilerplate to convert strings to class names and such. I'm struggling because I want it to be pretty and nice, but then I remember I'm programming in C++ using the VST SDK and therefore everything is ugly all the time. I'll check out that link!

Statistics: Posted by Erich.Pfister — Wed Feb 07, 2024 2:20 am



Viewing all articles
Browse latest Browse all 3328

Trending Articles