3 #ifndef SPECTMORPH_SYNTH_INTERFACE_HH
4 #define SPECTMORPH_SYNTH_INTERFACE_HH
6 #include "smmidisynth.hh"
7 #include "smproject.hh"
8 #include "smmorphplansynth.hh"
28 send_control_event (
const std::function<
void(
Project *)>& func, DATA *data =
nullptr)
30 m_project->synth_take_control_event (
new InstFunc (func, [data]() {
delete data;}));
33 send_control_event (
const std::function<
void(
Project *)>& func)
35 m_project->synth_take_control_event (
new InstFunc (func, []() {}));
38 synth_inst_edit_update (
bool active,
WavSet *take_wav_set,
WavSet *ref_wav_set)
47 } *event_data =
new EventData;
49 event_data->decoders = m_project->midi_synth()->inst_edit_synth()->create_decoders (take_wav_set, ref_wav_set);
54 project->midi_synth()->set_inst_edit (active);
57 project->midi_synth()->inst_edit_synth()->swap_decoders (event_data->decoders);
62 synth_inst_edit_gain (
float gain)
67 project->midi_synth()->inst_edit_synth()->set_gain (gain);
71 synth_inst_edit_midi_to_reference (
bool midi_to_reference)
76 project->midi_synth()->inst_edit_synth()->set_midi_to_reference (midi_to_reference);
80 synth_inst_edit_note (
int note,
bool on,
unsigned int layer)
86 project->midi_synth()->inst_edit_synth()->process_note_on ( 0, note, -1, layer);
88 project->midi_synth()->inst_edit_synth()->process_note_off ( 0, note, layer);
92 emit_apply_update (MorphPlanSynth::UpdateP update)
97 MorphPlanSynth::UpdateP update;
98 } *event_data =
new EventData;
100 event_data->update = update;
104 project->midi_synth()->apply_update (event_data->update);
109 emit_update_gain (
double gain)
114 project->midi_synth()->set_gain (gain);
118 emit_add_rebuild_result (
int object_id,
WavSet *take_wav_set)
123 std::unique_ptr<WavSet> wav_set;
124 } *event_data =
new EventData;
126 event_data->wav_set.reset (take_wav_set);
133 project->add_rebuild_result (object_id, event_data->wav_set);
138 emit_clear_wav_sets()
142 std::vector<std::unique_ptr<WavSet>> wav_sets;
143 } *event_data =
new EventData;
146 event_data->wav_sets.reserve (Project::WAV_SETS_RESERVE);
152 project->clear_wav_sets (event_data->wav_sets);
157 generate_notify_events()
159 NotifyBuffer *notify_buffer = m_project->notify_buffer();
160 if (notify_buffer->start_read())
162 while (notify_buffer->remaining())
165 signal_notify_event (sn_event);
168 notify_buffer->end_read();
173 notify_buffer->resize_if_necessary();
Definition: smnotifybuffer.hh:29
Definition: smproject.hh:67
Definition: smsignal.hh:150
Definition: smsynthinterface.hh:14
Definition: smmidisynth.hh:210
Definition: smwavset.hh:29
Definition: sminsteditsynth.hh:19
Definition: smproject.hh:35