myers / chord_detector Goto Github PK
View Code? Open in Web Editor NEWJavascript bindings for chord detector
Javascript bindings for chord detector
Hello @myers,
Thank you for sharing your work !
I would like to use your package but I have not arrived.
You say in the readme to do some stuff but I don't see where do theses things..
Could you help me?
Hey cool project. I tried to get the demo working on my phone but it doesn't seem to work, at least for me. Is it just the demo/phone? Would love to use this library in the future.
Do I need to install make and emsdk on my PC for building the project?
git submodule update --init # pull in Chord-Detector-and-Chromagram
npm run build # requires emscripten's emcc to be on your path
After I installed and setup make and emsdk I was able to run make
on project root dir.
/chord_detector>> make
emcc -O3 vendor/Chord-Detector-and-Chromagram/libs/kiss_fft130/kiss_fft.c -o build/kiss_fft.o
shared:INFO: (Emscripten: Running sanity checks)
emcc: warning: object file output extension (.o) used for non-object output. If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
emcc -O3 -I vendor/Chord-Detector-and-Chromagram/libs/kiss_fft130 -D USE_KISS_FFT vendor/Chord-Detector-and-Chromagram/src/Chromagram.cpp -o build/Chromagram.o
emcc: warning: object file output extension (.o) used for non-object output. If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
emcc -O3 vendor/Chord-Detector-and-Chromagram/src/ChordDetector.cpp -o build/ChordDetector.o
emcc: warning: object file output extension (.o) used for non-object output. If you meant to build an object file please use `-c, `-r`, or `-shared` [-Wemcc]
emcc -O3 --memory-init-file 0 chord_detector_wrapper.cpp -o index.js -s EXPORTED_FUNCTIONS="['_Chromagram_constructor','_Chromagram_destructor','_Chromagram_processAudioFrame', '_Chromagram_isReady', '_Chromagram_getChromagram', '_ChordDetector_constructor', '_ChordDetector_destructor', '_ChordDetector_detectChord', '_ChordDetector_getRootNote', '_ChordDetector_getQuality', '_ChordDetector_getIntervals']" -D USE_KISS_FFT -I vendor/Chord-Detector-and-Chromagram/src -I vendor/Chord-Detector-and-Chromagram/libs/kiss_fft130 build/*.o --post-js chord_detector.js
emcc: error: build/*.o: No such file or directory ("build/*.o" was expected to be an input file, based on the commandline arguments provided)
make: *** [index.js] Error 1
I ignored the error and tried running:
/chord_detector>> npm run build
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> [email protected] build
> make; cd docs; browserify demo.js -o bundle.js
make: *** There is no rule to build the target `;'. Stop.
I tried opening docs/index.html
:
I get this errors:
bundle.js:8
The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
(anonymous) @ bundle.js:8
j @ jquery-3.1.1.slim.min.js:2
k @ jquery-3.1.1.slim.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.1.1.slim.min.js:2
i @ jquery-3.1.1.slim.min.js:2
fireWith @ jquery-3.1.1.slim.min.js:2
fire @ jquery-3.1.1.slim.min.js:2
i @ jquery-3.1.1.slim.min.js:2
fireWith @ jquery-3.1.1.slim.min.js:2
ready @ jquery-3.1.1.slim.min.js:3
R @ jquery-3.1.1.slim.min.js:3
bundle.js:61
[Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
When hitting play buttons in the console I get this error:
MediaElementAudioSource outputs zeroes due to CORS access restrictions for file:///.../chord_detector/docs/A-Chord.ogg
So I run a server for loading app.
bundle.js:61
[Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)
(anonymous) @ bundle.js:61
bundle.js:63
[874] onaudioprocess // This fn keeps running after the played audio stops.
All audios only plays once. After playing all audios for the second time onaudioprocess
and I get this errors:
bundle.js:20
Uncaught DOMException: Failed to execute 'createMediaElementSource' on 'AudioContext': HTMLMediaElement already connected previously to a different MediaElementSourceNode.
at HTMLAudioElement.<anonymous> (http://127.0.0.1:5500/docs/bundle.js:20:23)
at HTMLAudioElement.dispatch (https://code.jquery.com/jquery-3.1.1.slim.min.js:3:10559)
at q.handle (https://code.jquery.com/jquery-3.1.1.slim.min.js:3:8586)
Running npm run build
or simply make
results in the error:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 392, in _handle_results
task = get()
TypeError: __init__() takes at least 3 arguments (1 given)
and the build never completes.
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.