Home › Forums › General › Using Ctrlr › probably a newbie mistake
Tagged: data request
- This topic has 13 replies, 3 voices, and was last updated 6 years, 10 months ago by human fly.
-
AuthorPosts
-
June 2, 2017 at 4:07 pm #72241
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.June 2, 2017 at 6:13 pm #72244some 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
June 3, 2017 at 7:01 am #72245i’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)June 3, 2017 at 4:06 pm #72249I’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.
June 3, 2017 at 5:42 pm #72251are 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)June 3, 2017 at 6:38 pm #72253yea, 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 occuredmy 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.
June 3, 2017 at 7:06 pm #72257additional 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.
June 3, 2017 at 7:39 pm #72258So, 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.June 3, 2017 at 7:42 pm #72260nope. Im wrong, the error message is still there. ugh.
June 3, 2017 at 7:58 pm #72262i 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.June 4, 2017 at 4:06 pm #72273Hi,
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.June 4, 2017 at 7:19 pm #72275Thanks 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.
June 4, 2017 at 7:23 pm #72276once 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.June 4, 2017 at 7:35 pm #72277Thanks 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. -
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.