September 6, 2017 at 7:56 am #72853
can i get a quick run-through of the ‘custom’ parameters?
i know this should be clear enough but i remember something
not being as i expected last time i tried.
i am not sure of the hierarchy of these parameters.
ie: if any take precedence over, and ‘own’ any of the others.
i wanted to use ‘modulatorCustomNameGroup’ to identify a
group of parameters to give an indexing with, ie: here, all
the parameters for the Pitch Env, Part1, starting with index1.
or: give them a customIndexGroup number, which they would list
under. what would be the distinction between the two?
then: what would a CustomName be used for? (have not attempted
to use that yet)
so far, i have an early thing working, where they all belong to
a uiTab, using that to ID parameters to include, and i ‘getRange’
from a single indexing, and that works.
– but i want to make that more specific now (going back to tidy it
up and eliminate some little errors)
i’m going to have a messaround with it again now, see what happens.September 6, 2017 at 3:52 pm #72856
as far as I know you can freely use these custom fields. I use them for identifying modulators – e.g. do something with a modulator if it belongs to a specific CustomGroup. I guess “name” customs are meant to be strings and the other ones are meant to be numeric. AFAIK these are not used anywhere unless you are using these in scripts.September 6, 2017 at 4:05 pm #72857
i remember seeing them used in the matrix panel you pointed
i have this randomizer that is a bit of a bodge, but works
if all modulators are on the designated tab. but i want to
get rid of the tab reference, and make each grouping of
modulators – here, envelopes – randomize by custom group name,
or custom modulator index group. i tried it but didn’t get it
to work for some reason, so i have been using this hack of what
i found in the matrix panel (which works fine as long as they’re
on the UItabs) – yes, it was pointed out to me that the iteration
is nonsensical 🙂 but i’ve been using it in the meantime. time to
tidy up.(nb: this is now ‘old’, so i might do it differently now)
randomPitchEG1_pt1=function() -- randomize a group by custom index group -- This stops issues during panel bootup if panel:getRestoreState() or panel:getProgramState() then return end local randomGroup = panel:getModulator("randomPitch1pt1"):getValue() -- random seeder local t=os.time() local c=os.clock() math.randomseed(t*c) --math.randomseed(Time.getMillisecondCounterHiRes()) if randomGroup~=nil then -- custom group items to randomize for k=1,4 do modul=panel:getModulatorWithProperty("modulatorCustomIndex",k) tab=modul:getComponent():getProperty("componentTabName") if tab =="tabs_Main_pt1" then rnd=math.random(0,100) --value range to random modul:setModulatorValue(rnd,false,false,false) end end for k=5,9 do modul =panel:getModulatorWithProperty("modulatorCustomIndex",k) tab =modul:getComponent():getProperty("componentTabName") if tab =="tabs_Main_pt1" then rnd=math.random(-50,50) --value range to random modul:setModulatorValue(rnd,false,false,false) end end end end
btw: it’s a bipolar pitch envelope and has 2 sets of value ranges,
hence arguments done twice. level has to be centred -50/+50,
whereas ‘time’ is 0-100.
September 6, 2017 at 7:12 pm #72867
- This reply was modified 2 weeks, 4 days ago by human fly.
edit: want to try and rebuild this. can’t get it to
work if i try to do it by custgroupname or custgroupnumber.
it works as is if the modulators are on a uitab (or have
the uitab ownership field with correct name in) and that
is used to identify the group of modulators.
but nothing with custgroupname or custgroupnumber yet.September 6, 2017 at 7:59 pm #72868
not having ANY luck editing the original version
i had, (which was extracts from the matrix panel
major/minor random) – have to start it again from
scratch aargh.September 10, 2017 at 11:09 pm #72880
Possemo (if you’re there) : in the Matrix panel, you’ve got the
major/minor random methods, which have:
if sliders==1 then for k=1,69 do modul=panel:getModulatorWithProperty("modulatorCustomIndex",k) group=modul:getComponent():getProperty("componentGroupName")
and then you have your parameter groups.
i still need modulatorCustomIndex, but i want to select
parameters by modulatorCustomIndexGroup (ie:”10″) or by
so i’ve tried substituting ‘componentGroupName’, but it
doesn’t seem to work. it’s essentially the same form, so
i’m wondering what’s missing. i haven’t needed to declare
at the beginning with my previous attempt, which works,
using ‘componentTabName’ as the grouping.
i’d like to do it with customIndexGroup or customNameGoup
because it offers better possibilities later if i want to
randomise without relying on things belonging to a uiTabs.
any thoughts? (had to leave this alone for a few days)September 11, 2017 at 8:10 am #72881
back to basics, to figure this out – here is the simplest
form of random by group, with a simple randomize method
mini demo panel:
method: (randomizes only first modulator in customNameGroup)
randomize=function() --randomize a group by customNameGroup --This stops issues during panel bootup if panel:getRestoreState() or panel:getProgramState() then return end --custom group items to randomize local modGroup = panel:getModulatorWithProperty("modulatorCustomNameGroup","custGroup1") --random seeder local t=os.time() local c=os.clock() math.randomseed(t*c) rand = math.random(0,127) --value range to random modGroup:setModulatorValue(rand,false,false,false) end
the ‘format string’ property below is not readable, cannot
see what is required there – is this the key to this?
i cannot see why this method would not ‘get’ all modulators
with same customGroupName. this is a simple method triggered
by button valuechange, no condition required there – and i
removed the ‘for…’ iteration, as it should not be needed.
nb: want to use this to check through all actions for
‘custom’ parameters – seems to be a useful thing to do?September 11, 2017 at 6:31 pm #72885
i thought this could work, it doesn’t:
(same with customNameGroup)
ie: give each item and index number, and give them a common
customNameGroup or customIndexGroup. i know this will work
if all the modulators/components are on a tab, and i call
componentTabName. would be very convenient to use these other
groupings, but they do not appear to work in the same way.
randomize=function() --randomize group by modulatorCustomIndexGroup --This stops issues during panel bootup if panel:getRestoreState() or panel:getProgramState() then return end --random seeder local t=os.time() local c=os.clock() math.randomseed(t*c) --custom group items to randomize for k=1,2 do mod=panel:getModulatorWithProperty("modulatorCustomIndex",k) grp=mod:getComponent():getProperty("modulatorCustomIndexGroup") if grp == 1 then rnd=math.random(0,127) --value range to random mod:setModulatorValue(rnd,false,false,false) end end endSeptember 11, 2017 at 8:14 pm #72887
awwwlrite, so here’s a version of the panel with
non-working custom stuff, and working tab multi-random.
custom index number seems to be the real identifier,
and uiTabs (and probably uiGroups, but less usefully imo)
seems to be the only current working way to reGroup
modulators/components for group actions – * by custom Index # *
please disprove this 😀
https://app.box.com/s/01uxstx8sdnct7kkopgijr41upsskjc8September 12, 2017 at 8:12 am #72891
better example panel here with different methods to compareSeptember 12, 2017 at 2:25 pm #72893
right well i’m beginning to see that was probably
a waste of time, as i could have been doing this
all along with tables … (except i’m not confident
with that yet. i’m not very good at all this)September 13, 2017 at 6:25 am #72900
have found a reference to Custom Index in the XP30 panel
in the method ‘PANEL_modulatorEfx ‘:
mod_idx = tonumber(modulator:getPropertyString("modulatorCustomIndex"))
if efx_selected == 0 then mod_label = stereoeq_name[mod_idx] mod_unit = stereoeq_unit[mod_idx] mod_value = stereoeq_value[mod_idx] etc.
(doing a bit of research)
You must be logged in to reply to this topic.