Blockhead v0.17.0 alpha
Added 2021-09-09 09:42:24 +0000 UTCUpdate Notes
This update introduces the concepts of block cloning and block references as discussed in previous blog entries. This involved some large internal changes to many of Blockhead's subsystems so there may be new bugs in places which don't necessarily seem like they have changed much.
Block References
The word "reference" is not used anywhere in the Blockhead UI. For the purposes of documentation I do not know what the correct terminology or framing is to describe what is happening and the most helpful explanation may not necessarily be the most technically accurate one.
This is a technical description of how things work now which shouldn't be considered a user-friendly manual:
- A "block" is a data structure which can be interacted with either via a block reference or through the new block list.
- The rectangular things on the workspace that we interact with are now all block references.
- There is always one item in the block list for any block for which there exists at least one reference.
- When the last reference to a block is deleted from the workspace, the corresponding item is removed from the block list, unless the block has been "Saved" by the user.
- "Copying" a block reference:
- Creates a copy of the underlying block
- Creates a new block reference
- Makes the new reference point to the new block
- The observable behavior of this operation should look and feel more or less the same as it did in v0.16
- "Cloning" a block reference:
- Creates a new block reference
- Makes the new reference point to the original block
- When two or more references point to the same underlying block, those references on the workspace will have some visual indicators:
- A small colored triangle in the top-right indicates that there is more than one reference to the block
- When expanded, audio blocks have a new button (the Instance Button) in the header indicating how many references there are to the block
- Hovering the mouse cursor over the block reference will highlight any others on the workspace which point to the same underlying block
- Clicking the Instance Button opens a context menu with a single item: "Make Unique". Clicking this is equivalent to performing a copy operation, deleting the current block reference and replacing it with the newly copied reference.
- Blocks are all given a unique identifier prefixed by the @ symbol which will be displayed in the block list if no custom name is assigned.
- Some block types are not really designed to be cloned (tempo guides and start blocks), so there is no option to do so in their context menu. However they can still be cloned via keyboard shortcut, or by cloning them as part of a larger selection of blocks. This is because I thought it would be too counter intuitive when cloning selections of more than one block if some blocks in the selection went missing or silently copied by value.
Block List
- The new block list lists all blocks (not block references) which exist in the project. For example if a project consists of one block and 50 references to it in the workspace, there will be only one item in the list.
- As an exception, start blocks and tempo guide blocks are not listed.
- Via the context menu you can organize blocks into folders though the interface for doing this is currently really bad.
- There is a toggle in the context menu to set a block to "Saved". If a block is saved then it won't be automatically deleted when there are no references to it.
- Sampler and synth blocks can be previewed by clicking on the left of the list item.
- Non-sampler blocks look a bit bare in the block list at the moment since there is no waveform to display. Choke envelopes are not displayed in the block list yet because I want to optimize the rendering of those visuals first.
Workspace Changes
The way block references interact while placing and dragging them around in the workspace has changed:
- Blocks will no longer automatically truncate when colliding with a neighboring block to the right. Instead it will be tucked behind it.
- Hovering over a block which is tucked behind its neighbor will display an indicator showing its actual size
- From the point of view of the audio engine, blocks still cannot overlap on the same lane, i.e. block regions that are tucked behind a neighboring block are discarded
- The size of a block is shared between all block references, so resizing a block reference will automatically update the size of any related block references.
Plugin Updates
New synth plugin: Berk v0.1.0
This is a synth based on a glottis/vocal tract model. I made this because I thought it would be a good test of the block manipulator system (not yet implemented). The envelope-based parameter controls are pretty bad but allow you to manipulate the model quite extensively.
Not all parameters are visible by default so check the (+) menu. The Throat Diameter parameter shows a single grid line at 25%. This is the point at which the throat is considered fully closed, which may produce a full glottal stop depending on the value of the Index parameter (air may still escape through the nose). So if you are struggling with silent output try increasing the diameter to above 25%.
The vocal tract model runs at a sample rate independent of everything else. This can be adjusted with the Quality parameter. Higher quality uses more CPU. I decided to expose this parameter because it turns out it also affects the perceived formant of the vocal model in quite a drastic way, so it was tempting to name the parameter "Formant" but I wanted it to be clear that the parameter has an effect on CPU usage.
New effect plugin: Tract v0.1.0
This is the vocal tract part of the Berk model, without the glottis, with some changes to allow it to be used as an audio effect. This effect introduces a small amount of latency to the audio signal due to buffering (see below).
Plugin latency reporting
Some audio effects need to buffer their input which introduces small amounts of latency to the audio signal. The only effect in Blockhead that does this currently is the Tract effect. When a Tract block is expanded there will be an info icon in the top-right of the header. If you hover the cursor over this icon Blockhead will show an estimate of how much latency the effect block introduces.
Currently any latency introduced by effects needs to be corrected manually (though with the Tract effect the latency is so tiny that it shouldn't be necessary). I will try to implement some kind of automatic latency compensation in the future. Interestingly in Blockhead effects are not free-running so latency can potentially be corrected automatically on a per-block basis, instead of having to delay the entire audio stream as is the case in traditional DAWs.
Additional Changes
Feature: Added a "Reload" option to the sample list context menu
Update: Sample list has been updated to be consistent with new block list
Update: The block focus (hover cursor over a block and press F) behavior was rewritten and should now work a lot better with different block and window sizes. When triggered Blockhead will try to adjust the view in such a way that the block takes up at least 1000 horizontal pixels on-screen, in a way that maintains the horizontal cursor position relative to the block as closely as possible.
Update: Added visual indicator for track resize handles
Update: The undo/redo history is now limited to 100 actions (previously it was infinite). The reason for introducing this limit is to allow expired sample data to be freed so that memory usage does not simply increase and increase during long sessions. Previously it was necessary to keep every bit of sample data for the current branch of history in memory just in case the user decided to undo all the way back to the beginning. The history length of 100 is arbitrary. If it turns out to be too annoying or limiting I will make the history length user-configurable.
Update: Project save and load internals were once again rewritten to try to make saving and loading more robust. The format of project files has again changed so old v0.16 projects will not be openable. Loading or creating a new project will now display a dialog while clearing the currently loaded project instead of just hanging the UI like it did before.
Update: Added a picture of a dumb ass to the credits screen
Update: Keybindings are now alphabetized in the editor
Update: Waveform rendering optimizations:
- The stretching waveforms in block/sample lists and export dialogs now render themselves once at a resolution of 500 horizontal pixels instead of redrawing every time they change size
- Waveforms on the workspace no longer need to fully redraw when scrolling off the left edge of the screen
- The only thing that should cause any lag now is zooming in and out with lots of sampler blocks on-screen, which I am planning to address in the future through other optimizations
Update: All block types can now be assigned labels by right-clicking them in the workspace and selecting "Add Label...". Labels are per-reference and appear in the bottom-left, as opposed to block names which are per-block and appear in the bottom-right.
Bugfix: Possible crash when changing the size of an input buffer while there are existing chunks in the buffer
Bugfix: When a track is collapsed its resizer handle does not move to the correct position
Bugfix: Setting a block color override doesn't generate and appropriate undo operation
Bugfix: Small blocks become invisible when you zoom out far enough
Bugfix: Blocks can become lost while dragging and zooming at the same time
Bugfix: Drag and drop system breaks if the view is panned vertically
Bugfix: Undo/redo action for lane move operation is missing localization string
Bugfix: File browser gets stuck in drag mode if you try to drag an item outside the Blockhead window
Bugfix: Effect block becomes non-interactive if its lane is deleted and undo'd back into existence
Bugfix: Sample errors get word-wrapped in a stupid way
Links
Known Issues: https://trello.com/b/MT1A3Zob/blockhead-issues
Discord: https://discord.gg/96NkHQsz