3 #ifndef SPECTMORPH_INST_EDIT_SYNTH_HH
4 #define SPECTMORPH_INST_EDIT_SYNTH_HH
6 #include "smlivedecoder.hh"
7 #include "smnotifybuffer.hh"
12 namespace SpectMorph {
14 struct MidiSynthCallbacks;
20 std::unique_ptr<WavSet> wav_set;
21 std::vector<std::unique_ptr<LiveDecoder>> decoders;
30 State state = State::IDLE;
32 double decoder_factor = 0;
34 unsigned int layer = 0;
39 static constexpr uint n_layers = 3;
40 static constexpr uint voices_per_layer = 64;
44 bool midi_to_reference =
false;
46 std::vector<Voice> voices;
50 InstEditSynth (
float mix_freq);
53 Decoders create_decoders (WavSet *take_wav_set, WavSet *ref_wav_set);
54 void swap_decoders (Decoders& decoders);
56 void set_gain (
float gain);
57 void set_midi_to_reference (
bool new_midi_to_reference);
58 void process_note_on (
int channel,
int note,
int clap_id,
int layer = -1);
59 void process_note_off (
int channel,
int note,
int layer = -1);
61 void process (
float *output,
size_t n_values, RTMemoryArea& rt_memory_area, NotifyBuffer& notify_buffer, MidiSynthCallbacks *process_callbacks);
Definition: sminsteditsynth.hh:17
Definition: smlivedecoder.hh:19
Definition: sminsteditsynth.hh:19