Page 1 of 1

Add loop functions with audio driven parameters

Posted: Wed Nov 02, 2016 18:50
by Scratchpole
I often use audio input to drive parameters of qtz compositions using the plus and minus controls and I want the option to use the loop modes at the same time.
e.g. I have a structure growing as the bass kicks, currently it gets to the the end of the 'time'line and then grows again. I want it to grow and then shrink.

Any chance this can be added please?

Re: Add loop functions with audio driven parameters

Posted: Wed Nov 02, 2016 19:04
by Zoltán
+1 for extending the fft features.

you could implement this in the qtz patch, counting the "overflows" where the slider jumps back to 0. on every second increment pass you could instruct the patch variables to be decreased instead on increasing. Would require just a few modules.

edit:
put this into a javaScript patch after the published input, that should do the trick, assuming your input is 0-1f:

Code: Select all

__number lastValue=0;
__boolean direction=false;
function (__number output) main (__number input)
{
	if(input < lastValue){
		direction=!direction;
		}
	lastValue=input;
	var result = new Object();
	if(direction){
		result.output = input;
	}else {
		result.output = 1 - input;
	}
	return result;
}