Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio effect - Frequency transform #19

Open
rafaelcmrj opened this issue Nov 4, 2016 · 12 comments
Open

Audio effect - Frequency transform #19

rafaelcmrj opened this issue Nov 4, 2016 · 12 comments

Comments

@rafaelcmrj
Copy link

Is there any way to apply audio effects in a audio recording stream ? I saw the frequency rate on default params var defaults = ['-f', 'cd', '-r', '48000' /*, '-D', 'plughw:0,0' */ ]; but nothing changes when I change the frequency value

@rwaldron
Copy link
Contributor

rwaldron commented Nov 4, 2016

I believe that's limited to the capabilities of the hardware itself. Also consider that the version of arecord and aplay that are available for openwrt are limited as well, to reduce overall footprint.

@rafaelcmrj
Copy link
Author

@rwaldron I don't think it's a hardware limitation.. we have a lot of softwares that do audio equalization, why can't we do the same ? mostly of the javascript samples use AudioContext, not available on NodeJS :(

@rwaldron
Copy link
Contributor

rwaldron commented Nov 4, 2016

My mention of that was based on what I was observing with two different microphones yesterday, but you're right, that limitation is not being imposed by the microphone hardware (as dimensions and resolution might be in the case of USB cameras). I'll keep investigating

@rafaelcmrj
Copy link
Author

@rwaldron I have been studying many things about it. We have it on WebAudioAPI. I will try to create something using this module: https://www.npmjs.com/package/web-audio-api

Question: If I record an audio using sampleRate 44000, can I play using a different sampleRate ? I will be able to test at the end of the day, but if you know the answer...

I'm also taking a look at OpenWRT API...

@rwaldron
Copy link
Contributor

rwaldron commented Nov 4, 2016

var defaults

That's only used when no arguments are explicitly provided to listen(...), which accepts an array of flags:

mic.listen(['-r', 16000]);

@rafaelcmrj
Copy link
Author

I guess to create a distortion effect I have to record using 44000hz and play using 16000, does it makes sense ?

@rafaelcmrj
Copy link
Author

@rwaldron I figured out the best way to do that is installing an equalizer plugin to ALSA module on tessel board. I have basically two options:

ALSA-equal: http://www.thedigitalmachine.net/alsaequal.html
PulseAudio: https://wiki.openwrt.org/doc/howto/pulseaudio

I'm getting trouble to install both of them. ALSA-equal because I can't run make on tessel root command line and PulseAudio because I can't install packages from apt-get repositories. Do you know how to fix at least one of them ? Run make commands and/or add new repositories to the Linux Distribution that is running on tessel board ?

@rwaldron
Copy link
Contributor

rwaldron commented Nov 8, 2016

I just did this...

root@sonny:~# opkg update
... feeds and stuff
root@sonny:~# opkg install pulseaudio
Installing pulseaudio-daemon (6.0-2) to root...
... installed stuff

@rafaelcmrj
Copy link
Author

@rwaldron I also can install pulseaudio, but as I know, pulseaudio can't convert a real time stream, does it make sense?

@rwaldron
Copy link
Contributor

rwaldron commented Nov 9, 2016

Yeah, I'm just trying to work through this along with you ;)

@rafaelcmrj
Copy link
Author

@rwaldron I found the alsa-equal plugin and I'm trying to convert to an OpenWRT package but I can't compile the file. I guess if we could put it to work, would be perfect. This plugin is awesome for audio equalization: http://www.thedigitalmachine.net/alsaequal.html

@dddesign
Copy link

dddesign commented Jun 7, 2017

@rafaelcmrj did you manage to compile alsaequal for openwrt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants