First try

This commit is contained in:
2023-08-29 16:08:11 +03:00
parent 9e993e8579
commit 6b7517ea4d
7 changed files with 105 additions and 64 deletions

View File

@ -65,7 +65,7 @@ export class Player extends Event {
}
atTheBeginning = (): boolean => {
return this.pulse()===0 && this.ziffers.index===0;
return this.ziffers.index===0;
}
origin = (): number => {
@ -76,6 +76,10 @@ export class Player extends Event {
return this.app.clock.time_position.pulse;
}
beat = (): number => {
return this.app.clock.time_position.beat;
}
nextBeat = (): number => {
return this.app.clock.next_beat_in_ticks;
}
@ -150,24 +154,25 @@ export class Player extends Event {
}
scale(name: string) {
this.ziffers.scale(name);
if(this.atTheBeginning()) this.ziffers.scale(name);
return this;
}
key(name: string) {
this.ziffers.key(name);
if(this.firstRun() || this.atTheBeginning()) {
console.log("At", this.app.clock.time_position);
this.ziffers.key(name);
}
return this;
}
octave(value: number) {
this.ziffers.octave(value);
if(this.atTheBeginning()) this.ziffers.octave(value);
return this;
}
retrograde() {
if(this.index === -1 && this.ziffers.index === -1) {
this.ziffers.retrograde();
}
if(this.atTheBeginning()) this.ziffers.retrograde();
return this;
}