Home Forums General Programming 'custom'?


This topic contains 11 replies, has 2 voices, and was last updated by  human fly 5 months, 1 week ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #72853

    human fly

    newb’ question:
    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.

    for example:


    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.


    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.


    human fly

    i remember seeing them used in the matrix panel you pointed
    me to.

    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)

    -- 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()
    	if randomGroup~=nil then
    -- custom group items to randomize
    		for k=1,4 do
    			if tab =="tabs_Main_pt1" then
    			rnd=math.random(0,100) --value range to random
    			modul:setModulatorValue(rnd,false,false,false) 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

    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.

    • This reply was modified 5 months, 2 weeks ago by  human fly.

    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.


    human fly

    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.


    human fly

    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	

    and then you have your parameter groups.

    i still need modulatorCustomIndex, but i want to select
    parameters by modulatorCustomIndexGroup (ie:”10″) or by
    modulatorCustomNameGroup (ie:”customPEG1pt1″).

    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)


    human fly

    back to basics, to figure this out – here is the simplest
    form of random by group, with a simple randomize method
    *not working*
    mini demo panel:

    method: (randomizes only first modulator in customNameGroup)

    --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()
    	rand = math.random(0,127) --value range to random

    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?


    human fly

    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 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()
    --custom group items to randomize
    	for k=1,2 do
    		if grp == 1 then
    		rnd=math.random(0,127) --value range to random

    human fly

    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 😀

    file >


    human fly

    better example panel here with different methods to compare



    human fly

    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)


    human fly

    have found a reference to Custom Index in the XP30 panel
    in the method ‘PANEL_modulatorEfx ‘:

    mod_idx = tonumber(modulator:getPropertyString("modulatorCustomIndex"))

    and then:

    if efx_selected == 0 then
    mod_label = stereoeq_name[mod_idx]
    mod_unit = stereoeq_unit[mod_idx]
    mod_value = stereoeq_value[mod_idx]

    (doing a bit of research)

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

Comments are closed.