<?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; sampler</title>
	<atom:link href="http://codehop.com/tag/sampler/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>Step and Funny Talk for the OLPC</title>
		<link>http://codehop.com/step-and-funny-talk-for-the-olpc/</link>
		<comments>http://codehop.com/step-and-funny-talk-for-the-olpc/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 16:41:06 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[the cosmos]]></category>
		<category><![CDATA[csound]]></category>
		<category><![CDATA[dsp]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[funnytalk]]></category>
		<category><![CDATA[olpc]]></category>
		<category><![CDATA[sampler]]></category>
		<category><![CDATA[sequencer]]></category>
		<category><![CDATA[step]]></category>
		<category><![CDATA[stepsequencer]]></category>
		<category><![CDATA[synth]]></category>
		<category><![CDATA[synthesizer]]></category>
		<category><![CDATA[victorlazzarini]]></category>
		<category><![CDATA[xo]]></category>
		<category><![CDATA[yamaha]]></category>

		<guid isPermaLink="false">http://www.thumbuki.com/20080317/step-and-funny-talk-for-the-olpc.html</guid>
		<description><![CDATA[I spent my spare time last week developing two audio-based activity prototypes for the OLPC: Step and Funny Talk. The whole process was surprisingly quick and easy. I attribute this to Victor Lazzarini&#8217;s Csound Sugar GUI toolkit. I do a &#8230; <a href="http://codehop.com/step-and-funny-talk-for-the-olpc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I spent my spare time last week developing two audio-based activity prototypes for the <a href="http://www.laptop.org/">OLPC</a>:  Step and Funny Talk.  The whole process was surprisingly quick and easy.  I attribute this to <a href="http://en.wikipedia.org/wiki/Victor_Lazzarini">Victor Lazzarini&#8217;s</a> Csound Sugar GUI toolkit.  I do a lot of <a href="http://www.csounds.com/">Csound</a> programming, but I&#8217;ve never actually done any GUI work for it.  Using the toolkit was as simple as defining widgets and mapping them in Csound.</p>
<h3>Step</h3>
<p><a href="http://www.flickr.com/photos/thumbuki/2340959656/" title="OLPC Step Activity by thumbuki, on Flickr"><img src="http://farm3.static.flickr.com/2284/2340959656_b6720d8812.jpg" width="500" height="333" alt="OLPC Step Activity" /></a></p>
<p>Flickr photo be <a href="http://www.flickr.com/photos/thumbuki/">me</a></p>
<p>Step is the first activitiy I&#8217;m developing for the XO.  It&#8217;s a straight forward eight note step sequencer with synth notes, snare and kick parts.  So far, I&#8217;ve probably put in about 8 hours on this.  Once a user has a pattern they like, they can render the loop to an audio file, which can then be loaded in other activities.  It still needs a lot of work, especially the synth engine.  Though you can still take a listen if you would like:  <a href="http://www.thumbuki.com/files/StepDemo1.mp3">StepDemo1.mp3</a>.</p>
<h3>Funny Talk</h3>
<p><a href="http://www.flickr.com/photos/thumbuki/2340117811/" title="OLPC Funny Talk Activity by thumbuki, on Flickr"><img src="http://farm3.static.flickr.com/2216/2340117811_c09311f384.jpg" width="500" height="333" alt="OLPC Funny Talk Activity" /></a></p>
<p>Flickr photo be <a href="http://www.flickr.com/photos/thumbuki/">me</a></p>
<p>This is my favorite of the two, as my inspiration for this activity comes from my childhood memories of the <a href="http://www.sonicstate.com/synth/yamaha_vss-30.cfm">Yamaha VSS-30 keyboard</a>.  My friends and I used to spend hours playing with that keyboard.  Often in a very juvenile manner.  I figured if we had such a great time playing with our voices, then perhaps the target audience of the OLPC will as well.  Here is &#8220;the sound of my voice&#8221; being processed with Funny Talk: <a href="http://www.thumbuki.com/files/FunnyTalkDemo1.mp3">FunnyTalkDemo1.mp3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://codehop.com/step-and-funny-talk-for-the-olpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.thumbuki.com/files/FunnyTalkDemo1.mp3" length="31153" type="audio/mpeg" />
<enclosure url="http://www.thumbuki.com/files/StepDemo1.mp3" length="15230" type="audio/mpeg" />
		</item>
	</channel>
</rss>
