DEV Community

amu
amu

Posted on • Updated on

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.

Top comments (0)