V4.0 testing [was V3.7]

@martin did show a popup text keyboard somewhere recently. For patch naming and such I use two controls - one to pick the position and the other to pick the character. I did implement a numeric popup keypad fir the 2290 preset. We can certainly implement our own with all the new capabilities in the OS. It would be more convenient if there was a built in one, but even if someone built a small standalone example, that could be useful too.

I was going to implement a simple limited rotary controlled design like the one you mentioned. I agree. Would be nice if there were a standard popup we could call.

Well got the Persist/Recall working for a simple set of controls for one table case. Since I think there is only one table per preset that can used here I have to figure out how to ramp this up to multiple user configuration store/recalls - I assume by creating a nested table of some sort with one nest case per user configuration I want to store.

1 Like

They limit appears to be the size. How complex of a table does not matter (I think).

In traditional programming, you could do a 2 dimensional array to store 10 presets like:

table ={}
for i=1,10 do
table[i] = {}
end

Then for each preset, asign values as usual
table[1][3]=17
table[1][4]=2

Etc. You can get as nested or complex as you want

Thanks. Do you know if Martin added the requested initialization option to not trigger functions before onLoad so you can do things in onLoad and have predictable initialization?

By the way I also see that persist and recall are not working across rerunning the preset. Part of this is likely due to reinitialization that perhaps wipes out tables, but I put in code to not do the initialization that would call normally call persist or recall on preset initialization (all that initialization I really don’t like that gets done without your knowledge before ā€œonLoadā€). So I have a program that sets persist only when you press the control that calls a function using it and then I exit and reload the program and perform a recall (the JSON of which I assumed was still in flash associated with the preset), but it’s like everything got reinitialized. The whole purpose of this function is to carry over persistence data sets across instances of running the program again. To do that I think a new initialization process related to persist and recall is needed. No automatic calling (firing of controls) of these routines should be done and the JSON file that gets generated needs to carry over and automatically load if the preset is run again. Of course not sure exactly what is needed here but for sure we can’t have the JSON file for a preset getting reset in any way after it is set. Only a manually programmed persist call should change the JSON file (never call persist ā€œbehind our backsā€).

Or maybe there is some secret sauce here Martin has not documented yet.

You’re past what I know. I’m visiting in Little Rock, AR and power has been out since this morning, so no real time to get on line and poke around.

AFAIK, the onLoad() can still be problematic and I generally make minimal use of it. I thought the persist() would work across E1 reboots and such as long as you didn’t re-send the preset down from the computer to the E1. The implication is that it should work when you change presets on the E1 and then go back.

Thanks for all your input. Let’s see what Martin says here. There must be a way for the JSON file to persist and be recalled repopulating the table on reloading a preset, possibly after a different E1 preset was used in the interim. All my Haken Audio Continuum and Expressive E Osmose Electra one presets are going to work like that - people will be moving back and forth between them to do different things and they will want to recall preset configurations they previously stored on each.

So here’s a cheat sheet I made for myself on programming multiple User configurations of a set of dials as a test case using a nested table that is translated fine to the internal JSON format. Now I just have to talk to Martin about how the Persisted file can be carried over when reloading the E1 preset so the user’s stored configurations can be retrieved and reloaded on bringing up the preset again once they have stored their desired configurations. Using Electra One 4.0 Persist-Recall Functions.pdf - Google Drive

Hi, i’m testing the new firmware and it’s fantastic. Version 4.0.0p seems very stable. Great work and improvements for the E1.

I have a question about persist() and recall() functions behavior. Is it possible to execute a recall when the preset is loaded (for example in preset.onReady) and read a previously stored file?

In E1 I can see the data.json file, but if I try to do recall(tablename) I get an error: ā€œrecall: Failed to parse associated JSON file.ā€

The file is 19k, large but under 20k.
Maybe I haven’t fully understood the purpose of these new functions and what i’m trying to do is not possible?

rkram53 Oops, i didn’t see your previous post where you’re talking about this topic. It would be great to be able store and read files after startup. Also some more file size would be nice. I’m trying to store a synth program names which are 8 banks x 128 programs and 16 bytes per program name. The file space is a bit short to store than info.

Hmm - need to determine the use of this in relation to the Snapshot feature for storing arbitrary user configurations, but the assumption is the JSON file is retained on rerunning a preset. I think persist/recall will let me add control to let users name their configurations. Maybe Martin needs to clarify what his use of persist/recall is intended to be.

Note new persist/recall operation Martin details below. Now JSON file is restored on rerunning the program.

Isn’t this what snapshots are for?

Here’s what I am talking about. A user can set an arbitrary configuration and store it with a control (here three separate configurations are programmed) and then they can recall their user configured configurations with a restore button. Snapshots let the user do this at runtime in the preset’s GUI? https://youtu.be/eRDf9cY4YXk

Note: See Martin’s responses below that clear this all up.

Thanks. Snapshots window for me in 4.0.0 Beta sometimes freezes. But it does seem to allow saving of a configuration. Not sure how the user can add their own names to the configurations they create (maybe they need to live with A0, etc.). Maybe this is a viable alternative to what I was going to do with persist/recall. Need to test it with a big configuration.

Note: Snapshots did not work here because I had controls set to None option and None is not processed. So per Martin the controls should be set to ā€œVirtualā€ option and then they will be processed by snapshot.

hmm, that looks like that the transferred data is not ok. I have not seen such thing for quite a while. What type / year mac is that? I do remember was experiencing something like that on my old iMac.

The 4.0 has support for transferring large data in smaller chunks. It might help. I still need to add support for that to the web app though.

I had to tweak colours a bit. The reason is that there are three different hardware revisions of MKII. Some of them are using IPS displays. The model with the IPS display has better contrast and viewing angles but tends to be darker. I had to balance things a bit so that it looks ok on both the IPS and VA screens. The 4.0 has support for applying gamma curves. I would like to tweak it but I want to do that after the 4.0 is officially released. Tweaking it and making it right for all revisions might be a bit time consuming.

I’ve read the discussion above and I will provide single response to it here. The persist() and recall() functions are available in 4.0. The purpose is to save ā€œoneā€ Lua table per preset. A persisted table can be recalled later. Note, if you persist more tables, only the last one will be kept and used for subsequent recall.

When I added the feature I designed it so that an upload of a preset resets (read removes) any persisted table data. The idea was to integrate this in the editor so that the editor always reads the data and reuploads them along with the preset data. The work on the editor is not finished yet and after reading the discussion I changed that a little bit: uploading a preset with an identical projectId will NOT remove the data. Uploading different preset to the slot will wipe them. This change is implemented in the firmware attached down below. That way users can update their presets without loosing the data and the same counts for the developers. If you use ā€œDelete presetā€ in the Controller section of the web app, you will remove all data related to the preset, including the persisted table.

The persist() and recall() can be called anywhere in the preset, including the global context. There is an example on how to use it:

Demo - persist Lua data

The example demonstrates how to load the data at the start up or use default.

Note, the persist() function supports all Lua data types, with one exception: you cannot persist Lua functions.

I assume it was cause by reuploading the preset. If you use 4.0.0r (below), it should work ok.

The limit is now at 20k but I can change it if needed.

I’d say that Snapshots can be misused for storing arbitrary data but it is far from optimal and it would be hard to use. A snapshot is a saved state (numeric values only) of all controls. I you need to save arbitrary data, use persist() and recall(). With the change I made today, it should work ok for you (I guess).

I will look at the Snapshot now. I have not had any problems with them. I will review it and will ask (@rkram53) for assistance if I need to replicate the issue.

The firmware:
firmware-v4.0.0r.srec.zip (2.0 MB)

PS: sorry for the slow response. My computer time was very limited in last few days.

1 Like

Martin - thanks for the info! I’ll try the new firmnware. The big preset I tested Snapshots on that did not work (ā€œDual Wavebankā€) connects to a specific preset running on a Continuum (but I don’t think that would affect changing snapshot values). I use lists and other controls - not sure were meant for snapshot restoration. You can try that - maybe I’m doing something wrong with snapshots using snahpshot button/menu. Let me know what I can do to help if you do find issues. I made the ā€œDual Wavebankā€ Public for a bit in case you need that to test with it.

1 Like