Picture-driven synthesis for the web. Maps color and light into pitch, timing, and texture through scanning and musical rules.
Install
·
Usage
·
API
npm install audioraMinimal HTML shell for live playback (two canvases + a play gesture):
<canvas id="map_canvas" width="640" height="360"></canvas>
<canvas id="wave_canvas" width="640" height="80"></canvas>
<button id="play">Play</button>
<script type="module">
import { Audiora, PRESETS } from "audiora";
const audiora = new Audiora({
waveCanvas: document.getElementById("wave_canvas"),
mapCanvas: document.getElementById("map_canvas"),
});
await audiora.loadImage("/photo.jpg");
audiora.applyParams(PRESETS.Haze, { tween: false });
document.getElementById("play").onclick = () => audiora.play();
// offline WAV — no play() needed; renders via OfflineAudioContext
const blob = await audiora.toBlob({ params: PRESETS.Bite, duration: 12 });
</script>See the API reference for constructors, params, presets, scan modes, and TypeScript types.
