Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

How can I apply a 24db/oct LR high and low pass filter to a WAV file?
How can I apply a 24db/oct LR high and low pass filter to a WAV file?
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 13th May 2010, 10:05 PM   #1
MikeHunt79 is offline MikeHunt79  United Kingdom
diyAudio Member
 
MikeHunt79's Avatar
 
Join Date: Aug 2003
Location: Bristol, UK
Default How can I apply a 24db/oct LR high and low pass filter to a WAV file?

Hi,

Is there any software for the PC or OSX that will allow me to apply a 24dB/octave LR or butterworth filter to a WAV file?

Free software would be preferable, I've tried audacity and along with a few plugins, but so far have found no software that will do this!

Thanks
  Reply With Quote
Old 14th May 2010, 01:04 AM   #2
Don Hills is offline Don Hills  New Zealand
diyAudio Member
 
Join Date: May 2009
Location: New Zealand
Why can't you use the LP ahd HP filter functions in Audacity?
  Reply With Quote
Old 14th May 2010, 02:11 AM   #3
benb is offline benb  United States
diyAudio Member
 
Join Date: Apr 2010
I'm guessing the filter functions in Audacity and other DAW programs are only approximations of what the OP wants to do, to precisely simulate a filter based on the values of its electrical components. I'm sure there are speaker crossover simulator programs that work through a soundcard or operate on a .wav file

Here's something that looks close, but it doesn't read/write a .wav file:

Digital Filters with GNU Octave


I'd think there would be Octave functions to handle .wav files, I've seen that Matlab has such functions.

It shouldn't be too much code to simulate L's, R's and C's in Octave or Matlab, so much so that I'd think it's been done before, even with .wav file I/O.
  Reply With Quote
Old 14th May 2010, 02:17 AM   #4
angshudas is offline angshudas  India
diyAudio Member
 
Join Date: May 2003
Location: New Delhi
Send a message via Yahoo to angshudas
You can use Scilab.
  Reply With Quote
Old 14th May 2010, 02:50 AM   #5
a_rabid_monkey is offline a_rabid_monkey  United States
diyAudio Member
 
Join Date: Jun 2008
I know foobar allows conversion of audio files, and you can run filters on the conversion.
  Reply With Quote
Old 14th May 2010, 03:15 AM   #6
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
Default sim the crossover in spice

LTspice circuit simulator has .wav read/write functions - just draw your crossover circuit, include a source with a .wav file independent source input, add the .wave directive to write out specified nodes

definitely use much smaller tmax step size than the sample interval in the .tran statement

won't do real time

next problem is to playback the channels in sync - the .wav format allows multichannel in one .wav so you could process a stereo souce to a 4 or 6 channel .wav output


my experience with SciLab showed it to be very inefficient with 24 bit extended wave read/write functions - it uses less of SciLab's stacksapce and it is faster to use "32 bit" files if you need hi res - stacksize limits you to a few minuites of audio file processing


the horsepower for realtime streaming with a dozen or so IIR biquads should be available in media player DSP plugins on most PCs - with crossover frequencies <~1/10 of fs IIR digital filters will be very close aproximations to the analog filter response

Last edited by jcx; 14th May 2010 at 03:35 AM.
  Reply With Quote
Old 14th May 2010, 10:03 AM   #7
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
This is an example of sox in linux, the parameters are the same in windows:

Generating 10 secs of white noise, 24bit, 48kHz, mono:

Code:
sox -n -c 1 -b 24 -r 48000 white.wav synth -n 10 white
Just checking its spectrum, it does look like white noise:
Code:
sox white.wav -n spectrogram -o spectrogram.png

display spectrogram.png
How can I apply a 24db/oct LR high and low pass filter to a WAV file?


Let's see response of the 12dB/oct (2 poles, 6dB/oct each?) "highpass" filter of sox at 10kHz:

Code:
sox --plot octave -n -n highpass 10k  > highpass.plt

octave highpass.plt
How can I apply a 24db/oct LR high and low pass filter to a WAV file?


What does it do to the spectrum?

Code:
sox white.wav -n highpass 10k spectrogram -o spectrogram-hp12.png

display spectrogram-hp12.png
How can I apply a 24db/oct LR high and low pass filter to a WAV file?


24 dB/oct - let's stack two filters on top of each other:

Code:
sox white.wav white-hp24.wav  highpass 10k highpass 10k spectrogram -o spectrogram-hp24.png

display spectrogram-hp24.png
How can I apply a 24db/oct LR high and low pass filter to a WAV file?


This time I specified in sox the name of the output wav file instead of the "no-file" parameter -n and the file white-hp24.wav with the spectrum above was stored for further use.

Last edited by phofman; 14th May 2010 at 10:27 AM. Reason: Fixed the dB/oct
  Reply With Quote
Old 14th May 2010, 10:51 AM   #8
sendler is offline sendler  United States
diyAudio Member
 
Join Date: Aug 2004
Location: ny
Default PC crossover

Quote:
Originally Posted by MikeHunt79 View Post
Hi,

Is there any software for the PC or OSX that will allow me to apply a 24dB/octave LR or butterworth filter to a WAV file?

Free software would be preferable, I've tried audacity and along with a few plugins, but so far have found no software that will do this!

Thanks
Do you want to make a pc crossover?
.
http://www.diyaudio.com/forums/multi...how-pc-xo.html
.
http://www.diyaudio.com/forums/multi...e-project.html
.
http://www.diyaudio.com/forums/multi...tpl-150-a.html
.
Transient Perfect loudspeaker DSP tools . Windows DSP speaker crossovers.
.
(((acourate))) - Room Correction, Speaker Optimization and Sound Improvement
__________________
Scott
  Reply With Quote
Old 14th May 2010, 12:08 PM   #9
Don Hills is offline Don Hills  New Zealand
diyAudio Member
 
Join Date: May 2009
Location: New Zealand
Whoah, there. All the OP wanted was this:

Quote:
Originally Posted by MikeHunt79 View Post
Is there any software for the PC or OSX that will allow me to apply a 24dB/octave LR or butterworth filter to a WAV file?
I know he said Audacity doesn't seem to do what he wants, but maybe that's because of its filter controls. Audacity has 3 controls for its LP and HP filter effects: Corner frequency, cutoff slope, and Q. The key is that any simple filter can be specified in terms of those 3 values. For example, a 4th order L-R filter has a slope of 24 dB/octave and a Q of 0.49.
  Reply With Quote
Old 17th May 2010, 01:33 AM   #10
MWP is offline MWP  Australia
diyAudio Member
 
Join Date: Oct 2002
Location: Adelaide, South Australia
I do this in real time using a Linux box.
I create the filters with GNU Octave, then run the audio through BruteFIR then out to the soundcard (6 channels) via JACK.
  Reply With Quote

Reply


How can I apply a 24db/oct LR high and low pass filter to a WAV file?Hide this!Advertise here!
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
high power low-pass filter shodan Subwoofers 1 17th April 2009 09:46 AM
How do i build a 12b/oct high-pass eq filter for a vented box cancerkazoo Car Audio 5 1st June 2005 12:35 AM
high-pass filter (low-level) keyser Parts 3 6th December 2004 03:02 PM
Low/High Pass Filter fatpower17 Car Audio 1 28th June 2004 08:45 AM
high pass filter for jx92, j-low? jfk Multi-Way 0 16th October 2003 07:32 PM


New To Site? Need Help?

All times are GMT. The time now is 05:13 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki