DAW + Audio Engine Dev Update (#6)

Hello! The previous update was around 3 weeks ago. I haven’t been that productive and didn’t did as much as I was looking forward to since then, but it’s fine. Maybe I’ll write about that separately.

About Ava, the most important thing that I did was refactoring the whole code base to process per sample rather than processing per full buffers. This helped me fix the issue of playing with virtual instrument parameters! I thought about going with this solution from the beginning but I thought it’d be more complicated so I didn’t do it, but later I realized it’s the common way.

Now, the sine generator instrument’s frequency can correctly change too. Delay still needs to be fixed. I also fixed a couple of bugs and segmentation faults that didn’t necessarily occur every time, most of them were because of the way I initialized pointers.

I used to code in C more than C++ and I was used to the C language way of initializing and working with pointers and this used to cause a lot of problems. For example, in class object pointers, instances, going with malloc (and not new) will cause random segmentation faults and it won't let you use for example polymorphism properly. That's totally reasonable because in this case you'll just reserve a part of memory; you won't create a proper object. Overall, I'm starting to get the grip of C++'s way of object oriented.

It’s obvious that there are parts of the code that can be pretty more optimized once they turn into pointers rather than normal variables. I’ll slowly refactor them one by one.

Another issue is the documentation which I don’t have any plans for now but I should figure something out soon!

The next important tasks are:

  • Fixing the delay
  • Writing a real-time callback function
  • Writing a real-time demo program

Check out Ava’s repository from here.

Originally published at https://dev.to on March 6, 2021.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
AMU

AMU

I make sound tools and software, music, and sometimes games. I love writing about stuff.