captbaritone / butterchurn

Butterchurn is a WebGL implementation of the Milkdrop Visualizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Butterchurn

Butterchurn is a WebGL implementation of the Milkdrop Visualizer

Screenshot of Butterchurn

Usage

Installation

With yarn or npm installed, run

$ yarn add butterchurn butterchurn-presets

Create a visualizer

import butterchurn from 'butterchurn';
import butterchurnPresets from 'butterchurn-presets';

// initialize audioContext and get canvas

const visualizer = butterchurn.createVisualizer(audioContext, canvas, {
  width: 800,
  height: 600
});

// get audioNode from audio source or microphone

visualizer.connectAudio(audioNode);

// load a preset

const presets = butterchurnPresets.getPresets();
const preset = presets['Flexi, martin + geiss - dedicated to the sherwin maxawow'];

visualizer.loadPreset(preset, 0.0); // 2nd argument is the number of seconds to blend presets

// resize visualizer

visualizer.setRendererSize(1600, 1200);

// render a frame

visualizer.render();

Thanks

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Butterchurn is a WebGL implementation of the Milkdrop Visualizer

License:MIT License


Languages

Language:JavaScript 100.0%