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

csound::CounterpointNode Class Reference

#include <CounterpointNode.hpp>

Inheritance diagram for csound::CounterpointNode:

csound::Node

List of all members.


Detailed Description

Uses Bill Schottstaedt's species counterpoint generator code to either (a) generate a counterpoint in species 1, 2, or 3 for a cantus firmus selected from notes generated by child nodes, or (b) attempt to correct the voice leading for species 1, 2, or 3 counterpoint in notes generated by child nodes.

Definition at line 52 of file CounterpointNode.hpp.


Public Types

enum  { MostNotes_ = 128, MostVoices_ = 12 }
enum  {
  Unison = 0, MinorSecond = 1, MajorSecond = 2, MinorThird = 3,
  MajorThird = 4, Fourth = 5, Tritone = 6, Fifth = 7,
  MinorSixth = 8, MajorSixth = 9, MinorSeventh = 10, MajorSeventh = 11,
  Octave = 12
}
enum  {
  Aeolian = 1, Dorian = 2, Phrygian = 3, Lydian = 4,
  Mixolydian = 5, Ionian = 6, Locrian = 7
}
enum  { DirectMotion = 1, ContraryMotion = 2, ObliqueMotion = 3, NoMotion = 4 }
enum  {
  WholeNote = 8, HalfNote = 4, DottedHalfNote = 6, QuarterNote = 2,
  DottedQuarterNote = 3, EighthNote = 1
}
enum  {
  One = 0, Two = 2, Three = 3, Four = 4,
  Five = 5, Six = 6, Eight = 8
}
enum  { infinity = 1000000, Bad = 100, RealBad = 200 }
enum  { INTERVALS_WITH_BASS_SIZE = 8 }
enum  { NumFields = 16, Field = (MostVoices_+1), EndF = (Field*NumFields) }
enum  { GenerateCounterpoint = 0, CorrectCounterpoint = 1 }

Public Member Functions

int ABS (int i)
virtual void addChild (Node *node)
void AddInterval (int n)
int ADissonance (int Interval, int Cn, int Cp, int v, int Species)
int AnOctave (int Interval)
void AnySpecies (int OurMode, int *StartPitches, int CurV, int CantusFirmusLength, int Species)
void ARRBLT (int *dest, int *source, int num)
int ASeventh (int Interval)
int ASkip (int Interval)
int AStep (int Interval)
int ATenth (int Interval)
int AThird (int Interval)
int BadMelody (int Intv)
int Bass (int Cn, int v)
int Beat8 (int n)
void BestFitFirst (int CurTime, int CurrentPenalty, int NumParts, int Species, int BrLim)
int Cantus (int n, int v)
int Check (int Cn, int Cp, int v, int NumParts, int Species, int CurLim)
void CleanRhy ()
virtual void clear ()
virtual void clear ()
int ConsecutiveSkipsInSameDirection (int Pitch1, int Pitch2, int Pitch3)
void counterpoint (int OurMode, int *StartPitches, int CurV, int CantusFirmusLength, int Species, int *cantus)
virtual ublas::matrix< double > createTransform ()
int CurRhy (int n)
int DirectMotionToPerfectConsonance (int Pitch1, int Pitch2, int Pitch3, int Pitch4)
int Doubled (int Pitch, int Cn, int v)
int DownBeat (int n, int v)
virtual double & element (size_t row, size_t column)
int ExtremeRange (int Pitch)
void fillCantus (int c0, int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8, int c9, int c10, int c11, int c12, int c13, int c14)
void FillRhyPat ()
int FirstNote (int n, int v)
virtual ublas::matrix< double > getLocalCoordinates () const
int GoodRhy ()
virtual void initialize (int mostnotes, int mostvoices)
int InMode (int Pitch, int Mode)
int LastNote (int n, int v)
int Look (int CurPen, int CurVoice, int NumParts, int Species, int Lim, int *Pens, int *Is, int *CurNotes)
int MAX (int a, int b)
void message (const char *format, va_list valist)
void message (const char *format,...)
int MIN (int a, int b)
int MotionType (int Pitch1, int Pitch2, int Pitch3, int Pitch4)
int NextToLastNote (int n, int v)
int Other (int Cn, int v, int v1)
int OtherVoiceCheck (int Cn, int Cp, int v, int NumParts, int Species, int CurLim)
int OutOfRange (int Pitch)
int PitchRepeats (int Cn, int Cp, int v)
virtual void produceOrTransform (Score &score, size_t beginAt, size_t endAt, const ublas::matrix< double > &globalCoordinates)
float RANDOM (float amp)
int SaveIndx (int indx, int *Sp)
void SaveResults (int CurrentPenalty, int Penalty, int v1, int Species)
virtual void setElement (size_t row, size_t column, double value)
void SetUs (int n, int p, int v)
int Size (int MelInt)
int SpecialSpeciesCheck (int Cn, int Cp, int v, int Other0, int Other1, int Other2, int NumParts, int Species, int MelInt, int Interval, int ActInt, int LastIntClass, int Pitch, int LastMelInt, int CurLim)
void toCsoundScore (std::string filename, double secondsPerPulse)
int TooMuchOfInterval (int Cn, int Cp, int v)
int TotalRange (int Cn, int Cp, int v)
virtual ublas::matrix< double > traverse (const ublas::matrix< double > &globalCoordinates, Score &score)
int UpBeat (int n, int v)
int Us (int n, int v)
void UsedRhy (int n)
int VIndex (int Time, int VNum)
void winners (int v1, int *data, int *best, int *best1, int *best2, int *durs)

Public Attributes

int AllDone
int AllVoicesSkipPenalty
int AscendingSixthPenalty
int AugmentedIntervalPenalty
int BadCadencePenalty
int BadMelodyPenalty
int BasePitch
boost::numeric::ublas::matrix
< int > 
BestFit
boost::numeric::ublas::matrix
< int > 
BestFit1
boost::numeric::ublas::matrix
< int > 
BestFit2
int BestFitPenalty
int Branches
std::vector< Node * > children
int CompoundPenalty
int CrossAboveCantusPenalty
int CrossBelowBassPenalty
boost::numeric::ublas::matrix
< int > 
Ctrpt
int DirectMotionPenalty
int DirectPerfectOnDownbeatPenalty
int DirectToFifthPenalty
int DirectToOctavePenalty
int DirectToTritonePenalty
int DissonanceNotFillingThirdPenalty
int DissonancePenalty
int DoubledFifthPenalty
int DoubledLeadingTonePenalty
int DoubledSixthPenalty
int DownBeatUnisonPenalty
boost::numeric::ublas::matrix
< int > 
Dur
int EighthJumpPenalty
int EndOnPerfectPenalty
int ExtremeRangePenalty
int FifthFollowedBySameDirectionPenalty
int FifthPrecededBySameDirectionPenalty
int Fits [3]
int FourRepeatedNotesPenalty
int generationMode
int HalfUntiedPenalty
int HighestSemitone
int InnerVoicesInDirectToPerfectPenalty
int InnerVoicesInDirectToTritonePenalty
int IntervalsWithBass [INTERVALS_WITH_BASS_SIZE]
int LeapAtCadencePenalty
int LesserLigaturePenalty
int LowerNeighborPenalty
int LowestSemitone
int LydianCadentialTritonePenalty
int MaxPenalty
int MelodicBoredomPenalty
int MelodicTritonePenalty
void(* messageCallback )(CSOUND *csound, int attribute, const char *format, va_list valist)
int Mode
int MostNotes
int MostVoices
int musicMode
int NoLeadingTonePenalty
int NoMotionAgainstOctavePenalty
int NotaCambiataPenalty
int NotaLigaturePenalty
int NotBestCadencePenalty
int NotContraryToOthersPenalty
int NoTimeForaLigaturePenalty
int NotTriadPenalty
int OctaveLeapPenalty
boost::numeric::ublas::matrix
< int > 
Onset
int OutOfModePenalty
int OutOfRangePenalty
int OverOctavePenalty
int OverTwelfthPenalty
int ParallelFifthPenalty
int ParallelUnisonPenalty
float PenaltyRatio
int PerfectConsonancePenalty
long randx
int RepeatedPitchPenalty
int RepetitionOnUpbeatPenalty
boost::numeric::ublas::vector
< int > 
RhyNotes
boost::numeric::ublas::matrix
< int > 
RhyPat
double secondsPerPulse
int SixFiveChordPenalty
int SixthFollowedBySameDirectionPenalty
int SixthLeapPenalty
int SixthPrecededBySameDirectionPenalty
int SkipFollowedBySameDirectionPenalty
int SkipFromUnisonPenalty
int SkipPrecededBySameDirectionPenalty
int SkipTo8vePenalty
int SkipToDownBeatPenalty
int species
int TenthToOctavePenalty
int ThirdDoubledPenalty
int ThreeRepeatedNotesPenalty
int ThreeSkipsPenalty
boost::numeric::ublas::vector
< int > 
TotalNotes
int TotalTime
int TripledBassPenalty
int TwoRepeatedNotesPenalty
int TwoSkipsNotInTriadPenalty
int TwoSkipsPenalty
boost::variate_generator
< boost::mt19937,
boost::uniform_real<> > * 
uniform_real_generator
int UnisonDownbeatPenalty
int UnisonOnBeat4Penalty
int UnisonPenalty
int UnisonUpbeatPenalty
int UnpreparedSixFivePenalty
int UnresolvedLeadingTonePenalty
int UnresolvedLigaturePenalty
int UnresolvedSixFivePenalty
int UpperNeighborPenalty
int UpperVoicesTooFarApartPenalty
boost::numeric::ublas::vector
< int > 
vbs
int VerticalTritonePenalty
std::vector< int > voiceBeginnings
size_t voices

Static Public Attributes

static int _Aeolian [12] = {1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0}
static int _Dorian [12] = {1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0}
static int _Ionian [12] = {1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1}
static int _Locrian [12] = {1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0}
static int _Lydian [12] = {1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1}
static int _Mixolydian [12] = {1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0}
static int _Phrygian [12] = {1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0}
static int BadMelodyInterval [13] = {0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0}
static int Dissonance [13] = {0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0}
static int ImperfectConsonance [13] = {0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0}
static int Indx [17] = {0, 1, -1, 2, -2, 3, -3, 0, 4, -4, 5, 7, -5, 8, 12, -7,-12}
static boost::mt19937 mersenneTwister
static int PerfectConsonance [13] = {1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}

Protected Attributes

ublas::matrix< double > localCoordinates

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

Generated by  Doxygen 1.6.0   Back to index