loading/saving presets for metamodules: a novel paradigm

Post Reply
User avatar
AutumnCheney
Posts: 504
Joined: Sun Dec 29, 2019 8:16 am
Location: tahlequah, ok, usa
Contact:

loading/saving presets for metamodules: a novel paradigm

Post by AutumnCheney »

abstract

here, i present a way to allow metamodules to load and save presets using a unique format originally created by logickin lambda and extended by me; i will explain how to retrofit existing modules to use this format and how to create new modules that can make use of this paradigm

motivation

as of now, sunvox does not natively support saving and loading presets for metamodules. you could just set the parameters and save the whole thing as a .sunsynth, but what if you update the module? you'll have to go back and update all the presets as well, which could be tedious. the basic modules aren't subject to this, since they are designed to be backwards compatible and will work regardless of the latest version you load them in

however, in june of 2021, logickin lambda published their "accipiter" supersaw module, which, along with being a great synth, also had a unique feature to it: it came with a preset bank module for loading presets. it used a set of velocity2ctl modules with preset "out max" and "out controller" controllers connected to the output and with a single multisynth as the input; when a note was sent into this multisynth, it would send a note on command to the velocity2ctl modules, which in turn would send their controller signals to the output. the breakthrough with this is when these were put into a metamodule and connected to another module, these controller signals would set the controllers of the connected module. this was revolutionary because it facilitated the use of manually set presets for any module, in particular metamodules

i noticed this module in december of 2021 and thought it was fascinating, but did not think of it until fairly recently, when i realized what a powerful system it could be. i quickly sought to make use of it, but soon ran into a problem: there is no way to easily save presets with the module. you could manually set the controllers of the velocity2ctl modules, but this would obviously be incredibly tedious. without the ability to copy hexadecimal controller values, conversion would make this even more arduous. soon, however, in time, i managed to design a system to circumvent this and make it possible to save presets alongside loading them. i was elated, and i am now sharing this with you

description

this paradigm is to be executed at the metamodule building stage. you can also relatively easily update existing metamodules as well

it requires a multisynth module (preferably module 2) alongside the audio/note input (preferably module 1) to be set aside for the "save preset" functionality. i reserved modules 1 and 2 because it would be easiest for the user to change the "input module" controller by just one step to access the function

next, for each controller for the metamodule, we need two modules: a multictl and a velocity2ctl. connect the multictl to the desired module's desired controller in the inner workings of the module and to the velocity2ctl's "out max" controller. set the velocity2ctl's "out controller" to the corresponding controller in the metamodule. for this example, it will be controller 6. lastly, connect this velocity2ctl directly to the output and the "save preset" multisynth to the velocity2ctl. if needed, set the "quantization" controller for each multictl to the number of possible options in the connect controller. for example, if it's connected to the analog generator's "waveform" controller, and the maximum value in hexadecimal is 10 (16 in decimal), set the quantization to 16 + 1 = 17

now, once the setup is complete, exit the metamodule. set the controllers to each of the corresponding multictls, optionally set name and color, etc. the module is completed at this stage

once you have created a preset you want to save, load a blank preset loader module; it will be attached here:
ACheney Preset Loader.sunsynth
(43.05 KiB) Downloaded 113 times
make a connection from your module to the preset loader. now, set the input module of your module to the "save preset" multisynth, select your module, and press a note. that's it; if everything is set up correctly, the values of the controllers will be sent to the preset loader's controllers and the preset will be saved

to load the preset again, set your module's input module to the audio/note input module, reverse the connection between the preset loader and your module, select the preset loader, and press a note. now the values of the controllers in the preset loader will be sent to your module's controllers. optionally, save the set preset loader as a sunsynth to save the preset for future use. and that's it!

advantages/disadvantages of this method

obviously, the main advantage of this method is that if the metamodule's internal workings are updated, there is no need to update the presets as well. the presets will always work as long as the controllers are the same. new controllers can also easily be added at the end of the controller list

however, if the controllers need to be rearranged or one added between two others, the "out controller" parameters of the velocity2ctl modules will need to be changed to accommodate this

other potential disadvantages:
  • the step sizes/values of the original controllers in the inner workings will be lost; all controllers will have 32768 values unless some quantization trick is used. if nightradio ever adds functionality to the multictl to quantize the "value" controller and/or give individual values different names, this will be fixed
  • the setup is potentially tedious for metamodules with a large amount of controllers
  • due to the multictl containing a 256 byte curve, the size of the module will increase for every new controller, which could potentially be a problem for those with extremely limited space
conclusion

using this paradigm, we can allow presets to be saved for metamodules. these presets could be used to teach beginners how to get good sounds out of the module, or to speed up using a particular setup for a module. the setup could be tedious, but i believe it will pay off in the long run. until native preset functionality is added to sunvox (if ever), i believe this is the best method for saving/loading presets.
my website: https://acheney.xyz

it features my music, sunvox content, and social media links!
User avatar
AutumnCheney
Posts: 504
Joined: Sun Dec 29, 2019 8:16 am
Location: tahlequah, ok, usa
Contact:

Re: loading/saving presets for metamodules: a novel paradigm

Post by AutumnCheney »

corollary: an example setup

because it is easiest to learn from example, i will attach a module using this system to this post, as well as two presets. the module is my old "analog synth" module; i chose this because it has relatively few controllers and is not complicated in terms of functionality. simply download them, load them into sunvox, and load the presets as described into the module to use them.

have fun!
Attachments
Thick bass (analog synth).sunsynth
(43.05 KiB) Downloaded 94 times
Default (analog synth).sunsynth
(43.05 KiB) Downloaded 117 times
ACheney Analog Synth (preset enabled).sunsynth
(63.6 KiB) Downloaded 112 times
my website: https://acheney.xyz

it features my music, sunvox content, and social media links!
Post Reply