[GreenKeys] Saving RTTY art as audio

Bob Camp ham at cq.nu
Tue Feb 15 18:21:41 EST 2005


Hi

With most compression methods there are ways to "soup it up". One 
possibility would be 4KHz sample rate. That may not be inside the mp3 
standard though.

I'm certainly not a Java programmer so I can not answer the question 
with any certainty. What I can say is that it's pretty darn easy to do 
in any of the languages that I do code in. I *assume* that any more if 
you can do it with VB or with C you can do it with Java.

Pretty much all you would need is:

1) Select a file  (Java *can* do that)
2) Open the file as text (ditto)
3) Parse the file format down to bits (ditto)
4) Select one of two wave files to play (ditto)
5) Push the wave file to the audio port (99% sure about that)
6) Wait until the wave file is done (if it can push it out it can check 
for done ...)
7) Loop until done (Java can do that)

The only two wave files you need are one for a one baud wide mark and a 
one baud wide space tone. The rest of the app would be straight code. 
You could change the shift and the speed by simply changing out the 
wave files. If you got a very small drop out between the "bits" coming 
out the audio port then the TU would take care of the situation. The 
speed coming out of the computer might be slow by a percent or two but 
that's the direction you would want to be off.

I can't say for sure you can do it, but I'd bet a roll of used yellow 
paper that it's possible.

	Take Care!

		Bob Camp
	`	KB8TQ


On Feb 14, 2005, at 11:30 PM, David Ross wrote:

> greenkeyers -
>
> Bob Camp wrote:
>> If I have a four hour tape and save it as binary it takes up about 
>> 80K as straight file. If we zip the thing it will drop down to less 
>> than 30K since the mapping is not very dense. A few thousand tapes 
>> will take up 30 Megs on a web site. That's not to tough to find space 
>> for. Zip compression is not lossy you loose nothing in the process.
>> If you do a normal audio CD then the same four hours will soak up 640 
>> meg x 4 = 2.5 gigs. A reasonable compression probably drops that to 
>> 200 Megs. Since sound compression is lossy you don't want to crank it 
>> up to far. MP3's are designed so the compression artifacts are not 
>> audible to the human ear. The same may not be true of a TU ....
>> Run up as MP3's the thousand or so tapes would soak up 200 Gigs on 
>> the web server. That's quite a bit more storage than the zip files.
>> It would be more practical to set up a java app that would take the 
>> binary file and put out tones. That way you would have the best of 
>> both worlds.
>
>
>
> I have been playing with exactly this -  converting ASCII text files 
> to RTTY tones.  I run an ASCII text file through MMTTY to make Baudot 
> audio tones, capture the audio tones to disk as a .WAV file, then 
> convert the .WAV file to a .MP3 file using an .MP3 encoder.
>
>   Running at 60WPM, 46,238 bytes of ASCII text converts into 8,140,640 
> bytes of .MP3 audio, and that is done at 8Kbits/second -  every byte 
> of ASCII text converts to 176 bytes of .MP3 audio.
>   If the .WAV -> .MP3 conversion is done at 16Kbits/sec, then the file 
> size is 16,280,719 bytes.
>   All this for 2 hours and 15 minutes of 60WPM text -  not very 
> efficient as far as disk space goes...
>
>        46,238 bytes of .TXT files converts to
> 1,435,870,862 bytes of .WAV files (44.1 Ksample/sec, 16 bit stereo), or
>     8,140,640 bytes of .MP3 files (at 8Kbits/second)
>
>   The above conversions were made using 850 shift, but I would guess 
> that 170 shift would give the same results.
>
>   With my own conversions, I see no print errors at either 8Kbits/sec 
> or 16Kbits/sec.
>   Nor do I see any errors on George's Internet feed at 24Kbits/sec, 
> either [Winamp -> MMTTY] or [Winamp -> Dovetron -> Model 28].  
> However, George's 24Kbps feed causes consistent underflows here, given 
> a 26.4Kbit ISP connection.
>
>   Using MMTTY to convert ASCII text to Baudot tones is the time 
> bottleneck, being done in realtime as it is.
>   The conversion from .WAV file to .MP3 file is quite fast -  I use 
> the LAME 3.91 encoder -  free & reasonably fast, it runs in a DOS 
> window.
>
>   Is it really possible to do the text-to-tone conversion with a Java 
> application?
>
> Dave Ross    N7EPI
> _______________________________________________
> GreenKeys mailing list
> GreenKeys at mailman.qth.net
> http://mailman.qth.net/mailman/listinfo/greenkeys
>



More information about the GreenKeys mailing list