bitwig / dawproject

Open exchange format for DAWs
MIT License
751 stars 19 forks source link

c++ glue class generator #66

Open Trinitou opened 11 months ago

Trinitou commented 11 months ago

This is an initial draft for a c++ glue class generator.

I tested including it into a test c++ project and using some of the classes and it compiled.

I have not much time to continue this but wanted to propose as others hopefully might want to jump on board or use it as a bad example ;)

Decisions

(please change if you know it better)

Known issues

daveronan commented 1 month ago

So if I understand this correctly, I can use this to programmatically create project files in C++?

Trinitou commented 1 month ago

So if I understand this correctly, I can use this to programmatically create project files in C++?

Actually for now it's only providing headers with struct declarations for the dawproject types. (and even this might be needed to be polished in some way) To being able to really use it, it's still missing the c++ code to parse/write those structs from/to XML and also the bits needed to zip/unzip whole dawproject files including audio files. I once started to write something for the XML part but that was incomplete and I currently don't have much time to continue it I fear.

So you'd still need to do some work to get this code really doing something for you.

The other (also totally valid) way to go about it would be to manually write the XML parsing/writing code for only the bits and pieces of dawproject you need for your project using something like tinyxml. But that might be a bit tedious and if dawproject gets updated/extended, you will have to adjust your code manually then.

daveronan commented 1 month ago

So if I understand this correctly, I can use this to programmatically create project files in C++?

Actually for now it's only providing headers with struct declarations for the dawproject types. (and even this might be needed to be polished in some way) To being able to really use it, it's still missing the c++ code to parse/write those structs from/to XML and also the bits needed to zip/unzip whole dawproject files including audio files. I once started to write something for the XML part but that was incomplete and I currently don't have much time to continue it I fear.

So you'd still need to do some work to get this code really doing something for you.

The other (also totally valid) way to go about it would be to manually write the XML parsing/writing code for only the bits and pieces of dawproject you need for your project using something like tinyxml. But that might be a bit tedious and if dawproject gets updated/extended, you will have to adjust your code manually then.

Ok, cool. I saw examples in there for java after I left that comment, so it's just a case of converting them it looks like. Thanks!