Logo Search packages:      
Sourcecode: csound version File versions  Download package

csound::Conversions Class Reference

#include <Conversions.hpp>

List of all members.

Detailed Description

Conversions to and from various music and signal processing units. Note that: silence::Event represents loudness in MIDI units (0 to 127). silence::Orchestra represents loudness in gain (0 to 1). silence::WaveSoundfileOut represents loudness in amplitude (0 to 1 for float samples, 0 to 32767 for short samples). Loudness can also be represented in positive decibels (0 to 84 for short samples, 0 to whatever for float samples). For float samples, decibels are assumed to be equivalent to MIDI velocity; otherwise, MIDI velocity is rescaled according to the maximum dynamic range supported by the sample size. All loudness conversions are driven by sample word size, which must be set before use; the default is 4 (float samples).

Definition at line 58 of file Conversions.hpp.

Static Public Member Functions

static double amplitudeToDecibels (double amplitude)
static double amplitudeToGain (double Amplitude)
static double amplitudeToMidi (double Amplitude)
static std::string boolToString (bool value)
static double decibelsToAmplitude (double decibels)
static double decibelsToMidi (double decibels)
static std::string doubleToString (double value)
static char * dupstr (const char *string)
static double findClosestPitchClass (double M, double pitchClass, double tones=12.0)
static double gainToAmplitude (double Gain)
static double gainToDb (double inputDb, double gain, bool odbfs=false)
static double get2PI (void)
static double getMaximumAmplitude (int size)
static double getMaximumDynamicRange ()
static double getMiddleCHz (void)
static double getNORM_7 (void)
static double getPI (void)
static int getSampleSize (void)
static double hzToMidi (double Hz, bool rounded)
static double hzToOctave (double Hz)
static double hzToSamplingIncrement (double Hz, double SR, double SamplesPerCycle)
static bool initialize ()
static std::string intToString (int value)
static double leftPan (double x)
static double midiToAmplitude (double Midi)
static double midiToDecibels (double Midi)
static double midiToGain (double Midi)
static double midiToHz (double Midi)
static double midiToOctave (double Midi)
static double midiToPitchClass (double midiKey)
static double midiToPitchClassSet (double midiKey)
static double midiToRoundedOctave (double midiKey)
static double midiToSamplingIncrement (double Midi, double SR, double SamplesPerCycle)
static double modulus (double a, double b)
static std::string mToName (double pitchClassSet)
static double nameToM (std::string name)
static std::vector< double > nameToPitches (std::string name)
static double octaveToHz (double Octave)
static double octaveToMidi (double Octave, bool rounded)
static double octaveToSamplingIncrement (double Octave, double SR, double SamplesPerCycle)
static double phaseToTableLengths (double Phase, double TableSampleCount)
static double pitchClassSetToMidi (double pitchClassSet)
static double pitchClassToMidi (double pitchClass)
static double rightPan (double x)
static const double round (double value)
static bool stringToBool (std::string value)
static double stringToDouble (std::string value)
static int stringToInt (std::string value)
static int swapInt (int Source)
static short swapShort (short Source)
static double temper (double octave, double tonesPerOctave)
static std::string & trim (std::string &value)
static std::string & trimQuotes (std::string &value)

Static Private Member Functions

static void fill (char *cname, char *cpitches)
static std::string listPitchClassSets ()
static void subfill (std::string root, char *cname, double pcs)

Static Private Attributes

static const double floatMaximumAmplitude = 32767.0
static bool initialized_ = false
static const double log10d20 = log(10.0) / 20.0
static const double log10scale = 1.0 / log(10.0)
static const double middleCHz = 261.6256
static std::map< double,
std::string > 
static const double NORM_7_ = 1.0 / 127.0
static const double PI_ = atan(1.0) * 4.0
static std::map< std::string,
double > 
static int sampleSize = 4
static const double TWO_PI_ = atan(1.0) * 8.0

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

Generated by  Doxygen 1.6.0   Back to index