Posted: Sun May 10, 2009 6:57 am Post subject:
A fun experiment
I worked on this one a few years ago, but decided that I needed more data. This is what I did yesterday:
This site: http://resource.npl.co.uk/pressure/pressure.html, contains historical data from a barometer in Teddington, UK, just outside of London. You can define the time span that you want the data from so I took the last 8 years (April 2001 - May 2009)and got the raw data from it. I stripped the dates from the text in MS Excel and fed it into Adobe Audition, where I did a DC removal and amplified it by about 45 dB, then cut the subsonics.
My wav file is about 8 seconds long, roughly corresponding to 8 years of pressure changes, and you can hear the distinct changes over a single year. If you count the repetitions, you get eight of them.
There are some clicks in there which is probably my fault (Excel will only load about 16300 rows at a time, so I had to chop he data up and do it piece by piece), but the steady tones you can hear are a mystery to me...
The thought behind this is that barometric changes and sound are the same - pressure changes over time. One is just a little slower than the other.
8years.wav
Description:
Wav file containing eight years of barometric pressure changes in Teddington, UK
Posted: Sun May 10, 2009 9:55 am Post subject:
Re: A fun experiment
Muied Lumens wrote:
I stripped the dates from the text in MS Excel and fed it into Adobe Audition, where I did a DC removal and amplified it by about 45 dB, then cut the subsonics.
Did you feed a text file to Audition or did you make it binary first?
I'm asking as I repeated the experiment and get a different outcome ;-)
As in that the days are audible as a tone of about 153 Hz.
Of course! That sounds plausible.
I stripped off the date and time data before I fed it straight into audition. Because of the way I did it, I'm not surprised you got a different result. _________________ Muied Lumens Sub Forum Bandcamp
Jan
yours sounds different because you are located in the Netherlands. I can hear the rain from here
You don't need a Ph.D to understand something this simple _________________ homepage - blog - forum - youtube
Quote:
Don't die with your music still in you - Wayne Dyer
I stripped off the date and time data before I fed it straight into audition. Because of the way I did it, I'm not surprised you got a different result.
I stripped the dates off as well and then I ran this code on it to make a binary file that I read into cool edit.
procedure ReadData( const aFileName: string);
var
aFile : TextFile;
S : string;
i : Integer;
p : Integer;
N : Integer;
sum : Int64;
begin
AssignFile( aFile, aFileName);
Reset( aFile);
AvgN := 0;
sum := 0;
SetLength( Data, 1024);
p := 0;
try
while not Eof( aFile)
do begin
ReadLn( aFile, S);
N := StrToIntDef( S, -1);
if N >= 0
then begin
sum := sum + N;
if p >= Length( Data)
then SetLength( Data, Length( Data) + 1024);
Data[ p] := N;
Inc( p);
end;
end;
SetLength( Data, p);
AvGN := sum div p;
for i := 0 to Length( Data) - 1
do Data[ i] := ( Data[ i] - AvgN) ;
finally
CloseFile( aFile);
end;
end;
procedure WriteData( const aFileName: string);
var
aFile : file of SmallInt;
i : Integer;
begin
AssignFile( aFile, aFileName);
Rewrite( aFile);
try
for i := 0 to Length( Data) - 1
do Write( aFile, Data[ i]);
finally
CloseFile( aFile);
end;
end;
procedure DoIt;
begin
ReadData( in_file_name);
WriteData( out_file_name);
end;
procedure TForm1.BitBtnDoItClick(Sender: TObject);
begin
DoIt;
end;
Jan, I'm assuming that you normalised and DC corrected the data, but I'm not a programmer, so I can't tell much from looking at your code.
I did that in Excel, using a small collection by taking the average and converting the numbers to positive and negative values. I also checked the graphs from the NPL site to see that it corresponded with the wave in AA. As far as I could see, it correlated well enough for my unscientific purpose...
Jan, I'm assuming that you normalised and DC corrected the data
I subtracted the average value from each data sample to remove the DC component, but didn't normalize ... I meant to do it, but there was a reasonable amount of signal, so I just later normalized in Cool Edit to -3 dB.
The biggest difference is that I saved the file as binary data, where you saved it as text probably ... but then your wave would have looked very different from the graph on the site ... so I don't quite get that bit
Anyway, I checked my wave against the plot on the site as well, and thought it to look similar.
Oh there is an interpretation detail .. I set it to read data as if it were 16 bit mono PCM, your file is shorter, so probably you imported it with other settings.
Edit : I took the dots out of the data, effectively multiplying by 100.
I did import a text file indeed, and was a little unsure of how the commas would be interpreted by the software, 16 bit 44.1 kHz mono. The general trend is the same as the plot, but I guess yours is much more accurate in the detail. The reason mine is a smaller file is because I pitched it up to correspond with a second a year. I conveniently forgot to mention this earlier.
You did it the proper way, so I trust your judgement. I've got to learn myself how to do some of that fancy code. _________________ Muied Lumens Sub Forum Bandcamp
I've got to learn myself how to do some of that fancy code.
Copy it (using Free Pascal and Lazarus)
The code minorly stumped me in formatting here and there but then, I'm just used to various forms of Basic (with a bare smattering of C and C++ and a few glances at 8 bit Assembler) over the years.
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Fri May 15, 2009 7:40 am Post subject:
I vaguely remember reading that a telecom twisted pair cable buried underground in North America has an impedance variation which is roughly sinusoidal. I think it was due to winter/summer temperature variation. _________________ "Let's make noise for peace." - Kijjaz
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum