Created
August 25, 2013 19:15
-
-
Save novadeviator/6335676 to your computer and use it in GitHub Desktop.
not sure why trigger does't work here (see Latch)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~grain_reveal = NodeDef { | |
arg buf, interval = 0.02, dur = 0.1, | |
threshold = 0.002, grow = 0.7, attack = 3, decay = 15, | |
in, trigger; | |
var energy, sound; | |
energy = (in - threshold).max(0) * grow; | |
energy = Decay2.kr(energy, attack, decay).min(1.0); | |
sound = GrainBuf.ar ( | |
2, | |
TDuty.ar(Dwhite(interval * 0.3, interval * 1.8)), | |
dur, | |
buf, | |
BufRateScale.ir(buf), | |
// LFNoise1.kr(0.01) * 0.5 + 0.5; | |
LFSaw.kr(LFPulse.ar(0.25,0,0.01) + 0.001 * 0.9 ); | |
// Latch.kr( WhiteNoise.kr(), trigger) // ?????????? | |
/// why this doesn't work as with grain_trigger_env??? | |
); | |
sound = LPF.ar( sound, energy.pow(4) * 20000 + 200 ) * ((energy * 4).min(1) + 0.01) * 0.8; | |
// Reverse filter and amp: | |
/* | |
x = ( | |
LPF.ar( x, (1 - movement).pow(4) * 20000 + 200 ) | |
* ( (1 - (movement * 1)).max(0) + 0.01) | |
* 0.5; | |
) | |
*/ | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"trigger" is here an argument to the NodeDef function -> it becomes a input to the node.
It has to be mapped to the preprocessing node that produces the trigger, equivalently to:
where: