gibber-cc / gibberish

Fast, JavaScript DSP library that creates JIT optimized audio callbacks using code generation techniques
387 stars 35 forks source link

Running on raspberry pi #15

Closed rob-gordon closed 7 years ago

rob-gordon commented 7 years ago

I'm trying to run Giberrish in node (v6.8.1) on Raspbian

I ran npm install and node build/build

> var Gibberish = require('./build/gibberish')
> Gibberish.init()
TypeError: audioContext is not a constructor
    at Object.init (/home/pi/Dev/Gibberish/build/gibberish.js:353:25)
    at repl:1:11
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:96:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:313:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:513:10)
    at emitOne (events.js:101:20)
rob-gordon commented 7 years ago

Sorry, I realized that this can only be run in a browser because it requires the AudioContext Web API. I'm trying to run it in a headless raspberry pi. Maybe I'll find a way...

charlieroberts commented 7 years ago

You should be able to do it with this library, but I will admit it's been a long time since I've tried getting this to work.

https://github.com/sebpiq/node-web-audio-api

rob-gordon commented 7 years ago

Thanks!