hold event
I have many good uses for an events control module similar to the way the smooth module timer works that would take the last input value and hold it for a set amount of time , then when the value 'hold' has timed out the module would send a user definable 'reset value'.
One more option for the module could be to reset the timer every time a new value was received or else play the entire 'last value', ignoring any new input values untill timed out.
I'm sure this is patchable but I think this function in a single module would be very usefull.
One more option for the module could be to reset the timer every time a new value was received or else play the entire 'last value', ignoring any new input values untill timed out.
I'm sure this is patchable but I think this function in a single module would be very usefull.
maybe a script or a user module...? ( do you hear the call , gurus..?
) )
hehe!
This would be really useful gurulogic, agree with you...for myself, It's the main difficulty with monome and launchpad.
This would be really useful gurulogic, agree with you...for myself, It's the main difficulty with monome and launchpad.
Seb.Dub
Something like this?
Code: Select all
VAR pInValue, pOutValue, pResetValue, pHoldTime, pIgnoreWhileHold : tParameter;
VAR lastTime : Single;
VAR holding : Boolean;
PROCEDURE Init;
BEGIN
pInValue := CreateParam('value in', ptDataField); SetIsOutput(pInValue, FALSE);
pOutValue := CreateParam('value out', ptDataField); SetIsInput(pOutValue, FALSE);
pResetValue := CreateParam('reset value', ptDataField); SetIsOutput(pResetValue, FALSE);
pHoldTime := CreateParam('hold time', ptDataFader); SetIsOutput(pHoldTime, FALSE);
SetSymbol(pHoldTime, 'ms');
SetMin(pHoldTime, 0); SetMax(pHoldTime, 10000);
pIgnoreWhileHold := CreateParam('ignore new', ptSwitch); SetIsOutput(pIgnoreWhileHold, FALSE);
holding := FALSE;
END; // Init
PROCEDURE Callback(n : Integer);
BEGIN
IF (n = pInvalue) THEN BEGIN
IF ((GetValue(pIgnoreWhileHold) = 0) OR (NOT holding)) THEN BEGIN
SetValue(pOutValue, GetValue(pInValue));
lastTime := TimeMs;
holding := TRUE;
END;
END;
END; // Callback
PROCEDURE Process;
BEGIN
IF ((holding) AND ((TimeMs - lastTime) >= GetValue(pHoldTime))) THEN BEGIN
SetValue(pOutValue, GetValue(pResetValue));
holding := FALSE;
END;
END; // ProcessBjørn S
Ask and ye shall receive! Seems to work fine, thanks!
Not to look a gift horse in the mouth but would a version that worked with midi be too hard to adapt from this? I presume the reset value would be a midi note off for the current note out, or alternativly a 'stop' outlet that could trigger a create midi module.
Either way, this is going in my 'very usefull' folder ~:>)
Not to look a gift horse in the mouth but would a version that worked with midi be too hard to adapt from this? I presume the reset value would be a midi note off for the current note out, or alternativly a 'stop' outlet that could trigger a create midi module.
Either way, this is going in my 'very usefull' folder ~:>)
Shouldn't be too hard to implement for MIDI, but IIRC there's already something similar (at least for note messages) in the MIDI Utility pack. Check it out, I don't have time now.
Bjørn S
Cool, will check...
I think the above script should definately be bundled with the next usine update. So very usefull!!!
I think the above script should definately be bundled with the next usine update. So very usefull!!!
great ! thanks sir bsork !
I've yet found utility to this one too !
I've yet found utility to this one too !
sorry im not at all questionning the utility of this, im sur there are plenty.
but just by curiosity, any exemple application?
but just by curiosity, any exemple application?
I'm also a bit curious as to what you're using it for... 
Enlighten us!
Enlighten us!
Bjørn S
i know i can do the same with pass and others but it's the first idea i've had :
a slow random generator for drone or pads..

a slow random generator for drone or pads..

-
noise2sine
- Member
- Posts: 458
- Contact:
I 've heard : slow random generator for drones ?!!? i want to test it !!!!!!!!!!
mm oh yeah i see the idea thanks nay, the fact to ' ignore new ' provide kind of quantized/reduce/stepped data out of the box,
othewise yes a pass with clock would do about the same, btw more handy on on only one module.
curious about guru and ethnix uses also...i guess they were after the reset value too, but what for??
othewise yes a pass with clock would do about the same, btw more handy on on only one module.
curious about guru and ethnix uses also...i guess they were after the reset value too, but what for??
Hmmm... my mind goes blank when looking for examples
Lets see.... how about modulating individual step durations or creating random evolving value mutations...?
Generally I see being able to hold values open in a 'gate' fashion as a utilty kind of thing.
One example that I have put into immediate use is that when I send Usine a SAVE_PATCH command, I need to ensure the patch is saved with a audio bus names that aren't in use when the patch loads, so when I press save, the bus names change to 'x', the patch saves and then after the set duration the bus names are set back to normal. If I like I could use the reset value to trigger the next patch to save using the same conditions... Probably coulda patched this some other way but this was nice n' easy.
Generally I see being able to hold values open in a 'gate' fashion as a utilty kind of thing.
One example that I have put into immediate use is that when I send Usine a SAVE_PATCH command, I need to ensure the patch is saved with a audio bus names that aren't in use when the patch loads, so when I press save, the bus names change to 'x', the patch saves and then after the set duration the bus names are set back to normal. If I like I could use the reset value to trigger the next patch to save using the same conditions... Probably coulda patched this some other way but this was nice n' easy.
yeah that make sense thanks. indeed that avoid the use of several counters, pass, affect or freez event things, having two values and timer directly, ill have to remember that 
After testing you script bsork, it was [not] totally what i had in mind.
Maybe i'had read the first guru message too fast :rolleyes:
Anyway, may be usefull, thanks!
Maybe i'had read the first guru message too fast :rolleyes:
Anyway, may be usefull, thanks!
Seb.Dub
great job bsork!!!
for info the 'math/variable' and 'math/multipleVariable' are kind of 'hold event' but without time management.
for info the 'math/variable' and 'math/multipleVariable' are kind of 'hold event' but without time management.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Yes - I don't htink it would be hard to patch the same thing.
Bjørn S
a script version will always be more efficient in CPU.
the main drawback of scrips is that it generally take more memory than it should.
That's why I prepare the concept of 'compiled script'. It will be a script but without any possible modification. Much more light...
the main drawback of scrips is that it generally take more memory than it should.
That's why I prepare the concept of 'compiled script'. It will be a script but without any possible modification. Much more light...
Olivier Sens
www.brainmodular.com
www.brainmodular.com
More efficient?!? Wow - things have changed more than I thought!
Bjørn S
-
multiphone
- Member
- Posts: 303
- Contact:
After scratching my head a few minutes wondering what Guru was doing with this script... and afer Nay patch inspiration...I found an application to move the sounds in space.
The movement are quite interesting and unexpected.

Not to bad
Best...
The movement are quite interesting and unexpected.
Not to bad
Best...
Yes especially if most of the code is in the Callback procedure.bsork wrote:More efficient?!? Wow - things have changed more than I thought!
Actually there is a bottle neck, in multicore CPU: only one script can be executed at the same time. but will disappear in the 5.30
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
multiphone
- Member
- Posts: 303
- Contact:
First words is :
"Ho ! My God ! "
This 5.3 are dream !
Best
"Ho ! My God ! "
This 5.3 are dream !
Best
wow wow 5.3 seems raising even higher levels..can't wait..
Who is online
Users browsing this forum: No registered users and 10 guests
