Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoohop committed Jun 28, 2018
0 parents commit 498a713
Show file tree
Hide file tree
Showing 48 changed files with 15,671 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .gitignore
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
53 changes: 53 additions & 0 deletions callGaborator.js
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.
34 changes: 34 additions & 0 deletions gaborator-1.2/CHANGES
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
11 changes: 11 additions & 0 deletions gaborator-1.2/LICENSE
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.
1 change: 1 addition & 0 deletions gaborator-1.2/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See doc/index.html for HTML documentation.
4 changes: 4 additions & 0 deletions gaborator-1.2/a.out.js

Large diffs are not rendered by default.

Binary file added gaborator-1.2/a.out.wasm
Binary file not shown.
4 changes: 4 additions & 0 deletions gaborator-1.2/compileWrapper.sh
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 -
Loading

0 comments on commit 498a713

Please sign in to comment.