SofaPirate / Plaquette

Object-oriented Arduino library for creative physical computing
https://sofapirate.github.io/Plaquette/
GNU General Public License v3.0
15 stars 4 forks source link

Consider adding Ramp, AbstractTimer and Timer as PqGetters #53

Closed sofian closed 2 years ago

sofian commented 2 years ago

In fact, Timer should be a PqDigitalGetter and Ramp should be a PqGetter (perhaps even a PqMappable). Currently this is not feasible as since both inhering from AbstractTimer we would get a situation with a "diamond problem" which we want to avoid.

Here is a tentative solution:

Only things are:

sofian commented 2 years ago

I'm not 100% sure whether we should do this after all cause there are already units that do the job: Metro (similar to Timer but not the same cause it only activates for one frame while Timer is more like a clock that needs to be restarted) and TriOsc (for a repetitive Ramp).

But still ... it could make more sense and be more logical to keep Timer and Ramp to be compatible with the rest of the system. Here is what each do: Repetitive Needs restart
Digital Metro Timer
Analog TriOsc ProgressBar (*)

(*) Ramp also fits in that category as a special / advanced case.