Home › Forums › General › Programming › what do you need to know in order to make panels?
- This topic has 45 replies, 5 voices, and was last updated 3 years, 2 months ago by
goodweather.
-
AuthorPosts
-
September 23, 2020 at 9:32 pm #120013
I don’t understand.
The ‘Called when the panel has finished loading” is already being used by the ‘init’ function for the Program 1-32 Buttons.
If the Panel is supposed to get a value from the Mirage then I first need to press the button to send the dump from the Mirage to the Panel or else there is nothing to index. Is that correct?
-
This reply was modified 3 years, 2 months ago by
BAUS. Reason: typo
Updating a 25 year old Editor
September 24, 2020 at 12:47 am #120020You are mixing some things up here Baus.
Yes, you do the assigning of midi in the midiMessageReceived the way you do.
But what DnalDoog tried to explain is that there is a better way of assigning your Modulators themselves. Every time you do panel:getModulatorByName(), Ctrlr has to go over all the modulators to search for the modulator with that name. But when you assign the modulator in the init file, before the panel is loaded, the modulator is put in memory (in a table?) and thus easier to find for Ctrlr. Thus faster. It’s a memory against runtime thingie.
You won’t notice it in a panel with just 10 modulators.. but some panels have a lot of modulators and then it becomes better practice to do it that way.
September 27, 2020 at 9:54 pm #120063At line 5:
midiMessageReceived = function(midiMessage)
Instead of
midiMessageReceived = function(midi)
??
This fixed that problem!
Thanks.
Also your explanation makes sense now. I did as you wrote and when the panel loads all Parameters are nicely at their lowest values.
Now on to the next part: getting the panel to update when it receives a Patch change.
Because of the 4 bit nibbles to a single value….does that mean that the sysex string also gets half as long? So 74 instead of 148?
I am still figuring out THAT part.
Updating a 25 year old Editor
September 27, 2020 at 10:23 pm #120064Actually, it does. Probably when higher values than 127 or 0x7F are required. Because in midi the highest value is 127. When a 2 bytes like 0x08 and 0x00 become 0x80 it’s a way to exceed the 127 limit.
September 28, 2020 at 5:38 pm #120072Okay….step by step.
When I press the “request patch data” button the Mirage returns this:
F0 00 00 23 01 44 01 0F 01 08 00 0F 00 08 00 0F 00 00 00 0F 01 0F 01 02 00 00 00 02 00 01 00 01 01 01 01 01 00 06 00 04 00 00 00 03 00 0F 03 00 00 0F 01 0A 00 00 00 00 00 08 00 0F 00 08 00 0F 00 00 00 0F 01 0F 01 02 00 02 00 02 00 03 00 01 01 01 01 01 00 06 00 05 00 00 00 03 00 00 00 00 00 0F 01 01 00 00 00 03 06 00 00 00 00 03 06 00 00 0F 01 0F 00 0F 01 06 01 00 00 00 00 00 00 0C 00 0F 03 04 05 02 05 09 04 04 05 0F 04 0E 04 00 02 01 03 F7
The bytes in BOLD is the first Modulator (AMP_ENV1_ATTACK). This string is always 148bytes including the F0 and F7. We should not count these so the length of the string is 146 and the first Modulator is the 7th byte. Correct?
-
This reply was modified 3 years, 2 months ago by
BAUS.
Updating a 25 year old Editor
September 28, 2020 at 6:44 pm #120074Hi BAUS, I would suggest to start a new thread focusing only on your Mirage panel instead of this generic one.
Would be easier I guess.
For what you want to achieve, you can have a look at my Pro2 panel.
In summary:
– in PanelLoaded I call AssignModulators which assign all modulators to variables that I can use in all methods in the panel
– you have your method to request a patch then MidiMessageReceived should check the size and process it. Look at my MidiMessageReceived method
– you may need a pack/unpack method to code/decode the middle part of your sysex message
– usually I’m coding a LoadProgramData and SaveProgramData that are extracting/storing the bytes from/to a memoryblock into/to modulators value. Other people are using tables or value pairs. I’m using memory blocks because I think there are dead simple and represents the actual data.
Those things are the base…
Good luck! -
This reply was modified 3 years, 2 months ago by
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.