MCPcopy Create free account
hub / github.com/Wohlstand/OPL3BankEditor / writeDataToInst

Method writeDataToInst

src/operator_editor.cpp:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void OperatorEditor::writeDataToInst(FmBank::Instrument &inst) const
82{
83 FmBank::Operator &op = inst.OP[m_operatorNumber];
84
85 const Ui::OperatorEditor &ui = *m_ui;
86 op.attack = uint8_t(ui.op_attack->value());
87 op.decay = uint8_t(ui.op_decay->value());
88 op.sustain = uint8_t(ui.op_sustain->value());
89 op.release = uint8_t(ui.op_release->value());
90 op.waveform = ui.op_waveform->currentIndex();
91 op.fmult = uint8_t(ui.op_freqmult->value());
92 op.level = uint8_t(ui.op_level->value());
93 op.ksl = ui.op_ksl->value();
94 op.vib = ui.op_vib->isChecked();
95 op.am = ui.op_am->isChecked();
96 op.eg = ui.op_eg->isChecked();
97 op.ksr = ui.op_ksr->isChecked();
98}

Callers 1

onOperatorChangedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected