Machines should be pure sequence generators, with no knowledge of MIDI, the UI, etc. Params in Machines violates this principle.
One pattern to decouple Params from Machines might be to create an adaptor object for each machine, which can call the methods of Machine, passing regular values.
class TuringMachineParams {
Param* param0() { */ ... */ }
Note next_note() {
return turing_machine.next_note(int prob, int low, int range, int bend_amount);
}
};
Machines should be pure sequence generators, with no knowledge of MIDI, the UI, etc. Params in Machines violates this principle.
One pattern to decouple Params from Machines might be to create an adaptor object for each machine, which can call the methods of Machine, passing regular values.