Forum Replies Created
-
AuthorPosts
-
Sure, they are some of the helper methods i use to calculate stuff.
function lsb(x) if x ~= nil then local bi = CtrlrLuaBigInteger(x) local lsb = bi:getBitRangeAsInt (0,7) return (lsb) end end
function msb(x) if x ~= nil then local bi = CtrlrLuaBigInteger(x) local msb = bi:getBitRangeAsInt (7,7) return (msb) end end
If you format the string correctly you can send it out over midi.
You can even use other functions inside this formatting construction.This is how i send out midi-data in the emu panel, a function that accepts some values & makes a midimessage.
function paramChangeMsg(paramNumLsb,paramNumMsb, paramVal) msg = string.format("f0 18 21 %.2x 55 01 02 %.2x %.2x %.2x %.2x 7f f7", devID, paramNumLsb, paramNumMsb, lsb(paramVal), msb(paramVal)) if msg then panel:sendMidiMessageNow(CtrlrMidiMessage(msg)) end end
Hope this helps 😉
Cool, thanks Atom 🙂
Added to the Todo list.@ lfo2vco – good tip, too bad i’m on m$ / linux so can’t use it myself…
The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.
You will need to figure out a formula for it or make a script that translates these values.
The values are me twisting the knob as Atom requested. Just like the avatar to the left : )
Lol, self-facepalm time 😀
The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.
You will need to figure out a formula for it or make a script that translates these values.
I use this for converting to opposite values, works with decimals & hex as input.
function invertNumber(input) local range = 127 local output = range + (input*-1) return (output) end
Then just call it whenever you need it somewhere.
Should be no problem, the manual has a detailed midi implementation listing, complete with examples of messages.
I just name the globals in caps to keep track of them 🙂
Thanks for the link, will keep it in mind for the future.Yah, nil values have had me doing some funny stuff along the way. If it’s supposed to be an int value i force it to be 0 in the script that needs the value and then Lua is happy again – and me too 🙂
Lol i did not even spot this one!
I think i wrote this one in a sleepy moment, the other (similar) functions i wrote use the correct variables.Thanks Atom!
First fetch some midi data and trigger other functions when needed:
midiReceived = function(midi)
ID = midi:getLuaData():getByte(7)
LS = midi:getLuaData():getByte(9)
MS = midi:getLuaData():getByte(10)
......
....
...
if ID == 44 then setSamplezoneRoot(LS,MS) end....
end
And then the “helper” function, this produces the errors:
function setSamplezoneRoot(x,y)
local rootnote = panel:getModulatorByName("sampleZoneRootNote")
rootnote:setValue(LS,false,true)end
Simultane posting – always good for a laugh!
Yeah, if it does not break anything please do, less typing 🙂
Mmmh, changing all to setValue(somevar,bool,bool) still gives the same error. I then changed them to the “old” way, setModulatorValur(x, bool,bool,bool) and this works again.
Moral of the story – imme stick to the old way for now 🙂
Thanks Atom, i found the offending scripts & modifying them now 🙂
Could it be that a few revs ago setValue only took one bool? I had them setup that way in the scripts that produced this error and they worked until now.
Cheerz,
HecJust downloaded & installed the latest rev for xp (1500) and i get the same errors, in 1449 it works as it should.
Thanks for your time and effort Steve!
Some of those errors come from my scripts (setValue in midiReceived for innstance), i will look into this further to track down the error. I probably forgot to add a safety somewhere, and Lua does not like empty variables.
The identity request stuff has only been added recently and is still being worked on by Atom afaik, and is not yet fully operational, hence the errors Ctrlr throws.I hope that once the panel is stable and finished it will be of use for you.
In the mean time – keep rockin’ that Emu!
Cheerz,
Hec
The preset button selects a preset in the memory of the sampler, not the preset number in soundsprint – what I think is what you expect.
It is the way the sysex stuff works for Eos.Hold ctrl-R while starting Ctrlr, this will reset it.
Drsteve,
Do yo mean that when you select a preset in the plugin you do not see the LCD on the sampler change?
This is normal, the emu does not reflect changes made using sysex unless you happen to be on an edit page that is being manipulated from the panel.You should see is the controls on the panel change values when a new preset or voice is selected.
Try auditioning a preset and change some easy to hear values.
Try setting it to 0 before assigning it a value, i had a similar problem with the menu uiListBox component.
Normally you won’t even see the “glitch” it makes.
- This reply was modified 10 years, 9 months ago by Hecticcc.
-
AuthorPosts