Commercial use without the permission of the author is strictly forbidden!
---------------------------------------------------------------------------
Disclaimer: The programmer can't be held responsible for ANY damages caused
by this software - use it at your own risc!
No fee whatsoever can be charged for the archive nor it's contense -not even
for distrubution expences (Aminet have exclusive right to distribute this
archive and charge whatever fee they seem suitable). This archive must be
distributed in it's original shape without any modifications.
---------------------------------------------------------------------------
Rescale Version 1.13 Copyright ©1999 Björn Ösberg
Usage: Rescale <SourceFile> <DestFile> SourceRate DestRate ReplayRate
If no replayrate is desired -enter sourcerate twice instead:
Or: Rescale <SourceFile> <DestFile> SourceRate DestRate SourceRate
Programming: Björn Östberg (JetRacer@Hem.Passagen.se)
Additional Code By: Fredrik Rambris (Fredrik.Rambris@Amiga.nu)
Visit our site: www.Amiga.nu
Rescale v1.13 68020 and 68020/68882 versions are included in this archive.
Installation:
Copy the version of the executable you prefer (68000 68020 68020FPU 68040)
to the directory where you want it ( "C:" is recommended) Rename the
executable to just "Rescale" for your own convinience. Copy the readme to
the directory where you store program documentations (ie. "Docs:" or
whatever). Done!
Description:
Rescale is a resample utility (SHELL only) which resamples standard 8SVX raw
sounds. The resample method used in the Rescale utility is vector based
scaling -similar to the one used in sizeable fonts but Rescale have
antialias output.
Running Rescale without any statements or faulty syntax will make it type
out some instructions aswell as copyright and version info. There are no
restrictions for the rates values so be carefull(!). A nice side-effect of
the previus is that you can specify the relation between source/dest/replay
in any way you like (but remember that you CANNOT mix different relative
values f.ex. samplerates and periods). Examples:
Downsample rate 16726(C-3) to rate 33452(C-4) with a 44.1KHz replay rate
Rescale <SourceFile> <DestFile> 16726 33452 44100
Downsample period 127 to period 254 -no replay rate
Rescale <SourceFile> <DestFile> 127 254 127
Rescale Wavelength 320 to Wavelength 256 -no replay rate
Rescale <SourceFile> <DestFile> 320 256 320
Etc.
Rescale can actually be used to rescale any signed 8-bit raw datafile at
all. -Usefull for programmers who wants to rescale sinus tables or whatever
with very high quality. Rescaling from a 256 samples original will produce
a 100% result.
In practic
¯¯¯¯¯¯¯¯¯¯
-That sounds nice but what does it all mean?
Well, f.ex. that you can resample to nearby frequencies without any
hearable quality loss (unlike the majority of trackers and editors). F.ex.
resampling a note D-3 instrument to a note C-3 instr. produces no noise.
You can also downsample with insane rates as 1:4 or below without jitter
(with reservations for the 8-bit format itself) and without the need for
filters thanks to the anti-alias.
Quality loss
¯¯¯¯¯¯¯¯¯¯¯¯
If you have resampled chords in protracker (or whatever) you know that it
sound crappy. What most people don't know is why:
With probably no exceptions - the sample editors/converters and composer
programs of today all use the classic integer-based skip/duplicate or
skip/mix 50%/50% resample methods. These routines create serius aliasing
errors which result in a very poor soundquality.
Or in laymans terms: it produces transient noise and static tuning errors.
About the programmer
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I (Björn Östberg) created the Rescale utility as an exersize learning
ANSI-C. Have no fear -An experienced programmer and friend of mine (Fredrik
Rambris) had a peek at the source before I released it and he had no
objections whatsoever. He also helped me out with the AmigaOS filehandling
(since the ANSI-C filehandling sucks!) and memory allocation using Exec. The
rescaling rutine is small enough to be rather harmless so that rules out
most error sources. I also have extencive experience with the programming
language Basic aswell so I'm no real freshman programmer.
In the near future (before Y2K):
·Proper syntax without the demand for a defigned replayrate.
·IFF 8SVX support
·AIFF support
·AIFF-C support
·Wav/RIFF support
·Multichannel support
·8/16/24/32-bit support
·Boopsi GUI
History:
v1.13 99-05-31 (Current) I put Rescale under the microscope and discovered a
serius bug! The StormC compiler ROUNDS OFF floats to integers! That
produced some transient noise that shouldn't have been there. Fixed the
bug anyway. Now things are as smooth as they where supposed to be =)
Included optimized versions for a number of processors (Hi Claude!).
I also fixed the bad progress display to show both progress aswell as
the final size (in bytes). The cursor seems to have it's own life though
and I suspect that I should have included a pause or something for it to
settle (darn annoying), but I don't know how to do that just yet (or just
turn it off for that matter).
v1.12 99-05-17 Never released (Hi StarFox!). Discovered an embarrising lack
of error messages if the infile didn't exist or there wasn't enough
memory to allocate processing buffers. Now Rescale blames the user for it
by printing a lame standard error message =)
BIGBUG(!) in the README file; the readme stated that it was okay to mix
different kinds of values f.ex:
'Rescale Infile Outfile 1 2 44100' WARNING: DO NOT TRY THIS!!!
It's NOT okay to mix a relative 1:2 ratio with a samplerate value!
The above syntax will multipy the length of the original sample by 88200
times... Not funny if you are working on a machine capable of allocating
that amount of memory (VMem or a 040/060 board)!
v1.11 99-05-05 First release. Small bugfix: Minor UI errors...
Major Aminet upload problems due to lack of initiative =)
v1.1 99-04-09 Bugfix: Fixed a defect statement
causing the help text to be typed no matter if the user syntax was
correct or not. Fixed minor bugs; some spell errors, etc. Wrote ReadMe
files, compressed AmiNet LHA Archive, and such. The utility was created
and converted within six days.
v1.0ß 99-04-08 Added the help text to the main.
v0.9 99-04-08 Completed Basic convertion. Got some help with AmigaOS
filehandling & arguments parsing, aswell as memory allocation using Exec.
v0.8 99-04-07 Did most of the convertion to ANSI-C, compiles just fine
-the C version doesn't do anything usefull yet though.
v0.7 99-04-05 Re-arranged the scaling routine written in Basic to a
procedure, added requesters and simple error handling.
v0.6 99-04-03 Wrote a scaling routine in Basic within 10 minutes. Was in a
state of shock the rest of the day since the routine worked at the first
try (almost) and only produced a guru once ;-)
For those of you with CD-R:
I'm working on an ultra qualitative tracker-to-sample rendering program
-using this very scaling routine and some other cool stuff. Much can be done
to improve the quality of the protracker replay, but even more if you are
working without a realtime demand. Floatingpoint volume slide with continous
updating, antialias vibrato, etc. I'm a reverb nut so I think I'll just
throw in some of that too. My reverb routine handles 4-256 channels highly
qualitative reverb. Natually I will support AIFF, AIFF-C, WAV & RAW signed/
unsigned 8/16/24/32-bit - aswell as a stereo surround audiomodes (with
advanced reverb). Note: This one is still vaporware.
For musicians and nirds:
Ontop of the previus I'm co-working on a sample editor/creator/sampler/
mixer/ etc. program called Soundfactory(t). REAL cool stuff. Advanced
synthetics, advanced reverb, digital equalizer, advanced professional
editing tools, professional multichannel editing and mixing, direct HDD edit
with disk cache, HDD recording using AHI, a full tracker composer, all
within a single program. Really advanced programming style: main executable
is hosting external gui and function modules. Fault tolerant design, etc.
Fredrik Rambris (Fredrik.Rambris@Amiga.nu) is coding the hosting skeleton
executable and as soon as he have set the final standard for the gui &
function modules I can start creating some of the function & gui modules.
Because of this modular design we can add anything we like to the skeleton
without even touching it ever again -even advanced stuff like a tracker
composer. By separating the GUI from the functions we can also support
multiple GUI systems easily and use universal processing functions.
On what platform? AmigaOS!
When? Our goal is before Y2K, but we will probably break that deadline.
This one is NOT vaporware - development in progress...
Greets to: Boost, Executor, StarFox, Claude Heiland-Allen.
Björn Östberg <JetRacer@Hem.Passagen.se>
SpEEd Productions Site: http://www.Amiga.nu -Soundfactory Development News
|