vsariola / sointu

Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac & Linux
MIT License
239 stars 15 forks source link

User presets for instruments #125

Open LeStahL opened 7 months ago

LeStahL commented 7 months ago

Most of the time, I do not rebuild complex stacks from scratch, but rather start off from a certain "basic" version of my instruments. It would be super convenient to be able to select them from a drop-down, similar to the built-in presets.

The feature could be configurable over ~/.config/sointu/presets.yml. This file could have the structure

presets:
 - name: Single instrument
   location: /path/to/single_instrument.yml
 - name: Instrument in patch
   location: /path/to/patch.yml:instrument_name_in_patch

The tracker could display a button (or have a menu entry) to make the current instrument a preset automatically (by adding it to presets.yml).

vsariola commented 6 months ago

Easy to do in principle; I'd prefer a simple folder with the user preset instruments, with instruments in the same format as normal instruments, to make it easier to move things around as needed.

However, slightly hard part is to make a convenient UI for it. Off the top of my head, there's a few options: 1) Put the user presets in the same popup menu as the default presets, perhaps with icons next to preset name to delete or overwrite it 2) Make a separate button, opening a popup or a dialog to manage the user presets. 3) Mix them with default presets, but don't put too much effort into making it easy to save them there: just have a special folder where the user can use the usual file save dialog to place her presets from where they eill magically appear in the list.

I have been thinking of hiding the copy, load and save instrument in context menu anyway, there could be also the commands to save/load presets.

vsariola commented 4 months ago

You can now drop presets to os.UserConfigDir()/sointu/presets/. They are loaded next time sointu is (re)started and mixed within the list of default presets.