Longs lists of names: how do you do it?

I tried finding a topic on this but maybe I am using the wrong keywords: What do y’all do when you want setup a list of waveform- or effect names (say: any list of say more than 10 items) into a list as text overlays.

Is there an import function I am missing?

At the moment I converted a list of strings into a json array using a pythonscript and try to hack it into the preset but I did not manage so-far

Is this something I need to look at LUA functions for? (Tried to avoid that until now. No particular reason :wink: )

1 Like

For your information, I bumped into the same question yesterday, when I had to add a list of 255 Multisound names for the Korg 01/W and 03/W series oscillators. I checked to do it via scripts or csv by downloading the preset and opening it up in notepad, but then decided I could do more harm than good, given the length of a preset in JSON. And python is unfamiliar territory for me.

An import/export of only an overlay would surely be less vulnerable.
Not sure such import exists currently.

Anyhow, I ended up adding all names manually. Brain on zero, eyes on the horizon. I managed to get them all in in 80 minutes.

Tip; go check in the public presets if there aren’t any overlays made for comparable instruments for the one you seek to build. Maybe they already created the overlay you look for. And these ones can be copied and pasted between presets, but not in json or text area’s.

In my presets you will find drawings for classical waveforms in the overlays. So the existing copy and paste of the E1 editor will allow you to reuse these overlays including the drawing.

image

image

1 Like

Thanks for your ideas and suggestions. Copying controls from presets certainly looks like to be the most convenient. Sadly I am not aware of any other synth that uses the same set of samples or effects

And in this case it’s about the names of 89 effect types (even worse as every effect type can have it’s own named parameters, but I’ll burn that bridge when I get there) and then there are the 244 “waves” (and likely much more in case of the TG500). And then, for my next endavour: Roland Fantom G, it will be even waaaaaaay worse.

I know one thing for sure and that’s that I am not going to type them in by hand. Refuse to do it with the current technology we have :slight_smile:

I managed to get the list into a downloaded preset and after importing it it shows in the editor but it seems it doesn’t want to send it to Electra One. Ah well, lets pause until tomorrow to do some further hacking :slight_smile:

If you find a way, let me know: I still have a Fantom X , a TG77 and an XV5080 to tackle :stuck_out_tongue_closed_eyes: ! But I don’t plan to start on them yet.

Anyways, check my Blofeld preset Electra One App, you may find inspiration to work on the Effects.
Have a look at the lua script: in it there is an array called fxNames, containing the control functions for each of the effects parameters, or a ‘0’ indication when not valid for a particular effect.
Below two functions, one for each effect, to hide and rename each of the controls based on fxNames.

Other idea, but I haven’t verified it in the documentation: maybe you can load an overlay into a preset via lua, so no overlay import needed.

2 Likes

I sure will let you know if I find something

Yesterday I looked in the LUA documentation to see if I could create a list or an array and move it to an overlay. And while you can set and get ids of overlays you can’t seem to fill them from code. More getters than setters it seems.

So back to the json preset hacking again.

  • Limited my hacked effect list to 5 to see if it had anything to do with sizes. Worked without problem.
  • Then to 45 instead of the 90 long list. Nope. Could not set it to electra one.
  • Then I inspected the effect names and this one drew my attention:
    “label”: “38 : Exc → Rev (Aural Exciter®*)”,
    Could it be? A strange character or the string is too long? I was guessing the Registered trademark and it was, but it turned out to be also the the arrow.
  • After adapting them all (remove the ® and replace → with ->, the preset could be send to electra and all 45 names worked
  • And of course also the full list of all 90 names worked after adaptation.

For me now this is a viable option.

Right. The E1 can’t stand irregular characters, Martin explained me once, but the logging doesn’t respond with an error for this yet.

Can I try out your hack?

Sure, what do you need from me?

First: backup your preset. I am not responsible for blablabla :smiley:

It’s relatively safe though. What I did is download the preset and save under a new unique name. When importing again, nothing should be overwritten this way.

It also helps if the list you want to replace already exists. So my control for selecting the effect presets was already there. Look for the overlay section in the json file

For example:

  "overlays": [
        {
            "id": 1,
            "items": [

I am only generating the stuff that goes in between the brackets (the items array)

Then:

I have a text file containing names I want to jsonnify (??!?!)

name 1
name 2
name 3
name 4
name 5

I have python script that takes that script (very simple, quick and dirty)

tab = '\t'

with open('names.txt', 'r') as f:

    lines = f.readlines()
    i=0

    for line in lines:
        output = f'''
        {{
         {tab} "value": {i},
         {tab} "label": "{line.strip()}",
         {tab} "index": {i}
         }},
         '''

        print(output)
        i += 1

It reads the file and creates an overlay -list-array (whatever you call it).
python3 the_name_you_saved_the_script_under.py

And the names are in names.txt or whatever you decided call your file. But then you have to adapt the filename in the python script too of course :wink:

Oh, I run it from the terminal. I either copy the output of the script to the clipboard or catch it in a file
e.g.

python3 the_name_you_saved_the_script_under.py >  output.txt

After running it you end up with:

{
         	 "value": 0,
         	 "label": "name 1",
         	 "index": 0
         },
         

        {
         	 "value": 1,
         	 "label": "name 2",
         	 "index": 1
         },
         

        {
         	 "value": 2,
         	 "label": "name 3",
         	 "index": 2
         },
         

        {
         	 "value": 3,
         	 "label": "name 4",
         	 "index": 3
         },
         

        {
         	 "value": 4,
         	 "label": "name 5",
         	 "index": 4
         },

The last entry has a comma too much. You have to remove it manually

Then I open the downloaded preset. Find the overlays and replace the one in the preset with the output of the scripts. In my case it looked like

{
            "id": 2,
            "items": [
----------------- replace from here ---------------
                {
                    "value": 0,
                    "label": "00 : Through",
                    "index": 0
               },
               {
                    "value": 1,
                    "label": "01 : Rev. Hall1",
                    "index": 1
               }
----------------- replace until here ---------------

            }
            ]
        },
        {
            "id": 3,
etc

and replace the overlay (id 2 items in my case) it with the full list the script outputted.

So again: The script does not create the complete overlay but only the items. So there is some danger.

Also when opening the downloaded preset in json form it showed everything on 1 line, I opened it in visual studio and set the language to json, then did shift+option+f to format the file (guess shift+alt+f if you are on PC). Doing that will format the json over multiple lines and indent everything nicely. It also adviseble to do the formatting again after pasting in the custom items. It cleans up bad indents etc.

Hope this helps. In case of any questions other than “how can I sue you you destroyed all my presets” please feel free to ask :slight_smile:

And how to generate he file with the names/effectnames/wavenames? My best bet is always:
getting a PDF, convert it to text (or copy relevant parts to a text file) and regex what you need from it. Depends on how the PDF was constructed how painful it will be :slight_smile:

1 Like

Great. I’m not going to do it right away, i’ll need a stronger motivator than my curiosity :yum:

Anyhow the way you explained it sounds sufficiently straightforward to understand and replicate. Thanks for sharing !

So next time the ‘big list’ comes by, it will be ‘brains on max, eyes focussed’ and then I’ll test your python script. After backing up, that is…

1 Like

Hmmm, I’m having some issue now. A previous “downloaded hacked and saved under another name”-preset I can import it over and over again and it keeps generating new presets in the WebApp.

For a new preset, I cannot get it to work anymore. The import seems to do nothing. I have to find out what I did differently this time. I will report when I find the reason.

Edit: a missing comma between two items of the array. That simple and that easy to break :smiley:
Remember to check the build in language features in your editor! That annoying red block there in the middle might actually be something you need to pay attention to! :smirk:

@L56 Thanks so much for your step-by-step. This is exactly what I was looking for to help enter overlays! Works like a charm!

1 Like