probably a newbie mistake

Home Forums General Using Ctrlr probably a newbie mistake

Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #72241
    xparis001
    Participant
      • Topics: 1
      • Replies: 8
      • Total: 9
      • β˜…

      hi,

      So I’m a newbie to LUA and writing code in general, so I apologize in advance. I’m building a panel for the Studio Electronics SE-1x, and following the awesome tutorial instructions here: What you need to know to make panels.

      I have the midiMessageReceived lua code plugged in, replacing the value shown for 135, which is the length of an SE1x sysex dump, and I’m calling the AssignValue function, and attempting to update my modulator with byte 5 of the dump. I cannot seem to get the knob to update at all. I’ve retraced my steps, and made a small, one knob example to see if I made a mistake in the previous panel, but still no luck. Could someone take a look at is and see what my stupid mistake must be? I’d be super appreciative. thanks πŸ™‚

      Attachments:
      You must be logged in to view attached files.
      #72244
      xparis001
      Participant
        • Topics: 1
        • Replies: 8
        • Total: 9
        • β˜…

        some additional information. in the log viewer, I’m getting this error:

        [LUA ERR ][12:11:40:000760]: add_file_and_line() failed at lua_getstack, unknown error occured

        here’s an example of the sysex message I’m sending to it.
        f0 00 00 4d 01 00 00 02 0d 0f 64 64 00 2d 73 33 2a 5d 7c 7f 00 29 1c 26 00 2a 18 2c 00 00 17 01 00 00 01 15 02 02 00 02 00 00 40 40 00 00 00 00 00 01 7e 00 00 10 09 0e 0b 00 00 00 00 03 00 01 02 00 7e 7e 00 00 45 01 4b 43 01 03 00 22 04 00 00 0b 00 02 07 00 30 00 00 00 00 00 00 00 76 40 02 12 00 04 00 53 7e 01 00 00 46 02 00 08 77 00 00 00 00 00 00 44 59 4e 50 20 4d 55 54 54 20 44 47 20 20 20 20 2e f7

        #72245
        human fly
        Participant
          • Topics: 124
          • Replies: 1070
          • Total: 1194
          • β˜…β˜…β˜…β˜…

          i’ve had a look a the test panel with midiox attached
          to the output, and it is sending just midiCC.

          there’s quite a bit missing by the look of things?
          but i haven’t mastered midi bulk operations yet.
          i’m looking at methods in existing panels (and
          doing something else atm – haven’t got to this yet)

          #72249
          xparis001
          Participant
            • Topics: 1
            • Replies: 8
            • Total: 9
            • β˜…

            I’m not concerned about the knob output at this point, im just trying to receive a sysex string, grab a range, and update the knob’s value.

            #72251
            human fly
            Participant
              • Topics: 124
              • Replies: 1070
              • Total: 1194
              • β˜…β˜…β˜…β˜…

              are you going to send it a dump request? :o)
              how is it receiving/fetching data?
              why not put that in so you can initiate the receive
              manually until you know it’s working correctly?
              create a button with ‘called when modulator value changes’
              and have:
              panel:sendMidiMessageNow(CtrlrMidiMessage("F0 etc etc F7"))
              (or trigger that by some other means)

              (this is off the top of my head until i try it myself. the
              other guys will know more about this)

              #72253
              xparis001
              Participant
                • Topics: 1
                • Replies: 8
                • Total: 9
                • β˜…

                yea, I’m sending the dumps manually at the moment. Still waiting on SE to get back to me on dump request formats. I’ve actually removed the SE1x from the equation, and are now sending the sysex message using BOME sendsx and the mac AIC driver. Still getting the same error.

                From what I can tell, this is the code that’s crashing out:

                midiMessageReceived = function(midiMessage)
                	s = midiMessage:getSize() -- Size of the midi dump received
                	if s == 135 then -- if size match the expected size of the dump requested
                		PatchDataLoaded = midiMessage:getData() -- create a memoryblock with the data dump
                		programData 	= midiMessage:getData():getRange(07,128) -- create a memory block with the synth engine data, leaving the header
                		assignValues(midiMessage,false) -- call a script to assign each byte to each modulator.
                	end
                end
                

                the error coming back from the LUA console is:
                add_file_and_line() failed at lua_getstack, unknown error occured

                my absolute guess is that it’s trying to create a memory block of the bytes, and is failing at it. I dont know if there’s something additional I should be doing? Or maybe 10.12 is protecting memory in some way? I dont know. My background is QA and midi dev, not coding really.

                thanks for your help so far, I really appreciate it. I’m gonna try to install the latest CTRLR, or back down to older ones and see if that makes a difference.

                #72257
                xparis001
                Participant
                  • Topics: 1
                  • Replies: 8
                  • Total: 9
                  • β˜…

                  additional info.

                  If I just load the panel, and send the panel any old midi CC3, the code above crashes with the error:

                  add_file_and_line() failed at lua_getstack, unknown error occured

                  in the log viewer.

                  I’m on OSX 10.12.5
                  Mac pro, 12core 2.93, 96GB RAM.

                  Edirol UM880 Midi devices. I’ve also tried it with Generic MIDI drivers, and the IAC driver.

                  #72258
                  xparis001
                  Participant
                    • Topics: 1
                    • Replies: 8
                    • Total: 9
                    • β˜…

                    So, I retraced my steps, started fresh again, and this time the error is not happening. I guess I had the function in the wrong place. However, my modulator value still isnt updating. Im hoping im missing something simple.

                    thanks again for the help, everyone πŸ™‚

                    • This reply was modified 6 years, 10 months ago by xparis001.
                    Attachments:
                    You must be logged in to view attached files.
                    #72260
                    xparis001
                    Participant
                      • Topics: 1
                      • Replies: 8
                      • Total: 9
                      • β˜…

                      nope. Im wrong, the error message is still there. ugh.

                      #72262
                      human fly
                      Participant
                        • Topics: 124
                        • Replies: 1070
                        • Total: 1194
                        • β˜…β˜…β˜…β˜…

                        i remember something called a ‘data request message’,
                        i thinkit’s a generic midi message, that you can send
                        to a device, and it sends back a single message – not
                        a bulk dump – that gives you the device’s format.

                        if anyone can remember what that would be, you could
                        send that and see if it gets anything back.

                        how about sending the se1x’s response to midiox instead
                        for the time being, to verify it is responding? trigger
                        the bulk dump from Ctrlr: check out what’s happening
                        in the midiox monitor.

                        i don’t know if ctrlr will do anything if you just fire
                        a bulk dump from the device without initiating it from
                        a ctrlr operation.

                        #72273
                        xor4life
                        Participant
                          • Topics: 0
                          • Replies: 1
                          • Total: 1
                          • β˜…

                          Hi,
                          Data requests are specific to each manufacturer and sometimes to models.
                          Don’t know if you have the complete sys ex documentation yet from manufacturer. But, you will need it.
                          Roland has a set standard for data requests and data set. Other manufacturers not so much.
                          Good luck.

                          #72275
                          xparis001
                          Participant
                            • Topics: 1
                            • Replies: 8
                            • Total: 9
                            • β˜…

                            Thanks for all the help, everyone! I figured it out. It’s working now, and it was a newbie mistake. I had changed the name of the midiMessageReceived function, so the panel wasnt able to call it correctly when it received midi. My panel’s now updating nicely.

                            #72276
                            human fly
                            Participant
                              • Topics: 124
                              • Replies: 1070
                              • Total: 1194
                              • β˜…β˜…β˜…β˜…

                              once upon a time, long ago..
                              i wanted to control a midiverbIII from the Cubase v2
                              mixermap(Atari days) but had no sysex docs, none in
                              the manual. somehow i received the idea that i could
                              send a ‘data request’ – i’ve forgotten how and what
                              the message involved, or if i’d tried it on another
                              machine before. it was something i’d read.

                              the method to get back the data from the midiverbIII
                              i used was to insert the data request in the first line
                              of cubase List Editor (or whatever it is called) and
                              arm cubase to record into a short Part, hit Play, and
                              get the answer back into the List.
                              i remember it being described as a handshaking procedure:
                              computer: ‘hello device, who are you?’
                              midiverbIII: hi, i’m midiverbIII and this is my data format’

                              so maybe i did have some info about the midiverbIII. there
                              was no internet to call on in those days, so i don’t know
                              how i found out how to do it (ended up building the sysex
                              message and guessing the parameter numbers, and managed
                              to remote the whole thing. still have the floppy for it
                              somewhere)

                              all i’m seeing in MIDI webpages are specific data requests
                              and no generic one. so i’m wondering what i really did now.

                              check out Eddie Lotter’s MIDI page, there are some ‘fun’
                              sysex tricks to try. i think that might be it: getting
                              a parameter address back.

                              #72277
                              human fly
                              Participant
                                • Topics: 124
                                • Replies: 1070
                                • Total: 1194
                                • β˜…β˜…β˜…β˜…

                                Thanks for all the help, everyone! I figured it out. It’s working now, and it was a newbie mistake. I had changed the name of the midiMessageReceived function, so the panel wasnt able to call it correctly when it received midi. My panel’s now updating nicely.

                                ha ha, that is the classic mistake, it seems. i’ve done it
                                several times.

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                              There is currently 0 users and 51 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