|
Post by joebataz on Mar 5, 2019 22:51:44 GMT
Here ya go and THANKS! joeb Attachments:Wizz.jzml (215.71 KB)
|
|
|
Post by joebataz on Mar 5, 2019 22:54:09 GMT
Need to get some sleep, trying to write a paper for school, some SQL for work and THIS..... Thanks again joeb
|
|
|
Post by xPsycHoWasPx on Mar 6, 2019 12:13:13 GMT
I have taken a little look on it. Here my delayed actions works fine with your SSet. but what button should trigger the delayed actions ?? then I will implement it on that.. but a few notes about the scripts example : decl val; if (mVal[0] == 1) val = 'C-2'; else if (mVal[1] == 1) val = 'C#-2'; else if (mVal[2] == 1) val = 'D-2'; else if (mVal[3] == 1) val = 'D#-2'; else if (mVal[4] == 1) val = 'E-2'; else if (mVal[5] == 1) val = 'F-2'; else if (mVal[6] == 1) val = 'F#-2'; else if (mVal[7] == 1) val = 'G-2'; else if (mVal[8] == 1) val = 'G#-2'; else if (mVal[9] == 1) val = 'A-2'; else if (mVal[10] == 1) val = 'A#-2'; else if (mVal[11] == 1) val = 'B-2'; else if (mVal[12] == 1) val = 'C-1'; else if (mVal[13] == 1) val = 'C#-1'; else if (mVal[14] == 1) val = 'D-1'; else if (mVal[15] == 1) val = 'D#-1'; else if (mVal[16] == 1) val = 'E-1'; else if (mVal[17] == 1) val = 'F-1'; else if (mVal[18] == 1) val = 'F#-1'; else if (mVal[19] == 1) val = 'G-1'; else if (mVal[20] == 1) val = 'G#-1'; else if (mVal[21] == 1) val = 'A-1'; else if (mVal[22] == 1) val = 'A#-1'; else if (mVal[23] == 1) val = 'B-1'; else if (mVal[24] == 1) val = 'C-0'; else if (mVal[25] == 1) val = 'C#-0'; else if (mVal[26] == 1) val = 'D-0'; else if (mVal[27] == 1) val = 'D#-0'; else if (mVal[28] == 1) val = 'E-0'; else if (mVal[29] == 1) val = 'F-0'; else if (mVal[30] == 1) val = 'F#-0'; else if (mVal[31] == 1) val = 'G-0'; return val; can be done much simpler with the firstof(mVal) it will turn the pad array into a normal counter so when first pad is triggered then firstof = 0, 2nd pad firstof = 1 the only problem with using firstof as indexer is once u press a pad and release em it will count 1 more than than the numbers of pads. this is avoided by doin: if (firstof(x) != sizeof(x)) { // } do doing this method and a list with the note letters it can be shrimp down to this: decl idx = firstof (mVal); if (idx != sizeof (mVal)) { decl list = { 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B' }; decl split = ((idx-24) <= 0 ? '-' : '+'); //if value is or under 0 it will add '-' else '+' decl val = list[idx % 12] + split + floor ((idx - 24) / 12); return val; }
so lets shorten firstof(mVal to just idx by doing:
decl idx = firstof (mVal); idx % 12 does that it will count from "0-11" once it goes over, it will start over, so it will repeat using the list over n over [0]-[11] next we just need to divide the idx by 12 and floor it , so once it becomes 12+, then floor ((mVal) / 12) = 1, and +24 = 2 ect. floor ((idx - 24) / 12) does that we start with -2 when 0. so combined: val = list[idx % 12] + split + floor ((idx - 24) / 12); will auto generate the 'C#-2' when idx(firstof(mVal)) = 1 + this coveres from 0-127 so the whole note range split = ((idx-24) <= 0 ? '-' : '+'); is needed to make the + when C1 = C+1 But don't worry your method was exactly how I did name listings and stuff to begin with, until I learned all this.. so some my scripts went from being 4-5 full scripts to a mere half script. also: arraytostring(array) turns a single values / arrays of ascii dec/hex into letters and symbols. so your convertDec(cv) script could be done with just that single line. but let me know where u want the delay script featured.
|
|
|
Post by joebataz on Mar 6, 2019 16:17:41 GMT
A lot of this has been pulled in from other apps I did years ago and getting back up to speed after I haven't looked at the code in so long has been a "challenge". And understand that I appreciate all the help and suggestions you are making. Eventually I'll start ripping it apart to make it better. The whole application is based on sending over note pairs (bank-preset) quickly. While the Banks (switches) and Presets (pads) do that effectively I want to do "Sets" of those pairs quickly. So I added the Sets switches and that is what should trigger the delayed action, Sets.SendSet(). Make sense??? Gotta run to "real" work %^P Back in an hour or so. THX!
joeb
|
|
|
Post by joebataz on Mar 6, 2019 21:46:53 GMT
BAH!! Figured it out, needed to move the write() call to the end of the PickSet() script...... YAY, it actually works with the equipment
|
|
|
Post by joebataz on Mar 8, 2019 19:26:56 GMT
Now that I have some time I've been looking into your code and it will cut down on size. Pretty spiffy!!! Thanks, joeb
|
|
|
Post by xPsycHoWasPx on Mar 10, 2019 0:38:05 GMT
BAH!! Figured it out, needed to move the write() call to the end of the PickSet() script...... YAY, it actually works with the equipment Sweet :-)
|
|
tzeee
New Member
Posts: 1
|
Post by tzeee on Apr 22, 2019 9:35:03 GMT
Hello PsycHoWasP may i ask you for help please ? I failed to implement your Delayed_Actions in my template. Maybe you could look into this and give some advice. Sorry for my very limited scripting skills. Attached a template with the extracted actions and the whole project. 1000 Thanks Best, Christof Delayed_Actions_fail.jzml (10.21 KB) Minitaurize ce yeah.jzml (321.11 KB)
|
|
richg
Full Member
Posts: 4
|
Post by richg on Apr 23, 2019 13:36:03 GMT
I'm also using Lemur with DMXIS to control lighting. I discovered DMXIS responds to Program Change (PC) and Bank Change (BC) messages on any channel to change Presets and Banks... not just Note commands on Ch 15 & 16.
For example, if you want to change to the first preset on the first bank you could send the following MIDI command:
0xB0 0x00 0x00 0x32 0x00 0xC0 0x00
or if you want the 8th Preset on the 3rd bank you could send:
0xB0 0x00 0x00 0x32 0x02 0xC0 0x07
Once you have a particular Bank selected you could choose different presets within Bank by sending various PC messages.
|
|