Changed logging behaviour in a preset [OBSOLETE]

After the Notes Transmittor I’m building a preset for the Korg KingKorg, including patchrequest. So far I was able to catch the first 62 bytes of the regular SysEx patch request using the patch editor and gradually building the controls, functions and overlays for it, when suddenly (after a load) the preset didn’t work anymore without apparent fault, but with a lot of logging going on when loading the preset.

Reversing my steps was of no help. In the end I cleared all of the Electra One (middle button left while booting) but that did not help .

Usually (example taking from my Notes Transmittor), when I upload a preset in the Electra One, I get about a page of messages in the log viewer, with something like this:

20:18:16.442 loadLua debug output:
20:18:16.446 ---- START ----
20:18:16.492 loadLuaModule: Lua extension file initialized: file=ctrlv2/p007.lua
20:18:16.494 ----- END -----
20:18:16.496 lua: function onClock does not exist
20:18:16.497 lua: function onStart does not exist
20:18:16.499 lua: function onStop does not exist
20:18:16.500 lua: function onContinue does not exist
20:18:16.502 lua: function onActiveSensing does not exist
20:18:16.503 lua: function onSystemReset does not exist
20:18:16.504 lua: function onTuneRequest does not exist
20:18:16.506 lua: function onProgramChange does not exist
20:18:16.507 lua callback assigned: onAfterTouchChannel
20:18:16.509 lua callback assigned: onPitchBend
20:18:16.510 lua: function onSongSelect does not exist
20:18:16.512 lua: function onSongPosition does not exist
20:18:16.513 lua callback assigned: onControlChange
20:18:16.515 lua callback assigned: onNoteOn
20:18:16.516 lua callback assigned: onNoteOff
20:18:16.518 lua: function onAfterTouchPoly does not exist
20:18:16.519 lua: function onSysex does not exist
20:18:16.520 lua: function onMessage does not exist
20:18:16.522 displayPage: page shown: page=0, controlSetId=-1

The first three lines give me the indication the load is going well, correct?

But now my KingKorg preset is spitting out that many pages of logs, I couldn’t capture the beginning of the log anymore. In search of the potential reason of this, I started clearing out bits and pieces from the code and the controls, untill I cleared out almost everything: the whole patch editor is empty, all of the lua script is gone, and only… 6 controls remain.
With this reduced set of controls, I can now copy and paste the full log during upload:

20:28:14.541 Preset::getPresetName: name=Clone of Clone of Kingkorg v0.1
20:28:14.546 ElectraApp::reset: preset memory deallocated
20:28:14.547 free RAM: free=157880, heap=3200, lua=0, collision=0
20:28:14.548 Preset::load: file: filename=ctrlv2/p007.epr
20:28:14.578 Preset::parseRoot: name=Clone of Clone of Kingkorg v0.1, version=2, projectId=T4FWw9BFzDMKIh961DTz
20:28:14.586 parsePage: page created: id=1 name=Common
20:28:14.587 parsePage: page created: id=2 name=A / OSCILLATORS
20:28:14.588 parsePage: page created: id=12 name=Patch
20:28:14.598 parseDevice: device: id=1, port=1, channel=12, name=KingKorg, rate=0
20:28:14.600 > 66 [B]
20:28:14.601 > 132 [#]
20:28:14.601 > 7 [#]
20:28:14.602 > 1 [#]
20:28:14.603 > 0 [
20:28:14.603 > 1 [#]
20:28:14.604 > 0 [
20:28:14.605 > 1 [#]
20:28:14.606 > 24 [#]
20:28:14.606 > 65 [A]
20:28:14.607 > 2 [#]
20:28:14.608 > 0 [
20:28:14.609 > 31 [#]
20:28:14.609 > 0 [
20:28:14.621 > 66 [B]
20:28:14.624 > 132 [#]
20:28:14.626 > 7 [#]
20:28:14.627 > 1 [#]
20:28:14.628 > 0 [
20:28:14.629 > 1 [#]
20:28:14.630 > 0 [
20:28:14.631 > 1 [#]
20:28:14.632 > 24 [#]
20:28:14.633 > 64 [@]
20:28:14.643 Preset::parseOverlayItems: value=0, label=Mono1, bitmap.empty=1
20:28:14.644 Preset::parseOverlayItems: value=1, label=Mono2/retrig, bitmap.empty=1
20:28:14.645 Preset::parseOverlayItems: value=2, label=Poly, bitmap.empty=1
20:28:14.656 parseControl: id=37, name=VOICE ASSIGN, type=list (3), mode=0, colour=FFFFFF, controlSetId=1, variant=(null), visible=1
20:28:14.658 parseMessage: device=1, msgType=sysex (7), parameterId=37, min=0, max=0, value=0, offValue=-1, onValue=-1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.660 parseValue: id=value, index=0, defaultValue=0, min=0, max=0, overlayId=1, formatter=(null), function=(null)
20:28:14.662 parseControl: id=41, name=DIRECT, type=fader (1), mode=0, colour=C44795, controlSetId=1, variant=(null), visible=1
20:28:14.663 parseMessage: device=1, msgType=sysex (7), parameterId=43, min=0, max=127, value=0, offValue=-1, onValue=-1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.664 parseValue: id=value, index=0, defaultValue=0, min=0, max=127, overlayId=0, formatter=(null), function=(null)
20:28:14.665 parseControl: id=42, name=VIA JOYSTICK +, type=fader (1), mode=0, colour=C44795, controlSetId=1, variant=(null), visible=1
20:28:14.666 parseMessage: device=1, msgType=sysex (7), parameterId=44, min=0, max=127, value=0, offValue=-1, onValue=-1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.667 parseValue: id=value, index=0, defaultValue=0, min=0, max=127, overlayId=0, formatter=(null), function=(null)
20:28:14.668 parseControl: id=69, name=SELECT IT, type=pad (4), mode=1, colour=C44795, controlSetId=3, variant=(null), visible=1
20:28:14.669 parseMessage: device=1, msgType=virtual (0), parameterId=33, min=0, max=0, value=0, offValue=0, onValue=1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.670 parseValue: id=value, index=0, defaultValue=0, min=0, max=0, overlayId=0, formatter=(null), function=selectIt
20:28:14.672 parseControl: id=402, name=EG1 LEVL, type=fader (1), mode=0, colour=C44795, controlSetId=1, variant=(null), visible=1
20:28:14.673 parseMessage: device=1, msgType=sysex (7), parameterId=245, min=0, max=63, value=0, offValue=-1, onValue=-1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.675 parseValue: id=value, index=0, defaultValue=0, min=0, max=63, overlayId=0, formatter=(null), function=(null)
20:28:14.676 parseControl: id=420, name=244, type=fader (1), mode=0, colour=F49500, controlSetId=2, variant=(null), visible=1
20:28:14.677 parseMessage: device=1, msgType=sysex (7), parameterId=251, min=0, max=127, value=0, offValue=-1, onValue=-1, lsbFirst=0, signMode=0, bitWidth=7
20:28:14.679 parseValue: id=value, index=0, defaultValue=0, min=0, max=127, overlayId=0, formatter=(null), function=(null)
20:28:14.680 Preset::parse: successfully loaded preset: name=Clone of Clone of Ki, version=2
20:28:14.681 number of lua functions: 3
20:28:14.684 free RAM: free=155784, heap=5296, lua=0, collision=0
20:28:14.686 displayPage: page shown: page=0, controlSetId=-1
20:28:14.689 free RAM: free=154496, heap=6584, lua=0, collision=0
20:28:14.691 handleCtrlFileReceived: preset loaded: name=Clone of Clone of Ki
20:28:14.692 handleSysEx: lua script transfer initiated
20:28:14.694 displayPage: page shown: page=0, controlSetId=-1

It’s like it is spitting thepreset itself all over the log viewer , but I don’t get to see the loadLuaModule message anymore.
What has triggered this behaviour for this preset? How do I make it work again as intended (I cloned the preset before I started emptying its scripts…) so the preset works as designed again?

The connections are as follows on my windows10:
image

Hi @NewIgnis,

The log messages you mentioned look ok. These are printed to the logfile every time the preset is loaded. It prints information about all parsed controls. messages, devices, pages. As you said, it basically provides description of the preset.

The loadLuaModule log message is shown only when there is a lua script present in the preset. If it is, the lua interpreter is initialized and the lua module can write to the log. If the lua script is not present, the lua interpreter is not loaded at all to save the memory and there are no lua related message in the log file.

I took a look at your presets and I can see that lua script is present in two copies and not in the third one (as you mentioned it).

What exactly stopped working in your preset? The patch parsing? Please let me know and possibly send me the syx file with the KingKorg patch dump. I will be able to look at that then. Thanks!

Thanks Martin for getting back.

here’s the preset for the Kingkorg.
Here is a syx file of one patch program dump, captured via Midi-Ox.
example 1 program data dump.syx (374 Bytes)

The weird thing is that the logging file used to be short. I was kind a adding 5-6 controls at a time, then uploading it into the E1 to verify on errors.
The moment this log became that extensive, was also the moment the preset stopped working, but because of the length of the log and the fact it gets clipped, I can’t see any info anymore on what is going wrong. The loadLuaModule log message may have passed by or not, I can’t verify anymore.

I’m in the dark.

These extensive log messages are not appearing in other presets I made, so no clue what caused this.

Here’s is the preset causing the large amount of logs.Electra One App

On this one I can still navigate and turn controls, but the control ‘Select it’ on page 1 isn’t sending out any midi requests, let alone receive a patch dump.
The test SysEx parameters changes you will find on page 12 ‘Patch’, still indicate something is being sent , but the synth is no longer responding to it.

Note : on parameter 240 (first control on last page); when I replace the function

’ {
“type”: “function”,
“name”: “getChannelByte”
},’

with a fixed value of “3B” that one control works again. (the value needs to be 0x30 + midi channel). But that function hasn’t been altered to my knowledge.

I’ve started the same work from another angle. This bug does not apply anymore, as currently it can’t be reproduced, so I will mark it as obsolete.