"PATCH" parsing section removed from preset

I am working on an editor for the Ensoniq mirage when loading the preset in the webapp the patch section is removed.

Here is the preset:
Ensoniq Mirage Soundprocess-patchparsing3-static.epr (210.3 KB)

This is what i get back after loading it on the web app:
Ensoniq Mirage Soundprocess (6).epr (59.7 KB)

Its important to note that the preset contains a large overlay which convert Midi Note numbers to “note name and frequency”.
That list is used by 6 controls.

I tried to load the preset via the sandbox and since no parameters are parsed from the patch request I think here the preset also got “truncated”
Reducing the list to 2 did not help, neither did removing ‘’’#’’’ and ‘’’/’’’.

Here a snippet from that list:

            {
               "value":126,
               "label":"F9#/Gb,11,83",
               "index":126
            }

i removed all whitespaces and newlines making the template 55kb but still no luck,

Hi @Flyweight,

I checked your preset. Your patch object must be inside the device. You have it in the root of the JSON.

ie.

   "devices":[
      {
         "id":1,
         "name":"Generic MIDI",
         "port":1,
         "channel":1
         "patch": {
             ... your patch stuff here ...
         }
      }
   ],

also something weird happened because at the bottom of the “soundprocess … static.epr” the control IDs go from 108 back to 13 whereas the “soundprocess (6)” file has them going 108 and then 109.

But, moving the patch object stuff into the device area will probably clean up the rest anyway.

As an aside - you might want to look into a Formatter function for the controls rather than an overlay to generate the note numbers. Typically you can code a very compact few lines that will take 0 - 127 and generate a text note display.

Ah ok so the issue is me :slight_smile: hihi
The list for the note number conversion I created using awk. Not sure have not tried to use the “Lua formatter”. Will look into it but first I have to correct the JSON.

Thanks for the help

If you decide to go the LUA route, attached is some quick and dirty C code that will spit out note names and frequencies for all 128 values. If I get time, I’ll throw it into the LUA editor in ElectraOne and translate it to LUA, but C is generally pretty close already.

note_disp.zip (484 Bytes)

1 Like

Thanks, I can play with it. Want to learn Lua, so far I added some callback to switch the midi channel with a control.
So your idea is a good exercise. Thanks for the homework :slight_smile: