diff options
Diffstat (limited to 'src/ui/App.jsx')
| -rw-r--r-- | src/ui/App.jsx | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/src/ui/App.jsx b/src/ui/App.jsx index fbbbd35..db3d762 100644 --- a/src/ui/App.jsx +++ b/src/ui/App.jsx @@ -6,7 +6,6 @@ import * as React from "react"; import { useState, useEffect, useRef } from "react"; import Relabi from "../relabi"; -import { Kalimba, Drums } from "../lib/instruments"; import Controls from "./Controls.jsx"; export default function App() { @@ -19,45 +18,43 @@ export default function App() { useEffect(() => { if (!relabi) { const relabiGenerator = new Relabi({ + settings: { + speed: 1.0, + feedback: 0.2, + }, waves: [ - { shape: "sine", frequency: 0.75 }, - { shape: "sine", frequency: 1.0 }, - { shape: "sine", frequency: 1.617 }, - { shape: "sine", frequency: 3.141 }, + { shape: "sine", frequency: 0.75, weight: 1 }, + { shape: "sine", frequency: 1.0, weight: 1 }, + { shape: "sine", frequency: 1.617, weight: 1 }, + { shape: "sine", frequency: 3.141, weight: 1 }, ], bounds: [ { - level: -0.75, - color: "#f33", - sounds: [ - { instrument: Drums, index: 0 }, - { instrument: Drums, index: 1 }, - ], - }, - { - level: 0.75, - color: "#f83", - sounds: [ - { instrument: Drums, index: 2 }, - { instrument: Drums, index: 3 }, - ], - }, - { level: -0.25, - color: "#3b8", - sounds: [ - { instrument: Kalimba, frequency: 440 }, - { instrument: Kalimba, frequency: (440 * 3) / 2 }, - ], + color: "#f33", + sounds: [{ instrument: "Kick" }, { instrument: "Snare" }], }, { level: 0.25, - color: "#36f", - sounds: [ - { instrument: Kalimba, frequency: (440 * 6) / 5 }, - { instrument: Kalimba, frequency: (440 * 6) / 7 }, - ], + color: "#f83", + sounds: [{ instrument: "Hat" }, { instrument: "Perc" }], }, + // { + // level: -0.25, + // color: "#3b8", + // sounds: [ + // { instrument: Kalimba, frequency: 440 }, + // { instrument: Kalimba, frequency: (440 * 3) / 2 }, + // ], + // }, + // { + // level: 0.25, + // color: "#36f", + // sounds: [ + // { instrument: Kalimba, frequency: (440 * 6) / 5 }, + // { instrument: Kalimba, frequency: (440 * 6) / 7 }, + // ], + // }, ], }); relabiGenerator.start(); |
