<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codehop &#187; download</title>
	<atom:link href="http://codehop.com/tag/download/feed/" rel="self" type="application/rss+xml" />
	<link>http://codehop.com</link>
	<description>#code #art #music</description>
	<lastBuildDate>Mon, 23 Apr 2012 18:37:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Splice and Stutter</title>
		<link>http://codehop.com/splice-and-stutter/</link>
		<comments>http://codehop.com/splice-and-stutter/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 18:34:39 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[bt]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[creativecommons]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[jean-luc sinclair]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[sampler]]></category>

		<guid isPermaLink="false">http://csound.noisepages.com/?p=105</guid>
		<description><![CDATA[Today on The Csound Blog, we&#8217;re going to learn how to build a loop-based sampler out of common household ingredients. Listen: mp3 Download: splice_and_stutter.csd, BT Sample Pack (13.2 MB) Here&#8217;s a brief rundown of today&#8217;s example. A drum loop is loaded &#8230; <a href="http://codehop.com/splice-and-stutter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-103" title="Splice and Stutter" src="http://codehop.com/wp-content/uploads/2009/10/SpliceAndStutterThumb.jpg" alt="Splice and Stutter" width="200" height="181" />Today on The Csound Blog, we&#8217;re going to learn how to build a loop-based sampler out of common household ingredients.</p>
<p>Listen: <a href="http://www.thumbuki.com/TheCsoundBlog/Splice_and_Stutter.mp3">mp3</a></p>
<p>Download: <a href="http://www.thumbuki.com/TheCsoundBlog/splice_and_stutter.csd">splice_and_stutter.csd</a>, <a href="http://www.archive.org/download/BT/BT44.zip">BT Sample Pack</a> (13.2 MB)</p>
<p>Here&#8217;s a brief rundown of today&#8217;s example. A drum loop is loaded into an f-table with the instrument <em>LoadSample</em>. The instrument <em>SampleEngine</em> plays back selective parts of the loop. Instruments <em>Basic</em>, <em>Stutter</em> and <em>Random</em> are interface instruments that simplify the process of triggering samples.</p>
<p>The <em>LoadSample</em> instrument loads a sample into an f-table, while storing information about the sample into an ad hoc data structure created from <strong>chn</strong> busses. Here isn&#8217;t the place to go into detail. I will say that it is akin to a C struct, and stores the file name, sample rate, length of file (in samples), the tempo, and the number of beats (quarter notes) in the loop. All the user-defined opcodes are support opcodes for the data structure.</p>
<p><em>SampleEngine</em> is the heart of this piece. It works by triggering discreet notes from within the loop, with the loop offset being determined by input it receives via p-field 7. The offset unit is in beats. Let&#8217;s say the loop is 16 beats long. A passed value of 0 plays the first quarter note. A value of 1 plays the second quarter note of the loop, etc.</p>
<p>This instrument is designed to be played by other instruments, rather than being triggered directly by a score i-event. That is&#8230;</p>
<p>Instead of having multiple samplers that do various things, I created a single complex sampler engine that is capable of a wider range of tricks. The problem with complex instruments in Csound is that writing score events can be cumbersome to write and certainly hard to read, especially when dealing with several parameters. This is where the interface instruments come into play.</p>
<p>The interface instruments <em>Basic</em>, <em>Stutter</em> and <em>Random</em> help us tame the complexity of <em>SampleEngine</em> by reducing the number of p-fields needed by the score, and by defining clear behaviors.  <em>Basic</em> is a no thrills controller that simply triggers part of the loop. <em>Stutter</em>, well, stutters. <em>Random</em> randomly picks a beat and plays it.</p>
<p>A greatly added benefit to this approach is that the score is much easier to read. Instead of trying to figure out if a particular i-event stutters or not by scanning a row of numbers, one can just casually look at the name of the instrument used. To put it another way, does this stutter?</p>
<pre>i 5 7 1 0.25 0.5 100 12 0.083 1 0</pre>
<p>How about this?</p>
<pre>i $Stutter 7 1 0.25 0.5 100 12 [1 / 12]</pre>
<p>There are a lots of ins and outs to today&#8217;s example. And I admit, I skipped over most of them. If there is a particular issue or issues you wish for me to expand on, comment below, and I&#8217;ll make it a priority to blog about it in the future.</p>
<p>This sampler is a derivitive work based on an instrument co-developed by <a href="http://www.jeanlucsinclair.com/">Jean-Luc Sinclair</a> (aka Jean-Luc Cohen) and myself back in 2006. The loop in today&#8217;s example is by <a href="http://www.btmusic.com/">BT</a> (aka Brian Transeau), released under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons attribution license</a>, and released as part of the <a href="http://wiki.laptop.org/go/Sound_samples">OLPC Sample Library</a>. You can obtain this sample and others <a href="http://www.archive.org/download/BT/BT44.zip">here</a>. (13.2 MB) You will need the loop &#8220;105 Blanketed Lama.wav&#8221; in order to run the csd file.</p>
<p><strong>Update:</strong> There is an issue with the CSD file not running on <span style="text-decoration: line-through;">Windows</span> Windows Me (or earlier). There is now a fix. Download the new <a href="http://www.thumbuki.com/TheCsoundBlog/splice_and_stutter.csd">splice_and_stutter.csd</a>, and see line 269 for details. This only applies to users of <span style="text-decoration: line-through;">Windows</span> Windows Me (or earlier versions).</p>
<p>Thanks to everyone on the <a href="http://www.nabble.com/CSD-error-bug-with-stutter-instrument-on-windows--tt26041900.html">Csound Mailing List</a> who helped straighten this out.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehop.com/splice-and-stutter/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
<enclosure url="http://www.thumbuki.com/TheCsoundBlog/Splice_and_Stutter.mp3" length="314163" type="audio/mpeg" />
		</item>
		<item>
		<title>Csound Vs. Music V — FIGHT! Pt. 2</title>
		<link>http://codehop.com/csound-vs-music-v-%e2%80%94-fight-pt-2/</link>
		<comments>http://codehop.com/csound-vs-music-v-%e2%80%94-fight-pt-2/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:31:21 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[bell labs]]></category>
		<category><![CDATA[dac]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[dynamic range]]></category>
		<category><![CDATA[music-n]]></category>

		<guid isPermaLink="false">http://csound.noisepages.com/?p=47</guid>
		<description><![CDATA[First, I want to make it clear that I&#8217;m making many assumptions about Music V that are likely wrong. I have a mixed bag of fossilized Music V bones, and I&#8217;m doing my best Emily Deschanel impression to reconstruct them. If &#8230; <a href="http://codehop.com/csound-vs-music-v-%e2%80%94-fight-pt-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-52" title="The Technology of Computer Music" src="http://codehop.com/wp-content/uploads/2009/10/TechOfComputerMusic_2.jpg" alt="The Technology of Computer Music" width="200" height="221" />First, I want to make it clear that I&#8217;m making many assumptions about Music V that are likely wrong. I have a mixed bag of fossilized Music V bones, and I&#8217;m doing my best Emily Deschanel impression to reconstruct them. If you are knowledgable of such things and catch an error, or would like to expand, please post a comment. With that said&#8230;</p>
<p>I had to read the Music V manual, but I finally found the bit-depth used for the examples in Mathews&#8217; The Technology of Computer.  12-bit, just as I suspected. According the manual, the digital-analog-converters (DAC) at <a href="http://en.wikipedia.org/wiki/Bell_Labs">Bell Telephone Laboratories</a> (BTL) operated with 12-bit samples. (pg. 168)</p>
<p>I don&#8217;t recall running across a 12-bit audio-file, ever. They just don&#8217;t make them like they used.  I don&#8217;t even think Csound natively supports outputting a 12-bit file. However, it does allow us to easily simulate it with the 0dbfs opcode.</p>
<p>I rewrote part the CSD file from <a href="http://csound.noisepages.com/2009/10/csound-vs-music-v-fight-pt-1/">part 1</a> to better preserve the the original structure of the Music V example. Instead of rescaling the audio output signal of instr 1 by a factor of 16, I elminated this multiplier, and set the global dynamic range to 12-bit with 0dbfs = 2048. Original Music V amplitudes can now be used without modyifing the values or making unnecessaring changes to instrument translations. Here is the new CSD: <a href="http://www.thumbuki.com/TheCsoundBlog/Csound_Vs_MusicV_pt2.csd">Csound_Vs_MusicV_pt2.csd</a></p>
<p>Csound makes changing the dynamic range easy. In fact, almost all modern software allows users to choose from a list of several bit depths. Music V, not so much. When Music V was installed at a new installation, parts of the program would have to be coded, in assembly and/or Fortran, specifically for that particular system. Including the dynamic range. In theory, other computer facilities might have used a different dynamic range other than 12-bit, based on the hardware they had on site.</p>
<p>One interesting bit of information I discovered is something that could be considered a precursor to the modern audio buffer.</p>
<p>The <a href="http://en.wikipedia.org/wiki/GE-600_series">General Electric GE645</a> computer at BTL used a 36-bit word length machine. In BTL&#8217;s particular setup, Music V would have to create 3 samples and collect them into a single 36-bit word before sending this word to the digital reel-to-reel. This isn&#8217;t too unlike the latency buffer found in programs such as Ableton Live, Max, Reaktor, etc., where <em>n</em> amount of samples are collected into a temporary buffer before sending the buffer to the DAC.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehop.com/csound-vs-music-v-%e2%80%94-fight-pt-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Csound Vs. Music V &#8212; FIGHT!  Pt. 1</title>
		<link>http://codehop.com/csound-vs-music-v-fight-pt-1/</link>
		<comments>http://codehop.com/csound-vs-music-v-fight-pt-1/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:48:36 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[max v mathews]]></category>
		<category><![CDATA[music-n]]></category>

		<guid isPermaLink="false">http://csound.noisepages.com/?p=38</guid>
		<description><![CDATA[Csound is a direct descendant of the Music-N series of computer music languages developed by Max V. Mathews.  One could make the case that all digital synthesizers are descendants, or at least distant cousins, of Music-N.  Comparing and contrasting Csound &#8230; <a href="http://codehop.com/csound-vs-music-v-fight-pt-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-42" title="The Technology of Computer Music Mathews" src="http://codehop.com/wp-content/uploads/2009/10/TechOfComputerMusic.jpg" alt="The Technology of Computer Music Mathews" width="500" height="222" /></p>
<p>Csound is a direct descendant of the <a href="http://en.wikipedia.org/wiki/MUSIC-N">Music-N</a> series of computer music languages developed by <a href="http://en.wikipedia.org/wiki/Max_Mathews">Max V. Mathews</a>.  One could make the case that all digital synthesizers are descendants, or at least distant cousins, of Music-N.  Comparing and contrasting Csound with Music V, the similarities are glaringly obvious.</p>
<p>I own a copy of the 1981 edition of Max Mathews&#8217; <em>The Technology of Computer Music</em>. The original was released in 1969 &#8212; that&#8217;s 40 years ago.  I&#8217;ve read it cover to cover.  I&#8217;ve translated some of the examples to Csound.  Much of the knowledge contained in that little red hardcover book is still relevant today.</p>
<p>I thought it would be fun to compare and contrast the two languages.  Here is <strong>The Simplest Orchestra</strong> example from pages 44-46:</p>
<pre><code>
1	INS 0 1 ;
2	OSC P5 P6 B2 F2 P30 ;
3	OUT B2 B1 ;
4	END ;
5	GEN 0 1 2 0 0 .999 50 .999 205 -.999 306 -.999 461 0 511 ;
6	NOT 0 1 .50 125 8.45 ;
7	NOT .75 1 .17 250 8.45 ;
8	NOT 1.00 1 .50 500 8.45 ;
9	NOT 1.75 1 .17 1000 8.93 ;
10	NOT 2.00 1 .95 2000 10.04 ;
11	NOT 3.00 1 .95 1000 8.45 ;
12	NOT 4.00 1 .50 500 8.93 ;
13	NOT 4.75 1 .17 500 8.93 ;
14	NOT 5.00 1 .50 700 8.93 ;
15	NOT 5.75 1 .17 1000 13.39 ;
16	NOT 6.00 1 1.95 2000 12.65 ;
17	TER 8.00 ;</code></pre>
<p>A loose translation into Csound looks something like this:</p>
<pre><code>&lt;CsoundSynthesizer&gt;
&lt;CsInstruments&gt;
sr     = 44100
kr     = 44100
ksmps  = 1
nchnls = 1

instr 1	
	a2 oscil p4, cpspch(p5), 2
	out a2 * 16
endin
&lt;/CsInstruments&gt;
&lt;CsScore&gt;
f2 0 512 -7 0 50 0.999 155 0.999 101 -0.999 155 -0.999 50 0

i 1 0    0.50  125 8.04
i 1 0.75 0.17  250 8.04
i 1 1.00 0.50  500 8.04
i 1 1.75 0.17 1000 8.05
i 1 2.00 0.95 2000 8.07
i 1 3.00 0.95 1000 8.04
i 1 4.00 0.50  500 8.05
i 1 4.75 0.17  500 8.05
i 1 5.00 0.50  700 8.05
i 1 5.75 0.17 1000 9.00
i 1 6.00 1.95 2000 8.11
e 8
&lt;/CsScore&gt;
&lt;/CsoundSynthesizer&gt;</code></pre>
<p>I&#8217;ll spend the next few blogs breaking down these examples, discussing the many differences and similarities, in hopes that we can learn something about our digital synthesis roots.  In the meantime, you can download this Csound file to listen for yourself: <a href="http://www.thumbuki.com/TheCsoundBlog/Csound_Vs_MusicV_pt1.csd">Csound_Vs_MusicV_pt1.csd</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codehop.com/csound-vs-music-v-fight-pt-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
