aboutsummaryrefslogtreecommitdiffstats
path: root/BowelyzerAnalyzer.sc
diff options
context:
space:
mode:
Diffstat (limited to 'BowelyzerAnalyzer.sc')
-rw-r--r--BowelyzerAnalyzer.sc75
1 files changed, 52 insertions, 23 deletions
diff --git a/BowelyzerAnalyzer.sc b/BowelyzerAnalyzer.sc
index f6ad54e..39728bd 100644
--- a/BowelyzerAnalyzer.sc
+++ b/BowelyzerAnalyzer.sc
@@ -118,32 +118,61 @@ BowelyzerAnalyzer{
});
}
+ // add and start the Synth with name, controls and input channel
startSynthWithNameAndControls{
arg name, controls, input;
- synths.add(name -> Synth(
- name,
- [
- inputChannel: input,
- sendReplyFreq: controls.at(\sendReplyFreq),
- amplitudeAttackTime: controls.at(\amplitudeAttackTime),
- amplitudeReleaseTime: controls.at(\amplitudeReleaseTime),
- hfHainsworth: controls.at(\hfhainsworth),
- hfFoote: controls.at(\hfFoote),
- hfThreshold: controls.at(\hfThreshold),
- hfWaitTime: controls.at(\hfWaitTime),
- pitchInitFreq: controls.at(\pitchInitFreq),
- pitchMinFreq: controls.at(\pitchMinFreq),
- pitchMaxFreq: controls.at(\pitchMaxFreq),
- pitchExecFreq: controls.at(\pitchExecFreq),
- pitchMaxBinsPerOctave: controls.at(\pitchMaxBinsPerOctave),
- pitchMedian: controls.at(\pitchMedian),
- pitchAmpThreshold: controls.at(\pitchAmpThreshold),
- pitchPeakThreshold: controls.at(\pitchPeakThreshold),
- pitchDownSample: controls.at(\pitchDownSample)
- ],
- analyzerGroup
+ // if the input is set to active, start right away, else pause
+ if(controls.at(\active),{
+ synths.add(name -> Synth.new(
+ name,
+ [
+ inputChannel: input,
+ sendReplyFreq: controls.at(\sendReplyFreq),
+ amplitudeAttackTime: controls.at(\amplitudeAttackTime),
+ amplitudeReleaseTime: controls.at(\amplitudeReleaseTime),
+ hfHainsworth: controls.at(\hfhainsworth),
+ hfFoote: controls.at(\hfFoote),
+ hfThreshold: controls.at(\hfThreshold),
+ hfWaitTime: controls.at(\hfWaitTime),
+ pitchInitFreq: controls.at(\pitchInitFreq),
+ pitchMinFreq: controls.at(\pitchMinFreq),
+ pitchMaxFreq: controls.at(\pitchMaxFreq),
+ pitchExecFreq: controls.at(\pitchExecFreq),
+ pitchMaxBinsPerOctave: controls.at(\pitchMaxBinsPerOctave),
+ pitchMedian: controls.at(\pitchMedian),
+ pitchAmpThreshold: controls.at(\pitchAmpThreshold),
+ pitchPeakThreshold: controls.at(\pitchPeakThreshold),
+ pitchDownSample: controls.at(\pitchDownSample)
+ ],
+ analyzerGroup
+ ).register;
+ );
+ },{
+ synths.add(name -> Synth.newPaused(
+ name,
+ [
+ inputChannel: input,
+ sendReplyFreq: controls.at(\sendReplyFreq),
+ amplitudeAttackTime: controls.at(\amplitudeAttackTime),
+ amplitudeReleaseTime: controls.at(\amplitudeReleaseTime),
+ hfHainsworth: controls.at(\hfhainsworth),
+ hfFoote: controls.at(\hfFoote),
+ hfThreshold: controls.at(\hfThreshold),
+ hfWaitTime: controls.at(\hfWaitTime),
+ pitchInitFreq: controls.at(\pitchInitFreq),
+ pitchMinFreq: controls.at(\pitchMinFreq),
+ pitchMaxFreq: controls.at(\pitchMaxFreq),
+ pitchExecFreq: controls.at(\pitchExecFreq),
+ pitchMaxBinsPerOctave: controls.at(\pitchMaxBinsPerOctave),
+ pitchMedian: controls.at(\pitchMedian),
+ pitchAmpThreshold: controls.at(\pitchAmpThreshold),
+ pitchPeakThreshold: controls.at(\pitchPeakThreshold),
+ pitchDownSample: controls.at(\pitchDownSample)
+ ],
+ analyzerGroup
+ ).register;
);
- );
+ });
}
// set a synth control by provoding its name, its control name and control value