Csound and CsoundAC API
5.17
|
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. More...
#include <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) |
CounterpointNode () | |
virtual Eigen::MatrixXd | 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) |
Returns a reference to the indicated element of the local transformation of coordinate system. | |
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 Eigen::MatrixXd | getLocalCoordinates () const |
Returns the local transformation of coordinate system. | |
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,...) |
void | message (const char *format, va_list valist) |
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 Eigen::MatrixXd &globalCoordinates) |
This function is called by the traverse() function. | |
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) |
Sets the indicated element of the local transformation of coordinate system. | |
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 Eigen::MatrixXd | traverse (const Eigen::MatrixXd &globalCoordinates, Score &score) |
The default implementation postconcatenates its own local coordinate system with the global coordinates, then passes the score and the product of coordinate systems to each child, thus performing a depth-first traversal of the music graph. | |
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) |
virtual | ~CounterpointNode () |
Static Public Attributes | |
static int | _Aeolian [12] |
static int | _Dorian [12] |
static int | _Ionian [12] |
static int | _Locrian [12] |
static int | _Lydian [12] |
static int | _Mixolydian [12] |
static int | _Phrygian [12] |
static int | BadMelodyInterval [13] |
static int | Dissonance [13] |
static int | ImperfectConsonance [13] |
static int | Indx [17] |
static boost::mt19937 | mersenneTwister |
static int | PerfectConsonance [13] |
Protected Attributes | |
Eigen::MatrixXd | localCoordinates |
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.
|
inherited |
|
inherited |
csound::CounterpointNode::CounterpointNode | ( | ) |
|
virtual |
|
inherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Reimplemented in csound::ChordLindenmayer, csound::Lindenmayer, csound::MusicModel, and csound::ScoreModel.
|
virtualinherited |
|
inherited |
|
inherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Returns a reference to the indicated element of the local transformation of coordinate system.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Returns the local transformation of coordinate system.
|
inherited |
|
virtualinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtual |
This function is called by the traverse() function.
The default implementation does nothing. If a derived node produces new Events, then it must transform them by the composite coordinates, then append them to the collecting score. If a derived node transforms Events produced by child Nodes, then it must transform only Events in the collecting score starting at the startAt index and continuing up to, but not including, the endAt index. These bookmarks, in turn, must be set in the Traverse function by all Nodes that produce events.
Reimplemented from csound::Node.
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
Sets the indicated element of the local transformation of coordinate system.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
The default implementation postconcatenates its own local coordinate system with the global coordinates, then passes the score and the product of coordinate systems to each child, thus performing a depth-first traversal of the music graph.
Reimplemented in csound::Koch, csound::Stack, csound::Intercut, csound::Hocket, and csound::Sequence.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Child Nodes, if any.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
int csound::CounterpointNode::generationMode |
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
int csound::CounterpointNode::musicMode |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
double csound::CounterpointNode::secondsPerPulse |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
int csound::CounterpointNode::species |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
std::vector<int> csound::CounterpointNode::voiceBeginnings |
size_t csound::CounterpointNode::voices |