MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / BandVocoder

Method BandVocoder

Source/BandVocoder.cpp:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include "UIControlMacros.h"
30
31BandVocoder::BandVocoder()
32: IAudioProcessor(gBufferSize)
33{
34 mCarrierInputBuffer = new float[GetBuffer()->BufferSize()];
35 Clear(mCarrierInputBuffer, GetBuffer()->BufferSize());
36
37 mWorkBuffer = new float[GetBuffer()->BufferSize()];
38 Clear(mWorkBuffer, GetBuffer()->BufferSize());
39
40 mOutBuffer = new float[GetBuffer()->BufferSize()];
41 Clear(mOutBuffer, GetBuffer()->BufferSize());
42
43 for (int i = 0; i < VOCODER_MAX_BANDS; ++i)
44 {
45 mPeaks[i].SetDecayTime(mRingTime);
46 mOutputPeaks[i].SetDecayTime(mRingTime);
47 mPeaks[i].SetLimit(mMaxBand);
48 mOutputPeaks[i].SetLimit(mMaxBand);
49 }
50
51 CalcFilters();
52}
53
54void BandVocoder::CreateUIControls()
55{

Callers

nothing calls this directly

Calls 4

ClearFunction · 0.85
BufferSizeMethod · 0.80
SetDecayTimeMethod · 0.80
SetLimitMethod · 0.45

Tested by

no test coverage detected