AngleDataspace::AngleDataspace() : DataspaceLib("angle", "radian") //would "<" be possible ?? { // Create one of each kind of unit, and cache them in a hash registerUnit(new RadianUnit, gensym("radian")); registerUnit(new RadianUnit, gensym("rad")); registerUnit(new DegreeUnit, gensym("degree")); registerUnit(new DegreeUnit, gensym("deg")); // Now that the cache is created, we can create a set of default units setInputUnit(neutralUnit); setOutputUnit(neutralUnit); }
GainDataspace::GainDataspace() : DataspaceLib("gain", "linear") { // Create one of each kind of unit, and cache them in a hash registerUnit(new LinearAmplitudeUnit, SymbolGen("linear")); registerUnit(new MidiGainUnit, SymbolGen("midi")); registerUnit(new DecibelUnit, SymbolGen("dB")); registerUnit(new DecibelUnit, SymbolGen("db")); // Now that the cache is created, we can create a set of default units setInputUnit(neutralUnit); setOutputUnit(neutralUnit); }
TemperatureDataspace::TemperatureDataspace() : DataspaceLib("temperature", "Kelvin") { // Create one of each kind of unit, and cache them in a hash registerUnit(new CelsiusUnit, SymbolGen("C")); registerUnit(new CelsiusUnit, SymbolGen("Celsius")); registerUnit(new FahrenheitUnit, SymbolGen("F")); registerUnit(new FahrenheitUnit, SymbolGen("Fahrenheit")); registerUnit(new KelvinUnit, SymbolGen("K")); registerUnit(new KelvinUnit, SymbolGen("Kelvin")); // Now that the cache is created, we can create a set of default units setInputUnit(neutralUnit); setOutputUnit(neutralUnit); }
TimeDataspace::TimeDataspace() : DataspaceLib("time", "millisecond") { // Create one of each kind of unit, and cache them in a hash registerUnit(new BpmUnit, gensym("bpm")); registerUnit(new UpdaterateUnit, gensym("fps")); registerUnit(new UpdaterateUnit, gensym("Hz")); registerUnit(new MillisecondUnit, gensym("ms")); registerUnit(new MillisecondUnit, gensym("millisecond")); registerUnit(new SecondUnit, gensym("s")); registerUnit(new SecondUnit, gensym("second")); registerUnit(new SampleUnit, gensym("sample")); // Now that the cache is created, we can create a set of default units setInputUnit(neutralUnit); setOutputUnit(neutralUnit); }