Home Artists Posts Import Register

Content

I spent a lot of time working out a bunch of  fiddly things regarding effect blocks. I implemented a granular freeze effect which is something akin to a VST effect named "I Wish" 

I wanted to implement this particular effect because I had a feeling it would reveal a bunch of issues with the effect API. Writing effects for Blockhead isn't always as straightforward as simply processing a dry signal and outputting a wet signal. The freeze effect is a weird case because it works by storing a small fragment of audio in a buffer when it is first triggered and then reading from it over and over, ignoring any other input audio that follows.

Blockhead jumps through a bunch of hoops to ensure that glitches and pops do not occur when the playback loops back and when the user is moving things around while the song is playing. When an effect block is created Blockhead creates four instances of the effect for the purposes of crossfading between them whenever a glitch would usually occur due to a loop or a data change. Blockhead regularly requests effect instances to completely reset themselves, covering up this event with a crossfade.

Blockhead also allows extremely small looping regions to the point where the engine itself sort of turns into a granular system, and reset events may occur multiple times per audio buffer.

For most effects the developer shouldn't have to worry much about this stuff because it all happens automatically, but there are a few potential pitfalls if you're not aware of how things are working. The filter and reverb test effects I added are more or less written in the same way a VST effect might be whereas the freeze effect required a little more care to be taken to ensure that the correct thing was happening in response to reset events.

In the end the freeze effect code ended up much simpler than it started. I want plugin development to be relatively easy but it's clear I will have to write some decent documentation eventually so that everyone understands what the host is doing behind the scenes.

Files

2021 04 16 21 36 13

Comments

No comments found for this post.