@sonoscope/halftone-spectrogram
v0.2.0
Published
Halftone dot-matrix shader program plugin for Sonoscope WebGL2 spectrogram renderer.
Maintainers
Readme
@sonoscope/halftone-spectrogram
Halftone dot-matrix WebGL2 shader program plugin for Sonoscope.
Renders spectrogram energy as dynamic retro halftone dots directly on the GPU.
Installation
npm install @sonoscope/halftone-spectrogram @sonoscope/coreUsage
import "@sonoscope/halftone-spectrogram/auto";
import { Sonoscope } from "@sonoscope/core";
const scope = new Sonoscope({ source });
scope.createSpectrogram(canvas, {
renderer: { type: "webgl", program: "halftone" },
});Options
| Option | Type | Default | Description |
|---|---|---|---|
| dotFrequency | number | 0.24 | Density of the dot matrix |
| minEnergyThreshold | number | 0 | Energy floor for rendering dots |
| energyGamma | number | 1.4 | Falloff gamma curve |
License
MIT
