adding more documentation

This commit is contained in:
2023-08-20 00:50:07 +02:00
parent c8090b4137
commit a0dfd126ab
3 changed files with 103 additions and 35 deletions

View File

@ -76,6 +76,23 @@ export class UserAPI {
return this.app.audioContext.currentTime;
};
public play = (): void => {
this.app.setButtonHighlighting("play", true);
this.app.clock.start();
};
public pause = (): void => {
this.app.setButtonHighlighting("pause", true);
this.app.clock.pause();
};
public stop = (): void => {
this.app.setButtonHighlighting("stop", true);
this.app.clock.stop();
};
silence = this.stop;
hush = this.stop;
// =============================================================
// Mouse functions
// =============================================================
@ -801,19 +818,6 @@ export class UserAPI {
return final_pulses.some((p) => p == true);
};
stop = (): void => {
/**
* Stops the clock.
*
* @see silence
* @see hush
*/
this.app.clock.pause();
this.app.setButtonHighlighting("pause", true);
};
silence = this.stop;
hush = this.stop;
prob = (p: number): boolean => {
/**
* Returns true p% of the time.