home *** CD-ROM | disk | FTP | other *** search
- Release note for "TimeStrech V.01 alpha" or something.
-
- Introduction
- ============
-
- Those of you who're into jungle-music will definitely have heard
- the effect this little hack produces. It's called timestretch and
- attemps to change a sample's replay-length without changing it's
- pitch. The way this is achieved is so slobby that it creates
- awful distortion which, in fact, isn't totally unwanted.
-
- This little hack was written for my private use as I'm trying
- to make some jungle-soundtrackers and this is why the "user-interface"
- sucks big rocks.
-
- Usage
- =====
-
- To use this routine in it's present stage copy the samples you
- want to process into "!Stretch.Input.", edit the
- chsize%, smooth% and stretch values in the source, run it and
- the processed samples will be put into "!Stretch.streched.".
- Read on to find out what these values mean.
-
- In the current stage the routine only copes with raw 8bit linear
- unsigned samples. This was easiest so I didn't bother (there's
- enough tools out to convert samples). Blowing the routine up
- to 16 bit is dead easy, but as I've got no 16bit sample-replay
- hardware I don't care aswell.
-
-
- The Algorithm
- =============
-
- This routine works the following way:
-
- The sample is divided into chunks (and chsize% is the size of
- these chunks). Here's an example with chsize%=4 (which is
- purely for demonstrative purposes, this value'd be nonsense):
-
- |--------------------- sample --------------------|
- __________________________________________________
- | | | | | | | | |
- | 1-4 | 5-8 | 9-12|13-16|17-20|21-24|25-28|29-32| ...
- | | | | | | | | |
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Now a sliding window technique is used to copy the
- chunks apart. After the end of chunk 1 the window
- gets slided conforming to the stretch-value, so
- given a value of 2 the routine would place the 2nd half
- of chunk 1 and the first half of chunk 2 after chunk 1,
- followed by chunk 2, then the 2nd half of chunk 2 again
- and so on and so forth.
-
- Something like this, anyway:
- __________________________________________________
- | | | | | | | | |
- | 1-4 | 3-6 | 5-8 | 7-10| 9-12|11-14|13-16|15-18| ...
- | | | | | | | | |
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Thus effectively doubling the sample-length by somewhat
- retaining the original replay-rate.
-
- Now this would lead to clicks at each cut giving a very
- noisy output (try it using smooth% = 0) so now these
- new chunks are shoved into another by smooth% samples and
- are linearly blended (which means high smoothing values
- shorten the sample a bit. Take this into account when you
- need precise stretching).
-
- Now you might notice that you can freak out the routine
- by setting smooth% > chsize%. But this still gives
- results that sound like a time-stretch so what the hell...
-
-
- Well, basically this is all. Easy innit ?
-
- Known bugs
- ==========
-
- The routine crops smooth% bytes at the beginning of
- the sample and creates some crap padding at the
- end of it... lets say: the processed samples need
- a little polishing afterwards...
-
-
- Legal crap
- ==========
-
- This is public domain. I don't want to have anything to
- do with this. Sell it, smoke it, use it, change it. I don't
- give a shit.
-
-
- Author's speech
- ===============
-
- The first day I saw AudioWorks at my local Acorn
- store I thought this was going to be a fine package some day,
- but it it's current state it's just as crappy as DSEdit or
- Armadeus. And as long as AudioWorks does not feature
- FFT-analysis and filtering, better spectrals, noise-filters
- and still crashes around on 12 bit samples (how come you
- include something in a professional product and don't even
- notice it does't work or what ?) I'm not gonna buy it.
- My advice: take a peek at COOL for windoze, it's 5$ shareware
- and kicks butt (if you give it a night for 100KB samples :) ).
-
- Well, erm, this is the reason why I started to code this one.
- I'm not gonna write a sample-editor myself, but maybe some
- folks who do realise that's it's bloody time to advance to
- some trickier sample-processing than just fading up and down.
- These are invited to use this code (ask me, I might convert
- it to assembler and fix some dodgy parts).
- And maybe there're other enthusiasts so we'd start a little
- collection of sample-processing-routines and do something
- senseful with it someday.
-
- How to contact the author
- =========================
-
- Internet's best, so send E-mail to "unao@rz.uni-karlsruhe.de".
-
- Then we've got snailmail: Benjamin Bommer
- Nuitsstr. 2c
- 76185 Karlsruhe
- Germany
-
- (and let me state that I'm only studying here. I'm from Berlin
- and don't want to be taken for a south-west-german moron with
- a speech-handicap, moustache, golden chain and shoulder-long hair)
-
- And after all you can ring : +49/721/55 21 34
- (and keep in mind this is GMT +1)
-
-
- So this is it fellas. Laters !
-