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 the notes).
The opcode comes most alive when multiple synchronised versions are used simultaneously.
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.
Performance
asource -- The audio signal to be cut up. This version runs in real-time without knowledge of future audio.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform; Audio out Audio in No messages-odac;;;RT audio out; For Non-realtime ouput leave only the line below:; -o bbcutm.wav -W ;;; for file output any platform</CsOptions><CsInstruments>; additions by Menno Knevel 2021sr=44100ksmps=32nchnls=20dbfs=1instr1; Play an audio file normally.source:a=soundin("drumsMlp.wav")outs(source,source)endininstr2; Cut-up an audio filebps:i=4subdiv:i=8barlength:i=4phrasebars:i=1numrepeats:i=p4source:a=diskin2("drumsMlp.wav",1,0,1)a1=bbcutm(source,bps,subdiv,barlength,phrasebars,numrepeats)outs(a1,a1)endin</CsInstruments><CsScore>i102; repeatsi2382i21286e</CsScore></CsoundSynthesizer>
Here is a simple example of the bbcutm opcode. It uses the file bbcutm.csd, and drumsMlp.wav.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform; Audio out Audio in No messages-odac;;;RT audio out; For Non-realtime ouput leave only the line below:; -o bbcutm.wav -W ;;; for file output any platform</CsOptions><CsInstruments>; additions by Menno Knevel 2021sr=44100ksmps=32nchnls=20dbfs=1instr1; Play an audio file normally.asourcesoundin"drumsMlp.wav"outsasource,asourceendininstr2; Cut-up an audio fileibps=4isubdiv=8ibarlength=4iphrasebars=1inumrepeats=p4asourcediskin2"drumsMlp.wav",1,0,1a1bbcutmasource,ibps,isubdiv,ibarlength,iphrasebars,inumrepeatsoutsa1,a1endin</CsInstruments><CsScore>i102; repeatsi2382i21286e</CsScore></CsoundSynthesizer>
<CsoundSynthesizer><CsInstruments>sr=44100kr=4410ksmps=10nchnls=2instr1asourcediskin"drumsMlp.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 envelopingasigbbcutmasource,2.6937,8,4,4,1,2,0.1,0outsasig,asigendininstr2;stereo versionasource1,asource2diskin"drumsSlp.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 envelopingasig1,asig2bbcutsasource1,asource2,2.6937,8,4,4,1,2,0.1,0outsasig1,asig2endin</CsInstruments><CsScore>i1010i21110e</CsScore></CsoundSynthesizer>
<CsoundSynthesizer><CsInstruments>sr=44100kr=4410ksmps=10nchnls=2instr1ibps=2.6937iplaybackspeed=ibps/p5asourcediskinp4,iplaybackspeed,0,1asigbbcutmasource,2.6937,p6,4,4,p7,2,0.1,1outsasig,asigendin</CsInstruments><CsScore>; source bps cut repeatsi1010"drumsMlp.wav"2.382//2.3 is the source original tempoi1010"beats.wav"2.483i1010"fox.wav"2.5164e</CsScore></CsoundSynthesizer>
Cutting up any old audio- much more interesting noises than this should be possible!
<CsoundSynthesizer><CsInstruments>sr=44100kr=4410ksmps=10nchnls=2instr1asourcediskin"drumsMlp.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 successionasigbbcutmasource,2,2,0.5,1,2,2,1.0,0outsasig,asigendin</CsInstruments><CsScore>i1030e</CsScore></CsoundSynthesizer>