Go Back   Home > Forums > Source & Line > Digital Line Level
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 4th August 2009, 02:27 AM   #11
diyAudio Member
 
Join Date: Mar 2007
Thanks Wingfeather, I don't use MATLAB, in fact, I'm probably wholly underqualified from a mathematics point of view, but I used to be a C/C++ programmer, and still tinker.

I can access a copy of MATLAB though; is the code likely to be something I can read as a programmer? I'd love to take a look.

I did have BruteFIR in mind as an engine, but I'm not sure it can use dynamic filters, which I guess would be required for such a system, though I haven't really looked at the code yet.


Of the other suggestions, the pink noise does work to some extent. Actually I've found that brown noise, with some additional low level "rumbling thunder" sounds played at random, and the whole thing equalized to remove the high and mid-frequency hiss, works best. But it has to be quite loud to really work, almost enough to be distracting in it's own right.

Wax earplugs are much better than the foam ones I originally tried, but still not completely effective in the bass.


But neither of those options is as interesting or challenging as noise cancellation ....
  Reply With Quote
Old 4th August 2009, 03:23 AM   #12
diyAudio Member
 
Join Date: Mar 2007
Just looking at MATLAB, it doesn't seem too unfamiliar to me, I'd be very interested in your code Wingfeather. Not sure if you can get my email by PM, etc? I'll send you one.
  Reply With Quote
Old 4th August 2009, 01:18 PM   #13
diyAudio Member
 
Join Date: Mar 2003
Location: Southwest, UK / York, UK / Edinburgh, UK
Ah, yeah - the MATLAB language is very simple to read and use, so you'll have no trouble. And while the maths behind optimal filtering isn't the simplest, the implementation is very straightforward.

For implementation, I'm not sure offhand if any packages are out there which will work off the shelf. Given that you're a C programmer, one thing I'd recommend is PortAudio (www.portaudio.com) - a cross-platform audio backend written in C that contains code to interface with ALSA, OSS, ASIO, DirectSound - you name it. Last I checked, it had an excellent tutorial on how to use it to write realtime audio applications.

I once wrote a very basic command-line app to run the EQ/crossovers for my 3-way speakers, which worked an absolute charm and didn't take too long to make. Honestly, that library was a joy to work with. You have to implement the FIR filter yourself though (it's not terribly complicated, but maybe time-consuming if you haven't done much signal processing before). I might still have the C++ code I used for that lot somewhere. I'll try digging it out.

Feel free to PM me - I should be able to get them.
__________________
Wingfeather
  Reply With Quote
Old 11th May 2010, 08:13 PM   #14
diyAudio Member
 
Join Date: May 2010
Default intres in code matlab

hi i lookt at your post about anti sound. im new to this matlab but im interested
i have a hiway nex to my house.
could you send me same code for matlab so il have a good start.
thanks.
email ma21@telefonica.net






Quote:
Originally Posted by Wingfeather View Post
Generally speaking, this kind of system is run adaptively all the time. This is nearly always the best thing to do: the update equations are not computationally expensive, and any changes to the acoustic transfer function (maybe you accidentally knock the reference microphone after you've set the system up or something) are adapted to.

Also, the delay between the outdoor microphone and the pillow microphone is accounted for - it comes out in the wash with the adaptive filter, and you're free to move things around during operation to find the best placement. Accounting for the delay does mandate a long filter if the two microphones are a long distance apart, which could be expensive - but if you know approximately the delay you're expecting you could add in a delay line to take care of the buik of it.

In terms of needing a microphone actually on the pillow, you don't need it to be that close. It all depends what kind of bandwidth you want to cancel out, as this approach is most effective at low frequencies. So long as the pillow mic is "relatively close" to yourself at the highest frequencies you want to cancel (in terms of phase difference), the system should be relatively effective. Indeed, you should actively bandlimit the signals (a 4th order lowpass or so is probably sufficient) so that this is satisfied.

If the pillow microphone is about a meter away from you, I imagine you should get good results at ~150Hz and down, give or take.

In terms of microphone placement, imagine a line drawn from the distant loudspeakers to the pillow microphone and beyond. I *think* that arranging the loudspeaker somewhere on this line will give the broadest sweet-spot (but I'm not in a position to think that through properly right now).

Do you have/use MATLAB at all? I have some code I could send you.
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer white noise generator, which software? Bricolo Everything Else 16 5th April 2010 11:50 PM
Active noise cancellation for a computer? MikeHunt79 Everything Else 0 3rd April 2008 10:54 PM
Active Noise Cancellation gcladis Pass Labs 4 27th June 2006 11:36 PM
software 1/3 octave pink noise generator deandob Multi-Way 6 25th March 2006 06:05 AM
Active Noise Cancellation manse Everything Else 7 31st March 2003 04:57 PM


New To Site? Need Help?

All times are GMT. The time now is 06:35 PM.

Page generated in 0.08702 seconds (80.07% PHP - 19.93% MySQL) with 10 queries

Copyright ©1999-2012 diyAudio