Creating a wav header

Hello,

I have been working on an old broadcast wave standard for the past week or so. I have everything successfully decoded, and will now start moving toward writing the wave header to a new file. I am writing this in python. My intention when I started this project was to write a plugin for Audacity to read and write this header type.

How can I integrate this to Audacity? I accept that this will take some time, but I would at least like to have a roadmap for myself.

I have the code hosted on github if anyone is interested.

Our importers and exporters all are here: audacity/modules at master · audacity/audacity · GitHub

Unfortunately, broadcast WAV is an unholy combination of WAV and MP2 so I’d expect an implementation to be a bit more difficult than other formats.

You’re telling me. I just spent the last week studying the spec. Most of it can be thrown out. But there are a few key things I want to bring to some kind of metadata interface. That being intro, outro, and eod markers, cart/category, and start/kill dates. The rest, I’m learning, is really just trash data anyways.

I see that these are all C++. I took a C++ course back in college, but it’s been a while. Hopefully I can lean on this forum for support while I undergo this project.

1 Like

So, forgive my naivete; The header files .h are where you declare classes, correct?
What is a good dev environment for this project? I use Pop_OS!. (is there a good way to keep my production Audacity alone while I work on this. With Python, I would create a venv.)

It looks like this class is where the data is all declared, but I don’t see how it’s read. Where would I see how a wav is read from binary (assuming that’s how this works). I imagine I would be creating a fork of the wavpack module, since the riff and fmt chunks are already accounted for here. For now, I imagine I would just be sending values to a log somewhere (where’s that?).