bbcutm — Generates breakbeat-style cut-ups of a mono audio stream.
The BreakBeat Cutter automatically generates cut-ups of a source audio stream in the style of drum and bass/jungle breakbeat manipulations. There are two versions, for mono (bbcutm) or stereo (bbcuts) sources. Whilst originally based on breakbeat cutting, the opcode can be applied to any type of source audio.
The prototypical cut sequence favoured over one bar with eighth note subdivisions would be
3+ 3R + 2
where we take a 3 unit block from the source's start, repeat it, then 2 units from the 7th and 8th eighth notes of the source.
We talk of rendering phrases (a sequence of cuts before reaching a new phrase at the beginning of a bar) and units (as subdivision th notes).
The opcode comes most alive when multiple synchronised versions are used simultaneously.
a1 bbcutm asource, ibps, isubdiv, ibarlength, iphrasebars, inumrepeats \
[, istutterspeed] [, istutterchance] [, ienvchoice ]
ibps -- Tempo to cut at, in beats per second.
isubdiv -- Subdivisions unit, for a bar. So 8 is eighth notes (of a 4/4 bar).
ibarlength -- How many beats per bar. Set to 4 for default 4/4 bar behaviour.
iphrasebars -- The output cuts are generated in phrases, each phrase is up to iphrasebars long
inumrepeats -- In normal use the algorithm would allow up to one additional repeat of a given cut at a time. This parameter allows that to be changed. Value 1 is normal- up to one extra repeat. 0 would avoid repeating, and you would always get back the original source except for enveloping and stuttering.
istutterspeed -- (optional, default=1) The stutter can be an integer multiple of the subdivision speed. For instance, if subdiv is 8 (quavers) and stutterspeed is 2, then the stutter is in semiquavers (sixteenth notes= subdiv 16). The default is 1.
istutterchance -- (optional, default=0) The tail of a phrase has this chance of becoming a single repeating one unit cell stutter (0.0 to 1.0). The default is 0.
ienvchoice -- (optional, default=1) choose 1 for on (exponential envelope for cut grains) or 0 for off. Off will cause clicking, but may give good noisy results, especially for percussive sources. The default is 1, on.
asource -- The audio signal to be cut up. This version runs in real-time without knowledge of future audio.
Here is a simple example of the bbcutm opcode. It uses the file bbcutm.csd, and beats.wav.
Example 79. A simple example of the bbcutm opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out Audio in No messages -odac -iadc -d ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o bbcutm.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1 - Play an audio file normally. instr 1 asource soundin "beats.wav" out asource endin ; Instrument #2 - Cut-up an audio file. instr 2 asource soundin "beats.wav" ibps = 4 isubdiv = 8 ibarlength = 4 iphrasebars = 1 inumrepeats = 2 a1 bbcutm asource, ibps, isubdiv, ibarlength, iphrasebars, inumrepeats out a1 endin </CsInstruments> <CsScore> ; Play Instrument #1 for two seconds. i 1 0 2 ; Play Instrument #2 for two seconds. i 2 3 2 e </CsScore> </CsoundSynthesizer>
Here are some more advanced examples...
Example 80. First steps- mono and stereo versions
<CsoundSynthesizer> <CsInstruments> sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 instr 1 asource diskin "break7.wav",1,0,1 ; a source breakbeat sample, wraparound lest it stop! ; cuts in eighth notes per 4/4 bar, up to 4 bar phrases, up to 1 ; repeat in total (standard use) rare stuttering at 16 note speed, ; no enveloping asig bbcutm asource, 2.6937, 8, 4, 4, 1, 2, 0.1, 0 outs asig,asig endin instr 2 ;stereo version asource1,asource2 diskin "break7stereo.wav", 1, 0, 1 ; a source breakbeat sample, wraparound lest it stop! ; cuts in eighth notes per 4/4 bar, up to 4 bar phrases, up to 1 ; repeat in total (standard use) rare stuttering at 16 note speed, ; no enveloping asig1,asig2 bbcuts asource1, asource2, 2.6937, 8, 4, 4, 1, 2, 0.1, 0 outs asig1,asig2 endin </CsInstruments> <CsScore> i1 0 10 i2 11 10 e </CsScore> </CsoundSynthesizer>
Example 81. Multiple simultaneous synchronised breaks
<CsoundSynthesizer> <CsInstruments> sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 instr 1 ibps = 2.6937 iplaybackspeed = ibps/p5 asource diskin p4, iplaybackspeed, 0, 1 asig bbcutm asource, 2.6937, p6, 4, 4, p7, 2, 0.1, 1 out asig endin </CsInstruments> <CsScore> ; source bps cut repeats i1 0 10 "break1.wav" 2.3 8 2 //2.3 is the source original tempo i1 0 10 "break2.wav" 2.4 8 3 i1 0 10 "break3.wav" 2.5 16 4 e </CsScore> </CsoundSynthesizer>
Example 82. Cutting up any old audio- much more interesting noises than this should be possible!
<CsoundSynthesizer> <CsInstruments> sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 instr 1 asource oscil 20000, 70, 1 ; ain, bps, subdiv, barlength, phrasebars, numrepeats, ;stutterspeed, stutterchance, envelopingon asig bbcutm asource, 2, 32, 1, 1, 2, 4, 0.6, 1 outs asig endin </CsInstruments> <CsScore> f1 0 256 10 1 i1 0 10 e </CsScore> </CsoundSynthesizer>
Example 83. Constant stuttering- faked, not possible since can only stutter in last half bar could make extra stuttering option parameter
<CsoundSynthesizer> <CsInstruments> sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 instr 1 asource diskin "break7.wav", 1, 0, 1 ;16th note cuts- but cut size 2 over half a beat. ;each half beat will either survive intact or be turned into ;the first sixteenth played twice in succession asig bbcutm asource, 2.6937, 2, 0.5, 1, 2, 2, 1.0, 0 outs asig endin </CsInstruments> <CsScore> i1 0 30 e </CsScore> </CsoundSynthesizer>