Home › Forums › General › News and releases › One byte midi messages received as empty
- This topic has 11 replies, 3 voices, and was last updated 10 years ago by zeoka.
-
AuthorPosts
-
February 11, 2013 at 7:43 pm #6309
One byte long midi messages are received as empty by the method called when the panel receives a midi message, I had this problem with active sense (message is FE), and midi clock (message is F8).
I noticed this problem when I had a script crashing Ctrlr completely when doing a getByte(0) on an active sense message.
using this code at the very start of the method it is not crashing and I see the messages in console everytime an active sense message is received.
s = midiMessage:getSize()
if s == 0 then
console(“Size is null, exit”)
return
endMidi clock seems to behave the same, and it even freezes Ctrlr completely when it is active.
February 11, 2013 at 9:22 pm #6313I removed support for realtime messages from LUA for a reason. All the LUA callbacks are done asynchronously, that is the callback can be done very very long after the actual message has been received, LUA is in the same thread as the GUI, if you draw to much in the gui then the callbacks will slow dowm, if you add REALTIME messages that do callback (remember each i byte messages does one callback), then you get serious performance issues.
I added the support for those messages, that is you will get the 1byte inside the MidiMessage not 0, but i have not changed anything else.
February 12, 2013 at 8:42 am #6322The thing is that I don’t really need support for thoses messages, but my synth keeps sending active sense messages every 300 ms and there is no way to stop it.
If you think Ctrlr shouldn’t support realtime messages you are probably right, but in that case I think it would be better if they don’t trigger the LUA method at all, instead of calling it with an empty message.
rev 1284 apprently still calls the method with no data.
Thanks for your quick answer.
February 12, 2013 at 12:41 pm #6326Yeah i just added the MidiClock, i updated the nightly ActiveSense is there, maybe i’ll add an option to a panel to just ignore realtime messages.
February 12, 2013 at 2:12 pm #6327Works perfectly in rev 1285, thanks a lot for the fast fix.
I agree that making an option to ignore realtime messages would probably be a good idea.
April 22, 2014 at 1:54 pm #22281Hi
Reactivate this post…
Could be nice if ctrlr get 0xFE ActiveSensing messages :
If ctrlr receives fe then
if “émoticône” ~= happy
set happy “émoticône” ,set color orange, setText “wired”,send identity request
end
elseif ctrlr doesn’t receive fe until 420 ms then
set unhappy “émoticône” ,set color grey, setText “unwired” ,set manufacturer/model/version texts to ——-,send identity request
endSomething like that How ? Possible for now ?
Tried on a modulator set on “Active sensing” message without sucessAttachments:
You must be logged in to view attached files.April 22, 2014 at 2:01 pm #22283I can try to do something like that, but i must say this might cause issues, i’ll get back to you if that’s a good idea at all.
April 22, 2014 at 2:17 pm #22287Cool !
Thank you AtomApril 22, 2014 at 2:40 pm #22289Have you tried setting the special panel property “Ignore realtime MIDI messages on Input” i just remember that i did that option for this purpose, if it’s set to true no 1 byte messages will ever pass thru to the panel.
April 22, 2014 at 6:07 pm #22299No haven’t see that it could be very practicle for midi monitoring 😉
The idea is using this byte instead
My panel will be “all automatic” (perf & samples names can’t be sent to the device so I can’t manage *.sys at all and there is too much params so I request edits all the time.Anyway the sampler needs own file to play and needs to save separately.For automation i’ll use 64 macro’s instead editor params.I’ve solved many midi messages (not all) sent to the device when the panel loads caused by lua scripts
Theese messages are not wrong but I want control WHEN the panel sends edit reqs
for example when simply fe is not received ! )
Hope this thing will be possible and efficient
thank you- This reply was modified 10 years ago by zeoka.
April 22, 2014 at 9:21 pm #22308If the option works for you (unselect it and see if you are getting Active Sense messages in Lua) you can always set it in Lua, panel properties can be changed at runtime from Lua, so you can alter that setting anytime you want.
April 23, 2014 at 10:33 pm #22355Thanks Atom !
using lua and timers + modulatorlinkedtopanelprop I’ve done many work !I’ve solved all my non-wanted midi msg at start up too !
Actually I isolate 0xfe by :-- -- Called when a panel receives a midi message (does not need to match any modulator mask) -- @midi http://ctrlr.org/api/class_ctrlr_midi_message.html -- MidiReceive = function(midi) database() size = midi:getSize() <strong> if size ~= nil then panel:getModulatorByName("Smiley"):setModulatorValue(0,false,false,false) end </strong>etc etc etc
How I could get the data (254) of this byte ? I could affinate this
Anyway I get it
If my update button is off my panel is off
if I push update but there is no 0xfe ,the smiley stay unhappy and the update returns off
if I push update but there 0xfe , wire smiley is happy and update stay on
if I set midi input off or turn off the vp , the wire smiley is unhappy and update returns off
nice- This reply was modified 10 years ago by zeoka.
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- The forum ‘News and releases’ is closed to new topics and replies.