Loopcarve user manual and tutorials
This edition of the manual is consistent with: Loopcarve 0.9, Libsndfile 1.0.10 Published on the Internet http://loopcarve.sourceforge.net/
Copyright (C) 2004 Derek Carter. All rights reserved.
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that they are marked clearly as modified versions, that the authors' names and title are unchanged (though subtitles and additional authors' names may be added), and that other clearly marked sections held under separate copyright are reproduced under the conditions given withinthem, and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.
Installation
Loop carve should compile from source code on any GNU compiler. It uses autoconf and make to work. It uses libsndfile which can be found here:
http://www.mega-nerd.com/libsndfile/
Installing on Mac OS X
- Download the source code. If you haven't installed libsndfile then also install it at this time. You can use fink or use the command line to compile and link libsndfile yourself.
- Install instructions can be found in the source code for loopcarve. It follows the GNU standard for making and compiling the source.
Installing on Win XP
- Probably the best thing is to download the binary, not the source, unless you have a GNU C compiler and also can compile libsndfile yourself.
- Unzip the binary and place it in a directory where you would like to keep it.
- Add the directory to your PATH in windows. This is done as follows.
- Start -> (Right Click) My Computer -> Properties -> Advanced
- Click on Environment Variables down the bottom.
- Look in system variables for one called "path"
- Click on path and press edit
- Scroll right to the end of the "Variable value:" and add the directory name for where you put loopcarve. Make sure you put in one of these ";" before directory name. See an example below.
- @example OTHER STUFF BEFORE IT;C:\loopcarve
- Press OK for everything.
- Start up a windows terminal application and type in loopcarve.exe when it comes up. The loopcarve program should run and you will get a list of options for loopcarve. Now you can change directories and start chopping!.
Introduction
Features
Loopcarve has been designed as a command line application which can be used to split up an audio file into several pieces automatically. It also provides a midi file with the timing information for the loop. Using this midi file and the sliced audio together, the tempo can be changed to a certain extent.
Loopcarve has the following features:
- Automatic beat detection
- Midi file output with loop timing information
- Akai MPC 1000 pgm file creation
- User specified number of slices
- Automatic file name creation
- Decay setting for each sample
- Automatic conversion to mpc1000 16-bit 44kHz PCM audio format
- Automatic bpm calculation
Settings
loopcarve [arguments] [file] Arguments:
- -s (number) :
- Slices the sample into even divisions.
- -n :
- Noteon sample play mode. Default is oneshot
- -b (number) :
- Number of bars in the sample
- -d (number) :
- Set the decay for each sample
- -w (number) :
- Set sensitivity of auto beat slicing
- -f (name) :
- Sets sliced sample file name.
Chopping Modes
Loopcarve has two different chopping mode. The default is automatic beat detection. In this mode the program analyzes the audio file and finds peaks. At these peaks the audio file is split. This works best with audio that has definite peaks such as drumloops or heavily accented sound.
The other mode is activated when you choose a set number of slices. When this is chosen, the file is divided into the number of slices set, in even divisions. This mode can be useful if you have a 2 bar loop for example and want to divide it up in 1/4, 1/8 or 1/16 notes. It saves a lot of time compared to chopping the loop by hand.
File Names
Loopcarve takes the first seven letters (or the lot if it is less) and uses them to make the filename for the midi file, audio slices and mpc .pgm file. You can also use the file name setting to set your own file name instead.
Number of Bars
The number of bars setting is important to get a correct loop with the midi file. The default is a 1 bar loop. Make sure you set this to the exact number of bars for your loop.
Decay Setting
Using this setting you can set the decay of each sample. You can choose any number from 1 to 100. The default is 5 which is the standard for a mpc1000 .pgm file. Increasing the decay can help with the transition between audio slices when you change the bpm a lot from the original sample bpm.
Audio Format Support
Loopcarve provides support for reading and then writing various audio formats. The following formats are supported using the excellent libsndfile interface:
- Microsoft WAV format (little endian).
- Apple/SGI AIFF format (big endian).
- Sun/NeXT AU format (big endian).
- RAW PCM data.
- Ensoniq PARIS file format.
- Amiga IFF / SVX8 / SV16 format.
- Sphere NIST format.
- VOC files.
- Berkeley/IRCAM/CARL
- Sonic Foundry's 64 bit RIFF/WAV
- Matlab (tm) V4.2 / GNU Octave 2.0
- Matlab (tm) V5.0 / GNU Octave 2.1
Tutorials
Tutorial 1
Loop carve should be pretty simple to use. It is designed to be fast to use and easy to chop up a couple of hundred loops. This tutorial will show you how to chop up a drumloop automatically. It is important to specifiy the number of bars in the loop as this provides important information for the calculation of bpm and also for midi timing information.
- Find a drumloop that you know the bar length. This example is a 2 bar drum loop.
-
loopcarve -b 2 drumloop.wav
- Copy all the generated files onto the mpc CF card. Ypu should have a program file, midi file and a number of slices. The original drumloop is not needed.
- Load the program file, choosing load samples as well. Load the midi file into a spare sequence.
- Change the program to the correct one for the midi sequence.
- Press play and you should be able to hear your original loop played back.
- Change the bpm of the midi file and listen to the loop play.
Things to try
Try increasing the decay settings when you chop a loop. This can give some interesting effects. Also try different Timing Correct settings on the midi information. This can also result in some interesting and unusual loops.
Tutorial 2
For this tutorial, we will explore the other chopping mode of Loopcarve. When you choose a certain number of slices in the loopcarve settings then this mode is activated. It chops the loop into even divisions and outputs the number of slices that you chose. This mode can be useful to chop up a loop and get individual drum sounds from it. For example, if you have a 1-bar drum loop, choose 16 slices to have 1/16 notes extracted from the original loop.
- Find a drumloop and the number of bars it has. This example chops a 2-bar loop into 16 even slices. So you will get 1/8 notes as a result. (16 slices / 2-bars)
-
loopcarve -b 2 -s 16 drumloop.wav
- Copy all the generated files to the mpc.
- Follow the same steps as Tutorial 1 to load in the program, samples and midi file.
Things to try
You can play the slices by hand on the mpc pads instead of using the midi file. This can be good for guitar/strings of horn lines. It is also useful for loops if you want to rearrange the loop in real time. As above, you can experiment with Timing Correct to get different effects.
Acknowledgements
Akai
Thanks to Akai for making some cool equipment. I wish they would implement something like this into the mpc1000...so I didn't have to use a computer to do this kind of thing. I don't really like using computers to make music.
Audio File IO
Thanks to Erik de Castro Lopo for making such a cool library for reading and writing audio files. Makes programming stuff like this much easier. Libsndfile can be found here:
http://www.mega-nerd.com/libsndfile/
Beat Detection
The beat detection algorithm uses ideas that can be found here:
http://www.gamedev.net/reference/programming/features/beatdetection/
Midi File Writing
The midi file writing was implemented by studying source code and various information found on the net. It only implements the basics needed to write a type 0 midi file. The information and source code can be found in the following places:
http://www.borg.com/~jglatt/tech/midifile.htm
http://www.sonicspot.com/guide/midifiles.html
http://www.harmony-central.com/MIDI/dev.html
http://www.harmony-central.com/MIDI/midifilelib.tar.gz
This document was generated on October, 17 2004 using texi2html 1.57.