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

Method Player

NeuralNote/Source/Player.cpp:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "PluginProcessor.h"
7
8Player::Player(NeuralNoteAudioProcessor* inProcessor)
9 : mProcessor(inProcessor)
10{
11 mProcessor->addListenerToStateValueTree(this);
12
13 mSynth = std::make_unique<MPESynthesiser>();
14 mSynth->setCurrentPlaybackSampleRate(44100);
15
16 for (int i = 0; i < NUM_VOICES_SYNTH; i++) {
17 mSynth->addVoice(new SynthVoice());
18 }
19
20 mSynthController = std::make_unique<SynthController>(inProcessor, mSynth.get());
21
22 setPlayheadPositionSeconds(mProcessor->getValueTree().getProperty(NnId::PlayheadPositionSecId, 0.0));
23
24 mShouldOutputMidi = mProcessor->getValueTree().getProperty(NnId::MidiOut, false);
25}
26
27Player::~Player()
28{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected