Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

Commit 1caef90

Browse files
committed
1 parent a27f42b commit 1caef90

File tree

7 files changed

+384
-15
lines changed

7 files changed

+384
-15
lines changed

CsoundAC/ChordSpace.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,18 +3221,39 @@ class SILENCE_PUBLIC ChordSpaceGroup {
32213221
* Number of voices in the chord space.
32223222
*/
32233223
int N;
3224+
virtual int getN() const {
3225+
return N;
3226+
}
32243227
/**
32253228
* The generator of transposition.
32263229
*/
32273230
double g;
3231+
virtual int getG() const {
3232+
return g;
3233+
}
32283234
/**
32293235
* The zero-based range of the chord space.
32303236
*/
32313237
double range;
3238+
virtual int getRange() const {
3239+
return range;
3240+
}
32323241
int countP;
3242+
virtual int getCountP() const {
3243+
return countP;
3244+
}
32333245
int countI;
3246+
virtual int getCountI() const {
3247+
return countI;
3248+
}
32343249
int countT;
3250+
virtual int getCountT() const {
3251+
return countT;
3252+
}
32353253
int countV;
3254+
virtual int getCountV() const {
3255+
return countV;
3256+
}
32363257
/**
32373258
* Ordered table of all OPTTI chords for g.
32383259
*/

CsoundAC/CounterpointNode.hpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,47 @@ class SILENCE_PUBLIC CounterpointNode :
5959
CorrectCounterpoint = 1
6060
};
6161
int generationMode;
62+
virtual int getGenerationMode() const {
63+
return generationMode;
64+
}
65+
virtual void setGenerationMode(int value) {
66+
generationMode = value;
67+
}
6268
int musicMode;
69+
virtual int getMusicMode() const {
70+
return musicMode;
71+
}
72+
virtual void setMusicMode(int value) {
73+
musicMode = value;
74+
}
6375
int species;
76+
virtual int getSpecies() const {
77+
return species;
78+
}
79+
virtual void setSpecies(int value) {
80+
species = value;
81+
}
6482
size_t voices;
83+
virtual size_t getVoices() const {
84+
return voices;
85+
}
86+
virtual void setVoices(size_t value) {
87+
voices = value;
88+
}
6589
double secondsPerPulse;
90+
virtual double getSecondsPerPulse() const {
91+
return secondsPerPulse;
92+
}
93+
virtual void setSecondsPerPulse(double value) {
94+
secondsPerPulse = value;
95+
}
6696
std::vector<int> voiceBeginnings;
97+
virtual std::vector<int> &getVoiceBeginnings() {
98+
return voiceBeginnings;
99+
}
100+
virtual void setVoiceBeginnings(const std::vector<int> &value) {
101+
voiceBeginnings = value;
102+
}
67103
CounterpointNode();
68104
virtual ~CounterpointNode();
69105
virtual void transform(Score &score);

CsoundAC/Score.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,23 @@ void Score::initialize(void)
564564
rescaleRanges[Event::HOMOGENEITY] = false;
565565
}
566566

567+
void Score::append_note(double time_, double duration, double status, double instrument, double key, double velocity, double phase, double pan, double depth, double height, double pitches) {
568+
{
569+
Event event;
570+
event.setTime(time_);
571+
event.setDuration(duration);
572+
event.setStatus(status);
573+
event.setInstrument(instrument);
574+
event.setKey(key);
575+
event.setVelocity(velocity);
576+
event.setPhase(phase);
577+
event.setPan(pan);
578+
event.setDepth(depth);
579+
event.setHeight(height);
580+
event.setPitches(pitches);
581+
push_back(event);
582+
}
583+
567584
void Score::append(double time_, double duration, double status, double instrument, double key, double velocity, double phase, double pan, double depth, double height, double pitches)
568585
{
569586
Event event;
@@ -581,6 +598,11 @@ void Score::append(double time_, double duration, double status, double instrume
581598
push_back(event);
582599
}
583600

601+
void Score::append_event(Event event)
602+
{
603+
push_back(event);
604+
}
605+
584606
void Score::append(Event event)
585607
{
586608
push_back(event);

CsoundAC/Score.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class SILENCE_PUBLIC Score :
6666
virtual ~Score();
6767
virtual void initialize();
6868
virtual void append(Event event);
69+
virtual void append_event(Event event);
6970
virtual void append(double time, double duration, double status, double channel, double key, double velocity, double phase=0, double pan=0, double depth=0, double height=0, double pitches=4095);
71+
virtual void append_note(double time, double duration, double status, double channel, double key, double velocity, double phase=0, double pan=0, double depth=0, double height=0, double pitches=4095);
7072
virtual void remove(size_t index);
7173
/**
7274
* Loads score data from a MIDI (.mid) file,

0 commit comments

Comments
 (0)