MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / noteStarted

Method noteStarted

Lib/Player/SynthVoice.cpp:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void SynthVoice::noteStarted()
31{
32 mADSR.reset();
33 mOsc.reset();
34
35 auto mpe_note = getCurrentlyPlayingNote();
36 mCurrentMidiNote = mpe_note.initialNote;
37 mAmplitude = mpe_note.noteOnVelocity.asUnsignedFloat();
38 mADSR.noteOn();
39 mOsc.setFrequency((float) mpe_note.getFrequencyInHertz(), true);
40}
41
42void SynthVoice::noteStopped(bool allowTailOff)
43{

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected