damien

Forum Replies Created

Viewing 20 posts - 21 through 40 (of 62 total)
  • Author
    Posts
  • damien
    Participant
      • Topics: 15
      • Replies: 62
      • Total: 77

      Hi,

      CC,Direct,Direct,-1,-1 works well.

      Thanks for your help

      • This reply was modified 3 years, 10 months ago by damien. Reason: typo
      damien
      Participant
        • Topics: 15
        • Replies: 62
        • Total: 77

        I’ll try with LUA as well with just the 3x hex according to goodweather’s guide:

        Control Change messages (CC) belongs to the Channel Voice family of messages. They are made of 3 bytes with n=channel number (0-15), c=controller number (0-127) and v=controller value (0-127) as:
        Some controllers may use values 0-16383 instead of 0-127.

        Status byte 1011nnnn
        Data byte 0ccccccc
        Data byte 0vvvvvvv

        They will then need 2 messages as above where the CC# of the first message will be 1 to 31 while the CC# of the second message will be 33 to 63.
        The value will be the combination of the value bytes of the two messages (value byte message 1 = MSB Most Significant Byte; value byte message 2 = LSB Least Significant Byte)
        Example1: setting the Amp EG attack time on Midi channel 1 to 43 will require sending B0 1C 2B hex or 10110000 00011100 00101011 (Midi channel 1 has channel number 0)

        • This reply was modified 3 years, 10 months ago by damien. Reason: typo
        damien
        Participant
          • Topics: 15
          • Replies: 62
          • Total: 77

          Interesting! I’m not so familiar with the multi section of Ctrlr

          I don’t think you need the sysexpart and you can also just do this with ‘multi’:

          CC,Direct,Direct,-1,-1,

          but just using CC should work too?

          cc multi screengrab

          Button values:
          off=0
          on=127

          EDIT::I didn’t see Possemo’s post just ahead of mine!

          I’ll try this tomorrow. But I’m pretty sure I’ll need a value denominator like xx somewhere to call the 2 values for the 2 different states. I’ll let you know.
          thanks 😉

          damien
          Participant
            • Topics: 15
            • Replies: 62
            • Total: 77

            it works but it is a bit complicated. CC’s are much easier to setup, see my screenshot. It wouldn’t hurt to study the demo panels either ?

            It does not work this way.
            I started doing that but whatever position the button is on, the value sent is 0 not 0 or 127 as defined in the value field in the Modulator Midi section.

            damien
            Participant
              • Topics: 15
              • Replies: 62
              • Total: 77

              OK
              I got it with using the value as MSB

              it gives :

              CC,Direct,xx,75,-1,F0 00 F7

              and it works

              hope it helps 🙂

              damien
              Participant
                • Topics: 15
                • Replies: 62
                • Total: 77

                For the delay time between messages I went with a setting in the “general” preference pane called:
                Global delay for midi message [ms]

                It’s working great.

                I was talking about waiting the message “ready” FROM the Ensoniq.
                Everytime the unit is ready for a new task it sends a sysex message “I’m ready”:
                f0 0f 40 00 00 02 00 f7

                It’s very useful because sometime it’s still in process so considering this type of flag is a nice tool to avoid errors.

                Thanks!

                damien
                Participant
                  • Topics: 15
                  • Replies: 62
                  • Total: 77

                  And…

                  it’s….

                  WORKING!!!!

                  midiMessage:getData():getByte(i) was a keypoint but error still occured.
                  I messed with the script and removed the “local” tag and it worked.

                  So everything is dumped from the unit to ctrlr every parameter are updated.
                  I have to think about a way to add a timer between sent messages because the unit is cluttered rapidly.
                  Everytime a message is received, processed and complete the unit send an acknowledge “error” message telling the unit is ready for operation again.

                  Message received is (my commented console report) :

                  
                  LUA>> Displays the RAW Received Midi Message
                  LUA>> f0 0f 40 00 00 02 00 f7
                  LUA>> Displays the Received Midi Message Type in decimal
                  LUA>> 2
                  LUA>> Displays the MessageErrorCode in decimal
                  LUA>> 0
                  LUA>> 0 Meaning TX over - Ackowledge (ACK) - No Error

                  So I’ll think about a way to wait the ACK message for sending new message to avoid cluttering the input of the DP4.

                  Thanks a lot for all your help! I deeply appreciate the support.
                  Damien

                  damien
                  Participant
                    • Topics: 15
                    • Replies: 62
                    • Total: 77

                    Well I don’t know what’s happening, it’s more like if the ctrl don’t receive the sysex message.
                    Tomorrow I’ll try a simple button that send the dump request message.

                    Then display the message received by ctrlr in the console.
                    something like :

                    midiMessageReceived = function(midiMessage)
                    console(String(midiMessage:toHexString(1)))
                    end
                    

                    It should display the sysex message received in the console isn’t it?

                    damien
                    Participant
                      • Topics: 15
                      • Replies: 62
                      • Total: 77

                      thanks dnldoog,
                      I’m back for the last stretch in this project.
                      I tried what you suggested but get an error :

                      Error message: [string “midiMessageReceived”]:19: attempt to call method ‘getByte’ (a nil value)

                      My sysex request is going to the unit properly:
                      To MIDI output port 0 SysEx Ensoniq 7 bytes F0 0F 40 00 00 15 F7

                      And the message is sent back to ctrlr properly :
                      From MIDI input port 0 SysEx Ensoniq 334 bytes F0 0F 40 00 00 25 02 00 00 03 04 02 00 05 03 07 02 06 03 03 0A 03 04 02 00 04 0D 06 0F 06 0E 06…

                      So it’s probably just a syntax error but cannot find out what’s wrong with it.

                      I did a simple request to display the string in the console and get an error for nil value as well:

                      midiMessageReceived = function(midiMessage)
                      
                      local midiMessageRawSize = midiMessage:getSize()
                      
                      if  midiMessageRawSize == 334  then
                      
                      console(String(midiMessage:toHexString(1)))
                      end
                      
                      end
                      

                      It’s probably coming from the very top of the script.

                      Any idea about what’s wrong with it? the stripped down version should give at least the sysex message in the console?

                      Thanks a lot!

                      in reply to: (Solved) Radio Buttons and LUA script #118895
                      damien
                      Participant
                        • Topics: 15
                        • Replies: 62
                        • Total: 77

                        Hi Damien,
                        what is the progress for your DP4 editor?

                        Hi,
                        I will start working back on it this weekend. It took me some time to fix my unit.
                        I had to recap all the PSU and change 3 IC regulators. My DP4 fried last month and once everything was replaced I discovered 1 DSP failed, maybe due to static, power surge or maybe heat when I desoldered the regulator next to it.
                        I found one ESP on ebay this week it was a pain… those are really hard to find.
                        So right now I have a “DP/3” but next week The 4th unit will be back home.

                        My next step for the ctrl is the preset management.
                        You can be sure I’ll let you know through the steps and I’ll probably need some help from you and dnldoog as previously.

                        Congrats for the purchase! This is a very special beast, it’s like the poor man’s eventide H3000 🙂

                        Thoses behringer clones are really impressive for the price.
                        I’ll probably buy some of their FX unit by Klark Tecknik like the bdd320 dimension D, their 1176 and la2a seem to be really nice like all the new Klark teknik/behringer range.
                        Don’t hesitate to ask me if you need some tips with the ensoniq. I know it by heart.
                        Take care

                        damien
                        Participant
                          • Topics: 15
                          • Replies: 62
                          • Total: 77

                          Thank for the explanation. The Juce function is lighter on the cpu, Knobs were slow to move with the table concat function and without using memoryblock, you were absolutely right.
                          Your last script is on point. It’s working great I must say. Thanks so much. Have a nice week!

                          • This reply was modified 3 years, 11 months ago by damien. Reason: typo
                          damien
                          Participant
                            • Topics: 15
                            • Replies: 62
                            • Total: 77

                            There you go! We have it. it’s working for every parameter value from 0 to 65535

                            I don’t understand exactly the arguments and functions of the script you wrote but it’s working 100% this time.
                            Negative value from decimal signed 2’s complement are working as well.
                            A+ mister Dnaldoog. You’re the boss 🙂

                            ex:
                            Unit B (00 02) Decay time (param #3) Param value 3668 :
                            F0 0F 40 00 00 01 00 01 00 02 00 03 00 0E 05 04 F7

                            >>> E54h

                            Thank you ever so much

                            damien
                            Participant
                              • Topics: 15
                              • Replies: 62
                              • Total: 77

                              edit (to avoid ghost posts)

                              I removed
                              ‘panel:sendMidiMessageNow(CtrlrMidiMessage(m:toHexString(1)))’
                              obviously 🙂

                              damien
                              Participant
                                • Topics: 15
                                • Replies: 62
                                • Total: 77

                                Hi Dnalddoog,

                                We are getting close!
                                I struggled to make it work. The “strcat” formula never worked.

                                The only way to send messages was to forget about the memoryblock and go straight with a basic concat formula.
                                The Format for Param is alright (0p 0p) but the format for the ParamValue is not good since I only send this format (0v 0v) and I need a 16bit word (0v 0v 0v 0v) that allows to send values above the 128 range.
                                For exemple if I move the delay time parameter whose max value is 3668 I only send 05h 04h.

                                So It would require another type of nybblization with 0v 0v 0v 0v format as required by the specs.
                                If the value is just a 8bit field 00 00 are required before.

                                This is what I have :

                                --
                                -- Called when a modulator value changes
                                -- @mod   http://ctrlr.org/api/class_ctrlr_modulator.html
                                -- @value    new numeric value of the modulator
                                --
                                
                                AlgoParamValueSend = function(mod, value)
                                
                                EnsoniqDP4Header = "F0 0F 40 00" 						-- Ensoniq DP4 Header
                                MidiID = "00" 											-- Midi Device ID
                                MsgType = "01" 											-- For Command Message
                                Cmd = "00 01"											-- For Parameter Change Command
                                Unit = mod:getProperty("modulatorCustomIndexGroup") 	-- Format 00 0U [stored in the modulatorCustomIndexGroup Field]
                                ParamId = mod:getProperty("modulatorCustomIndex") 		-- Format 0p 0P [stored in the modulatorCustomIndex Field]
                                EOX = "F7" 												-- Tail of SySex Message is always F7
                                NameID = mod:getProperty("Name")
                                
                                console ("Check the Mod value : " .. tostring(value))
                                console ("Check the Mod Unit : " .. tostring(Unit))
                                
                                Param = splitInteger2Nybble(ParamId)
                                ParamValue = splitInteger4Nybble(value)
                                
                                Param = table.concat(Param ," ")
                                console("Check the Param String : ".. tostring(Param))
                                
                                ParamValue = table.concat(ParamValue ," ")
                                console("Check the ParamValue String : ".. tostring(ParamValue))
                                
                                msg = table.concat({EnsoniqDP4Header, MidiID, MsgType, Cmd, Unit, Param, ParamValue, EOX}, ' ')
                                panel:sendMidiMessageNow(CtrlrMidiMessage(msg))
                                
                                console("Check the sent message : ".. tostring(msg))
                                
                                panel:sendMidiMessageNow(CtrlrMidiMessage(m:toHexString(1)))
                                
                                end --function
                                
                                splitInteger2Nybble = function(int)  -- integer input
                                local t={}
                                local msb=bit.rshift(bit.band(int,240),4)
                                local lsb = bit.band(int,15)
                                table.insert(t,string.format("%.2x",msb))
                                table.insert(t,string.format("%.2x",lsb))
                                return t
                                end -- function
                                
                                splitInteger4Nybble = function(int)  -- integer input
                                local t={}
                                local msb=bit.rshift(bit.band(int,240),4)
                                local lsb = bit.band(int,15)
                                table.insert(t,string.format("%.2x",msb))
                                table.insert(t,string.format("%.2x",lsb))
                                return t
                                end -- function'
                                
                                and the console shows for 2 value change above 128 :
                                
                                

                                LUA>> Check the Mod value : 2614
                                LUA>> Check the Mod Unit : 00 02
                                LUA>> Check the Param String : 00 03
                                LUA>> Check the ParamValue String : 03 06
                                LUA>> Check the sent message : F0 0F 40 00 00 01 00 01 00 02 00 03 03 06 F7
                                LUA>> Check the Mod value : 3668
                                LUA>> Check the Mod Unit : 00 02
                                LUA>> Check the Param String : 00 03
                                LUA>> Check the ParamValue String : 05 04
                                LUA>> Check the sent message : F0 0F 40 00 00 01 00 01 00 02 00 03 05 04 F7
                                `

                                We are close to the end 🙂 The function splitInteger4Nybble needs to be adjusted.

                                Next I’ll work on the algorhythm change via a click on the LCDs and shows a menu with all FX and presets available.

                                Thanks in advance for the help.

                                damien
                                Participant
                                  • Topics: 15
                                  • Replies: 62
                                  • Total: 77

                                  Thanks dnldoog,

                                  I tried your method but it’s not working and I don’t know where the error is coming from

                                  this is the adjusted method

                                  --
                                  -- Called when a modulator value changes
                                  -- @mod   http://ctrlr.org/api/class_ctrlr_modulator.html
                                  -- @value    new numeric value of the modulator
                                  --
                                  
                                  splitInteger2Nybble = function(int)  -- integer input
                                  local t={}
                                  local msb=bit.rshift(bit.band(int,240),4)
                                  local lsb = bit.band(int,15)
                                  table.insert(t,string.format("%.2x",msb))
                                  table.insert(t,string.format("%.2x",lsb))
                                  return t
                                  end -- function
                                  
                                  AlgoParamValueSend = function(mod, value)
                                  
                                  local EnsoniqDP4Header = "F0 0F 40 00"  -- Ensoniq DP4 Header
                                  local MidiID = "00"  -- Midi Device ID
                                  local MsgType = "01" -- For Command Message
                                  local Cmd = "00 01"  -- For Parameter Change Command
                                  local Unit = mod:getProperty("modulatorCustomIndexGroup") -- Format 00 0U [stored in the modulatorCustomIndexGroup Field]
                                  local ParamId = mod:getProperty("modulatorCustomIndex") -- Format 0p 0P [stored in the modulatorCustomIndex Field]
                                  local EOX = "F7" -- End of SySex Message is always F7
                                  
                                  local Param = splitInteger2Nybble(ParamId)
                                  local ParamValue = splitInteger2Nybble(value)
                                  
                                  Param = table.concat(Param ," ")
                                  ParamValue = table.concat(ParamValue ," ")
                                  
                                  local strcat = string.format("%s %s %s %s %s %s %s %s", EnsoniqDP4Header, ID, MsgType, Cmd, Unit, Param, ParamValue, EOX)
                                  m:loadFromHexString(strcat)
                                  
                                  panel:sendMidiMessageNow(CtrlrMidiMessage(m:toHexString(1)))
                                  
                                  end --function
                                  

                                  I get an error while moving a slider 🙁

                                  36: bad argument #3 to ‘format’ (string expected, got nil)

                                  I’m really stuck. If only it could be regular cc value changes 🙂

                                  Can you please help with that?

                                  Thanks a lot! Have a nice weekend

                                  • This reply was modified 3 years, 11 months ago by damien. Reason: typo again
                                  • This reply was modified 3 years, 11 months ago by damien. Reason: typo again
                                  damien
                                  Participant
                                    • Topics: 15
                                    • Replies: 62
                                    • Total: 77
                                      Edit

                                    (to avoid ghost posts) :

                                    I assigned the dedicated Parameter Index for each knobs in the ModulatorCustomIndex Field. This value is in Decimal (ex: 08) So it has to be converted from decimal to hex within 2 FourBitNibblized bytes 🙂

                                    Cheers

                                    in reply to: Cleaning blank nibbles from hexstring #118400
                                    damien
                                    Participant
                                      • Topics: 15
                                      • Replies: 62
                                      • Total: 77

                                      Hi Damien,

                                      Looking at it, it looks like you would start at byte 42 and then if you wanted a 51 byte MemoryBlock, I am guessing you might need to extract a further 102 bytes from the message, something like m:getRange(42,102).

                                      Hi dnaldoog

                                      oh okay I was using the string.sub() function but it’s not working.
                                      You are right the getRange(start,end) is working exactly as needed.

                                      It’s easy to get mistaken by the “end” variable. which counts the amount of arguments to get, not the offset end position. I got it from a previous tip you gave a long time ago on the forum.
                                      thanks! have a nice day

                                      • This reply was modified 3 years, 11 months ago by damien. Reason: typo
                                      in reply to: Cleaning blank nibbles from hexstring #118386
                                      damien
                                      Participant
                                        • Topics: 15
                                        • Replies: 62
                                        • Total: 77

                                        I have another question about BlockMemory

                                        Right now I have the edit buffer sysex dump hard coded in a Lua Method.

                                        For another function called “UAParamBufferMessage” I need to remove the first 17 bytes from the EditBufferMessage. The first offset will shift from 17 to 0

                                        everytime I call this new string, ctrlr says the string is nil, my syntax is bad, it’s a (bad) mix between C, java and php 🙂

                                        Can you please help to create a new shortened substring from the longest one with the proper synthax?

                                        t={}
                                        
                                        m2 = MemoryBlock([[
                                        F0 0F 40 00 00 25 01 00 00 
                                        03 02 02 00 05 03 06 0F 07 05 07 02 06 03 06 05 02 00 04 03 06 0F 06 0E 06 06 06 09 06 07 02 00
                                        00 01 02 0F 00 00 03 00 04 08 05 04 04 09 02 05 01 0B 04 0B 00 00 00 07 07 05 00 00 01 0C 01 06 
                                        00 00 05 01 00 0A 00 0D 00 01 09 04 04 0B 04 09 00 06 00 01 02 0C 07 0F 00 07 00 03 02 0F 05 0D 
                                        07 0F 07 0F 00 03 02 00 01 02 02 0D 05 01 03 02 04 0E 02 0E 01 04 00 04 00 00 02 09 09 0D 00 00 
                                        00 0C 02 0D 00 00 01 07 01 03 00 00 00 00 05 0E 0E 0D 02 00 00 06 00 01 03 0F 07 0F 00 07 00 03 
                                        02 00 00 00 07 0F 07 0F 00 00 00 00 02 0B 00 0D 02 00 00 0C 00 00 00 00 00 00 00 00 00 00 00 00 
                                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 
                                        00 00 07 0F 00 00 00 02 00 00 07 0F 07 0F 07 0F 02 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                                        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                                        00 00 00 01 00 00 07 0F 00 00 00 02 00 00 07 0F 07 0F 04 00 00 00 00 00 00 02 00 01 00 00 00 00 
                                        01 00 00 00 F7
                                        ]])
                                        
                                        for i = 7,
                                        m2:getSize()-2,2 do
                                        assert(i < m2:getSize())
                                        msb = bit.lshift(m2:getByte(i),4)
                                        lsb = m2:getByte(i+1)
                                        total = msb+lsb
                                        console(String(string.format("[%d] = %.2X",i,total)))
                                        
                                        table.insert(t,total)
                                        
                                        end
                                        
                                        EditBufferMessage = MemoryBlock()
                                        EditBufferMessage:createFromTable(t)

                                        that gives me

                                        32 20 53 6F 75 72 63 65 20 43 6F 6E 66 69 67 20 | 01 2F 00 30...

                                        And I want to create the string UAParamBufferMessage

                                        something like

                                        UAParamBufferMessage = EditBufferMessage(starting at byte #17 and ends at byte #51)

                                        01 2F 00 30...

                                        Thanks a lot!

                                        • This reply was modified 3 years, 11 months ago by damien. Reason: typo again
                                        in reply to: Cleaning blank nibbles from hexstring #118384
                                        damien
                                        Participant
                                          • Topics: 15
                                          • Replies: 62
                                          • Total: 77

                                          Hi Dnaldoog and GoodWeather
                                          Thanks for the replies, I comply my script to your recommandation and it’s working very well.
                                          Now I need to write a global sysex midi message when the pots values are changing, I’ll work on it this weekend.

                                          @Goodweath Nevermind if the seller does not reply on audiofanzine the price could be a little bit less expensive anyway. Patience always pays off 🙂

                                          Retetraligonybblization sounds good as well!

                                          • This reply was modified 3 years, 11 months ago by damien.
                                          in reply to: Cleaning blank nibbles from hexstring #118343
                                          damien
                                          Participant
                                            • Topics: 15
                                            • Replies: 62
                                            • Total: 77

                                            Belge, mon nom c’est Bontemps ?

                                            Ouii j’ai lu l’entête de ton guide c’est pour ca que je te demandais ça. Regarde sur audiofanzine y a un DP4 à vendre en Belgique :
                                            https://fr.audiofanzine.com/multieffet/ensoniq/dp4/petites-annonces/i.2013732.html

                                          Viewing 20 posts - 21 through 40 (of 62 total)
                                          Ctrlr