It is currently September 20th, 2020, 8:27 pm

No problems, just thought I would share this

Discuss the use of Lua in Script measures.
jav26122
Posts: 26
Joined: February 9th, 2015, 8:45 pm

No problems, just thought I would share this

Post by jav26122 »

So I felt like making a VU meter with a ridiculous amount of bands, but the only way I know how to do that is to write out a new meter and measure for every band. There's probably an easier way to do this, but I decided to make a script to write the script for me, cuz why not?....genius :D
100 measures written in less than a second. This is in lua btw incase you couldn't tell.
Just thought I would share my script-writing-script for the lolz.

Code: Select all

table={"[MeasureBand+]", "Measure=Plugin", "Plugin=AudioLevel", "Parent=MeasureAudio", "Type=Band", "BandIdx=+", "Channel=R", "  "}
 
for i=1, 100 do
	var = i - 1
	var2 = 100 - i
	for e=1, #table do
		string1 = table[e]
		string1 = string.gsub(string1, "+", tostring(var))
		string1 = string.gsub(string1, "~", tostring(var2))
		print(string1)
	end
end 
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: No problems, just thought I would share this

Post by drakulaboy »

whoa, this is really helpful, thank you mate!