How To Use BpmDj: kbpm-play


Introduction

BpmDJ containts three distinct part. The first program is the player, the second program is the selector and the third program is the music-analyzer. In this section we will explain the details of the player. The player is only concerned with one song at a time.

Using the Player

kbpm-play image

The player can be started with ./kbpm-play. Normally, the selector will start a player with tht ecorrect arguments. If you need to start it yourself have a look at the command line arguments (at the end of this file). The player has a number of keys enumerated below:

Keys, Buttons & Displays

Position/Size

The top LCD shows the current playing position (in seconds)
The bottom LCD shows the total playing time of the entire track.
Both values take into the account the current playing speed.

Nudging

1/32 note forward
1/32 note backward
1/8 note forward. This is useful if you have the two beats interleaving each other.
beat forward

Shifting Measures

2 One measure forward
1 One measure backward
5 Four measures forward
4 Four measures backward
8 Eight measures forward
7 Eight measures backward

Tempo

<target>  Selects the target tempo of the song.
<normal>  Selects the normal tempo of the song.
0, <normal-witch>  automatically changes the tempo of the song until it is playing at its normal tempo. This action takes 10s.
<fast-switch>      takes 5 seconds to reach the target tempo.
<slow-switch>      takes 60 seconds to reach the target tempo.
<tempo-slider>     can be used to modify the tempo. This tempo modification is a percentage of the current playying tempo, which can be either the target tempo, the normal tempo or somewhere in between.

The three LCD's refer to, from left to right, the target tempo, the normal tempo, and the current playing speed.

Cues

/            marks the current position and places it in the cue.
<space>      stops and starts the song. If a cue is available the song will automatically restart at that position.
<restart-button> can be used to restart the song at position 0.
{            shift the cue 8 measures backward
}            shift the cue 8 measures forward
(            shift the cue 1/32 backward
)            shift the cue 1/32 forward
Z,X,C,V      four positions where you can store a cue. You do this by pressing the capital Z, X, C or V. If a cue is present at the given position, the button is colored green, otherwise it is colored red.
z,x,c,v      retrieves a cue from the four positions. If the song was not yet playing it immediately starts playing. If it was playing the player will shift back to the cue, respecting the current position in the measure.

LFO's

The player contains a number of low frequency oscilators (LFO's). When you start one by clicking its button, it will start immediatelly and modify the volume of the sound over time. The LFO will have a period that matches the tempo of the song. For every oscilator available, we show the volume modification ofer time.

Switch off the LFO section
b, break  Break LFO. At 95% of 4M it will suddenly stop and the continue again at 4M.

large break graph

s, slow up saw small; S, fasr saw up  Slow and fast saw up LFO's

slow saw up largefast upsaw


r, slow down saw; R, fast down saw   Slow and fast saw down LFO's

slow down saw largefast saw down large

p, slow panning; P, fast pan  Slow and fast panning LFO (mid, right, mid, left). In the picture below, blue is completely switched to the left, red is completely switched to the right.

slow pan largefast pan large

Metronome. Aside from the LFO's that modify ponly the volume, there is also a metronome that will generate at every beat a ping.

Loops

The loop section can be used to repeat the same piece of audio over and over again.

<no>  Switch off looping
<1B>  When you press this buttonb the track will jump back 1B and will keep on doing so every time it reaches the same position.
<1M>  .. guess..
<4M>  ..guess...

Some Scenarios

Scenario 1: Simple Beatmixing

Before we can even think of playing we need to generate the index files:

  • Go to your DJ directory. Be sure all your music is in ./music and that a directory ./index exists. If this is the case continue
  • Enter 'cbpm-count music/A.mp3'
  • Enter 'cbpm-count music/B.mp3'
  • Move both .idx files to ./index
  • Start song A by typing 'kbpm-play index/A.idx' (instead of using kbpm-play, it would also be possible to use cbpm-play)
  • A first song is playing, called A.mp3. We now want to switch to the second song (B.mp3)
  • Be sure to switch of the gain of channel B and turn the volume down of channel B.
  • Enter 'kbpm-play -m index/A.idx index/B.mp3' on the computer. If both index files exist he will automatically start playing at the target tempo (the tempo of song A)
  • Listen to song B in your headphone (push PFL of channel B) and press / at the beginning of a phrase.
  • Now we stop song B by pushing <space>
  • Now listen to song A in your headphone (push PFL of channel A). Press <space> at the beginning of a phrase. Now song B will jump back to the first mark. Hence, both songs should be synchronized. Of course this is not the case
  • Slide song B a bit to the left or to the right with +,  - . If the beats match, listen a while longer to see which direction you have to nudge to keep them in sync. You can listen two both songs together by pushing the PFL of channel A and channel B.
  • Jump back or forth in song B till you are where you want to be with 7 and 8.
  • Switch all PFL's off. Increase the volume of channel B until maximum. Remove the bass drum of channel A with the low band filter.
  • Slowly remove channel A (or remove channel A abruptly when appropriate)
  • Scenario 2: cue's

    Of course not all music should be beat mixed. Sometimes a switch can be done by kicking in song B at the right moment. This requires the ability to start song B where we want.

  • Listen to song B, hit '/' or '[' at the position you want to start the song.
  • Push <space>. The music will stop. If you now push <space>) the music will immediately start at the cue. If the position is wrong. Push ' (' (or ')') to shift the cue forward and backward. You can shift the cue 8 measures at a time by using '{' and '}'.
  • Hit <space> again. Turn on the volume of channel B and at the right moment push <space> again.
  • There are 4 different cues, which are saved to disk. These are called the Z-cue, the X-cue, the C-cue and the V-cue. Setting a cue to the current cue is done by pushing the capital Z, X, C or V. Retrieving a cue is done by pushing a small x, c, v or z. When retrieving a cue the program will immediately jump to that position. If you leave the program, the cue-configuration will be saved to disk for the next time you start that song. If you are playing a lot of music you might want to develop your own standards for this.

    Scenario 3: Using stored cues to do a fast beatmix

    Suppose we have a song with a number of cues. Which have been stored to disk. If we want to mix this song at this position over another song we start the song at the right tempo (cbpm-play -m). We load the current cue by pushing the small letter ('z' for example). If this is done we listen to the playing song and at the right moment (the start of a phrase) we push ']'. The beats should be slightly off. This is due to a latency in the transmission of the keypress and the arrival of the keypress at the program (hence, I can't solve this problem). Now start nudging ('+' and '-') until the beats are good.

    Scenario 4: LFO's

    Some extra fun can be done by using a number of LFO's.

  • At the top of a beat push 'p'. You will now hear the music spinning from left to right. If you are tired of this effect, push 'n'
  • At the beginning of a phrase push ' b'. In 4 measures a sound break will occur right before the 5th measure.
  • Scenario 5: Using the Metronome

    You can use a build in metronome to check whether your cue's are positioned at the beginning of a measure. To do this load the correct cue (press z, x, c or v) and press 'm' to start the metronome. Now pause the song by pressing spacebar: ' '. Press spacebar again to start at the current cue. The metronome will also restart at its beginning. If the cue is correct the metronome should sound together with a beat. If this isn't the case press ' (' or ' )' to shift the cue a bit back or forth. When you press one of those, you the music will stop. Press spacebar ' ' again to start at the new position. Repeat this process until the beats match the metronome. At last, store the cue in one of the 4 positions.

    Scenario 6: Exactly positioning a cue

     If you want to place a cue exactly at the beginning of a beat you first need to place it somewhere around the beat. Afterwards you can shift it back and forth with the '(' and ')' keys until it is exactly at the start of the beat. However, there is a tool that can help in deciding whether the start of the beat is exactly the start of the beat and this is the 'r' function. This is a LFO that slowly decreases the volume to zero (over 1 or 2 measures) and then maximizes the volume again. If you have the cue exactly at the beat and you press 'r' you will hear every start with a beat. If it is a bit too early positioned you will hear some noise, a beat and then the rest (press ')' in that case). If the cue is placed a bit too late you will very likely completely miss the entire beat (press '('). After you have positioned a cue at a correct position, press 'n' to bring back the sound to normal and press 'Z','X','C' or 'V' to store it for later retrieval.
     

    Using the BPM counter

    kbpm-count

    The BPM counter of kbpm-play is accessible via the 'BPM-counter' button of the main-pane. The bpm-counter window supports three tools.
  • A tapping bpm-counter, to get a rough idea of the tempo
  • A fully automatic BPM counter (as described in previous sections)
  • A spectrum analysis to retrieve the color of the song.
  • Tapping the beat

    If you want a rough estimate of the tempo of a song, press the tap button. Make sure that the song is playing at its normal tempo, otherwise your measurement will be wrong. If you want to get into the rhythm before tapping, press the reset key whole the time and suddenly start using the Tap-button. If you want to tap less, set the skip box on some value you like. For instance, if the skip-box is set to 4, the tapping counter will assume that with every tap, four beats have been passed. If you tap the beat, the tempo information will change immediately and give the best estimate of the tempo. However, if you want an exact BPM-count, you should continue with the automatic bpm-counter.

    The automatic bpm counter

    To use the automatic bpm-counter, first specify the upper and lower bounds of the BPM. You can easily narrow these down by tapping the beat as described in previous section. The automatic counter is started with the Start button. Beware this might take a time ! If you need the tempo of a lot of songs, you should use the file selector kbpm-dj and measure the tempo of songs in batch overnight.
     

    Obtaining the color of a song

    To obtain the color of a song, select a suitable cue-point, go to the bpm-counter window and select 'Fetch Spectrum'. Beware, this takes a while ! If you need to do this in batch, please use the file-selector kbpm-dj.
     

    Using the Pattern Analyzer

    The pattern analyzer can be used to see how the tempoline changes over time and how well the measured tempo  is correct. To analyze a song, the pattern-analyzer will visualize hoirinzotally the different measures, while vertically the content of one such a measure is visualized. If the period (BPM) is correct, the song should show distinct visual lines. However, if the period is worng, or the song contains different tempos, or the drummer of the group doesn't actually care about being correct, then the visualisation will look something different.

    The above picture shows the pattern visualisation of AlienPump (Tandu). As can be seen, the white 'strokes' go horizontally, so the period of this song is correct. If this was not the case, the white horizontal strokes would slant down or up. If this were the case then you can manually modify the tempo by using sliders A and B. Slider A is a fine tempo modification. Slider B is a coarse grain tempo modification. Once the music is 'horizontalized', you can press the 'set Tempo' button to make this tempo permanent.

    In the two pictures below, we see on the left the song Anniversary Waltz (Status Quo). As can be seen, this song drifts slightly and the drummer clearly didn't think a steady rythm would be good in this piece of music. The right picture below is the pattern visualisation of the song XFile (Chakra & Edimis), this song comes from an 'already mixed' cd and as you can see the DJ who created the mix had to modify the tempo over time.  In both pictures, the vertical red lines show where the song was playing at the moment of the snapshot.

                 

    Command Line Switches

    Usage: kbpm-play <options> argument

    -c --create create an index file if none exists
    -q --quiet be quiet
    -m arg --match arg song to match tempo with
    -p nbr nbr --position nbr nbr position to place the window
    -v --verbose be verbose with respect to latency
    -L nbr --latency nbr required latency in ms (default = 744)
    --oss-driver---------------------------------
    --oss use OSS driver (default)
    -d arg --dsp arg dsp device to use (default = /dev/dsp)
    -F nbr --fragments nbr the number of fragments used to play audio.
    -X --nolatencyaccounting does not take into account the latency when marking a cue
    --alsa-driver---------------------------------
    --alsa use OSS driver (default)
    --dev arg device to use (default = hw:0,0)
    --analysis------------------------------------
    -b --batch no ui output, md5sum is automatically checked
    --bpm measure bpm
    -l nbr --low nbr lowest bpm to look for (default = 120)
    -h nbr --high nbr highest bpm to look for (default = 160)
    --spectrum obtain color at cue-point, no sound, quit imm
    -r arg --rawpath arg path that .raw temp files are stored in
    argument the index file of the song to handle

    requires at least one argument

    Copyright (c) Werner Van Belle 2001-2004
    e-mail: werner.van.belle@vub.ac.be
    Tel: +32 486 68 84 48; Fax: +32 2 629 35 25
    http://bpmdj.sourceforge.net/