removing stuff

This commit is contained in:
2023-08-17 13:04:45 +02:00
parent 8541d0c3ef
commit ab482b38b2
5 changed files with 9 additions and 9 deletions

View File

@ -55,9 +55,6 @@
<p id="blinker-9" class="text-white text-5xl">•</p>
</div>
-->
<span id="clockviewer" class="font-mono font-semibold mr-6 py-1 bg-white text-black rounded align-center text-normal px-2">
Clock
</span>
<a id="play-button-1" class="mr-5">
<svg class="w-8 h-8" fill="currentColor" viewBox="0 0 14 16">
<path d="M0 .984v14.032a1 1 0 0 0 1.506.845l12.006-7.016a.974.974 0 0 0 0-1.69L1.506.139A1 1 0 0 0 0 .984Z"/>

View File

@ -1003,6 +1003,7 @@ export class UserAPI {
length: number,
rotate: number = 0
): boolean[] {
if (pulses == length) return Array.from({ length }, () => true);
function startsDescent(list: number[], i: number): boolean {
const length = list.length;
const nextIndex = (i + 1) % length;
@ -1199,7 +1200,7 @@ export class UserAPI {
sound = (sound: string) => {
return new Sound(sound);
return new Sound(sound, this.app);
}
samples = samples;

View File

@ -45,7 +45,7 @@ export class Clock {
this.time_signature = [4, 4];
this.tick = 0;
this.bpm = 120;
this.ppqn = 48;
this.ppqn = 24;
this.transportNode = null;
this.ctx = ctx;
ctx.audioWorklet.addModule(TransportProcessor).then((e) => {

View File

@ -1,3 +1,5 @@
import { type Editor } from './main';
import {
superdough,
// @ts-ignore
@ -7,7 +9,7 @@ export class Sound {
values: { [key: string]: any }
constructor(sound: string) {
constructor(sound: string, public app: Editor) {
this.values = { 's': sound }
}
@ -162,6 +164,6 @@ export class Sound {
}
out = (): object => {
return superdough(this.values, 0.0);
return superdough(this.values, this.app.clock.pulse_duration);
}
}

View File

@ -37,7 +37,7 @@ export class TransportNode extends AudioWorkletNode {
setTimeout(() => {
const now = performance.now();
this.app.clock.time_position = futureTimeStamp;
this.$clock.innerHTML = `[${futureTimeStamp.bar}:${futureTimeStamp.beat}:${zeroPad(futureTimeStamp.pulse, '2')}]`;
// this.$clock.innerHTML = `[${futureTimeStamp.bar}:${futureTimeStamp.beat}:${zeroPad(futureTimeStamp.pulse, '2')}]`;
tryEvaluate(
this.app,
this.app.global_buffer,
@ -66,7 +66,7 @@ export class TransportNode extends AudioWorkletNode {
this.startTime = null;
this.elapsedTime = null;
this.app.clock.tick = 0;
this.$clock.innerHTML = `[${1} | ${1} | ${zeroPad(1, '2')}]`;
// this.$clock.innerHTML = `[${1} | ${1} | ${zeroPad(1, '2')}]`;
this.port.postMessage("stop");
}