January 14 – 27, 1993 I worked on a project to convert any uncompressed 8-bit digital sounds t

January 14 – 27, 1993 I worked on a project to convert any uncompressed 8-bit digital sounds to a format I could use on my computer. (Tandy 1000 TL). Looking back at my 1993 self from my 2019 self is interesting but how I did pseudo-code interests me more. I was driven by the impossibility of the task: It wasn’t going to be perfect as I did not have access to the header files of other sound files. But I also knew “Headers are basically GARBAGE DATA if you’re not using them, so just INCLUDE THEM” and tack on a new header for your needs. It worked. It was spread around to a lot of folks at the time online through PC-Link / AOL and BBS’. Three years later, a guy named Jeffrey Hayes took my code and improved it – not once but twice – and his documentation called me “Disappeared from the internet”.
 
{pseudo-program – ’cause it seems to help program development!
 
define deskmate sound header.
start program.
print_banner; (* glory lines *)
 
IF no command_line_parameters THEN message1 ELSE BEGIN
search for file listed in command_line_parareter.
IF file doesn’t exist THEN message2
check file length;
sample_size := file length – # of bytes in header.
sample_rate := fixed rate or another command line parameter.
 
open new file called DM_SOUND.SND for writing
add header to beginning of DM_SOUND.SND
open FILENAME.SOU for reading
add FILENAME.SOU to end of DM_SOUND.SND
CLOSE FILENAME.SOU
CLOSE new file.
 
report success or failure in operation;
say our goodbyes;
print_end_banner;
 
print_banner:
WRITELN(‘xxx program by Kenneth Udut’);
 
message1:
WRITELN(‘You must specify xxx arguements’);
print_end_banner;
 
message2:
WRITELN(‘file xxx doesn’t exists’);
print_end_banner;
 
print_end_banner:
WRITELN(‘write the author xxxxxx’);
halt;
END.
 
——————
The original one (I think) that I spread around.I knew enough marketing to say “Uploaded by friend of author”https://archive.org/details/conv2snd_zip
================
In the source code, I gave my thoughts on distribution:
 
This program is 100% public domain. Use it as you will, play with the source code, use the source code, and even ask money for your revised versions of it!
 
Just give me a BIG THANKS and, if you don’t wish to FREELY distribute YOUR source code, -please- make it available for others for a SMALL fee.
 
Thanks! –Kenneth Udut, age 20, 14-JAN-1993
=======
         Here’s the magic sequence:IF sample_size < 256 THEN samp_char_1 := CHR(sample_size)
ELSE BEGIN
IF sample_size < 65536 THEN
BEGIN
samp_char_1 := CHR(sample_size div 256);
samp_char_2 := CHR((sample_size div 256) + 1);
samp_char_3 := CHR(0);
END
ELSE
BEGIN
samp_char_1 := CHR(sample_size div 65536);
samp_char_2 := CHR(sample_size div 65536);
samp_char_3 := chr((sample_size div 65536) + 1);
END;
END;WRITE(header_part, samp_char_1, samp_char_2, samp_char_3);

In other words, a file less than 256 bytes is encoded by just using
the corresponding ASCII code.  A file from 257 bytes to 65535 bytes
uses TWO bytes to signify file size.  A file from 65536 onward and
upward uses THREE bytes to signify file size!

I’m not an engineer, and this whole idea is just a little beyond me,
but the power of HACK helped me immensely here!

=====
 Wow, it took 10 days JUST to get it to work at all.January 24, 1993
1.37: first working copy.

Also, there is a “click” at the beginning of the sound file. This
is merely the header of the ORIGINAL file, which can easily be
edited out.

January 14 – 24, 1993
1.00 to 1.36: struggled to get a working copy of this program going!

January 14, 1993 – start of the programming for CONV2SND!

======
 “digitized sound files are practically all identical in makeup.
atari, amiga, tandy, soundblaster, sun, all create the same basic
digitized sound files.

the difference lies in the ‘header’.

the header of a file is a small series of bytes, 44 in the case of
DeskMate .SND files. The purpose of a header?

a header tells the program how big the file is, as most programs
that read digitized sound files need to be specially told how many
bits of sound it needs to load up. it also might tell you the ‘name’
or description of the sound file. the sampling rate (how fast the
sound was recorded and should be played back) is also usually
included.

=====

Leave a comment

Your email address will not be published. Required fields are marked *


+ two = 4

Leave a Reply