jamoma / JamomaCore

Jamoma Frameworks for Audio and Control Structure
Other
36 stars 14 forks source link

Updating Gain Dataspace mid gain function, also moving inline functio… #378

Closed lossius closed 8 years ago

lossius commented 8 years ago

…ns for gain conversions from DspLib to Foundation

MIDI function is specified as:

As DataspaceLib is an extension to Foundation, it makes no sense that regular methods for converting gain values reside in the DspLib, they are instead moved to TTBase.h in Foundation.

This implies that they can be used by the DataspaceLib, and makes the code more DRY.

kTTGainMidiPower and similar constants no longer need to be exposed/exported as global constants. They are only used for mapping MIDI gain values, and hence should be replaced in all other locations by the TTMidiToLinearGain() and TTLinearGainToMidi() methods.

The only place where this constant seemed to be used, was in j.meter~. That object was anyway deprecated, and I have removed it from the JamomaMax repository.

Unit tests have been updated for the change, and all Dataspace unit tests pass.

lossius commented 8 years ago

Closes #375