-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
voodoohop
committed
Jun 28, 2018
0 parents
commit 498a713
Showing
48 changed files
with
15,671 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
|
||
// function onRuntimeInitialized() { | ||
|
||
const em_module = require('./wrap_gaborator.js'); | ||
|
||
// async function getWrapper() { | ||
|
||
// const m = em_module(); | ||
// console.log(m.then); | ||
// const module= await m; | ||
// console.log(module); | ||
// return module; | ||
// } | ||
|
||
// async function testGaborator() { | ||
// const wrapper = await getWrapper(); | ||
// wrapper._sayHi(); | ||
// } | ||
|
||
// testGaborator(); | ||
|
||
const loader = require('audio-loader') | ||
|
||
const m = em_module(); | ||
|
||
m.then(({ThomashGaborator}) => { | ||
// console.log(Object.keys(Module.ThomashGaborator)) | ||
// Module._analyze(Float32Array.from([0,1,0,0.5])); | ||
|
||
|
||
console.log(ThomashGaborator); | ||
|
||
|
||
loader("./media/ZOOM0037.wav").then(audio => { | ||
const gaborator= new ThomashGaborator(audio.sampleRate); | ||
const data = audio.getChannelData(0); | ||
gaborator.analyze(data,function(real,imag,band,t) {console.log("resuult",{real,imag,band,t});}); | ||
console.log(data.length) | ||
}) | ||
.catch(e => console.error(e)); | ||
|
||
// const data=new Float32Array(44100).fill(1.0) ; | ||
|
||
}) | ||
// console.log .log(em_module._sayHi()); // direct calling works | ||
|
||
|
||
// Module['onRuntimeInitialized'] = onRuntimeInitialized; | ||
|
||
|
||
// em_module.ccall("sayHi"); // using ccall etc. also work | ||
// console.log(em_module._daysInWeek()); // values can be returned, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
1.2 | ||
|
||
Add overview documentation. | ||
|
||
Add real-time FAQ. | ||
|
||
Actually include version.h in the release. | ||
|
||
Fix off-by-one error in defintion of analyzer constructor ff_min | ||
argument. | ||
|
||
Fix incorrect return value of band_ff() for DC band. | ||
|
||
Add streaming example code. | ||
|
||
Add analyzer::analysis_support() and analyzer::synthesis_support(). | ||
|
||
Document analyzer::band_ff(). | ||
|
||
Improve signal to noise ratio at low numbers of bands per octave. | ||
|
||
Note the need for -mfpu=neon on ARM in render.html. | ||
|
||
1.1 | ||
|
||
Added CHANGES file. | ||
|
||
Added reference documentation. | ||
|
||
New include file gaborator/version.h. | ||
|
||
1.0 | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
The Gaborator library is Copyright (C) 1992-2018 Andreas Gustafsson. | ||
|
||
License to distribute and modify the code is hereby granted under the | ||
terms of the GNU Affero General Public License, version 3 (henceforth, | ||
the AGPLv3), but not under other versions of the AGPL. See the file | ||
doc/agpl-3.0.txt for the full text of the AGPLv3. | ||
|
||
If the terms of the AGPLv3 are not acceptable to you, commercial | ||
licensing under different terms is possible. Please contact | ||
info@gaborator.com for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See doc/index.html for HTML documentation. |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
cd "$(dirname "$0")" | ||
em++ -std=c++11 -I. -ffast-math wrap_gaborator.cc --bind -s MODULARIZE=1 -s ALLOW_MEMORY_GROWTH=1 -o ../wrap_gaborator.js | ||
cd - |
Oops, something went wrong.