Linking Multiple LFO Sync Rates via Scripting

Here is the script I’ve been working with if this helps clarify where I’m at:

-- define the filter types
defineSlotLocal("ratesyncTypes")
ratesyncTypes = {
				{ name = "1/64", 		index = 1 },
				{ name = "1/32", 		index = 2 },
				{ name = "1/16T", 		index = 3 },
				{ name = "1/16", 		index = 4 },
				{ name = "1/8T", 		index = 5 },
				{ name = "1/16D", 		index = 6 },
				{ name = "1/8", 		index = 7 },
				{ name = "1/4T", 		index = 8 },
				{ name = "1/8D", 		index = 9 },
				{ name = "1/4", 		index = 10 },
				{ name = "1/2T", 		index = 11 },
				{ name = "1/4D", 		index = 12 },
				{ name = "1/2", 		index = 13 },
				{ name = "1/1T", 		index = 14 },
				{ name = "1/2D", 		index = 15 },
				{ name = "4/4", 		index = 16 },
				{ name = "5/4", 		index = 17 },
				{ name = "6/4", 		index = 18 },
				{ name = "7/4", 		index = 19 },
				{ name = "8/4", 		index = 20 },
				{ name = "16/4", 		index = 21 },
				{ name = "32/4", 		index = 22 },
				{ name = "64/4", 		index = 23 }
			  }

-- create table with the names of the ratesync types
function getRatesyncTypeNames()
	ratesyncTypeNames = {}
	for i=1, #ratesyncTypes do
		ratesyncTypeNames[i] = ratesyncTypes[i].name
	end
end

getRatesyncTypeNames()

-- parameter change callbacks for the ratesync parameters
function onRatesyncTypeChanged()
	this.parent:getMidiModule(lfo1):setParameter("RateSync", ratesyncTypes[RatesyncType].index)
	this.parent:getMidiModule(lfo2):setParameter("RateSync", ratesyncTypes[RatesyncType].index)
	this.parent:getMidiModule(lfo3):setParameter("RateSync", ratesyncTypes[RatesyncType].index)
	this.parent:getMidiModule(lfo4):setParameter("RateSync", ratesyncTypes[RatesyncType].index)

end

defineParameter("RatesyncType", 	  "Rate Sync Type", 	 1, ratesyncTypeNames, 	onRatesyncTypeChanged)

Thanks,
rmjmusic