ilambda / lsdj-wave-cruncher Goto Github PK
View Code? Open in Web Editor NEWTurns a sound clip into a LSDJ wavetable synth.
License: MIT License
Turns a sound clip into a LSDJ wavetable synth.
License: MIT License
I just tested this and it seems doable to add a method to auto-detect the frequency of a wav file. This was the code I used and it requires fs, node-wav, and pitchfinder
const fs = require("fs");
const wav = require("node-wav");
const Pitchfinder = require("pitchfinder");
// see below for optional constructor parameters.
const detectPitch = new Pitchfinder.YIN();
const buffer = fs.readFileSync("PATH_TO_WAV");
const decoded = wav.decode(buffer); // get audio data from file using `wav-decoder`
const float32Array = decoded.channelData[0]; // get a single channel of sound
const pitch = detectPitch(float32Array); // null if pitch cannot be identified
console.log("Frequency detected: " + parseFloat(pitch) + " Hz")
The API should be installable using npm and runnable as a command line :
$ lsdjcrunch crunch ...options
$ lsdjcrunch patch ...options
$ lsdjcrunch crunch-patch ...options
$ lsdjcrunch export ...options
Also, commands should have a --output
or -o
option for the output file. If not provided, the output file should be piped to stdout
const output = (file: Stream, options) {
file
.pipe(options.output ? fs.createWriteStream(options.output) : process.stdout)
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.