top of page

March 14th

  • jesseemmothmusik
  • 15 mars
  • 3 min läsning

The past week has been about dealing with some blockers and taking the editor to a much more user friendly state. 


Audio Buffers & Asset management

I’ve implemented a class that acts as an owner for all assets in use as well as a central point for fetching audio data when drawing stuff, playing stuff and making DSP transformations on the audio buffers. An audio region no longer needs to hold a copy of a loaded audio buffer but simply needs to keep track of which audio asset it is referring to through an integer value.


No more WavInfo or AudioBuffer as members
No more WavInfo or AudioBuffer as members

Properties of a region

What makes up the features of a region is packed in a struct. This includes for example fade times is seconds, a normalized value for start/end points and a gain value expressed in decibels. The main reasoning for this implementation is that a region will always correspond to a “portion” of an audio file. It never needs knowing the format of the loaded file or what the audio buffer looks like. When playing back a region it simply sends it’s properties to the interface and everything beyond that is taken care of elsewhere.

ree


Drawing fades

I implemented commands and shaders for drawing fades as simple lines. I like to call this the MVP version of this feature but honestly don’t know if I’m going to revisit this again in this project (due to other features needing my attention).


Fades displayed as yellow lines
Fades displayed as yellow lines

One issue I had with the waveform textures was the fact that I could not draw directly to it (since that would be drawing directly to the texture that possibly multiple regions are referring to) and therefore had to keep a copy of the texture inside the region class. And the wastefulness doesn’t stop there; the region also needs another texture with the same proportions to draw fades onto! That is two copies of a texture for every instance of an audio region and this hurts!

I reckon another solution would be to have the waveform texture as a resource during the shading stage and thereby having only one texture for both waveforms and fades. This would mean that I have to sample and draw fades every time a region is changed rather than just draw fades. The memory trace of this strategy is better and therefore I think it might be the solution I’m looking for given the fact that having large audio buffers loaded in the editor already consumes a lot of memory.


User Interface

The interaction between the user and the application is starting to take form. The user now has the ability to play, select, move, resize, change fade zones and change gain on the regions. In the Properties window the useful stuff is displayed when a region is displayed and it is also from this window the user will be able to render a region (with edits) to a new file.


Properties window
Properties window

Next I’ll be implementing rendering of regions into new files. This will be a piece of cake given the fact that all functionality is already there. I’ll then be thinking about serialization and enabling the user to save a scene file containing all edits (and of course to enable opening this file again later). This will be a lot of fun!

 
 

Senaste inlägg

Visa alla
bottom of page