SpectMorph
|
00001 /* 00002 * Copyright (C) 2010-2011 Stefan Westerfeld 00003 * 00004 * This library is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License as published by the 00006 * Free Software Foundation; either version 3 of the License, or (at your 00007 * option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, but WITHOUT 00010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 00012 * for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #include "smmorphoperatormodule.hh" 00019 #include "smwavset.hh" 00020 00021 namespace SpectMorph 00022 { 00023 00024 class MorphSourceModule : public MorphOperatorModule 00025 { 00026 protected: 00027 struct MySource : public LiveDecoderSource 00028 { 00029 WavSet *wav_set; 00030 Audio *active_audio; 00031 00032 void retrigger (int channel, float freq, int midi_velocity, float mix_freq); 00033 Audio* audio(); 00034 AudioBlock *audio_block (size_t index); 00035 } my_source; 00036 public: 00037 MorphSourceModule (MorphPlanVoice *voice); 00038 ~MorphSourceModule(); 00039 00040 float latency_ms(); 00041 void set_config (MorphOperator *op); 00042 LiveDecoderSource *source(); 00043 }; 00044 }