My device keeps freezing.
It only freezes on the controls that have the oscPairSelect1() and oscPairSelect2() function assigned in the json.
Do I am doing something wrong here?
The function seems to do what it supposed to do. It sends 1 osc pair select message until we switch to the other pair.
You can replicate it by loading this preset.
Just go to the “OSC PAIR1” or “OSC PAIR2” page and keep twisting the “OSC fine” but any other control will do.
At some point the Electra One freezes. But in the console app nothing appears in the logs.
mirageSoundProcessDeviceId = 9
incCount1 = 1
incCount2 = 1
-- getPatchNumberByte function is added in the patch request and reponse in the json
-- it fetches the value from parameterNumber 40 (patch select) on the moment the patch request button is pressed
-- so that the same patch is requested as parameterNumber 40 (patch select) is set to.
function getPatchNumberByte()
local parameterNumber = 40
patchNumber = parameterMap.get (mirageSoundProcessDeviceId, PT_SYSEX, parameterNumber )
return (patchNumber)
end
-- oscPairSelect1 and oscPairSelect2 send a osc pair select message once, after that reset the counter of the other function.
-- so if we switch to that page the corresponding osc pair select message is send out once again.
-- controls belonging to osc pair 1 have the function oscPairSelect1 added in the json .epr file and controls osc pair 2
-- oscPairSelect2
function oscPairSelect1()
if incCount1 == 1 then
device = devices.get (mirageSoundProcessDeviceId)
midi.sendSysex (PORT_1, { 0, 0, 35, 1, 67, 60, 1, 0 })
incCount1 = incCount1 + 1
-- reset the other counter so the message will be send for pair 2 once we switch to that controls
incCount2 = 1
end
end
function oscPairSelect2()
if incCount2 == 1 then
device = devices.get (mirageSoundProcessDeviceId)
midi.sendSysex (PORT_1, { 0, 0, 35, 1, 67, 60, 2, 0 })
incCount2 = incCount2 + 1
incCount1 = 1
end
end
I don’t have a Mirage, but the template (with the LUA code pasted in) does not lock up no matter how much I twist.
Maybe the Mirage is sending back something that is causing a problem?
Try unplugging the MIDI Out from the Mirage and see what happens, but here, with lots of twisting, no lockup.
(and believe me - I’ve been locking up my ElectraOne and/or PC quite a bit during my preset development…)
I have cleared all my presets by sending an empty one to all the slots.
Then reloaded the presets and the issue persists.
I then re-flashed the firmware, templates where not affected but the issue still persist.
Only when I keep twisting a know which have the oscPairSelect funtions attached this issue occurs.
yes, I was on the oscillator pages as you mentioned. I was rotating the Fine controls for both and then twisting other knobs and it was stable for me. I can try some other tests later today if that same template is still a problem.
That would be great.
You have to really keep rotating the “fine controll” or others for a while.
I loaded the preset and lua code via Electra One App and after uploading I kept dialing “OSC A Fine” after a while the Electra One froze up.
I did get it to lock up. But only when I had the log console running. If I was not in the App Editor and did not have the console log running, it never locked up. With the console log open, the controls began to stutter and not change values, then locked up solid.
Hi Tim, I have it on my todo. I had a few moments when I planned to sit down and review it. Unfortunately, we are quite overwhelmed with number of orders coming in and I want to make sure people will get their Electras on time. It feels it will be a little bit calmer today, if I have a moment, this is really high up on my list. With other few issues reported by other users lately.
I did some tests
I use the e.one console to read the memory consumption.
1 made 2 controls both with a function assigned: oscPairSelect1() and oscPairSelect2()
Same lua code is used in 2 presets. 1 with 2 controls and another with many copies of a control ( to saturate the memory ), I found that commented out data is not send to the e.one.
mirageSoundProcessDeviceId = 1
incCount1 = 1
incCount2 = 1
function oscPairSelect1()
if incCount1 == 1 then
device = devices.get (mirageSoundProcessDeviceId)
midi.sendSysex (PORT_1, { 0, 0, 35, 1, 67, 60, 1, 0 })
incCount1 = incCount1 + 1
incCount2 = 1
end
end
function oscPairSelect2()
if incCount2 == 1 then
device = devices.get (mirageSoundProcessDeviceId)
midi.sendSysex (PORT_1, { 0, 0, 35, 1, 67, 60, 2, 0 })
incCount2 = incCount2 + 1
incCount1 = 1
end
end
collectgarbage("collect")
Adding a single cycle garbage collection works as a workaround. My template does not freeze anymore.
collectgarbage("count")
Adding only to print the gc count to the end of the function in the “many controls” template and the e.one gets crazy. Some distortion on the display and its freezes after a while when twisting the knops.