Any way to save presets in modular 2

A place for developers to share ideas and assist each other in solving problems.

Moderators: valis, garyb

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Any way to save presets in modular 2

Post by DragonSF » Sat Aug 27, 2016 11:32 pm

I'm building an additive synth with modular 2 (or at least try). I'm wondering, the settings of some modules (ADSR and VCA) can be saved as preset in an external file?

User avatar
JoPo
Posts: 1943
Joined: Wed Jun 05, 2002 4:00 pm
Location: VRRAAaaooOôOooommmh
Contact:

Re: Any way to save presets in modular 2

Post by JoPo » Sun Aug 28, 2016 1:23 am

If you create a preset file of your modular, ADSR, VCA and all modules of the patch will be saved each time you create a new preset. But don't forget to create a bank with all your presets in it and save the bank in your HD. And each time you create a new preset, save your bank again ! In order to find it back next time you load your patch.
Some of modular modules have there own preset feature, like sequencers, some of Roy's modules such as free envelope, etc... http://www.cwmodular.org/Modules/CwmModules.zip

This works for any preset devices in Scope.
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Sun Aug 28, 2016 1:47 am

What if I only want to create a preset of some parts only? Not the whole module? How can I achieve that (if it's possible at all).

User avatar
faxinadu
Posts: 1292
Joined: Wed Nov 01, 2006 3:12 am
Location: israel
Contact:

Re: Any way to save presets in modular 2

Post by faxinadu » Sun Aug 28, 2016 3:01 am

with the stock modular modules, no, that is not possible.

you can make your own modular modules for envelopes using sdk envelope modules and add a preset list to the module itself. cool idea actually :)

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Sun Aug 28, 2016 3:36 am

I've written a program to get the envelopes of a wave over time. I just want to create/superimpose these data to the free env in modular to control the amplitude over time for each harmonic. FreeEnv seems to be a good start and your advice is also valid. Let me check, which is more appropriate/convenient. But I'm getting closer...
Is there any way to read/modify such preset file outside Scope? Or at least does a description of the file structure exist?

User avatar
JoPo
Posts: 1943
Joined: Wed Jun 05, 2002 4:00 pm
Location: VRRAAaaooOôOooommmh
Contact:

Re: Any way to save presets in modular 2

Post by JoPo » Sun Aug 28, 2016 4:20 am

No.. You can't edit a preset file outside Scope.
Yes : in SDK you can create your own envelope module with its own preset feature... And then share it here ! :wink:

And in BC modular shell, you can load another modular patch with its own preset and I/O : if you use always the same filter system in a lot of your modular patches, for instance, you can create it and then recall it when needed. They are called CLM modules :
http://bcmodular.wikispaces.com/CLM
Maybe, it can be a workarround for what you are trying to achieve...
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <

djmicron
Posts: 1097
Joined: Wed Jul 23, 2003 4:00 pm
Location: Milano
Contact:

Re: Any way to save presets in modular 2

Post by djmicron » Sun Aug 28, 2016 3:10 pm

for modular modules where the individual preset is not available, you can use a sub modular module, such as the ones available with the bc modular to load the envelope and save the presets for that sub modular.

edit:

sorry i missed the prev post :)
Image

jksuperstar
Posts: 1488
Joined: Mon Nov 15, 2010 12:57 pm

Re: Any way to save presets in modular 2

Post by jksuperstar » Sun Aug 28, 2016 7:48 pm

A CSV "player" would be a pretty ideal module for this purpose. Load a CSV file (from excel, etc), and play it as a sequence using a sample clock input. Maybe have multiple outputs (for multiple columns) too.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Mon Aug 29, 2016 7:42 pm

Can someone please direct me to a sample or some doc, to show how to create a module, which can write and read data from a file?

User avatar
sharc
Posts: 638
Joined: Mon Oct 29, 2001 4:00 pm
Location: No idea. All looks the same down here

Re: Any way to save presets in modular 2

Post by sharc » Tue Aug 30, 2016 5:44 am

DragonSF wrote:Can someone please direct me to a sample or some doc, to show how to create a module, which can write and read data from a file?
IniIntInterface / IniStringInterface can do what you ask

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Tue Aug 30, 2016 3:08 pm

sharc wrote:
DragonSF wrote:Can someone please direct me to a sample or some doc, to show how to create a module, which can write and read data from a file?
IniIntInterface / IniStringInterface can do what you ask
And where can I find those? (Sorry, but I'm really a beginner here)
Update:
After searching the forum, I found the .pep files (which were hidden). Next question: how to use those?

User avatar
sharc
Posts: 638
Joined: Mon Oct 29, 2001 4:00 pm
Location: No idea. All looks the same down here

Re: Any way to save presets in modular 2

Post by sharc » Wed Aug 31, 2016 11:38 am

You can load them in the SDK via ModuleLoader.mdl

...From there you can make them circuit or surface components by adding GOs and attributes in the GOs window.

Unfortunately there isn't any .nfo files for these scripts so the functionality is limited to reading strings and integers upon module load and then prompting reading and writing via right-click.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Wed Aug 31, 2016 3:38 pm

I could load them and assigned GOs and attributes, but when I try to load it, I'm getting 'nil references'. Right click doesn't offer anything useful...

User avatar
sharc
Posts: 638
Joined: Mon Oct 29, 2001 4:00 pm
Location: No idea. All looks the same down here

Re: Any way to save presets in modular 2

Post by sharc » Thu Sep 01, 2016 10:21 am

You need to take them out of the ModuleLoader - After loading one of the scripts fold the ModuleLoader. In the Project Explorer if you now look into the folded ModuleLoader you'll see the script. If you right-click on it you'll get read & write options.

If you assign GOs and attributes to it and drag it out of the ModuleLoader into your circuit parent or a surface panel, you'll then be able to right-click the GO for read / write.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Fri Sep 02, 2016 12:03 am

sharc wrote:You need to take them out of the ModuleLoader - After loading one of the scripts fold the ModuleLoader. In the Project Explorer if you now look into the folded ModuleLoader you'll see the script. If you right-click on it you'll get read & write options.

If you assign GOs and attributes to it and drag it out of the ModuleLoader into your circuit parent or a surface panel, you'll then be able to right-click the GO for read / write.
That doesn't seem to work. When I drag and drop the pep file to the moduleloader, I see the wait-cursor and then nothing. I.e. the moduleloader is empty as before. I'm using version 3.0 (prelease) according to 'about'.

User avatar
sharc
Posts: 638
Joined: Mon Oct 29, 2001 4:00 pm
Location: No idea. All looks the same down here

Re: Any way to save presets in modular 2

Post by sharc » Fri Sep 02, 2016 5:07 am

Enter the filename (including extension) of the pep script into the modules array of the ModuleLoader ...It's best in this instance to have the array size set to 1. Set 'load' to 0 in the ModuleLoader Pad List. This will load the module and if you re-select the ModuleLoader the Pad List will update to show the additional pads of the loaded module.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Fri Sep 02, 2016 4:00 pm

sharc wrote:Enter the filename (including extension) of the pep script into the modules array of the ModuleLoader ...It's best in this instance to have the array size set to 1. Set 'load' to 0 in the ModuleLoader Pad List. This will load the module and if you re-select the ModuleLoader the Pad List will update to show the additional pads of the loaded module.
OK, I was able to enter the filename into the array and got the pep loaded. After that, I could drag out the interface (in Project Explorer) and add some GO (like frame, text) to it. But I can see the module in the circuit design only after clicking 'create circuit representation'. I also can see 'read' and 'write' menu options, but they don't do anything.As it turns out, the pep file is still within the loader, even the project explorer says otherwise. Question now: how can I separate module loader and pep with mouse?
I see this:
Image1.png
Image1.png (50 KiB) Viewed 1271 times

User avatar
sharc
Posts: 638
Joined: Mon Oct 29, 2001 4:00 pm
Location: No idea. All looks the same down here

Re: Any way to save presets in modular 2

Post by sharc » Sat Sep 03, 2016 4:10 am

After dragging IniStringInterface.pep out of the ModuleLoader rename it to IniStringInterface and save it as a .mdl.

You can now load this module and set the path field for the location of your text file.

Check out the cset.ini in notepad to see the format of Section and Key entries or simply enter them in the PadList, set the path and then choose write to update the text file with the correct formatting.

...Value is the string which will show for the key.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Sat Sep 03, 2016 6:47 pm

OK, thanks a lot. That works so far. I.e. I can create an interface module for each partial, use the same path, but different keys and get my values for each envelope curve. Nice.
Netx question: how can I connect the value with the EG? Does is EG (1 for each partial) need a new new pad to connect to the value? Does such EG exist or do I need to create my own EG? I would like to use the Multi Segment EG, which has T L S entries, but I can't connect them to the Interface.

DragonSF
Posts: 265
Joined: Sun Nov 08, 2015 4:28 pm

Re: Any way to save presets in modular 2

Post by DragonSF » Tue Sep 06, 2016 12:04 am

Image2.png
Image2.png (16.36 KiB) Viewed 1212 times
I'm a little step farther now: I can read/write array elements from/to file, but I haven't find a way to iterate the index in the ArrayIterator. I can do this manually and get the actual data, but I want to use something, which does this for each index (incl. read/write). Any ideas, how to accomplish that?
Or is there a function, which converts arrays to string (CSV) and vice versa?

Post Reply