what do you need to know in order to make panels?

Home Forums General Programming what do you need to know in order to make panels?

Viewing 6 posts - 41 through 46 (of 46 total)
  • Author
    Posts
  • #120013
    BAUS
    Participant
    • Topics: 2
    • Replies: 22
    • Total: 24

    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 1 year, 10 months ago by BAUS. Reason: typo

    Updating a 25 year old Editor

    #120020
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★

    You 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.

    #120063
    BAUS
    Participant
    • Topics: 2
    • Replies: 22
    • Total: 24

    At 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

    #120064
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★

    Actually, 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.

    #120072
    BAUS
    Participant
    • Topics: 2
    • Replies: 22
    • Total: 24

    Okay….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 1 year, 10 months ago by BAUS.

    Updating a 25 year old Editor

    #120074
    goodweather
    Participant
    • Topics: 45
    • Replies: 550
    • Total: 595
    • ★★★

    Hi 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!

Viewing 6 posts - 41 through 46 (of 46 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 52 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr