SynthesizerState MasterSynthesizer::state() const { SynthesizerState ss; SynthesizerGroup g; g.setName("master"); g.push_back(IdValue(0, QString("%1").arg(_effect[0] ? _effect[0]->name() : "none"))); g.push_back(IdValue(1, QString("%1").arg(_effect[1] ? _effect[1]->name() : "none"))); g.push_back(IdValue(2, QString("%1").arg(gain()))); ss.push_back(g); for (Synthesizer* s : _synthesizer) ss.push_back(s->state()); if (_effect[0]) ss.push_back(_effect[0]->state()); if (_effect[1]) ss.push_back(_effect[1]->state()); return ss; }
SynthesizerGroup Compressor::state() const { SynthesizerGroup g; g.setName(name()); for (const ParDescr& d : pd) g.push_back(IdValue(d.id, QString("%1").arg(value(d.id)))); return g; }
SynthesizerGroup Zerberus::state() const { SynthesizerGroup g; g.setName(name()); QStringList sfl = soundFonts(); foreach(QString sf, sfl) g.push_back(IdValue(0, sf)); return g; }
SynthesizerState MasterSynthesizer::state() const { SynthesizerState ss; SynthesizerGroup g; g.setName("master"); g.push_back(IdValue(0, QString("%1").arg(_effect[0] ? _effect[0]->name() : "NoEffect"))); g.push_back(IdValue(1, QString("%1").arg(_effect[1] ? _effect[1]->name() : "NoEffect"))); g.push_back(IdValue(2, QString("%1").arg(gain()))); g.push_back(IdValue(3, QString("%1").arg(masterTuning()))); g.push_back(IdValue(4, QString("%1").arg(dynamicsMethod()))); g.push_back(IdValue(5, QString("%1").arg(ccToUseIndex()))); ss.push_back(g); for (Synthesizer* s : _synthesizer) ss.push_back(s->state()); if (_effect[0]) ss.push_back(_effect[0]->state()); if (_effect[1]) ss.push_back(_effect[1]->state()); return ss; }