sicklincoln / mmll Goto Github PK
View Code? Open in Web Editor NEWA javascript Musical Machine Listening Library
License: Other
A javascript Musical Machine Listening Library
License: Other
Hi, I suggest you to create a README.md written in markdown with some guidelines and create a website for the examples, so people can see your library in action before deciding to clone it.
Bye!
Hi I was trying on the onset detection, which seems pretty decent BTW. I was running it offline, just piping in some mono PCM. Essentially I want to auto slice some samples based on their onsets. On all three of the samples I found that it found the peaks well enough, but reported them ~2400 samples too late. I understand that because it's streaming that you will always essentially be late, but is this expected in terms of the delay I should try to subtract ?
Here's my code
var onsetdetector = new MMLLOnsetDetector(44100)
fetch("pianomelody.wav")
.then((response) => {
return response.arrayBuffer()
})
.then(data => {
const context = new (window.AudioContext || window.webkitAudioContext)();
context.decodeAudioData(data, (buffer) => {
run(buffer.getChannelData(0))
})
})
function run(data) {
const CHUNK = 16
const buffers = sliceBuffer(data, CHUNK)
for(let i=0; i<buffers.length;i++) {
const buffer = buffers[i]
const detection = onsetdetector.next(buffer)
if(detection) {
console.log("d", i*CHUNK/44100-0.054)
}
}
}
MMLLQitch requires floating variable sr to be set in the surrounding javascript otherwise it fails. E.g in this example project, there is no real need to make sr and set it to sampleRate, but if its no included then theres errors
https://mimicproject.com/code/9ffb5eb7-b3dd-f19b-0a17-4e2b8494d16f
as a solution , looking at the listener code line 44 of MMLLQitch.js
self.m_SR = sr;
should be
self.m_SR = sampleRate;
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.