Here are some of the kinds of things that I am trying (with limited success) to do these days. I could do all these things pretty easily, were it not for the critically important last issue (after the word "Meanwhile...")
I want Kyma to process a live incoming audio signal, but I want the processing to begin after a certain amount of time has elapsed since the incoming audio signal began.
I want to have Kyma process an incoming audio signal, but I want the processing to begin only after a pitch (any pitch) is sustained for more than 1 s.
I want Kyma to process an incoming audio signal ... but only when the level is above a certain loudness threshold.
I want Kyma to process an incoming audio signal ... but only when a certain pitch is sounded.
Meanwhile ... in ALL these cases, the live audio signal should be passing through Kyma unaffected when processing is not going on. When the processing conditions are met, ONLY processed audio should come out of Kyma.
-- MarkPhillips - 27 Oct 2009
The switch can be done with a "StereoMix2" module with (condition) in one field and 1-(condition) in the other.
You have the condition that needs to be met to switched to the processed but you need to also say what condition will be met to put the switch back to the pass through state?
Is it after a pre determined time? Is it when say the detected constant pitch has gone or does it never go back to the unprocessed signal?
-- PeteJohnston - 28 Oct 2009
In these examples of conditional processing, I've used a Crossfade to smoothly select between the dry and unprocessed input. Note that I could, alternatively, have used the SelectableSound module, but I wanted a smooth fade from dry to processed signal, rather than a hard switch from one to the other. These examples use:
EnergyAtFrequency to conditionally process the input based on the input pitch
Threshold to conditionally process the input based upon whether it exceeds and amplitude threshold
The CapyTalk expressions hasChangedInLast: , hasChangedReset:, and gateWhen: to conditionally process the input when a particular pitch has been sustained for 1 second
A combination of hadChangedReset: and the Delay module to begin processing an arbitrary amount of time after the input exceeds a threshold amplitude.
-- CarlaScaletti - 28 Oct 2009
Thanks ... this helps. Seriously ... I gotta learn more about CapyTalk? expressions! I was already working with the crossfade object as a possible solution. I'm finding the "Threshold" issues to be really tricky and a little unreliable or at least a little unpredictable. I'm thinking MIDI might be an alternative, if I can figure out how to use MIDI events (i.e. note messages) as a trigger for processing.
-- MarkPhillips - 30 Oct 2009