diff --git a/index.html b/index.html index 6398251..fce506d 100644 --- a/index.html +++ b/index.html @@ -46,13 +46,10 @@ - + - Topos - - diff --git a/src/Documentation.ts b/src/Documentation.ts index 60dc92b..25b6ed4 100644 --- a/src/Documentation.ts +++ b/src/Documentation.ts @@ -509,8 +509,7 @@ divbar(2) `, false)}; -- onbar(n: number, ...bar: number[]): The first argument, n, is used to divide the time in a period of n consecutive bars. The following arguments are bar numbers to play on. For example, onbar(5, 1, 4) will return true on bar 1 and 4 but return false the rest of the time. You can easily divide time that way. - +- onbar(bars: number | number[], n: number): The second argument, n, is used to divide the time in a period of n consecutive bars. The first argument should be a bar number or a list of bar numbers to play on. For example, onbar([1, 4], 5) will return true on bar 1 and 4 but return false the rest of the time. You can easily divide time that way. ${makeExample( "Using onbar for filler drums", @@ -519,7 +518,7 @@ ${makeExample( onbar(4, 4)::mod(.5)::snd('hh').out(); // Here comes a longer version using JavaScript normal control flow -if (onbar(4, 1, 3)) { +if (onbar([4, 1], 3)) { mod(1)::snd('kick').out(); } else { mod(.5)::snd('sd').out(); diff --git a/src/main.ts b/src/main.ts index 0c91885..cde96bf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -91,6 +91,9 @@ export class Editor { public _mouseX: number = 0; public _mouseY: number = 0; + // Topos Logo + topos_logo: HTMLElement = document.getElementById('topos-logo') as HTMLElement; + // Transport elements play_buttons: HTMLButtonElement[] = [ document.getElementById("play-button-1") as HTMLButtonElement, @@ -398,6 +401,12 @@ export class Editor { }); } + this.topos_logo.addEventListener("click", () => { + this.hideDocumentation(); + this.updateKnownUniversesView(); + this.openBuffersModal(); + }) + this.play_buttons.forEach((button) => { button.addEventListener("click", () => { if (this.isPlaying) {