1 |
|
---|
2 |
|
---|
3 | /*
|
---|
4 | // Create components
|
---|
5 | new audioMixerCpt = new AudioMixer(numSamples,channels);
|
---|
6 | new windowCpt = new Window();
|
---|
7 | new fftMagnitudeCpt = new FFTRealMagnitude();
|
---|
8 |
|
---|
9 | // Wire them up
|
---|
10 |
|
---|
11 | windowCpt.setInput("input",audioMixerCpt.getOutput("mixedFrames"));
|
---|
12 | fftMagnitudeCpt.setInput("input",audioMixerCpt.getOutput("output"));
|
---|
13 |
|
---|
14 | */
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 | // *******
|
---|
19 | // *******
|
---|
20 |
|
---|
21 | function 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');
|
---|