source: gs3-extensions/web-audio/trunk/js-dsp/component/active-workflow.js@ 28388

Last change on this file since 28388 was 28388, checked in by davidb, 11 years ago

Set of JS, CSS, PNG etc web resources to support a mixture of audio player/document display capabilities

File size: 1.5 KB
Line 
1
2
3/*
4// Create components
5new audioMixerCpt = new AudioMixer(numSamples,channels);
6new windowCpt = new Window();
7new fftMagnitudeCpt = new FFTRealMagnitude();
8
9// Wire them up
10
11windowCpt.setInput("input",audioMixerCpt.getOutput("mixedFrames"));
12fftMagnitudeCpt.setInput("input",audioMixerCpt.getOutput("output"));
13
14*/
15
16
17
18// *******
19// *******
20
21function ActiveWorkflow(transformMode,frameBufferLength,concatLimit,channels,samplerate,totalNumFrames) {
22
23 // Create components
24 var audioMixerCpt = new AudioMixer(frameBufferLength/channels,channels);
25 var freqSpectrumCpt = new WFFreqSpectrum(frameBufferLength*concatLimit,channels,samplerate,totalNumFrames);
26 var filterBankCpt = new WFFilterBank(frameBufferLength*concatLimit,channels,samplerate,totalNumFrames);
27 var chromaCpt = new WFChromaTransform(transformMode,frameBufferLength*concatLimit,channels,samplerate,totalNumFrames);
28
29 // Wire components up
30 audioMixerCpt.connectOutput("mixedFrames", freqSpectrumCpt, "monoAudioInputFrames");
31 freqSpectrumCpt.connectOutput("freqSpectrumFrames", filterBankCpt, "freqSpectrumInputFrames");
32 filterBankCpt.connectOutput("filterBankFrames", chromaCpt, "inputFrames");
33
34 var that = new Workflow(audioMixerCpt);
35
36 that.initialize();
37
38 that.audioMixerCpt = audioMixerCpt;
39 that.freqSpectrumCpt = freqSpectrumCpt;
40 that.filterBankCpt = filterBankCpt;
41 that.chromaCpt = chromaCpt;
42
43 return that;
44}
45
46//ActiveWorkflow.swiss(Workflow, 'pumpDataHead');
Note: See TracBrowser for help on using the repository browser.