OpenWareLaboratory
VoltsPerOctave Class Reference

Public Member Functions

float getFrequency (float sample)
 
void getFrequency (FloatArray samples)
 
void getFrequency (FloatArray samples, FloatArray output)
 
float getSample (float frequency)
 
void getSample (FloatArray frequencies)
 
void getSample (FloatArray frequencies, FloatArray output)
 
float sampleToVolts (float sample)
 
void setMidiNote (float note)
 
void setTune (float octaves)
 
 VoltsPerOctave (bool input=true)
 
 VoltsPerOctave (float offset, float multiplier)
 
float voltsToSample (float volts)
 

Static Public Member Functions

static float hertzToNote (float freq)
 
static float hertzToVolts (float hertz)
 
static float noteToHertz (float note)
 
static float voltsToHertz (float volts)
 

Data Fields

float multiplier
 
float offset
 

Detailed Description

Definition at line 11 of file VoltsPerOctave.h.

Constructor & Destructor Documentation

◆ VoltsPerOctave() [1/2]

VoltsPerOctave::VoltsPerOctave ( bool  input = true)

Definition at line 11 of file VoltsPerOctave.cpp.

References multiplier, and offset.

◆ VoltsPerOctave() [2/2]

VoltsPerOctave::VoltsPerOctave ( float  offset,
float  multiplier 
)

Definition at line 7 of file VoltsPerOctave.cpp.

Member Function Documentation

◆ getFrequency() [1/3]

float VoltsPerOctave::getFrequency ( float  sample)
inline

Definition at line 27 of file VoltsPerOctave.h.

References sampleToVolts(), and voltsToHertz().

Referenced by getFrequency().

◆ getFrequency() [2/3]

void VoltsPerOctave::getFrequency ( FloatArray  samples)

Definition at line 55 of file VoltsPerOctave.cpp.

References getFrequency().

◆ getFrequency() [3/3]

void VoltsPerOctave::getFrequency ( FloatArray  samples,
FloatArray  output 
)

Definition at line 37 of file VoltsPerOctave.cpp.

References ASSERT, getFrequency(), and SimpleArray< T >::getSize().

◆ getSample() [1/3]

float VoltsPerOctave::getSample ( float  frequency)
inline

Definition at line 30 of file VoltsPerOctave.h.

References hertzToVolts(), and voltsToSample().

Referenced by getSample().

◆ getSample() [2/3]

void VoltsPerOctave::getSample ( FloatArray  frequencies)

Definition at line 76 of file VoltsPerOctave.cpp.

References getSample().

◆ getSample() [3/3]

void VoltsPerOctave::getSample ( FloatArray  frequencies,
FloatArray  output 
)

Definition at line 59 of file VoltsPerOctave.cpp.

References ASSERT, getSample(), and SimpleArray< T >::getSize().

◆ hertzToNote()

static float VoltsPerOctave::hertzToNote ( float  freq)
inlinestatic

Definition at line 39 of file VoltsPerOctave.h.

◆ hertzToVolts()

static float VoltsPerOctave::hertzToVolts ( float  hertz)
inlinestatic

Definition at line 48 of file VoltsPerOctave.h.

Referenced by getSample().

◆ noteToHertz()

static float VoltsPerOctave::noteToHertz ( float  note)
inlinestatic

Definition at line 42 of file VoltsPerOctave.h.

◆ sampleToVolts()

float VoltsPerOctave::sampleToVolts ( float  sample)
inline

Definition at line 33 of file VoltsPerOctave.h.

References multiplier, and offset.

Referenced by getFrequency().

◆ setMidiNote()

void VoltsPerOctave::setMidiNote ( float  note)
inline

Definition at line 24 of file VoltsPerOctave.h.

◆ setTune()

void VoltsPerOctave::setTune ( float  octaves)
inline

Definition at line 21 of file VoltsPerOctave.h.

◆ voltsToHertz()

static float VoltsPerOctave::voltsToHertz ( float  volts)
inlinestatic

Definition at line 36 of file VoltsPerOctave.h.

Referenced by getFrequency().

◆ voltsToSample()

float VoltsPerOctave::voltsToSample ( float  volts)
inline

Definition at line 45 of file VoltsPerOctave.h.

References multiplier, and offset.

Referenced by getSample().

Field Documentation

◆ multiplier

float VoltsPerOctave::multiplier

Definition at line 16 of file VoltsPerOctave.h.

Referenced by sampleToVolts(), VoltsPerOctave(), and voltsToSample().

◆ offset

float VoltsPerOctave::offset

Definition at line 15 of file VoltsPerOctave.h.

Referenced by sampleToVolts(), VoltsPerOctave(), and voltsToSample().


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