wave file editor to play with

Charles Hallenbeck chuckh at mhonline.net
Sun Oct 1 16:17:37 EDT 2000


Hi Geoff -

The "#x" and "#y" are meant to suggest just any old arbitrary numbers,
although the '#' is required. For instance, to copy track #1 to just after
track #5 you would enter "copy #1 #5". If you omit the destination number
then the track is duplicated right next to itself. If you then join them,
you have the original track concatenated with itself.

I guess it needs more of a manual... I promise it will be coming. I need to
also define a "gap" which is what separates one track from another. A gap
can be automatically detected if you wish (that is the default) and consists
of a 100 ms period of identical successive values. That many successive
identical values will produce no sound, no matter what the values are, and
in all likelihood they are zeros (or might as well be). How many samples
that is will depend on the sampling rate, sample size, number of channels,
etc., but 100 ms is the basic unit for a "gap" with this package.

You may find that a wav file only has one track - no gaps - that will
usually be the case. But you can split that trick in two with the command
"split #1" in which case it is split in two equal parts. the second argument
to "split" is a percent, with the percent sign first (for parsing
convenience) so if you want to split off just the first %10 of a long track
forspecial consideration, it would be "split #1 %10". Now you have two
tracks, but no gap has yet been placed between them. To place a gap of zeros
after the first of these two tracks, the command is "zero #1". Saving these
two tracks with their intgervening gap will produce a file which when you
next read it, will remember how many tracks you created in it. deleting (or
"drop"ping) the gap will cause the two tracks to be concatenated when
written to a file, so you will not later know anything about the division.

The "play" command also takes a track specifyer, such as "play #1" or "play
#3" except that now you have two more possibilities. You can say "play *"
and hear all the tracks, gaps and all, or you can specify a number of
different tracks in any order and hear them that way, as in "play #1 #5 #3
#9"

The "plot" command is perhaps the least obvious. It will show you four
different statistics calculated for each eighth of a track's duration. The
four statistics are "min" and "max" (obvious I hope), "drift" and "swing".
The "drift" is simply the ordinary mean of all the sample values. It ought
to be zero (or 128 for unsigned bytes) but may have "drifted" away from
zero, producing a DC component to the signal. The "swing" is the standard
deviation (engineers call it a "root mean square") and is a better index of
loudness than the min/max values. Each of these four statistics is shown for
eight equal divisions of the track's duration, so you can see how the values
progress across the track. I have played with this a lot and find that eight
is as many divisions as I can easily grasp at a time. You can always "split"
the track and repeat the "plot" on a smaller region, essentially zooming in
on it.

As for the -e switch, I think you are absolutely right - and I will get rid
of that as soon as I get a decent computer to use again! One thing I did not
mention is that when you use -m or -w to automatically process a file (as
opposed to editing it) it applies the "gain" command to bring the min and
max values as close to the limits of the sample size as possible without
clipping.

Sorry for the incomplete documentation, but thank goodness I put it out
there when I did, or it would now be a goner, I'm afraid!!!

Hope some of this helps... Chuck.




More information about the Speakup mailing list