| 1 | |
| 2 | <refentry id="bbcutm"> |
| 3 | <indexterm id="IndexBbcutm"><primary>bbcutm</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Sample Playback</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>bbcutm</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>bbcutm</refname> |
| 11 | <refpurpose> |
| 12 | Generates breakbeat-style cut-ups of a mono audio stream. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | 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 (<emphasis>bbcutm</emphasis>) or stereo (<emphasis>bbcuts</emphasis>) sources. Whilst originally based on breakbeat cutting, the opcode can be applied to any type of source audio. |
| 20 | </para> |
| 21 | |
| 22 | <para> |
| 23 | The prototypical cut sequence favoured over one bar with eighth note subdivisions would be |
| 24 | |
| 25 | <literallayout> |
| 26 | 3+ 3R + 2 |
| 27 | </literallayout> |
| 28 | |
| 29 | 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. |
| 30 | </para> |
| 31 | |
| 32 | <para> |
| 33 | 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). |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | The opcode comes most alive when multiple synchronised versions are used simultaneously. |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Syntax</title> |
| 43 | <synopsis>a1 <command>bbcutm</command> asource, ibps, isubdiv, ibarlength, iphrasebars, inumrepeats \ |
| 44 | [, istutterspeed] [, istutterchance] [, ienvchoice ]</synopsis> |
| 45 | </refsect1> |
| 46 | |
| 47 | <refsect1> |
| 48 | <title>Initialization</title> |
| 49 | <para> |
| 50 | <emphasis>ibps</emphasis> -- Tempo to cut at, in beats per second. |
| 51 | </para> |
| 52 | |
| 53 | <para> |
| 54 | <emphasis>isubdiv</emphasis> -- Subdivisions unit, for a bar. So 8 is eighth notes (of a 4/4 bar). |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | <emphasis>ibarlength</emphasis> -- How many beats per bar. Set to 4 for default 4/4 bar behaviour. |
| 59 | </para> |
| 60 | |
| 61 | <para> |
| 62 | <emphasis>iphrasebars</emphasis> -- The output cuts are generated in phrases, each phrase is up to iphrasebars long |
| 63 | </para> |
| 64 | |
| 65 | <para> |
| 66 | <emphasis>inumrepeats</emphasis> -- 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. |
| 67 | </para> |
| 68 | |
| 69 | <para> |
| 70 | <emphasis>istutterspeed</emphasis> -- (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. |
| 71 | </para> |
| 72 | |
| 73 | <para> |
| 74 | <emphasis>istutterchance</emphasis> -- (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. |
| 75 | </para> |
| 76 | |
| 77 | <para> |
| 78 | <emphasis>ienvchoice</emphasis> -- (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. |
| 79 | </para> |
| 80 | </refsect1> |
| 81 | |
| 82 | <refsect1> |
| 83 | <title>Performance</title> |
| 84 | <para> |
| 85 | <emphasis>asource</emphasis> -- The audio signal to be cut up. This version runs in real-time without knowledge of future audio. |
| 86 | </para> |
| 87 | </refsect1> |
| 88 | |
| 89 | <refsect1> |
| 90 | <title>Examples</title> |
| 91 | |
| 92 | <para> |
| 93 | Here is a simple example of the bbcutm opcode. It uses the file <ulink url="examples/bbcutm.csd"><citetitle>bbcutm.csd</citetitle></ulink>, and <ulink url="examples/drumsMlp.wav"><citetitle>drumsMlp.wav</citetitle></ulink>. |
| 94 | <example> |
| 95 | <title>A simple example of the bbcutm opcode.</title> |
| 96 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 97 | <xi:include href="examples-xml/bbcutm.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 98 | </example> |
| 99 | </para> |
| 100 | |
| 101 | <para> |
| 102 | Here are some more advanced examples... |
| 103 | |
| 104 | <example> |
| 105 | <title>First steps- mono and stereo versions</title> |
| 106 | <programlisting> |
| 107 | <emphasis role="csdtag"><CsoundSynthesizer></emphasis> |
| 108 | <emphasis role="csdtag"><CsInstruments></emphasis> |
| 109 | <emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100 |
| 110 | <emphasis role="ohdr">kr</emphasis> <emphasis role="op">=</emphasis> 4410 |
| 111 | <emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10 |
| 112 | <emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2 |
| 113 | |
| 114 | <emphasis role="oblock">instr</emphasis> 1 |
| 115 | asource <emphasis role="opc">diskin</emphasis> "drumsMlp.wav",1,0,1 <emphasis role="comment">; a source breakbeat sample, wraparound lest it stop!</emphasis> |
| 116 | |
| 117 | <emphasis role="comment">; cuts in eighth notes per 4/4 bar, up to 4 bar phrases, up to 1</emphasis> |
| 118 | <emphasis role="comment">; repeat in total (standard use) rare stuttering at 16 note speed,</emphasis> |
| 119 | <emphasis role="comment">; no enveloping</emphasis> |
| 120 | asig <emphasis role="opc">bbcutm</emphasis> asource, 2.6937, 8, 4, 4, 1, 2, 0.1, 0 |
| 121 | |
| 122 | <emphasis role="opc">outs</emphasis> asig,asig |
| 123 | <emphasis role="oblock">endin</emphasis> |
| 124 | |
| 125 | <emphasis role="oblock">instr</emphasis> 2 <emphasis role="comment">;stereo version</emphasis> |
| 126 | asource1,asource2 <emphasis role="opc">diskin</emphasis> "drumsSlp.wav", 1, 0, 1 <emphasis role="comment">; a source breakbeat sample, wraparound lest it stop!</emphasis> |
| 127 | |
| 128 | <emphasis role="comment">; cuts in eighth notes per 4/4 bar, up to 4 bar phrases, up to 1</emphasis> |
| 129 | <emphasis role="comment">; repeat in total (standard use) rare stuttering at 16 note speed,</emphasis> |
| 130 | <emphasis role="comment">; no enveloping</emphasis> |
| 131 | asig1,asig2 <emphasis role="opc">bbcuts</emphasis> asource1, asource2, 2.6937, 8, 4, 4, 1, 2, 0.1, 0 |
| 132 | |
| 133 | <emphasis role="opc">outs</emphasis> asig1,asig2 |
| 134 | <emphasis role="oblock">endin</emphasis> |
| 135 | |
| 136 | <emphasis role="csdtag"></CsInstruments></emphasis> |
| 137 | <emphasis role="csdtag"><CsScore></emphasis> |
| 138 | <emphasis role="stamnt">i</emphasis>1 0 10 |
| 139 | <emphasis role="stamnt">i</emphasis>2 11 10 |
| 140 | <emphasis role="stamnt">e</emphasis> |
| 141 | <emphasis role="csdtag"></CsScore></emphasis> |
| 142 | <emphasis role="csdtag"></CsoundSynthesizer></emphasis></programlisting> |
| 143 | </example> |
| 144 | </para> |
| 145 | |
| 146 | <para> |
| 147 | <example> |
| 148 | <title>Multiple simultaneous synchronised breaks</title> |
| 149 | <programlisting> |
| 150 | <emphasis role="csdtag"><CsoundSynthesizer></emphasis> |
| 151 | <emphasis role="csdtag"><CsInstruments></emphasis> |
| 152 | <emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100 |
| 153 | <emphasis role="ohdr">kr</emphasis> <emphasis role="op">=</emphasis> 4410 |
| 154 | <emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10 |
| 155 | <emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2 |
| 156 | |
| 157 | <emphasis role="oblock">instr</emphasis> 1 |
| 158 | ibps <emphasis role="op">=</emphasis> 2.6937 |
| 159 | iplaybackspeed <emphasis role="op">=</emphasis> ibps<emphasis role="op">/</emphasis>p5 |
| 160 | asource <emphasis role="opc">diskin</emphasis> p4, iplaybackspeed, 0, 1 |
| 161 | |
| 162 | asig <emphasis role="opc">bbcutm</emphasis> asource, 2.6937, p6, 4, 4, p7, 2, 0.1, 1 |
| 163 | |
| 164 | <emphasis role="opc">outs</emphasis> asig, asig |
| 165 | <emphasis role="oblock">endin</emphasis> |
| 166 | |
| 167 | <emphasis role="csdtag"></CsInstruments></emphasis> |
| 168 | <emphasis role="csdtag"><CsScore></emphasis> |
| 169 | |
| 170 | <emphasis role="comment">; source bps cut repeats</emphasis> |
| 171 | <emphasis role="stamnt">i</emphasis>1 0 10 "drumsMlp.wav" 2.3 8 2 <emphasis role="Ccomment">//2.3 is the source original tempo</emphasis> |
| 172 | <emphasis role="stamnt">i</emphasis>1 0 10 "beats.wav" 2.4 8 3 |
| 173 | <emphasis role="stamnt">i</emphasis>1 0 10 "fox.wav" 2.5 16 4 |
| 174 | <emphasis role="stamnt">e</emphasis> |
| 175 | <emphasis role="csdtag"></CsScore></emphasis> |
| 176 | <emphasis role="csdtag"></CsoundSynthesizer></emphasis></programlisting> |
| 177 | </example> |
| 178 | </para> |
| 179 | |
| 180 | <para> |
| 181 | <example> |
| 182 | <title>Cutting up any old audio- much more interesting noises than this should be possible!</title> |
| 183 | <programlisting> |
| 184 | <emphasis role="csdtag"><CsoundSynthesizer></emphasis> |
| 185 | <emphasis role="csdtag"><CsInstruments></emphasis> |
| 186 | <emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100 |
| 187 | <emphasis role="ohdr">kr</emphasis> <emphasis role="op">=</emphasis> 4410 |
| 188 | <emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10 |
| 189 | <emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2 |
| 190 | |
| 191 | <emphasis role="oblock">instr</emphasis> 1 |
| 192 | asource <emphasis role="opc">oscil</emphasis> 20000, 70, 1 |
| 193 | <emphasis role="comment">; ain, bps, subdiv, barlength, phrasebars, numrepeats,</emphasis> |
| 194 | <emphasis role="comment">;stutterspeed, stutterchance, envelopingon</emphasis> |
| 195 | asig <emphasis role="opc">bbcutm</emphasis> asource, 2, 32, 1, 1, 2, 4, 0.6, 1 |
| 196 | <emphasis role="opc">outs</emphasis> asig, asig |
| 197 | <emphasis role="oblock">endin</emphasis> |
| 198 | |
| 199 | <emphasis role="csdtag"></CsInstruments></emphasis> |
| 200 | <emphasis role="csdtag"><CsScore></emphasis> |
| 201 | <emphasis role="stamnt">f</emphasis>1 0 256 10 1 |
| 202 | <emphasis role="stamnt">i</emphasis>1 0 10 |
| 203 | <emphasis role="stamnt">e</emphasis> |
| 204 | <emphasis role="csdtag"></CsScore></emphasis> |
| 205 | <emphasis role="csdtag"></CsoundSynthesizer></emphasis></programlisting> |
| 206 | </example> |
| 207 | </para> |
| 208 | |
| 209 | <para> |
| 210 | <example> |
| 211 | <title>Constant stuttering- faked, not possible since can only stutter in last half bar could make extra stuttering option parameter</title> |
| 212 | <programlisting> |
| 213 | <emphasis role="csdtag"><CsoundSynthesizer></emphasis> |
| 214 | <emphasis role="csdtag"><CsInstruments></emphasis> |
| 215 | <emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100 |
| 216 | <emphasis role="ohdr">kr</emphasis> <emphasis role="op">=</emphasis> 4410 |
| 217 | <emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10 |
| 218 | <emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2 |
| 219 | |
| 220 | <emphasis role="oblock">instr</emphasis> 1 |
| 221 | asource <emphasis role="opc">diskin</emphasis> "drumsMlp.wav", 1, 0, 1 |
| 222 | |
| 223 | <emphasis role="comment">;16th note cuts- but cut size 2 over half a beat.</emphasis> |
| 224 | <emphasis role="comment">;each half beat will either survive intact or be turned into</emphasis> |
| 225 | <emphasis role="comment">;the first sixteenth played twice in succession</emphasis> |
| 226 | |
| 227 | asig <emphasis role="opc">bbcutm</emphasis> asource, 2, 2, 0.5, 1, 2, 2, 1.0, 0 |
| 228 | <emphasis role="opc">outs</emphasis> asig, asig |
| 229 | <emphasis role="oblock">endin</emphasis> |
| 230 | |
| 231 | <emphasis role="csdtag"></CsInstruments></emphasis> |
| 232 | <emphasis role="csdtag"><CsScore></emphasis> |
| 233 | <emphasis role="stamnt">i</emphasis>1 0 30 |
| 234 | <emphasis role="stamnt">e</emphasis> |
| 235 | <emphasis role="csdtag"></CsScore></emphasis> |
| 236 | <emphasis role="csdtag"></CsoundSynthesizer></emphasis></programlisting> |
| 237 | </example> |
| 238 | </para> |
| 239 | </refsect1> |
| 240 | |
| 241 | <refsect1> |
| 242 | <title>See also</title> |
| 243 | <para><link linkend="SiggenSample"><citetitle>Sample Playback</citetitle></link></para> |
| 244 | </refsect1> |
| 245 | |
| 246 | <refsect1> |
| 247 | <title>Credits</title> |
| 248 | <para> |
| 249 | <simplelist> |
| 250 | <member>Author: Nick Collins</member> |
| 251 | <member>London</member> |
| 252 | <member>August 2001</member> |
| 253 | </simplelist> |
| 254 | </para> |
| 255 | |
| 256 | <para>New in version 4.13</para> |
| 257 | </refsect1> |
| 258 | </refentry> |