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

Multiplying oscillators yields error: "ambiguous overload for 'operator*' (operand types are 'pq::SquareOsc' and 'pq::SquareOsc' ..." #114

Open possibly-human opened 6 months ago

possibly-human commented 6 months ago

Multiplying oscillators as suggested in https://sofapirate.github.io/Plaquette/getting_started.html returns the following error : "error: ambiguous overload for 'operator*' (operand types are 'pq::SquareOsc' and 'pq::SquareOsc'"

The multiplying operator '*' is not multiplying numbers but SquareOsc objects

"(myOsc myOsc1) >> myLed;" does not work but "(float(myOsc) float(myOsc1)) >> myLed;" does

Capture d’écran, le 2024-05-22 à 11 04 48
sofian commented 6 months ago

A proper fix would be to explicitely add an operator to multiply two Node objects (and we should also add other operators +-/)