Forum Replies Created
-
AuthorPosts
-
No problem, I’ve been working on this today and about to have a version that works with both ” title=”Wink” />… happy easter and enjoy the family !!!
Hi Atom, they are looking GREAT ” title=”Smile” /> actually and thank you for it (they will make the panel look more like the jd)… but my panel seems to have some glitches with the latest nightly… I will try looking into it today. I think it has to do with some threading and lua… but I’m not sure.
So far, so good, I’m actually quite pleased with the current result that I should be able to provide an alpha release tomorrow night ” title=”Wink” /> I’ve decided "NOT" to publish the 4,000+ patches with it yet mainly because the current "release" version does not support ListBox and the library requires them… AND the current nightly appears to be "twitchy" with the panel, so I this alpha release will be for the stabe version ONLY ” title=”Smile” />
For the rest, it does everything perfectly ” title=”Wink” /> Moving sliders on the JD moves the sliders on the VST as long as you MIDI EDIT TX ON on the JD ” title=”Wink” /> And moving the sliders on the VST changes the values on the JD. Reading/Writing to temporary memory is working. Program Change Auto-Read from temporary does work also. Ability to completely reset a tone as per Roland’s Initial Patch published for the JD. Ability to clone a specific TONE to the ActiveTones so changes on the "active tones" mainly follows the first tone selected. The patches library is working really great ! I’ve got just one issue with it that will need to be assessed for it to work ” title=”Wink” />
[img:2ijs6zhq]http://dl.dropbox.com/u/4540586/ctrlr/preview-3.png[/img:2ijs6zhq]
[quote:35l5g98h]
The automation issues are my fault i’m fixing them, i hope the next nightly will sort that out.
[/quote:35l5g98h]I even had a problem in the release (for some modulators) ! Are you talking about both having issues or only the Nightly… Anyway, I’ve stopped converting to the nightly because some of the lua stuff was not working or was unpredictable… but it did help me pinpoint stuff that was not properly declared. So I’ll be ready when the next nightly is release ” title=”Wink” />.
It is NOT a Virtual instrument… (look for Jaded800 on google for a partial "imitation" of a jd as a VSTi). My panel is a VST Patch Editor… think of it as a controller of the jd within your daw or ctrlr ” title=”Wink” />
It is NOT a Virtual instrument… (look for Jaded800 on google for a partial "imitation" of a jd as a VSTi). My panel is a VST Patch Editor… think of it as a controller of the jd within your daw or ctrlr ” title=”Wink” />
Currently debugging under latest nightly release… some of the things I was doing are broken and need fixing ” title=”Wink” />… under construction… DO NOT LOOSE HOPE ” title=”Smile” />
Before converting to latest Nightly, the only thing "NOT" working was MidiLearn and automation under DAWs, and I’ve pinpointed "where" but not "why"…
Stay tune !!
It does crash on my current panel, will not even load it… I will try tonigth by disabling some lua methods and see…
Started pinpointing the issue, I know of 1 button and a whole groups of sliders are responsible, but not really why… I will need to compare with a diff utility because right I can’t figure it out…
Not a bug, found out that the listbox was listening for some CCs’ ” title=”Wink” /> just removed that and it was fixed ” title=”Wink” />
Add a button near the label field to apply the modification ? Personnally, I stick with 16 combos with letters and value ” title=”Wink” />
[quote:1dw3egpi]
atom wrote:
I also must admit that the last nightly was waaaay to early and i need to fix a lot, so be patient i’m working on it (i just don’t have so much time now it’s my first day at my new job tomorrow so i’m stressed to the max)[/quote:1dw3egpi]
[quote:1dw3egpi]
No problem, this is still an incredibly useful piece of software, despite it having a bug here or there . And good luck at your new job!
[/quote:1dw3egpi]I couln’t agree more ! Fantastic piece of MIDI/IDE/SDK you did here ” title=”Wink” /> I’m current still using an old nightly … Where can we download previous nightly ? (more stable-one but yet above release ?)
Done, as is the listbox issue, thanks for everything !!!
I’m confirming a bug, I’ve created a simple panel, only put a listbox in it with some items with no lua events, switch out of edit mode (play mode), select an item and play with my modulation stick… the selected item does switch around.
Chris
Re: releasing variables from memory, well that’s what I meant ” title=”Wink” /> I understood there was a garbage collector… The thing is I have a listbox with a lot of items in it and some tables related to that listbox… upon closing, I want to empty that, it’s useless and it slows down on startup… Right now, I’ve been able to manage how that could occur… EXCEPT when this part of the screen is still displayed ” title=”Wink” /> Looking fwd to those 2 things ” title=”Wink” /> Mainly the "before" save method !
Great, ! I’m happy to help out ” title=”Wink” />
Finally, the other reason you might want to use the index / group index even if you’re using the modulator midi sysex pattern is that you can loop over all your modulator and assign a concatenated string to that value based on the indexes ” title=”Wink” />… reassigning all your midi msg as you would like with less chance of error ” title=”Wink” />…
I think that will work ONLY with sysex msg and not with LUA… and since I only use that ” title=”Wink” />… The main issue with the LUA approach, is that it doesn’t involved Snapshot, so you need to resend the patch when you load the panel… I forgot to mention that ” title=”Wink” /> The advantages is that you can resend the whole patch in one shot instead of modulator by modulator which resulted in errors in my synth… Of course, resending the patch is another lua method… Which looks like this :
3 series of 128 bytes to be sent ” title=”Wink” />
[code:1ulgpwlb]
function writeTemporaryPatch()local val, chk, syx
— Function
syx = { " 00 00 ", " 01 00 ", " 02 00 " }
for i = 1, 3, 1 do
chk = i – 1
for m = (((i – 1) * 128) + 1), (i * 128), 1 do
val = 0
if (gPatchModulators[m] ~= nil) then
val = gPatchModulators[m]:getModulatorValue()
if (gPatchModulators[m]:getComponent():getPropertyString("uiType") == "uiSlider") then
val = val – gPatchModulators[m]:getComponent():getPropertyInt("uiSliderMin")
end
end
syx[i] = syx[i] .. string.format("%.2x ",val)
chk = chk + valend
chk = (128 – (chk % 128))
syx[i] = "f0 41 10 3d 12 00" .. syx[i] .. string.format("%.2x ",chk) .. "f7"
panel:sendMidiMessageNow(CtrlrMidiMessage(syx[i]))
end
end
[/code:1ulgpwlb]Beware of tables in lua, from my understanding they start at 1 where in our patch and address we base everything at 0 ” title=”Wink” /> This can
Ok, here’s the part of the code snippet, it’s actually a method defined below the main method just in case I need to use it from somewhere else ” title=”Wink” />
The example is for the Roland JD-800, the sysex for changing a parameter in the temporary patch memory of the jd is :
f0 41 10 3d 12 msb add lsb val chk f7
Where msb/add/lsb is the full address of the parameter to be changed, val is the value and chk is checksum. In my case, the msb is always 00 . The JD-800 patch is exactly 384 bytes, which basically is 3 sets of 128 bytes, so the address will range from h00 h00 h00 to h00 h02 h38. (the first part is common/effects for 78 bytes, then 4 series of 72 bytes for each tone)
So my sysex string is "f0 41 10 3d 12 00 add lsb val chk f7" with the msb hardcoded as the first 00… the rest follows:
The first thing I do is calculate the UID (unique id) which is from 0 to 383 (from the custum index/group) and is exactly the base address of the parameter in the midi implementation of the Roland JD-800. I calculate the expected add and lsb from the UID.
If the UID is <= 383 then
— > it’s one of the patch parameter !!!
Note: I use a lot of sliders with negative value that ends up being all in positive in the JD… For example, the pitch fine ranges from -50 to 50, but the JD value can range from h00 to h64. So if the component is a uiSlider, I perform the following calculation where I substract the uiSlider minimum value from the value… So if my modulator value is -25 and the minimum value is -50… I will then send (-25 – -50) = 25 = h19
Afterward, I calculated the Roland checksum which is basically (128 – (the remainder of (the sum of all significative parts of the sysex) % 128))… then the sysex is built and send to the device…
However, if the UID is > 383, then it’s my 5th groups of modulators, mainly the "ACTIVE TONE" modulators, modulators that change whatever tone is current active (can be from 1 to 4 of them, It’s dynamic !!) … So if 2 tones are active, the msg needs to be send for those 2 tones at their proper address… I basically "set" the according modulators and each will send the sysex for me ” title=”Wink” />
[code:1s65pwgv]
function sendSysexModulatorValue(modulator, newValue)
local uid, val, add, lsb, chk, syxuid = tonumber(modulator:getPropertyString("modulatorCustomIndexGroup")) + tonumber(modulator:getPropertyString("modulatorCustomIndex"))
if (uid <= 383) then
add = math.floor(uid / 128)
lsb = (uid % 128)
val = newValueif (modulator:getComponent():getPropertyString("uiType") == "uiSlider") then
val = val – modulator:getComponent():getPropertyInt("uiSliderMin")
endchk = (128 – ((add + lsb + val) % 128))
syx = string.format("f0 41 10 3d 12 00 %.2x %.2x %.2x %.2x f7", add, lsb, val, chk)
panel:sendMidiMessageNow(CtrlrMidiMessage(syx))
else
for i = 1, 4, 1 do
if (gToneButtons[i + 4]:getModulatorValue() == 1) then
uid = ((i – 1) * 72) + 96 + tonumber(modulator:getPropertyString("modulatorCustomIndex")) + 1
gPatchModulators[uid]:setModulatorValue(newValue, false, false, true)
end
end
end
end
[/code:1s65pwgv]ALSO very important, at the start of the panel, I build a global collection of all "UIDs" modulators called gPatchModulators[uid], this can be useful to directly access a modulator based on a uid !!!
It is important to set every modulators, the proper indexes and those that are not part of the patch modulators, a value of -1 !! you will understand later why ” title=”Wink” />
[code:1s65pwgv]
function buildPatchModulators().
local uci, ucg, uidgPatchModulators = {}
for i,m in ipairs(panel:getModulatorsWildcard("*",false):getObject()) do
uci = tonumber(m:getPropertyString("modulatorCustomIndex"))
ucg = tonumber(m:getPropertyString("modulatorCustomIndexGroup"))
if (uci ~= -1) and (uci ~= nil) then
uid = uci + ucg + 1
gPatchModulators[uid] = m
end
end
end
[/code:1s65pwgv]Finally, upon receiving midi msg (let’s say for a complete patch (384 bytes in my case)) you can do something like this, it’s less error prone than listing 384 modulators ” title=”Wink” /> !!!
[code:1s65pwgv]
function assignSysexPatchValues(programData)
for uid = 1, 384, 1 do
assignPatchModulatorValue(gPatchModulators[uid], tonumber(programData:getByte(uid – 1)))
end
endfunction assignPatchModulatorValue(modulator, value)
local val = valueif (modulator ~= nil) then
if (modulator:getComponent():getPropertyString("uiType") == "uiSlider") then
val = val + modulator:getComponent():getPropertyInt("uiSliderMin")
endmodulator:setModulatorValue(val, false, false, true)
end
end
[/code:1s65pwgv]I was able to build my pannel under 2 weeks by using those strategies ” title=”Wink” /> and that’s why I’m using LUA all the way in my coding ” title=”Wink” />
Enjoy ” title=”Wink” /> !
-
AuthorPosts