MCPcopy Create free account
hub / github.com/amsynth/amsynth / VoiceAllocationUnit

Method VoiceAllocationUnit

src/core/synth/VoiceAllocationUnit.cpp:42–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41
42VoiceAllocationUnit::VoiceAllocationUnit ()
43: mMaxVoices (0)
44, mPortamentoTime (0.0f)
45, mPortamentoMode(PortamentoModeAlways)
46, sustain (0)
47, _keyboardMode(KeyboardModePoly)
48, mMasterVol (1.0)
49, mPanGainLeft(1)
50, mPanGainRight(1)
51, mPitchBendRangeSemitones(2)
52, mPitchBendValue(1)
53, mLastNoteFrequency (0.0f)
54#ifdef WITH_MTS_ESP
55, mtsClient(MTS_RegisterClient())
56#endif
57{
58 limiter = new SoftLimiter;
59 reverb = new revmodel;
60 distortion = new Distortion;
61 mBuffer = new float [kBufferSize * 2];
62
63 for (int i = 0; i < 128; i++)
64 {
65 keyPressed[i] = false;
66 active[i] = false;
67 _voices.push_back (new VoiceBoard);
68 }
69
70 memset(&_keyPresses, 0, sizeof(_keyPresses));
71
72 SetSampleRate (44100);
73}
74
75VoiceAllocationUnit::~VoiceAllocationUnit ()
76{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected