-
Notifications
You must be signed in to change notification settings - Fork 33
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
Equalizer #69
Comments
@zvikapika @chipaudette @eyuan-creare |
Thanks! I just found this morning a correspondence regarding this need, in which Chip referred to the Equalizer_8BandBiquad example he wrote. I uploaded it but there is a lot of high pitch static noise when I do not speak directly to the microphone, making it impossible to work with. I tried attenuating the high pitch frequency channels through the Serial Monitor, as the sketch allows, but noise levels did not change. I also thought it might be an issue with my microphone (using a lapel) but even after changing mic, noise level did not subside. @chipaudette |
Do you receive this high pitch noise when using the straight passthru example? You could consider recording the sound to SD card before and after the 8-band filter. |
No, the pass thru example works fine. but after tweaking half a day with just about everything, I found that the issue was too much gain on the microphone. Simple! when you know it :) Thanks for all the help! AudioConnection_F32 patchCord35(gainBlocks[4],0,mixer,4); //connect gain block back to mixer |
Hi! Thanks for pointing out the typo in the patchCord names. I've fixed it in the repo. Chip |
To further the discussion of what you're doing, it sounds like you want to use the Tympan to (at first) assess a person's hearing? For example, perhaps you are thinking of playing quiet sounds toward a person. The sounds would be at different frequencies. You would use the Tympan to adjust the loudness at the different frequencies until they can hear all of the quiet sounds? Is that what you're thinking? If so, you should definitely try it yourself, first. One thing that you will notice is that using a lapel microphone for hearing ambient sounds is not as satisfying as you would like. You will probably have a negative reaction. Your reaction will be that is does not sound as good as using your normal ears. There are several reasons for this. Some important reasons are:
There are lots of other challenges to making your own hearing device. The Tympan is a great platform to find and explore (and overcome?) the challenges that your intended user is most sensitive to. Good Luck! Chip |
Oh, I also forgot to mention... If you are using the "equalizer" code on the Tympan to adjust the loudness for different frequencies, you are making a "linear" hearing aid. This is a device that just makes things louder. This can be all that a person needs. If this proves to be good enough for your needs, you can stop there. Great! But, for most users of real hearing aids, people found that they liked the extra loudness for quiet sounds, but they HATED the extra loudness for sounds that were already loud. So, what they wanted was a device that amplified quiet sounds but provided less amplification as sounds become louder. In response, hearing aids added "dynamic range compression". You can see this old blog post of mine: https://openaudio.blogspot.com/2017/01/the-need-for-dynamic-range-compression.html Tympan has many examples that include compression. Typically, you use one compressor for each frequency band that you are processing (a.k.a "Multiband Compression"). So, if you are using an 8-band equalizer as your baseline right now, you would probably want to move to an 8-band compression system. Compressors have many settings that need to be configured. Having 8 compressors will have 8x the settings. Complicated! For existing Tympan examples, see any of the examples with "WDRC" in the name. This stands for "Wide Dynamic Range Compressor". There are many WDRC examples. The reason that there are so many different examples is so that we can illustrate how to use different types of (IIR vs FIR) or to add support for Bluetooth (to enable control via your phone!) or to allow saving of presets on the SD card. These additional features can make the code very complicated, unfortunately. The "simplest" 8-band compression example is probably this one: https://github.com/Tympan/Tympan_Library/tree/main/examples/03-Intermediate/WDRC_FIR_8Band. It has none of these extra features. Even without the extra features, there is still a lot of code to configure and manage all of those compressions. Sorry. Chip |
Oh, WOW! Indeed I am working on a (low cost) hearing aid (for Nigerian market) - hence why we chose to work with a DIY Revision E rather then the earpiece (also, we opted not to use Bluetooth to make things simple for the end consumer). I know quite a bit about general microcontroller programming, mechatronics and such, but I am doing my first steps with audio processing. Still, I am currently technical project lead... Next week we will be meeting a local Audiologist with whom we will consult about the process of tuning such a device in more detail, but from an initial Zoom meeting I gathered that:
Regarding lapels, I guessed that they we not ideal but I figured placing two microphones, one next to each ear, as you said, will give us a starting point. Also, I was looking a bit but count not find directional microphones that are compact - usually they are long and cumbersome, maybe due to reflector shape reasons. Anyway at first stage we thought of 3d printing a small cone reflector, but have not yet arrived at that point - see how that goes. Do you know where we can source a compact directional mic? Last, regarding compression - it makes perfect sense, I know anything about it, though. I will read your post and try incorporating the example into the equalizer Thank you so much again, I really appreciate your extensive help. Hopefully, this project will make a difference to many people's lives here in Nigeria whose need are currently not catered to at all, due to cost reasons All the best, |
Hi Zvika, Here are some thoughts in response to your comments:
Yes, testing to find one's threshold of hearing is very typical. But, despite being typical and normal, it is still hard to do if you are testing normal hearing people. Very hard. The problem is that normal hearing people are able to hear very quiet sounds. Therefore, at the person's threshold of hearing, the test tones will be very quiet. This has several important implications:
I think that it is probably best to use omnidirectional microphones. A directional microphone might be good if you can keep it pointing in the right direction...but which direction is the "right direction"? In my message, I raised the possibility that you might inadvertently get a directional microphone as your lapel microphone. I raised this possibility because it is a bad thing. I would suggest that you stay with omnidirectional microphones. |
Thanks, again, for your enlightening comments! As the manual tuning of the devices can be anywhere, we cannot rely on a sound proof booth. For the time being we have settled for noise blocking earphones such as the ones used in workshops, that the patient will wear during the calibration process on top of the in-ear headphones/buds. Hopefully that would get us close enough to bring some value. The generation of the test tones will also be done by the Tympan hardware, so I think it should be relatively noise free, from what I've so far heard. Thanks again, p.s. I just got the first generation of the 3d printed ear reflectors, you might want to take a look :) |
Hi all,
We have now entered level 2 of the project, taking the prototype to an audiologist and then to some tests
I was asked to develop an equalizer app that would be used for the self-tune process
(here, in Nigeria, audiologist who know how to do this are quite rare)
The basic idea is to help a hearing impaired client to map his/her own frequency response values, and per (currently) 8 frequency bands find what is the threshold DB per band, so that we can compensate for the bands that need amplification
I searched the examples but could not find a similar example - I figured there must be one, since this is what a hearing aid does, right? So, either I missed it somehow, or it is code that was not included in the examples.
Can you help?
Thanks,
Zvika
The text was updated successfully, but these errors were encountered: