We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've searched high and low, but can't figure this out. My friend and I are trying to build a program that reads input from a microphone, and tweets at certain intervals. The problem? Most ambient noises register between a 0 and 1 volume reading--you have to be extremely loud to get it above there. The highest number we've gotten is 21, so we're thinking that the range could be 0 to 25.
This leaves us with some questions:
How does minim measure volume--what are the measuring units and range?
Further: how would I map these units from their limited 0 to 25 range to a wider range, 0 to 100, so we can capture more detail?
If we do successfully map it, how do we then plug that float into our averaging equation for volume?
Here's our code:
volume = abs(int(in.right.get(1)*mult)); float volumeConverted = map(volume,0,25,0,100); <--this isn't working, because the averaging equation that we have won't read it // volumeConverted = volumeC <--tried this conversion as a workaround for the float issue, but it didn't seem to work at all total = total - readings[index]; readings[index] = volumeConverted; <-- this isn't working, can't plug in float
Thank you so much!