florian-grond / SC-HOA

HOA wrapper classes for SuperCollider based on https://github.com/sekisushai/ambitools
GNU General Public License v3.0
32 stars 7 forks source link

HOAAmbiDecoderHelper creates classes that depend on MathLib quark #10

Closed patrickdupuis closed 6 years ago

patrickdupuis commented 6 years ago

From HOA Tutorial Exercise 14:

The HOADecSATO class additionall has the following class variables: speakerPositions: an array of Cartesian points of the speaker positions in meters as provided in ~spkrPos above. sweeterPositions: an array of Cartesian points of the speaker positions in meters relative to the sweetspot.

The wrapper class (HOADecSATO... in our case) created using HOAAmbiDecoderHelper has two classvar's (speakerPosition and sweeterPositions) that contain an array of Cartesian objects. Cartesian is part of the MathLib quark, which means that your generated classes depend on MathLib. This kind of dependancy can lead to breakage. Users who install a decoder must have MathLib installed before moving any files into their Extensions folder. Failure to do so will result in a broken class library. They'll have to manually move the MathLib files into their downloaded-quarks folder in order to be able to use SC again.

Could the positions simply be kept as arrays of floats, rather than proper Cartesian points?

florian-grond commented 6 years ago

I agree this creates an unwanted dependency I'll try to look at that and will put an array of floats instead

florian-grond commented 6 years ago

Hi Patrick, I just removed the mathlib dependency (Cartesian)