Martin,
Is there a reason why a table that is an array of table “records” is not getting persisted? Program works ok but this type of table seems not to get persisted? Ideally for user presets I want a table that is an array of records/tables, each array element mapping to a user configuration that when select will fill in all preset controls and then set associated values on the Midi target. I made a preset “Array of User Tables” that works but never seems to get persisted. I think I’m doing the same thing that worked in a number of other table tests.
Thanks
Rich
Thanks
Rich
local userTable = {}
– Do initial recall
recall (userTable)
– Create and insert tables into the Table array if userTable not there
if next (userTable) == nil then
print(“User Table Not Persisted - Reinitialize”)
for i = 1, 3 do
local userRecord = {
m1 = 0, m2 = 0, m3 = 0, m4 = 0, m5 = 0, m6 = 0
}
table.insert(userTable, userRecord)
end
printTable(userTable) – debugit
else
print(“User Table Exists - Reloaded”)
end
Tried upgrading on the web page to the 4.0 is says is available. Loads for first step, but then the Electra One just sits there saying disconnected on web page (which page said to ignore) but controller just displays “Updating Firmware” seems hung there. Had to power cycle and it went back to 4.0.0.r release. Do we have the file to load the old way?
@martin - no rush (for me). My entire studio and computer stuff is almost packed up in boxes. Looking to make the initial move next week and then probably another week or more to unbox and get something even partially set up.
So, no real ability to test any changes until mid-May or so.
Thanks for the laugh. It’s been very hectic, You don’t realize how many audio, MIDI, and patchbay cables you have until they have to be packed up.
Back in the day, that was close. My brothers swore they’d never help again after moving the B3 + 122, CS-80, Ampex MM-1200, Trident Series 70 mixer, DX-1, Mellotron, Synthexes, JP-8’s Chroma, T-8, and more.
Same here! Just moved to a new apt, and focusing the on my studies for a while onward so no time or space for music / gear new firmware looks great tough, can’t wait till after the exams to play with it!
…on the other hand, I just designed my first (CMOS) opamp and a DAC! So hopefully return wiser
Yup I think I’ll be good on copper come the post-apocalypse… Gotta be like 50 kg just in cables.. and then all the boxes of gear… And then all my diy projects, have a bunch of hardware I’ve built that just needs enclosures… Pretty much a full (additional) studio of hw compressors like stereo la2a, 1176’s, DAoC, zener/tg, Foote, mastering stuff from ka audio, tons of eurorack… All neatly packed in cardboard boxes. Yey
unfortunately, I was not able to reproduce it. I have evertyhing running, but even using the keyboard array keys does not switch the sets of parameters dispplayed on Electra. I guess I am doing something in a wrong way. If I use on screen buttons on the E1 display, it seems to be rather responsive.
I changed things so that JSON size can go up to around 1MB. I would advise to use it with caution though. I would like to look at stuff that @Mint-Gecko and tweak colours a little bit more today. I think updated and most likely final version of 4.0.0 will be provided tomorrow.
There was an issue with the arrays. It is fixed. I used your Array of User Tables preset. It seems to work just fine now. Updated firmware will do later.
I did my best to make the serialization as flexible as possible but I hit some limits. It mostly comes out of how Lua treats arrays and what can be done in JSON. A true Lua array starts with index 1 and it is dense - no holes in the sequence of indexes. If your array is like that, it will be serialized as a JSON array and recalled properly. Anything else will be treated as a key-value associative array. But there is a catch, A number cannot be used as a key in JSON. I played around with the idea that I could convert such index numbers (eg. your 0 and 1) to text strings and use them as keys. It worked but I did not like the idea that persist() and recall() would mutate the data. So, what I did is that keys must be text strings and force the developer (you) to explicitly care about that conversion. Your example then turns into:
one extra remark. The 1-based indexes are pain. If there’s one thing I do not like on Lua it’s them. but, if you decide to use 0-based numeric index like in your original example, please take in account that certain things will not work ok for you in Lua in general. Use it carefully.
EDIT: it will be release in the next firmware update.
There are other ways to trigger this behavior. All steps expect the plugin to be installed and the plugin to have loaded its (shipped) map and displaying it on the E1.
Using u-he Diva
Go to Module “Osc” or “Filter”
Change the “Model” type parameter (OSC: Knob 1; Filter: Knob 3) using the E1
Notice that for every model change, there’s a noticable stutter happening
Now use your mouse’s scroll wheel/scroll gesture on the touchpad to change that parameter in Diva’s UI instead. When I do that through the params range (fully up and fully down) once, it’s usually fine but when I do this like 20 times up and down, it takes multiple seconds to catch up.
Go to Thor (Module) and select “Osc 1” or “Filter 1”
Change the Type parameter (Knob 1) a bit, it’ll quickly start to become too stuttery to make meaningful adjustments
I want to acknowledge that this has improved with the upcoming firmware (that’s great, thanks for all the improvements), but it also doesn’t feel fluent. Can you find any calls from my script that are causing these slowdowns?
@martin , so you are saying that if I have a basic array structure (starting with index=1), like a series of assignments storing values or strings then I need to convert the numeric index to a string before using persist() and recall()?
It looks like I need some kind of wrapper functionality to “JSON” and “un-JSON” any data I want persisted. Not a problem, just want to know. Gives me something to think about the next week or two.
Completed firmware support for multiple Lua files in one preset (@Electrolove)
I am still busy with @Mint-Gecko’s “slow response”. And I need to pay attention to issue that @cryingboyscafe reported - freeze when Squarp sequencer is connected. Both issues seem to be somewhat specific and not affecting the majority of setups/presets, therefore I am gettings things ready for releasing 4.0 officially this week.
Completed firmware support for multiple Lua files in one preset (@Electrolove)
I am still busy with the @Mint-Gecko “slow response”. And I need to pay attention to issue that @cryingboyscafe reported - freeze when Squarp sequencer is connected. Both issues seem to be somewhat specific and not affecting the majority of setups/presets, therefore I am gettings things ready for releasing 4.0 officially this week.