Hey there,
This might be the incorrect forum in general but I figured I'd give it a shot. I'm using NAudio and WASAPI to do some c# loopbacking with my sound card.
I've got LEDs with a controller via USB and want to set it up to visually display my sound.
I am not 100% sure what the code does exactly - but here is a little snippet:
BitConverter.ToInt32(e.Buffer, 0)
Basically an object of e has a buffer of bytes that I convert to an int. It seems to be a value range of -2000000000 to +2000000000 (I'm very rough guessing here).
I took the code verbatim from an example that wrote to a .wav file and instead of writing the bytes to the file it converted that range to a value from 0-255 (for my RGB lights) and converted it.
I guess my question is, once I get this range of -20..+20.. is there a fun way to visualize it as RGB?
Right now I basically say if the range is -200..-075 then edit red value, if -075..+075..edit blue value, and green.
It just kind of shows up as purple (like, every color is just average).
It's bland.
Any ideas?
Thanks,
WB
Visualizing Sound Data from bytes to RGB
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
-
whitebabylon
- Posts: 2
- Joined: Tue Jun 24, 2014 2:22 am
- Operating System: Please select
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: Visualizing Sound Data from bytes to RGB
Are you by any chance redesigning Spectrogram View?
Open a show on the timeline.
Drop-down menu on the left > Spectrogram View.
Koz
Open a show on the timeline.
Drop-down menu on the left > Spectrogram View.
Koz
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: Visualizing Sound Data from bytes to RGB
Attached.
Koz
Koz
- Attachments
-
- Screen Shot 2014-06-23 at 9.41.43 PM.png (237.05 KiB) Viewed 4558 times