-
Notifications
You must be signed in to change notification settings - Fork 37
Waveform audio input on ledmatrix
#34
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
Conversation
e2459b3
to
b2f44db
Compare
@JohnAZoidberg any tips on how to solve the problem with the build? It seems like some of the crates are defining duplicate symbols but not even sure where to start debugging that :)... |
You've got |
Oh you mean |
Can confirm it works |
@JohnAZoidberg no rush at all, but I think this is ready for another review when you are. Thanks for the help whipping it into shape! |
Signed-off-by: Daniel Schaefer <[email protected]>
Needed for the EQ visualizer. Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Co-authored-by: Daniel Schaefer <[email protected]>
1480692
to
4d67b67
Compare
cedc355
to
70d14a2
Compare
@JohnAZoidberg I made the EDIT: A bit of Googling made me realize this is expected behavior rust-lang/cargo#10801 so I removed the commit to restore |
70d14a2
to
7bba3fb
Compare
Yeah, that's perfectly fine. A bit odd, but does no harm. |
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
chrono = "0.4.23" | ||
|
||
# For audio visualizations | ||
vis-core = { git = 'https://github.com/Rahix/visualizer2.git', rev = '1fe908012a9c156695921f3b6bb47178e1332b92', optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to pin this specific commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I guess since it's the latest one on their master, and they don't do releases (yet).
Ok, that's fine.
Alright, let's go ahead and merge this! |
Trying to work with an example at https://github.com/Rahix/visualizer2/blob/canon/README.md and @JohnAZoidberg 's boilerplate
eq
module code to get theledmatrix
to show a rough waveform of actual current audio input!Got it working at this point. This is just grabbing the audio input stream with some Rust wrappers for it
cpal
https://github.com/RustAudio/cpal and https://github.com/diwic/alsa-rs to access the underlyingalsa
layer at the system level.Demo:
https://photos.app.goo.gl/C6NMsZdKnLAnXpwW9
Testing Instructions
cargo run --target x86_64-unknown-linux-gnu -p inputmodule-control led-matrix --input-eq
Then make some noise, assuming your microphone/input is on - try clapping, singing, putting on some music decently loudly, etc!
Next on the to-do list:
len is 34 but the index is 34
error (probably a relatively simple one to solve with how I'm constructing thevec
)info.volume as u8
code. I tried usingvec![info.volume as u8; 8]
but I kept getting an array index out of bounds error too