Typedefs | Functions | Variables

/Users/garethloy/Musimathics/Musimat1.2/include/Musimat.h File Reference

Declarations of Musimat datatypes and global functions. More...

#include "Aliases.h"
#include "MathFuns.h"
#include "Complex.h"
#include "List.h"
#include "Matrix.h"
#include "Rational.h"
#include "Rhythm.h"
#include "Pitch.h"
#include "Random.h"
#include "Dynamics.h"
#include "Pitches.h"
#include "Row.h"

Go to the source code of this file.

Typedefs

typedef List< IntegerIntegerList
 A List of type Integer.
typedef List< RealRealList
 A List of type Real.
typedef List< StringStringList
 A List of type String.
typedef List< ComplexComplexList
 A List of complex values.
typedef List< PitchPitchList
 A List of type Pitch.
typedef List< RationalRationalList
 A List of type Rational.
typedef List< RhythmRhythmList
 A List of type Rhythm.
typedef Matrix< IntegerIntegerMatrix
 A Matrix of type Integer.
typedef Matrix< RealRealMatrix
 A Matrix of type Real.
typedef Matrix< StringStringMatrix
 A Matrix of type String.
typedef Matrix< ComplexComplexMatrix
 A Matrix of complex values.
typedef Matrix< PitchPitchMatrix
 A Matrix of type Pitch.
typedef Matrix< RationalRationalMatrix
 A Matrix of type Rational.
typedef Matrix< RhythmRhythmMatrix
 A Matrix of type Rhythm.

Functions

template<class ListType >
Real Max (ListType L)
 Maximum value of List L.
Complex Max (ComplexList L)
template<class ListType >
Integer MaxPos (ListType L)
 Index of the maximum value of List L.
template<class Type >
Real Min (Type L)
 Minimum value of list L.
Complex Min (ComplexList L)
template<class Type >
Integer MinPos (Type L)
 Index of the minimum value of list L.
template<class Type >
Void Print (Type i)
 Global print function.
template<class Type >
Void Print (String s, Type i)
 Global print function with prefix string.
Integer Length (RhythmList Reference L)
 Length of a ComplexList.
Integer Length (String s)
 String length.
RationalList RealListToRationalList (RealList R)
 Convert a RealList to a RationalList.
PitchList IntegerListToPitchList (IntegerList Reference L)
 Convert an IntegerList to a PitchList.
IntegerList PitchListToIntegerList (PitchList Reference P)
 Convert a PitchList to an IntegerList.

Variables

Const Real Pi
 Pi computed to the machine precision of a Real.

Detailed Description

Declarations of Musimat datatypes and global functions.

Definition in file Musimat.h.


Function Documentation

PitchList IntegerListToPitchList ( IntegerList Reference  L ) [inline]

Convert an IntegerList to a PitchList.

Parameters:
LIntegerList
Returns:
PitchList

Definition at line 166 of file Musimat.h.

References For, Length(), P, and Return.

{
        PitchList P;
        For( Integer i = 0; i < Length( L ); i++ )
                P[i] = L[i];
        Return P;
}
IntegerList PitchListToIntegerList ( PitchList Reference  P ) [inline]

Convert a PitchList to an IntegerList.

Parameters:
PPitchList
Returns:
IntegerList

Definition at line 177 of file Musimat.h.

References For, Length(), and Return.

{
        IntegerList L;
        For( Integer i = 0; i < Length( P ); i++ )
                L[i] = P[i];
        Return L;
}
RationalList RealListToRationalList ( RealList  R )

Convert a RealList to a RationalList.

Parameters:
RRealList
Returns:
RationalList

Definition at line 36 of file Rational.cpp.

References For, Length(), and Return.

{
        RationalList L;
        For (Integer i = 0; i < Length( R ); i++ ) {
                Rational x(R[i]);
                L[i] = x;
        }
        Return( L );
}

Variable Documentation

Const Real Pi

Pi computed to the machine precision of a Real.

Pi computed to the machine precision of a Real.

Always works to the precision of your hardware.

Definition at line 26 of file MathFuns.h.