Home › Forums › General › Using Ctrlr › dump
- This topic has 4 replies, 2 voices, and was last updated 11 years, 3 months ago by zeoka.
-
AuthorPosts
-
January 20, 2013 at 3:05 pm #5710
Hi
Something like this ?
panel :MIDIMessageReceveid : GetMIDIMessage ()
{(0xfo , 0x3e , 0x11 ,(ignore),(0-128) , (ignore) ,0xf7)}
dumpfx1n1 = GetByte ( 4)
if value == 0 then
panel:getModulatorByName(“fx1-1”):setModulatorValue( 0), false, true, false)
if value == 1 then…….
I can’t find post that gives a starting point , i’ve found a post of atom with elements but i lose it
On wich panel can i have an example ?
Thank you !
January 24, 2013 at 12:19 am #5792You mean listening for incoming midi and make stuff happen?
In the panel’s properties there is a “Called when panel receives a MIDI message”, the script you put there can listen to incoming data.
panelMidiReceived = function(midi)–grab the data you’re interested in
–in bytes
ID = midi:getLuaData():getByte(1)
LS = midi:getLuaData():getByte(2)
MS = midi:getLuaData():getByte(3)
— or as a range
string = midi:getLuaData():getRange(1,10)— then do stuff with it
if ID == 1 then
if MS == 0 then
panel:getModulatorByName(“modulator-1”):setValue(0, true, false, true)elseifif MS == 1 then
panel:getModulatorByName(“modulator-1”):setValue(1, true, false, true)…
end
if ID == 2 then
if MS == 0 then
panel:getModulatorByName(“modulator-2”):setValue(0, true, false, true)elseif MS == 1 then
panel:getModulatorByName(“modulator-2”):setValue(1, true, false, true)…
end
…
end
- This reply was modified 11 years, 3 months ago by Hecticcc.
January 24, 2013 at 6:55 pm #5800Thank you very much Heccticcc
I’ve very bad explained what i need
If i understand “Called when a panel receives a midi message” is a function by itself it wait for a midi message ,no function needed ? May be the reason i’ve not found in the forum..
I’ve do that
dumps = function(midi)
–Get FX1 — vendor,model , ID , dump,buffer,fx nb,idx0 ,idx1 ,idx2 , idx3..idx18,cheksum — f0 , 3e , 11, 0to127,15, 20or30, 00,0to127,0to127,0to127…… 00,whatever,f7
({ 0xf0, 0x3e, 0x11, 0x00, 0x15, 0x00 , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,0xf7})
idx0==midi:getLuaData():getByte(7)
panel:getModulatorByName(“FX1 Type”):setValue((idx0), true, false, true)
idx1==midi:getLuaData():getByte(8)
panel:getModulatorByName(“FX1 Output”):setValue((idx1), true, false, true)
idx2==midi:getLuaData():getByte(9)
panel:getModulatorByName(“FX1-1”):setValue((idx), true, false, true)
idx3==midi:getLuaData():getByte(10)
panel:getModulatorByName(“FX1-2”):setValue((idx3), true, false, true)
panel:getModulatorByName(“FX1-3”):setValue((idx4), true, false, true)
panel:getModulatorByName(“FX1-4”):setValue((idx5), true, false, true)
panel:getModulatorByName(“FX1-5”):setValue((idx6), true, false, true)
panel:getModulatorByName(“FX1-6”):setValue((idx7), true, false, true)
panel:getModulatorByName(“FX1-7”):setValue((idx8), true, false, true)
panel:getModulatorByName(“FX1-8”):setValue((idx9), true, false, true)
panel:getModulatorByName(“FX1-9”):setValue((idx10), true, false, true)
panel:getModulatorByName(“FX1 Delay:Autopan”):setValue((idx11), true, false, true)
panel:getModulatorByName(“FX1 Delay:Sync”):setValue((idx12), true, false, true)
end
I’ve a syntax error near idx0 i miss something i don’t know what
But the main problem is how to put a “0-127 byte” ? or a “whatever” byte in my incoming message ?
I need to convert a byte to value since i get it ? i think no but i don’t know so much…
Heccticcc it must be a enormous task to do a digital sampler panel like the emu’s it’s incredible the ctrlr idea the number of dev’s is infinite and they are motivate ! i’m curious to see this panel (i don’t understand how get xml and open it in ctrlr:i’ve tried to copy paste
in a blank panel but no)
I keep anyway your idea you post above it could be useful for texts depending of 2 values
Happy days
- This reply was modified 11 years, 3 months ago by zeoka.
January 24, 2013 at 9:14 pm #5802idx0==midi:getLuaData():getByte(7)
is wrong, you are trying to compare values by typing ==
Assigning is done with a single =
idx0 = midi:getLuaData():getByte(7)
ps best to ask questions like this in the programming part of the forum 😉
January 25, 2013 at 9:32 pm #5815Thank you
I’ve got the same error the error is elsewhere
I will post in programming
-
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.