GithubHelp home page GithubHelp logo

lcav / easy-dsp Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 6.0 6.53 MB

A browser based interface for real-time DSP on popular embedded platforms.

Home Page: https://lcav.github.io/easy-dsp/

License: GNU General Public License v3.0

Makefile 0.19% PHP 0.08% Python 72.84% C 9.37% HTML 4.47% JavaScript 11.00% Shell 0.23% CSS 1.27% Arduino 0.56%

easy-dsp's People

Contributors

ebezzam avatar fakufaku avatar ntag avatar sahandkashani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easy-dsp's Issues

Incorrect audio shape

When applying browserinterface.change_config, the first buffer sent to the callback does not have the correct shape (buffer size, number of channels) but subsequent ones do. Need to apply a check as in examples/frame_processing.py.

Support software upsampling / downsampling on the acquisition side

Allow browser-main-daemon to run some rate conversion before sending the audio. This would allow to support more samplings rates (especially lower ones) even when the hardware doesn't.

What is required is to design a number of low pass filters to filter the data before downsampling.

Handle the audio stream playback with a web worker in the browser

Currently both the graphics and the audio are handled in the same thread in the browser. When there is a lot of audio streaming this could be a problem. We could create a web worker that takes care of getting the audio from the websocket, resample it and plays it back.

It the only communication needed with the main thread is:

  • set origin of audio stream (python code server or ws-audio)
  • play
  • stop

what needs to be decided is how to handle configuration changes

hardware_config.json

Do you have an example of a hardware_config.json file that I can use to define my own array?

Many thanks

Tao

Clean up the demonstration scripts

Some of the demonstration scripts where hacked before the icassp demo. Especially, some of the light color stuff should be handled in the neopixel class, like the HSV color scheme.

Compilation Error

On running make the following error is generated

gcc -g -Wall -Wextra -O0 -std=gnu99 browser-main-daemon.c -o browser-main-daemon -lasound -lpthread browser-main-daemon.c: In function ‘main’: browser-main-daemon.c:74:3: warning: implicit declaration of function ‘query_available_config’ [-Wimplicit-function-declaration] query_available_config(); ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c:61:15: warning: unused parameter ‘argc’ [-Wunused-parameter] int main (int argc, char *argv[]) ^~~~ browser-main-daemon.c:61:27: warning: unused parameter ‘argv’ [-Wunused-parameter] int main (int argc, char *argv[]) ^~~~ browser-main-daemon.c: At top level: browser-main-daemon.c:110:6: warning: conflicting types for ‘query_available_config’ void query_available_config(void) ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c:74:3: note: previous implicit declaration of ‘query_available_config’ was here query_available_config(); ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c: In function ‘query_available_config’: browser-main-daemon.c:138:14: warning: ‘return’ with a value, in function returning void return 1; ^ browser-main-daemon.c:110:6: note: declared here void query_available_config(void) ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c:146:14: warning: ‘return’ with a value, in function returning void return 1; ^ browser-main-daemon.c:110:6: note: declared here void query_available_config(void) ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c:155:14: warning: ‘return’ with a value, in function returning void return 1; ^ browser-main-daemon.c:110:6: note: declared here void query_available_config(void) ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c:161:14: warning: ‘return’ with a value, in function returning void return 1; ^ browser-main-daemon.c:110:6: note: declared here void query_available_config(void) ^~~~~~~~~~~~~~~~~~~~~~ browser-main-daemon.c: In function ‘handle_audio’: browser-main-daemon.c:207:26: warning: unused parameter ‘nothing’ [-Wunused-parameter] void* handle_audio(void* nothing) ^~~~~~~ browser-main-daemon.c: In function ‘handle_connections_control’: browser-main-daemon.c:385:40: warning: unused parameter ‘nothing’ [-Wunused-parameter] void *handle_connections_control(void* nothing) ^~~~~~~ browser-main-daemon.c: In function ‘handle_connections_audio’: browser-main-daemon.c:474:38: warning: unused parameter ‘nothing’ [-Wunused-parameter] void* handle_connections_audio(void* nothing) { ^~~~~~~ gcc -g -Wall -Wextra -O0 -std=gnu99 browser-wsaudio.c -o browser-wsaudio -lwebsock -lpthread browser-wsaudio.c: In function ‘main’: browser-wsaudio.c:100:19: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t {aka long int}’ [-Wformat=] printf("%X %d\n", magic_byte, t); ~^ %ld browser-wsaudio.c:188:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < numChannelConfigs; i++) { ^ browser-wsaudio.c:206:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < numPossibleRates; i++) { ^ browser-wsaudio.c: In function ‘send_possible_config’: browser-wsaudio.c:276:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < numChannelConfigs; i++) { ^ browser-wsaudio.c:279:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (i == numChannelConfigs - 1) ^~ browser-wsaudio.c:289:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < numPossibleRates; i++) { ^ browser-wsaudio.c:292:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (i == numPossibleRates - 1) ^~ browser-wsaudio.c: In function ‘main_ws’: browser-wsaudio.c:330:21: warning: unused parameter ‘nothing’ [-Wunused-parameter] void* main_ws(void* nothing) { ^~~~~~~ In file included from /usr/local/include/websock/websock.h:73:0, from browser-wsaudio.c:5: browser-wsaudio.c: At top level: /usr/local/include/websock/utf.h:25:17: warning: inline function ‘decode’ declared but never defined uint32_t inline decode(uint32_t *state, uint32_t *codep, uint32_t byte); ^~~~~~ //usr/local/lib/libwebsock.so: undefined reference to decode'
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'browser-wsaudio' failed
make: *** [browser-wsaudio] Error 1`

I'm using ubuntu 18.04

any ideas? Many thanks in advance

Home directory not accessible: Permission denied

In the logs.txt:
Home directory not accessible: Permission denied
Keeps appearing and no audio config is displayed on the web page, fields are just blank, struggling to find where that error may come from. The log shows that it’s finding the correct Any ideas?
Full log

Home directory not accessible: Permission denied
cannot set channel count (Invalid argument)
Possible number of channels: 2
Possible sampling rates: 44100 48000 96000 192000
Bind successful audio
Waiting for a connection...
Bind successful control
Waiting for a connection...
audio interface opened
hw_params allocated
hw_params initialized
hw_params access set
hw_params format set
hw_params rate set
connect: Connection refused

Cheers

Tao

unable to open web page

After installation on ubuntu 18.04 the on trying to access from remote pc 'my-board-ip:8081' I get the following error.

Forbidden
You don't have permission to access / on this server.

I'm not an apache expert so don't know which settings to change next.

many thanks in advance

tao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.