Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

LF: Re: Experimental software for WSPR-8 and -32

To: <[email protected]>
Subject: LF: Re: Experimental software for WSPR-8 and -32
From: "Markus Vester" <[email protected]>
Date: Sat, 22 Sep 2012 15:35:07 +0200
Cc: <[email protected]>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com; s=20110426; t=1348320915; bh=U/HNaIIGUF4QCEfP4sLP+I+z3j7GgYRC0COliw5PkuY=; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type; b=wpeD+3rbEaskNKlZZh6dUyukNSm+gtan6p/u4f51+48u6IWm/1W9Y2r3lcDm0X97t UpVmexsyoPblfuMTYkUPW8dQJWfWbEWrYSWhbSgv7VbeXSy02cvaZFkPi8hll5ShSp BjfFj641aFlG8DLeeD3+V/ptp6M3lFjlwTMgkbvk=
Importance: Normal
Reply-to: [email protected]
Sender: [email protected]
Hi Andy,
 
yes, this would surely work. After all I'm doing basically the same thing here, only with different tools.
 
Using wav files, you would probably need to set your RX to some low audio frequency (< 750 Hz), such that the accelerated output can be accomodated by the maximum BFO setting in WSPR (3 kHz). BTW you could even get away without the samplerate patch, by changing the speed in the Windows soundrecorder SndRec32exe.
 
Wonder if you can possibly detect transmissions from DK7FC or myself this afternoon?
 
Best 73,
Markus (DF6NM) 
 
 
 
Re: [rsgb_lf_group] Experimental software for WSPR-8 and -32

Here is a utility to change the sample rate stored in a .WAV header.  
And yes, the date on the files is genuine, it really was written in 1999 !    I've included the PowerBasic source code for interest.   Run from a CMD prompt.
 
 
I've just tested it with a file containing a 300Hz tone at 3000Hz sampling rate, speeded up to 12000Hz / 1200Hz audio.
 
SndRec32 and Gram (the latter in analyze file mode) both were happy with the original 3kHz sampling rate so windows and the sound card can cope with this non-standard value.
 
The way windows seems to cope with different sample rates, it appears to always work with multiples of 300Hz - which explains why 11025Hz often ends up at 11100Hz (1.0068 times higher - recognise that number WSJT users?) so its worth keeping with 3000, 6000 etc at the slow side.
 
Andy  G4JNT


 
On 22 September 2012 11:23, Andy Talbot <andy.g4jnt@...> wrote:
There may be another way to use SlowWSPR using simple sound record and playback tools and a wav file editing facility.  The technique is based around .WAV files and changing the sample rate stored in the header.   My understanding is that SlowWSPR uses 1/4 or 1/8 the frequency spacing with a corresponding reduction in the symbol rate - ie both go together so after making allowance for the audio tones, changing the sampling rate will give teh correct symbol / spacing change
 
First save a complete SlowWSPR transmission, recorded at an audio frequency of 1500/4 = 375Hz or 1500/8 = 187.5Hz and  a suitable sampling rate - like 6000 or 12000 S/s.   Then edit the wav file header using a suitable tool (I'll come to that shortly) so it appears to have been sampled at 24000 or 48000Hz or whatever.   This will then replay at standard WSPR spacing and symbol rate - at a proportionately  higher audio centre frequency -and can be decoded with the WSPR software.  
Transmission reverses the process, slowing down the wav file.   
 
Sample rate is stored in the .WAV file header as a 32 bit number.    The portion of listing below (in the Basic programming language, so variable types are defined by their suffix)  shows how the various parameters are extracted from a .WAV file header.  Changing the sampe rate involves putting appropriate values into the SampleRate&  field.  To be strictly accurate, the BytePerSec& ought to be changed as well, but in practice this often isn't necessary - try it and see.
I haven't tried this, but many years ago I did speed up wav files by a huge factor to listen to HF ionospheric Doppler.    However, these were synthetic .WAV files generated from VERY slow samples (just a few Hz sampling rate) then speeded up 1000 times by the simple process of making the header info  any value I wanted.   It worked fine, and the sounds of ionospheric Doppler shift from teh carriers of distant broadcast signals recorded over a several hour period then speeded up to a few seconds were wonderful to listen to.  The nearest I can explain is that teh saound was a bit like that of whales.
 
The software to do that is lost in the mists of time (needing the Motorola 56003EVm to sample and generate data for the  raw file, and all done with G3PLX's help) but there is no reason a fully PC / Sopundcard based solution couldn't be made to do the same job.
 
Andy   G4JNT
 
 
Reading bits of a .wav header
' in the Basic language,   suffix % = 16 bit int, & = 32 bit int, $ = string
 
open "b" , 1 , wavfile$
get 1 , 16 , size&  'Size of file
get 1 , 24 , SampleRate&  
get 1 , 34 , BitsPerSample% 
get 1 , 40 , SizeOfData&
get 1 , 22 , channels%    'in case its in stereo
get 1 , 28 , BytesPerSec&    'bytes / playing time
get 1 , 32 , BytesPerSample%
do
   seek 1 , thisloc&
   get$ 1 , 4 , d$
   incr thisloc&
loop until ucase$(d$) = "DATA" or eof(1)
get 1 ,, SizeOfData&
  'now positioned at start of data
 
 
Writing a complete .wav header (for mono data)
 
 
open "b" , 2 , wavyfile$
riff$ = "RIFF"  : put$ 2 , riff$
chunk& = records& * 2 + 36 : put 2 ,,  chunk&
wave$ = "WAVE" : put$ 2 , wave$
fmt$ = "fmt "  : put$ 2 , fmt$
size& =  16 : put 2 , 16 , size&
equals1% = 1 : put 2 , 20 , equals1%
channels% = 1 : put 2 , 22 , channels%
samplerate& = srate& : put 2 , 24 , samplerate&
BytesPerSec& = srate& * 2 * channels% : put 2 , 28 , BytesPerSec&
BytesPerSample% = 2: put 2 , 32 , BytesPerSample%
BitsPerSample% = 16 : put 2 , 34 , BitsperSample%
seek 2 , 36
d$ = "data" : put$ 2 , d$
SizeOfData& = records& * 2
put 2 ,, SizeOfData&
'  Start storing the 16 bit samples...

 
<Prev in Thread] Current Thread [Next in Thread>