Reply by Bob Larter June 20, 20092009-06-20
Jasen Betts wrote:
> On 2009-05-26, Nico Coesel <nico@puntnl.niks> wrote: >> "miso@sushi.com" <miso@sushi.com> wrote: >> >>> On May 25, 2:21=A0pm, pantel...@gmail.com wrote: >>>> On May 25, 10:10=A0pm, "m...@sushi.com" <m...@sushi.com> wrote: >>>> >>>>> You can always dual boot a windows PC. >>>> It can be quite a challenge for a non Unix wizzard to start using >>>> Linux, >>>> especially command line tools like humfilter. >>>> As humfitler is a a simple command line program,. >>>> written in a simple C, and basically only >>>> does wav file format input to wave file output, >>>> it should be easily portable to DOS, and run in >>>> a MSDOS window in for example XP. >>>> Perhaps compile with the old djgpp compiler? >>>> Several of my programs have been ported to DOS by people. >>>> I am sure you can somehow send the wave output to a soundcard >>>> even in MS software. >>> It's been my experience that it is easier to compile software under >>> Linux. The lack of compilers for windows is the issue. I assume to >> Look for Mingw. Thats a GCC that works fine to compile software under >> Windows. Still, more complex programs cannot be compiled easely >> because of the Linux build tools. > > You can rin mingw on linux, or many of the build tools are portable > to windows (modulo the limitations of the windows command-line).
Cygwin gives you a proper Linux command line under Windows. -- W . | ,. w , "Some people are alive only because \|/ \|/ it is illegal to kill them." Perna condita delenda est ---^----^---------------------------------------------------------------
Reply by Jasen Betts June 14, 20092009-06-14
On 2009-05-26, Nico Coesel <nico@puntnl.niks> wrote:
> "miso@sushi.com" <miso@sushi.com> wrote: > >>On May 25, 2:21=A0pm, pantel...@gmail.com wrote: >>> On May 25, 10:10=A0pm, "m...@sushi.com" <m...@sushi.com> wrote: >>> >>> > You can always dual boot a windows PC. >>> >>> It can be quite a challenge for a non Unix wizzard to start using >>> Linux, >>> especially command line tools like humfilter. >>> As humfitler is a a simple command line program,. >>> written in a simple C, and basically only >>> does wav file format input to wave file output, >>> it should be easily portable to DOS, and run in >>> a MSDOS window in for example XP. >>> Perhaps compile with the old djgpp compiler? >>> Several of my programs have been ported to DOS by people. >>> I am sure you can somehow send the wave output to a soundcard >>> even in MS software. >> >>It's been my experience that it is easier to compile software under >>Linux. The lack of compilers for windows is the issue. I assume to > > Look for Mingw. Thats a GCC that works fine to compile software under > Windows. Still, more complex programs cannot be compiled easely > because of the Linux build tools.
You can rin mingw on linux, or many of the build tools are portable to windows (modulo the limitations of the windows command-line).
Reply by Jasen Betts June 14, 20092009-06-14
On 2009-05-25, panteltje@gmail.com <panteltje@gmail.com> wrote:
> On May 25, 10:10&nbsp;pm, "m...@sushi.com" <m...@sushi.com> wrote: > >> You can always dual boot a windows PC. > > It can be quite a challenge for a non Unix wizzard to start using > Linux, > especially command line tools like humfilter. > As humfitler is a a simple command line program,. > written in a simple C, and basically only > does wav file format input to wave file output, > it should be easily portable to DOS, and run in > a MSDOS window in for example XP. > Perhaps compile with the old djgpp compiler?
Or compile with the current mingw compiler and run it on the windows command-line
Reply by Eeyore May 27, 20092009-05-27

Ben Bradley wrote:

> Here are my thoughts after reading the whole thread (I DID learn C > 22 years ago - didn't make me rich, but it paid a lot more than > cleaning toilets in recording studios, and probably even more than > designing pro audio equipment). > > In sci.electronics.design and comp.dsp, On Thu, 21 May 2009 02:54:36 > +0100, Eeyore <rabbitsfriendsandrelations@hotmail.com> wrote: > > >I am proposing to engage on a project regarding mains voltage 'purity' > >(and absence of ) with regard to audible clicks and pops in high-end > >professional and hi-fi audio equipment. > > > >Typical EMC filters operate in the RF band and are threfore no use to > >filter audio 'in band' noise that can travel through transformer > >interwinding capacitance etc. > > > >I have found some of the TI INA series that will with suitable > >preconditioning, tolerate mains voltages and give excellent common-mode > >etc rejection. So assembling a 'preamp' front end should be no problem. > > From what others posted, I'm thinking you might want to make > several of these, to also measure things like the neutral voltage and > the ground voltage (maybe referenced to your own ground stake you put > in the ground outside the window or door, on the opposite side of the > building where the main power comes in). Make these to withstand a > kilovolt or more on the inputs (use several series resistors in each > leg). That way you can see common-mode signals as well as > differential. > > > >What I will need to do however is to filter all the mains frequencies > >and harmonics to a very large degree. > > You say elsewhere you want to see the results in "real time." I > interpret that as "not having to wait 30 seconds for processing," that > a half-second or two seconds might be acceptable. > > Others have said it, but I also see this as a PC application. A USB > audio interface with four inputs should work (you probably want 24bit > samples - if USB can't do 48/24 and 4 channels, you then use a desktop > machine (or firewire, whatever), perhaps powered by a battery backup > to insure line isolation, with a 4=channel or 8-channel card). Three > inputs are for hot-to-neutral, neutral-to-your-ground, > ground-to-your-ground, and the forth is the balanced output (with > ground not connected!) of the mixer/console/UUT. > > You run this thing, and it samples data continuously. When the > mixer has an output (or when there's an anomalous output on any of the > other three inputs), the thing samples a few more cycles, then stops > and does the filtering (on data that's a few cycles long), and shows > the areas of interest, both with and without the 50/60Hz imposed on > the hot/neutral input. > > This puts all the algorithms in a PC which has plenty of DSP > horsepower thesedays, and also makes a good multichannel data > recorder. I'm thinking you (or someone who knows C and PC code > development) can get the Audacity source and modify it to do this (I > don't know of the legalities and such of using the code in a > commercial product, if you have to make the code you add open-source > or what). > > And you just might want to have more inputs to look at, such as the > main DC filtering caps of the console. This would show if the > transient occurs at a time when the rectifiers are conducting.
Hi Ben, just wanted to acknowledge the thought you put into this ( along with all the other useful contributors ). I'm going to chew it over and get back later. Graham -- due to the hugely increased level of spam please make the obvious adjustment to my email address
Reply by miso...@sushi.com May 26, 20092009-05-26
On May 26, 3:43&#2013266080;am, Jan Panteltje <pNaonStpealm...@yahoo.com> wrote:
> On a sunny day (Mon, 25 May 2009 20:50:48 -0700 (PDT)) it happened > "m...@sushi.com" <m...@sushi.com> wrote in > <d946c8cd-b785-4f80-a7da-97d8bcce5...@p6g2000pre.googlegroups.com>: > > >It's been my experience that it is easier to compile software under > >Linux. The lack of compilers for windows is the issue. &#2013266080;I assume to > >use the soundcard in windows, you need to use some windows API, and > >the documentation or lack thereof can be frustrating. > > humfilter does not use the sound card. > It just creates a filtered wave file from a non-filtered wave file. > there are plenty of free C compilers for MS win, > including MS own one. > But you can cross-compile on Linux too with for example DJ Delories > djgpp as I pointed out. > Or even native in MSDOS. > I do not have it installed, but for 1000 Euro I could [make a DOS > version of humfilter] :-) > Else look here: > &#2013266080;http://www.delorie.com/djgpp/ > > Anyways, if you port my software (anybody) please keep to the GPL license > conditions. > I do no very actively pursue and search for GPL violations, but the FSF may > torture you and send you to a jail in Cuba :-)
A bit off topic, but for those that want to do analysis on a wave file, you can use sox to convert it into ascii. I've done this to put sampled signals into spice as a PWL input. Obviously, you need to use some scripting or write a small program to get the data in spice format.
Reply by JosephKK May 26, 20092009-05-26
On Fri, 22 May 2009 20:13:39 +0100, Eeyore
<rabbitsfriendsandrelations@hotmail.com> wrote:

> > >Nico Coesel wrote: > >> Eeyore wrote: >> >Nils wrote: >> > >> >> After reading the discussion I wonder: >> >> >> >> Couldn't you simply connect a transformer to the mains, add a resistor >> >> divider at the output to get the signal down and record the glitches? >> > >> >My front end will do all of that to get the levels right etc. The thing is, >> >you don't seem to be able to see the glitches for the mains, we've already >> >been looking. They must be quite small, or it's getting in via another >> >> Get a proper digital scope. Many scopes lower their samplerates so you >> don't see short glitches. Lecroy is bad when it comes to this kind of >> behaviour. What you need it peak detect. > >I agree but it's beyond our budget for this alone. By making dedicated kit of >our own, designed specifically for this kind of job alone we can avoid that >problem. > >Graham
Check leasing a good scope for 3 to 6 months. Might be worth it, then again it might not.
Reply by Nobody May 26, 20092009-05-26
On Tue, 26 May 2009 19:55:38 +0000, Nico Coesel wrote:

>>It's been my experience that it is easier to compile software under >>Linux. The lack of compilers for windows is the issue. I assume to > > Look for Mingw. Thats a GCC that works fine to compile software under > Windows. Still, more complex programs cannot be compiled easely > because of the Linux build tools.
MSys (hosted on the MinGW site) provides make, a shell, and most of the common text-processing tools (sed etc). This will allow a lot of Unix projects to build with little or no modification.
>>use the soundcard in windows, you need to use some windows API, and >>the documentation or lack thereof can be frustrating.
http://msdn.microsoft.com/en-us/library/ms713503(VS.85).aspx
Reply by Nico Coesel May 26, 20092009-05-26
"miso@sushi.com" <miso@sushi.com> wrote:

>On May 25, 2:21=A0pm, pantel...@gmail.com wrote: >> On May 25, 10:10=A0pm, "m...@sushi.com" <m...@sushi.com> wrote: >> >> > You can always dual boot a windows PC. >> >> It can be quite a challenge for a non Unix wizzard to start using >> Linux, >> especially command line tools like humfilter. >> As humfitler is a a simple command line program,. >> written in a simple C, and basically only >> does wav file format input to wave file output, >> it should be easily portable to DOS, and run in >> a MSDOS window in for example XP. >> Perhaps compile with the old djgpp compiler? >> Several of my programs have been ported to DOS by people. >> I am sure you can somehow send the wave output to a soundcard >> even in MS software. > >It's been my experience that it is easier to compile software under >Linux. The lack of compilers for windows is the issue. I assume to
Look for Mingw. Thats a GCC that works fine to compile software under Windows. Still, more complex programs cannot be compiled easely because of the Linux build tools.
>use the soundcard in windows, you need to use some windows API, and >the documentation or lack thereof can be frustrating.
Try to find a library that handles that for you. -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... "If it doesn't fit, use a bigger hammer!" --------------------------------------------------------------
Reply by Jan Panteltje May 26, 20092009-05-26
On a sunny day (Mon, 25 May 2009 20:50:48 -0700 (PDT)) it happened
"miso@sushi.com" <miso@sushi.com> wrote in
<d946c8cd-b785-4f80-a7da-97d8bcce5d2f@p6g2000pre.googlegroups.com>:

>It's been my experience that it is easier to compile software under >Linux. The lack of compilers for windows is the issue. I assume to >use the soundcard in windows, you need to use some windows API, and >the documentation or lack thereof can be frustrating.
humfilter does not use the sound card. It just creates a filtered wave file from a non-filtered wave file. there are plenty of free C compilers for MS win, including MS own one. But you can cross-compile on Linux too with for example DJ Delories djgpp as I pointed out. Or even native in MSDOS. I do not have it installed, but for 1000 Euro I could [make a DOS version of humfilter] :-) Else look here: http://www.delorie.com/djgpp/ Anyways, if you port my software (anybody) please keep to the GPL license conditions. I do no very actively pursue and search for GPL violations, but the FSF may torture you and send you to a jail in Cuba :-)
Reply by JosephKK May 26, 20092009-05-26
On Thu, 21 May 2009 21:48:23 -0700 (PDT), "miso@sushi.com"
<miso@sushi.com> wrote:

>On May 21, 2:04&#2013266080;pm, Eeyore <rabbitsfriendsandrelati...@hotmail.com> >wrote: >> "m...@sushi.com" wrote: >> > Eeyore <rabbitsfriendsandrelati...@hotmail.com> wrote: >> >> > > I am proposing to engage on a project regarding mains voltage 'purity' >> > > (and absence of ) with regard to audible clicks and pops in high-end >> > > professional and hi-fi audio equipment. >> >> > > Typical EMC filters operate in the RF band and are threfore no use to >> > > filter audio 'in band' noise that can travel through transformer >> > > interwinding capacitance etc. >> >> > > I have found some of the TI INA series that will with suitable >> > > preconditioning, tolerate mains voltages and give excellent common-mode >> > > etc rejection. So assembling a 'preamp' front end should be no problem. >> >> > > What I will need to do however is to filter all the mains frequencies >> > > and harmonics to a very large degree. >> >> > > I imagine I would need for example to null 50 Hz +/- 2 Hz to ~ -100dB. I >> > > have done only a little DSP ( I can't see it happening with analogue >> > > filters ) and I don't even know where to begin with such a severe filter >> > > without affecting the pass-band. Same will go for harmonics up to some >> > > serious number. >> >> > > Can &#2013266080;anyone offer some advice as to algorithms ( number of cycles for >> > > such a deep notch ) and even better, a readily available eval board upon >> > > which it could be set up ? Remember I only need to 'hear' audio band, so >> > > 44.1 or 48 kHz sampling should be OK esp given the oversampling ADCs >> > > today. >> >> > I'd be more inclined to sample the AC by phase locking to it. >> >> Yes, sampling the mains fundamental would be neat. I don't think you'd even >> need to be phase locked for simple notch filters. >> >> > Then you could easily create a comb filter to kill the power line >> > fundamental >> > and harmonics. This implies that you should use a 48kHz sample rate. >> >> Readily available. >> >> > I'm not sure you need any filtering prior to sampling given the >> > dynamic range of ADCs these days. >> >> Agreed. Just a simple first order at some high frequency for luck probably. >> >> > If your spike is say 70dB down from the carrier (60/50 Hz mains), I can't >> > believe it be significant to the >> > power supply design. >> >> I wouldn't make ANY assumptions of that nature with today's high SNR audio ! >> I've seen some astonishing things. >> >> > Besides basic DSP filtering, you could use LMS to get rid of the >> > fundamental. I suppose you could then LMS for each harmonic. >> >> Hadn't thought of LMS. Not looked at it in ages actually. You mean the >> off-the-shelf package ? A bit pricey IIRC. >> >> Graham > >I programmed the LMS fit. For the fundamental, you just phase unwrap >the sampled signal (presumably a sine) with an arcsin. The phase >versus time plot should be series of points that would ideally be a >straight line. If you fit a line to these points using LMS, the slope >will indicate the LMS best fit to frequency. At the time, that was all >I needed to do. But later I hacked a bit by creating a perfect sine >wave using this LMS derived slope. I don't recall how I did the >amplitude fit, but I think I didn't do LMS, but just ran some >optimizer to vary the amplitude to make the difference between samples >and the fitted sine wave go to a minimum. This is not a rigorous >solution to the problem, but probably valid. Note I did this a few >decades ago, so none of this is perfectly fresh in my mind, but the >technique as I recall it is sound. > >As a hardware person, I think the phase locked sampling and comb >filter would be the way to go. You probably would have to come up with >a VXCO for the phase locked source. I hate all this windowing stuff. >Synchronous sampling is much cleaner.
Sounds nearly sensible to the task, but does not address detecting the difference of line disturbances very well.