tweaking defaults
This commit is contained in:
@ -26,7 +26,11 @@ import {
|
|||||||
} from "superdough";
|
} from "superdough";
|
||||||
import { Speaker } from "./StringExtensions";
|
import { Speaker } from "./StringExtensions";
|
||||||
import { getScaleNotes } from "zifferjs";
|
import { getScaleNotes } from "zifferjs";
|
||||||
import { OscilloscopeConfig, blinkScript } from "./AudioVisualisation";
|
import {
|
||||||
|
OscilloscopeConfig,
|
||||||
|
blinkScript,
|
||||||
|
runOscilloscope,
|
||||||
|
} from "./AudioVisualisation";
|
||||||
|
|
||||||
interface ControlChange {
|
interface ControlChange {
|
||||||
channel: number;
|
channel: number;
|
||||||
|
|||||||
@ -141,6 +141,7 @@ export const runOscilloscope = (
|
|||||||
const HEIGHT = canvas.height;
|
const HEIGHT = canvas.height;
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
|
requestAnimationFrame(draw);
|
||||||
if (!app.osc.enabled) {
|
if (!app.osc.enabled) {
|
||||||
canvasCtx.clearRect(0, 0, WIDTH, HEIGHT);
|
canvasCtx.clearRect(0, 0, WIDTH, HEIGHT);
|
||||||
return;
|
return;
|
||||||
@ -152,7 +153,6 @@ export const runOscilloscope = (
|
|||||||
dataArray = new Float32Array(analyzer.frequencyBinCount);
|
dataArray = new Float32Array(analyzer.frequencyBinCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
requestAnimationFrame(draw);
|
|
||||||
analyzer.getFloatTimeDomainData(dataArray);
|
analyzer.getFloatTimeDomainData(dataArray);
|
||||||
|
|
||||||
canvasCtx.fillStyle = "rgba(0, 0, 0, 0)";
|
canvasCtx.fillStyle = "rgba(0, 0, 0, 0)";
|
||||||
|
|||||||
@ -62,10 +62,10 @@ export class Editor {
|
|||||||
osc: OscilloscopeConfig = {
|
osc: OscilloscopeConfig = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
color: "#fdba74",
|
color: "#fdba74",
|
||||||
thickness: 2,
|
thickness: 4,
|
||||||
fftSize: 2048,
|
fftSize: 256,
|
||||||
orientation: "horizontal",
|
orientation: "horizontal",
|
||||||
is3D: true,
|
is3D: false,
|
||||||
size: 1,
|
size: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user