Forum Replies Created
-
AuthorPosts
-
Atom,
you are doing a great work really!"dasfaker":1531amcx wrote:This code fills a uiCombo from a toggle button and works fine.[code:1531amcx]–
— Called when a modulator value changes
— @modulator http://ctrlr.org/api/class_ctrlr_modulator.html
— @newValue new numeric value of the modulator
—
toggle = function(modulator, newValue)
if newValue == 1 then
a = panel:getModulatorByName("modulator-1"):getComponent() — the combo modulator
text1 = ""
for n = 0, 10, 1 do
numberLine = n
text1 = string.format("%s%s%s%s",text1, "Line ", numberLine, "n")
end
a:setPropertyString("uiComboContent",text1)
end
end[/code:1531amcx][/quote:1531amcx]got it
the problem was that before I set [code:1531amcx]propertyString[/code:1531amcx] I called [code:1531amcx]getComponent()[/code:1531amcx]
Now works fine for me.Many thanks mate
"dasfaker":1rd42eu9 wrote:It could be a problem with the formatting of text1.This works for me:
"Line1[b:1rd42eu9]n[/b:1rd42eu9]Line2[b:1rd42eu9]n[/b:1rd42eu9]Line3…"[/quote:1rd42eu9]
the[b:1rd42eu9] text1[/b:1rd42eu9] value was set in the code
[code:1rd42eu9]text1 = string.format("%s%s%s",text1,text,"n")[/code:1rd42eu9]"dasfaker":shppbksc wrote:There is no receiveMidiMessageNow.But in the midiMessageReceived method you can check if a received midi message match what you need.[/quote:shppbksc]
thanks mate.
I think that should work then.
"atom":1higrai9 wrote:There is now receiveMidiMessage method, there is a Panel callback that gets triggerd everytime a midi message is received (it’s one of the panel properties). You need to decide based on the message length and contents what the message is for, use it or ignore it.[/quote:1higrai9]Thanks Atom for pointing my noise into that..i’m blind person
I see now … midiMessageReceived = function(midiMessage)
in case of midiMessage – can I use for example this value
[code:1higrai9]
dump_request_msg30 = {0xF0, 0x33, 0x7F, 0x09, 0x30, 0x04, 0x00, 0xF7}
— When the Patch Request message below is received by Nord Lead 3, it will reply by sending a PatchDump of Message Type $20.
m = CtrlrMidiMessage(dump_request_msg30)
panel:sendMidiMessageNow(m)[/code:1higrai9]
and then call the function
[code:1higrai9]midiMessageReceived = function(midiMessage)
s = midiMessage:getMidiMessageType()
if s==20 then
— call the SysEx message 40 – request all sliders and knobs value on the synth and make automaticly changes on panel // recall_data_msg40 = {0xF0, 0x33, 0x7F, 0x09, 0x40, 0x04, 0xF7}
UpdatePatch()
ends = midiMessage:getSize()
if s == 261 then
PatchDataLoaded = midiMessage:getLuaData()
endend[/code:1higrai9]
and then using Save button I can call the code like this
[code:1higrai9] f = utils.saveFileWindow ("Save Patch", File(patchnametext..extension_format), "*.syx", true)
f:create()
if f:existsAsFile() thenlastSavedProgram = PatchDataLoaded
f:replaceFileContentWithData(lastSavedProgram)end
[/code:1higrai9]am I right or I need do to this process by another way?
Also can I use code to check MidiMessageType this way?
[code:1higrai9]m = CtrlrMidiMessage(dump_request_msg30)
panel:MidiMessageRecieved(m)[/code:1higrai9]hi,
seems nobody knows answer to my question?The question is the code what I used to send Midi data to device by[code:22ax6tb2] panel:sendMidiMessageNow(m)[/code:22ax6tb2]
– is there command like maybe [code:22ax6tb2]panel:recieveMidiMessageNow(m)[/code:22ax6tb2]?
FIXED ” title=”Very Happy” />
Deleted old scripts – copy them back into new created Methods. Works fine now.
"atom":1zhl94fi wrote:It’s propably a LSB/MSB split, you need to learn how values are represented in the synth[/quote:1zhl94fi]
thats the main problem as manual do not show it.
As far as I understand LSB is minimal value and MSB is maximal for current modulator/knob what ever.There is a MIDI Controller List which has 3 columns in the table and shows the following information, for instance few of them
[b:1zhl94fi]Nord Lead 3 Parameter | MIDI Controller # | MIDI Controller Name[/b:1zhl94fi]
Osc 2 Keyboard Tracking On/Off | 34 | LSB for Controller 2
Filter Frequency1 | 74 | Sound Controller 2 (Timbre)
Filter Resonance | 42 | LSB for Controller 10
Filter Frequency2 (in Multi Mode) | 59 |
Filter Keyboard Tracking On/Off | 46 | LSB for Controller 14How to read the 3rd column I dunno. I can only guess that if I turn for instance Filter Freq 1 modulator on synth its minimal value goes to Sound (??) Controller 2 (Timbre)..whats that mean I do not know.. CC controller or what else.. Also If the third column supposed to be an extra CC controllers none of them are assigned to modulators on the panel.
Also there is a mentioning about that[i:1zhl94fi] "Amplifier Level responds to both Controller 71 and Controller 7. Only Controller 71 is transmitted
from the Nord Lead 3."[/i:1zhl94fi] It shown in SysEx as 2 values so in that point I can only guess that I have to use only one value but I can be mistaken.Please help!
p.s. manual is attached
"atom":qum47vqn wrote:It’s propably a LSB/MSB split, you need to learn how values are represented in the synth. The fact that your sysex works is probably because you limited your values to 0.127 and everything else was zeroed out.[/quote:qum47vqn]
thanks for direction..will dig the manual"atom":1bam6jm6 wrote:MANAGER INIT is a information string that says the LUA manage has been created, the following line is an error from your code.[/quote:1bam6jm6]still cannot find that error.
all scripts look fineI enabled logs in CtrlR
it gaves me the following on the panel opening
[img:1bam6jm6]http://dl.dropbox.com/u/4202790/logic-tut/logs.png[/img:1bam6jm6]"itege":2xdwyo9x wrote:Yeah, I made the mistake of buying the rekon plug-in for my slim phatty before I asked here, I gave up on getting it to work, the activation crap they send me never works.Also, there was a nightly a few weeks ago that fixed the parameter pushing thing for me, unless you are talking about reading the patch data from the device itself, in which case I have no clue.[/quote:2xdwyo9x]
I heard that kind of stories. CtrlR is the best solution I’ve ever seen. Its all up to you
Reading the patch data – I was thinking out loud ) well this is the only thing I’m thinking about now. I’m working on Nord Lead 3 panel and it is almost finished. And like any Software AU/VST I wish it will be able to save my selected program information on device to the DAW..like a preset. That would be nice indeed ))
"itege":175gcweu wrote:Does anyone know if the Virus B panel would be compatible with this? I just purchased one and am currently on vacation, would like to be able to dive right in when I get home. If it isn’t does anyone know where I can get a midi implementation chart thing? Looked in the manual but got nothing, also I saw that there is a rekonaudio VST that is made for use with basically all of the pre-TI virues, but it doesn’t work with my DAW(so I’m assuming that this increases the chances of the ctrlr panel working with the rack).Thanks and sorry that I keep asking for stuff.[/quote:175gcweu]
you may Learn MIDI parameters using MIDI Monitor built into CtrlR. Also if you are using Apple Logic for instance there is an option Control Assignments which allows you to see MIDI CC and SysEx data.
Regarding rekonaudio stuff – I heard that people who bought their productions are complaining about this plugins and their bugs..so they are not perfect. but who knows.
The only thing I’m concerning now would CtrlR AU/VST be able to save and the load patch data on startup of the project in Logic or Ableton.
Joined!
CtrlR rules )"atom":3qgf4vij wrote:you need to format that, this is a integer (example 13th byte)
[code:3qgf4vij]
b = data:getByte(13)
console (string.format ("decimal=%d hex=%x", b, b))
[/code:3qgf4vij][/quote:3qgf4vij]Thanks Roman!
"romsom":ejyq5gk2 wrote:[url:ejyq5gk2]http://lua-users.org/wiki/StringLibraryTutorial[/url:ejyq5gk2]also if you still need this:
[code:ejyq5gk2]text = text1 .. text2[/code:ejyq5gk2]
…not that hard to google…
Good Night ” title=”Wink” />[/quote:ejyq5gk2]
thanks mate, I was Googling but seems I did it wrong
"atom":52rprhua wrote:That actually is ok, you need to repaint the component after changing it, if you want it gets repainted when the mouse is over it (performance issues)[code:52rprhua]
comp:repaint()
[/code:52rprhua][/quote:52rprhua]
thanks mate
thats work for me now!"atom":1jlusiqj wrote:I made small fix, i forgot to add a line in the fixedImageSlider. I’m building a new nightly so check that out, it should work.[/quote:1jlusiqj]
mate, I have checked panel with the latest nightly and it didn’t work me as I expected… the led of the modulator (YELLOW) appears visually only when I move mouse over that modulator. Code works fine.
So in fact it works but only when you move mouse over the affected component
Mouse cursor Properties set to Normal"atom":snd3lps3 wrote:All i can say is that i checked it with the latest nightly build and it work for me, so there must be some bug in your code.[/quote:snd3lps3]I checked a code again. it works fine. I can see the made changes for that uiFixedImageSlider component on it Properties. But it is not changing on Panel visualy.
ok, lets do a experiment
I wanna check with you one thing if you will open my panel that I sent your before (the latest one) and then
[img:snd3lps3]http://dl.dropbox.com/u/4202790/experiment.png[/img:snd3lps3]
if you can see on picture 2 buttons – marked as RED is Single Filter and marked as BLUE is MultiFilter
and one slider (uiFixedImageSlider) marked as YELLOW
1. select RED button and set the value as shown on picture (DistLP). in theory the YELLOW slider should be shown as on picture – with turned on light. BLUE should be off
2. now if you selected the RED with different value YELLOW slider should turn its lights offI need this because in Ctrlr Revision 1047 (not build) visuals worked fine, and in the latest build (revision 1056) visuals doesn’t work exatly with this type of Slider (uiFixedImageSlider). Visual works with uiImageButtons
Could you please check it for me? Many thanks
p.s. I also change my code according to your example.
[code:snd3lps3]FilterSwitch = function(modulator, newValue)— Images ON Status
MultiFilterTypeOn = "sixfold_selection_filter"
SingleFilterTypeOn = "sixfold_selection_filter"
FilterSlopeTypeOn = "led_three_upward2"— Images OFF Status
MultiFilterTypeOff = "sixfold_selection_filteroff"
SingleFilterTypeOff = "sixfold_selection_filteroff"
FilterSlopeTypeOff = "led_three_upward_off"— When click this know Filter mode changes to Multi
— filterslope modulator
filter_slope_mod = panel:getModulatorByName("FilterSlope")— Single Filter Type modulator
single_filter_mod = panel:getModulatorByName("FilterType")— Multi Filter Type and Led Modulators
multi_filter_mod = panel:getModulatorByName("FilterEnvCtrl")— Frequency2/Dist Slider modulator
freq_dist_mod = panel:getModulatorByName("FilterFreq2")— This knob on click disables Multi Filter type that is why Filter Slope and Single Filter Type knobs
— need to be enabled. And MultiFilter knob plus Filter2 need to be disabled. Filter2 runs with CC 114
— Enabling Dist Slider if DIST LP (58) value is Selected on Filter Type and
— set MIDI CC 114 to Frequency2/Dist Slider modulator
— Disable Slope if Single Filter equal BR typemod = panel:getModulatorByName("FilterFreq2")
if mod ~= nil then
midi = mod:getMidiMessage()
if midi ~= nil then
if newValue >58 then
midi:setPropertyInt ("midiMessageCtrlrNumber", 59)
else
midi:setPropertyInt ("midiMessageCtrlrNumber", 114)
end
end
endif freq_dist_mod ~= nil and filter_slope_mod ~= nil and single_filter_mod ~= nil and multi_filter_mod ~= nil then
if newValue == 0 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
filter_slope_mod:setModulatorValue (2, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
end
elseif newValue == 1 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
filter_slope_mod:setModulatorValue (2, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
end
elseif newValue == 2 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
filter_slope_mod:setModulatorValue (2, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
end
elseif newValue == 3 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOff)
— filter_slope_mode:setModulatorValue (0, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
endelseif newValue == 4 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
filter_slope_mod:setModulatorValue (2, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-off")
end
elseif newValue == 5 then
comp_freq = freq_dist_mod:getComponent()
comp_slope = filter_slope_mod:getComponent()
comp_multi = multi_filter_mod:getComponent()
comp_single = single_filter_mod:getComponent()
if comp_freq ~= nil and comp_slope ~= nil and comp_multi ~= nil and comp_single ~= nil then
comp_slope:setPropertyString ("uiImageButtonResource", FilterSlopeTypeOn)
filter_slope_mod:setModulatorValue (1, false, true, true)
comp_single:setPropertyString ("uiImageButtonResource" , SingleFilterTypeOn)
comp_multi:setPropertyString ("uiImageButtonResource" , MultiFilterTypeOff)
comp_freq:setPropertyString ("uiImageSliderResource", "filter-on")
end
endend
end[/code:snd3lps3]
"dasfaker":2k60293w wrote:The link give me an error and I can’t open the pdf.Anyway, I did the Virus panel withou sysex documentation. There is a way to know which byte corresponds to which parameter.
Open an init patch in the synth and make a dump to midiox. Then change one parameter on the synth and make another dump to midiox. You can then compare the dumps and you will find that one byte is different (and maybe the checksum too, but this will be close to the end of then dump so you can forget it). Now you know the position in the dump of the parameter you changed. Go to the init patch and change another parameter…. Do this with all the parameters of a patch and you will have the position of each parameter in the dump.[/quote:2k60293w]
thanks for that advise. Now I faced to that Bytes issue
"atom":rjlw36oz wrote:Here is a modified example built with the latest nightly.[/quote:rjlw36oz]
thanks mate. I will check that panel as well. Yes of course there might be a problem within code. But I cannot understand how the same code works different in different builds. That’s the thing I was concerning. -
AuthorPosts