Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::sound::filters::FilterParameterUnits Class Reference

A class that represents the units of a SoundFilter parameter. More...

#include <omSoundFilterParameterUnits.h>

Public Types

enum  Enum {
  UNDEFINED = 0, GENERIC = 1, DECIBELS = 2, PERCENT = 3,
  RATIO = 4, SECONDS = 5, MILLISECONDS = 6, HERTZ = 7,
  METERS = 8, DEGREES = 9, INDEX = 10, SAMPLES = 11,
  SAMPLE_RATE = 12, BPM = 13, BEATS = 14, CENTS = 15,
  SEMITONES = 16, OCTAVES = 17, MIDI_NOTE_NUMBER = 18, MIDI_CONTROL = 19
}
 An enum that specifies the allowed SoundFilter parameter types. More...
 

Public Member Functions

 FilterParameterUnits ()
 Create a new filter parameter units object with an UNDEFINED parameter units. More...
 
 FilterParameterUnits (Enum newUnits)
 Create a new filter parameter units object with the specified units enum value. More...
 
 operator Enum () const
 Convert this filter parameter units type to an enum value. More...
 
UTF8String getAbbreviation () const
 Return a string representing the abbreviated name of this parameter units. More...
 
UTF8String toString () const
 Return a string representation of the parameter unit type. More...
 
 operator UTF8String () const
 Convert this parameter unit type into a string representation. More...
 

Detailed Description

A class that represents the units of a SoundFilter parameter.

This value is used to determine how to display the filter parameter. Units are available for commonly used DSP parameter types.

Member Enumeration Documentation

An enum that specifies the allowed SoundFilter parameter types.

Enumerator
UNDEFINED 

A undefined filter parameter unit type.

GENERIC 

A generic parameter. Values are evenly distributed in the parameter's range.

DECIBELS 

The parameter is specified in terms of a decibel gain factor, relative to 0dB (full scale).

PERCENT 

The parameter's value is in terms of a percentage.

RATIO 

The parameter's value is specified as a ratio of two numbers.

This unit type would typically be used for compressor or gate ratios.

SECONDS 

The parameter's value is specified in terms of seconds.

MILLISECONDS 

The parameter's value is specified in terms of milliseconds.

HERTZ 

The parameter's value is specified in terms of frequency (Hertz).

METERS 

The parameter's value is specified in terms of a number of meters.

DEGREES 

The parameter's value is specified in terms of a number of angular degrees.

INDEX 

An index parameter, representing a whole-number value.

This unit type indicates that only integer values should be allowed for this filter parameter.

SAMPLES 

The parameter's value is specified in terms of a number of samples.

SAMPLE_RATE 

The parameter's value is specified in terms of a number of samples per second.

BPM 

The parameter's value is specified in terms of the number of beats per minute.

BEATS 

The parameter's value is specified in terms of a number of beats.

CENTS 

The parameter's value is specified in terms of a number of cents (1/100th of a semitone).

SEMITONES 

The parameter's value is specified in terms of a number of semitones.

OCTAVES 

The parameter's value is specified in terms of a number of octaves.

MIDI_NOTE_NUMBER 

The parameter's value is specified in terms of a MIDI note number.

Values are evenly distributed in the parameter's range. Values should range between 0 and 127 to be MIDI-compliant.

This unit type indicates that only integer values should be allowed for this filter parameter.

MIDI_CONTROL 

The parameter's value is specified in terms of a MIDI control channel value.

Values are evenly distributed in the parameter's range. Values should range between 0 and 127 to be MIDI-compliant.

Constructor & Destructor Documentation

om::sound::filters::FilterParameterUnits::FilterParameterUnits ( )
inline

Create a new filter parameter units object with an UNDEFINED parameter units.

om::sound::filters::FilterParameterUnits::FilterParameterUnits ( Enum  newUnits)
inline

Create a new filter parameter units object with the specified units enum value.

Member Function Documentation

om::sound::filters::FilterParameterUnits::operator Enum ( ) const
inline

Convert this filter parameter units type to an enum value.

This operator is provided so that the FilterParameterUnits object can be used directly in a switch statement without the need to explicitly access the underlying enum value.

Returns
the enum representation of this parameter unit type.
UTF8String om::sound::filters::FilterParameterUnits::getAbbreviation ( ) const

Return a string representing the abbreviated name of this parameter units.

For some parameter types, this method may return an empty string, indicating there is no valid abbreviation for this unit type (linear gain, for example).

UTF8String om::sound::filters::FilterParameterUnits::toString ( ) const

Return a string representation of the parameter unit type.

This string is the same as the 'long' representation for this unit type. This string will not contain any abbreviations and shouldn't be used for compact display.

om::sound::filters::FilterParameterUnits::operator UTF8String ( ) const
inline

Convert this parameter unit type into a string representation.


The documentation for this class was generated from the following file: