los - Loop Offsetting Sequencer
- Introduction
- Compiling
- Operation - Basics
- Operation - Advanced
- Switches - Summary
- Scripting (-f)
- Contact
- License
- Waranties
- Bugs
- TODO
1. Introduction - los 0.0.3
LOS is a loop offsetting sequencer. It is specialiced in offseting sample positions within sound files.
LOS and examples can be found here:
http://members.chello.se/hampasfirma/los/index.html
LOS have been succesfully been compiled with:
alsa-driver-0.5.11
alsa-driver-0.9.0beta4
LOS also supports OSS.
2. Compiling
Type make for an instruction.
make alsa
make oss
make dummy
alsa - with alsa support. You need ALSA for this.
oss - with oss support.
dummy - no sound support. You need to pipe the output to a file or another sound program.
3. Operation - Basics
./los [switches] wavefile.wav
- examples
- 1. play a wave and loop forever (use CTRL-C to quit). ./los amen.wav 2. set the length of the wave to 15000 and loop forever. ./los -l 15000 amen.wav 3. Every loop offset the the length withing the sample 500 samples. ./los -l 15000 -o 500 amen.wav 4. Start with a small loop then increase the length with 50 samples every loop. ./los -l 100 -L 50 amen.wav 5. Play a loop 4 times before adding offset. ./los -l 5000 -R 4 -o 5000 amen.wav 6. Play a small offsetted loop in reverse mode. ./los -l 30000 -m 1 -o 1000 amen.wav note: -m 0 is forward, -m 1 is reverse, -m 2 is alter(forward-reverse-forward...): 7. Play a small loop 4 times starting at position 400000. ./a -l 45000 -r 4 -s 40000 amen.wav 8. Play a tiny offsetted loop with the total length of 1000000 samples. ./a -l 500 -o 100 -t 1000000 amen.wav
4. Operation - Advanced
How to make things be on beat.
Use -x flag to calculate some numbers on your loop.
If you offset large loops the tempo will change.
example:
Lets say your loop is 120000 samples long and you want to
play two 8's of that loop so you type the following.
./los -l 40000 myfile.wav
Then you want to add some offset to the loop of 5000 so you add: ./los -l 40000 -o 5000 myfile.wav.
This will change the tempo of your song. To make it the same tempo you will have to change the length of the loop aswell. So the correct lenght would be: ./los -l 35000 -o 5000 myfile.wav
5. Switches - Summary
Controling start end and offset positions:
-s n start Position -e n end Position -l n lenght -L n Length Offset -o n offset -O n Offset (offset is added before the loop is played. This is usefull in scripts) -p pause. Play silence (used to insert pauses in scripts).
Controling repeats, total length etc:
-r n Repeats(offset). How many times the loop will repeat before offseting.
-R n Repeats(total). How many times the loop will repeat before exiting.
-t n Total Length before exiting. total number of samples that will be played before exiting.
-m n Mode. Direction of sample.
Forward mode = 0.
Reverse mode = 1.
Alter mode = 2. (forward the reverse the forward...).
- Scripting
- -f <filename> Play wave file with parameters from a file. -F <filename> same as above but loop script forever.
- Output
- -w <filename> Output to wavefile. -W Output to stdout (this will also do -q). -q Quite mode. No output. Can be used the quickly generate a wavefile. -d Display interactive loop statisticts (start point, offsets, current sample pos etc).
- help
- -h show summary of switches.
-x <filename> Calculate some lenght numbers that can be used on a loop then exit immediately.
Numbers are filelength/(2,4,8,16,32,64,and various tripplets).
6. Scripting (-f | -F)
-f <filename> file script mode. play positions from script file. See ./script dir for examples. -F <filename> Same as above but loop script forever.
- Example
- ./los -f scripts/timestrech.los amen.wav
- Notes
- In script specifying a switch with zero value will turn of a parameter. example script: #play a 1000 sample loop 2 times los -l 1000 -r 2 #add 100 offset to the 1000 sample loop and play 2 times los -o 100 #turn of the offset(but still play the 1000 sample lenght loop 2 times). los -o 0
- Comments
- #this is a hidden comment ;this comment will come on stderr.
Comments must start on the first position on the line.
7. Contact
If you do something cool with los. Please send me a mail.
8. Licence
GPL
9. Waranties
None
10. Bugs
Sometimes ALSA does not play any sound. This often happens on large files. A temporary solution is to pipe the wave to an external program of choice.
example:
./los -W amen.wav | esdcat
./los -W amen.wav | aplay
./los -W amen.wav | madplay
If you offset big files > 30MB or so. los can loose the wave. A solution for that is also to pipe the output.
If you specify odd numbers (1,3,5 etc) on stereo files los will fuck upp and play static. Only use even numbers for your parameters.
11. Todo
configure script.
Interactive mode. You control the loop on the fly.
GUI (I don't do/use gui).
mono files play at double speed sometimes. I need to look closer at the wave header.
