<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://cycling74.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;feed=atom&amp;action=history</id>
		<title>MSP MIDI Tutorial 3: MIDI Sampler - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;action=history"/>
		<updated>2013-06-19T07:15:43Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.1</generator>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=922&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 16:16, 6 July 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=922&amp;oldid=prev"/>
				<updated>2012-07-06T16:16:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:16, 6 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patches&lt;/del&gt;: [[Media:03iMIDISampling.zip]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;patch and files&lt;/ins&gt;: [[Media:03iMIDISampling.zip]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=911&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 16:06, 6 July 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=911&amp;oldid=prev"/>
				<updated>2012-07-06T16:06:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:06, 6 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;patch&lt;/del&gt;: [[Media:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;03iMIDISampler&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;maxpat&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;patches&lt;/ins&gt;: [[Media:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;03iMIDISampling&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;zip&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=830&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 15:33, 28 June 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=830&amp;oldid=prev"/>
				<updated>2012-06-28T15:33:08Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:33, 28 June 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch: [[03iMIDISampler.maxpat]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch: [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Media:&lt;/ins&gt;03iMIDISampler.maxpat]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=732&amp;oldid=prev</id>
		<title>Admin at 22:59, 24 June 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=732&amp;oldid=prev"/>
				<updated>2012-06-24T22:59:00Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:59, 24 June 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;keymaps, and multi-timbral operation.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;keymaps, and multi-timbral operation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* To use the tutorial patchers in this section of the tutorial, make sure you&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* To use the tutorial patchers in this section of the tutorial, make sure you have a correctly configured MIDI controller connected to your computer. The tutorials in this section use a variety of MIDI messages as example input; if your controller lacks any of these features, you can simulate their input with user interface objects in the tutorial.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;have a correctly configured MIDI controller connected to your computer. The&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;tutorials in this section use a variety of MIDI messages as example input; if your&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;controller lacks any of these features, you can simulate their input with user&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;interface objects in the tutorial.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===Our fun sampler===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;===Our fun sampler===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=731&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Click here to open the tutorial patch: 03iMIDISampler.maxpat  In this tutorial we talk about how to create a MIDI-controllable sampler in MSP. Along the way, we'll look at...&quot;</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_MIDI_Tutorial_3:_MIDI_Sampler&amp;diff=731&amp;oldid=prev"/>
				<updated>2012-06-24T22:58:23Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Click here to open the tutorial patch: &lt;a href=&quot;/wiki/index.php?title=03iMIDISampler.maxpat&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;03iMIDISampler.maxpat (page does not exist)&quot;&gt;03iMIDISampler.maxpat&lt;/a&gt;  In this tutorial we talk about how to create a MIDI-controllable sampler in MSP. Along the way, we&amp;#039;ll look at...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Click here to open the tutorial patch: [[03iMIDISampler.maxpat]]&lt;br /&gt;
&lt;br /&gt;
In this tutorial we talk about how to create a MIDI-controllable sampler in MSP.&lt;br /&gt;
Along the way, we'll look at different features of many samplers, including looping,&lt;br /&gt;
keymaps, and multi-timbral operation.&lt;br /&gt;
&lt;br /&gt;
* To use the tutorial patchers in this section of the tutorial, make sure you&lt;br /&gt;
have a correctly configured MIDI controller connected to your computer. The&lt;br /&gt;
tutorials in this section use a variety of MIDI messages as example input; if your&lt;br /&gt;
controller lacks any of these features, you can simulate their input with user&lt;br /&gt;
interface objects in the tutorial.&lt;br /&gt;
&lt;br /&gt;
===Our fun sampler===&lt;br /&gt;
&lt;br /&gt;
* Take a look at the patcher for this tutorial. The two sets of patcher logic&lt;br /&gt;
(labeled &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; both deal with playing back samples stored in&lt;br /&gt;
{{maxword|name=buffer~}} objects by using {{maxword|name=groove~}} objects under MIDI control.&lt;br /&gt;
Look at patcher area &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. Turn on the audio by clicking the {{maxword|name=ezdac~}}&lt;br /&gt;
and turn up the {{maxword|name=gain~}} slider. From the {{maxword|name=umenu}} object at the top of&lt;br /&gt;
the patch, select option &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; ('bd+hh.aiff'). Play some notes on your MIDI&lt;br /&gt;
keyboard. You should hear a the bass drum sample at different pitches depending&lt;br /&gt;
on which key you press. Select option &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; and take a listen; you should hear&lt;br /&gt;
the snare drum.&lt;br /&gt;
&lt;br /&gt;
* Select option &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; ('cym.aiff') from the {{maxword|name=umenu}}. Play a note&lt;br /&gt;
on the keyboard and hold it down, or select a note from the {{maxword|name=kslider}} object.&lt;br /&gt;
Notice that the sample loops. Select option &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;; notice that the bass guitar&lt;br /&gt;
sound loops a swell. Play the sounds triggered by options &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; and&lt;br /&gt;
&amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;. Double-click the {{maxword|name=coll}} file named &amp;lt;code&amp;gt;sampler&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=umenu}} object in our tutorial patcher causes the {{maxword|name=coll}}&lt;br /&gt;
object to dump out different data depending on which sample we select. Looking at&lt;br /&gt;
its contents by double-clicking it reveals the entire database:&lt;br /&gt;
&lt;br /&gt;
1, 24 sample1 0 0 0; ''(bd+hh.aiff)''&lt;br /&gt;
&lt;br /&gt;
2, 33 sample2 0 0 0; ''(snare.aiff)''&lt;br /&gt;
&lt;br /&gt;
3, 50 sample3 0.136054 373.106537 1; ''(cym.aiff)''&lt;br /&gt;
&lt;br /&gt;
4, 67 sample4 60.204079 70.476189 1; ''(bass.aiff)''&lt;br /&gt;
&lt;br /&gt;
5, 84 sample5 0 0 0; ''(epno.aiff)''&lt;br /&gt;
&lt;br /&gt;
6, 108 sample6 0 0 0; ''(ahkey.aiff)''&lt;br /&gt;
&lt;br /&gt;
Each entry in the file sets up the {{maxword|name=groove~}} object in the patcher to&lt;br /&gt;
play a sample. The format of each line in the {{maxword|name=coll}} file is:&lt;br /&gt;
&lt;br /&gt;
''base_key buffer~_name loop_start loop_end looping''&lt;br /&gt;
&lt;br /&gt;
The ''base key'' refers to which MIDI note at which the sample will play at&lt;br /&gt;
''normal'' speed. The second item in the {{maxword|name=coll}} refers to which&lt;br /&gt;
{{maxword|name=buffer~}} object will play the sample. The next three values determine the&lt;br /&gt;
start and end points of an internal loop which the {{maxword|name=groove~}} object will play,&lt;br /&gt;
and whether or not to use it at all (the last value).&lt;br /&gt;
&lt;br /&gt;
The point of a sampler is to play back recordings (audio samples), often from&lt;br /&gt;
an acoustic instrument. If an acoustic instrumental source is used, it's usually&lt;br /&gt;
inefficient to create a unique sample for every possible note on that instrument.&lt;br /&gt;
Instead, every few notes are sampled, and in-between pitches are achieved by&lt;br /&gt;
playing these sampled notes slightly fast or slow based on their base key. Similarly,&lt;br /&gt;
a sampler is capable of playing notes that sustain for far longer than it's practical to&lt;br /&gt;
record an instrumental sampler. Instead, a sample of modest length is used, as an&lt;br /&gt;
area is found ''within'' the sustaining part of the sample that can be safely&lt;br /&gt;
looped. When you play a note and hold it, the sample starts playback at the&lt;br /&gt;
beginning; once it moves into the loop zone, it repeats that area over and over again;&lt;br /&gt;
when you pick up the note, it plays from the loop zone through to the end of the&lt;br /&gt;
sample.&lt;br /&gt;
&lt;br /&gt;
* Click through the {{maxword|name=umenu}} again and notice how the different&lt;br /&gt;
parameters coming from the {{maxword|name=coll}} object set up the {{maxword|name=groove~}}&lt;br /&gt;
object.&lt;br /&gt;
&lt;br /&gt;
The ''base key'' is converted from MIDI to frequency by the&lt;br /&gt;
{{maxword|name=mtof}} object and used as a divisor for the frequency we want to play. In this&lt;br /&gt;
way, we get a ''ratio'' of the desired frequency and the base frequency which&lt;br /&gt;
we can use to set the speed of a {{maxword|name=groove~}} object. If we want the sound to&lt;br /&gt;
come out an octave higher, we want the ratio to be &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt;; an octave lower, it&lt;br /&gt;
should be &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt;. The second value out of the {{maxword|name=coll}} file is formatted&lt;br /&gt;
with a &amp;lt;code&amp;gt;set&amp;lt;/code&amp;gt; prefix by the {{maxword|name=prepend}} object and send to the&lt;br /&gt;
{{maxword|name=groove~}} to select the appropriate {{maxword|name=buffer~}} to play. The loop values&lt;br /&gt;
come out as numeric data, setting the loop start and end points and sending a loop&lt;br /&gt;
value into an {{maxword|name=int}} box which is triggered each time a note plays. Note-on&lt;br /&gt;
values (i.e. values with velocities greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, passed from the&lt;br /&gt;
{{maxword|name=stripnote}} object) trigger the &amp;lt;code&amp;gt;loop&amp;lt;/code&amp;gt; message, set the value of the&lt;br /&gt;
{{maxword|name=sig~}} object, and restart the sample by sending a &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; into the&lt;br /&gt;
{{maxword|name=groove~}} object. Note-off objects set the &amp;lt;code&amp;gt;loop&amp;lt;/code&amp;gt; state to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;,&lt;br /&gt;
allowing the {{maxword|name=groove~}} to play out the sample to the end and then&lt;br /&gt;
stop.&lt;br /&gt;
&lt;br /&gt;
===Multi-timbral samplers and keymaps===&lt;br /&gt;
&lt;br /&gt;
* Look at the patcher logic labeled &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; on the right of the tutorial&lt;br /&gt;
patcher. As in the last tutorial, a {{maxword|name=poly}} object is used to route MIDI data to a&lt;br /&gt;
number of instances of a single abstraction, this time called&lt;br /&gt;
&amp;lt;code&amp;gt;samplervoice~&amp;lt;/code&amp;gt;. However, the values out of the {{maxword|name=poly}} object do&lt;br /&gt;
more than set the voice allocation.&lt;br /&gt;
&lt;br /&gt;
* Turn down the {{maxword|name=gain~}} slider in patcher area &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and turn&lt;br /&gt;
up the one in patcher area &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;. Using an attached MIDI keyboard, play some&lt;br /&gt;
notes all over the range of the keyboard. Notice that, depending on which notes you&lt;br /&gt;
play, different samples are heard. Play some chords. Notice that you can have as&lt;br /&gt;
many as four notes playing simultaneously. Look at the {{maxword|name=message}} box&lt;br /&gt;
attached to the {{maxword|name=funbuff}} object:&lt;br /&gt;
&lt;br /&gt;
0 1,&lt;br /&gt;
&lt;br /&gt;
41 2,&lt;br /&gt;
&lt;br /&gt;
48 3,&lt;br /&gt;
&lt;br /&gt;
53 4,&lt;br /&gt;
&lt;br /&gt;
68 5,&lt;br /&gt;
&lt;br /&gt;
96 6&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=funbuff}} object is loaded with these values to use them as a&lt;br /&gt;
''key map'' for a multi-timbral sampler. Any MIDI notes whose pitch values are&lt;br /&gt;
between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;40&amp;lt;/code&amp;gt; will trigger sample &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (as defined in&lt;br /&gt;
the {{maxword|name=coll}} file); pitches between &amp;lt;code&amp;gt;41&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;47&amp;lt;/code&amp;gt; will trigger&lt;br /&gt;
sample &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;; and so on.&lt;br /&gt;
&lt;br /&gt;
* Double-click any of the abstractions named &amp;lt;code&amp;gt;samplervoice~&amp;lt;/code&amp;gt; and&lt;br /&gt;
look at the patcher logic inside. Notice how it resembles the patcher logic in area&lt;br /&gt;
&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; of the main patcher, with the addition of some objects to handle MIDI&lt;br /&gt;
velocity to scale the amplitude output of the {{maxword|name=groove~}} object.&lt;br /&gt;
&lt;br /&gt;
The MIDI velocity of incoming notes is divided by &amp;lt;code&amp;gt;127.&amp;lt;/code&amp;gt; to scale it&lt;br /&gt;
between &amp;lt;code&amp;gt;0.&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.&amp;lt;/code&amp;gt; It is then multiplied ''by itself'', creating&lt;br /&gt;
an exponential scaling wherein higher values on the MIDI velocity continuum yield&lt;br /&gt;
far greater increases in volume than lower numbers. This simulates the behavior of&lt;br /&gt;
logarithmic volume circuits (such as mixer faders) in analog audio&lt;br /&gt;
equipment.&lt;br /&gt;
&lt;br /&gt;
* Return to the main patcher, and click the {{maxword|name=toggle}} box labeled 'Play a&lt;br /&gt;
sequence'. Double-click the {{maxword|name=patcher}} object named &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; as&lt;br /&gt;
you rock out to the sequence playing out of our sampler.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;sequence&amp;lt;/code&amp;gt; subpatch contains a {{maxword|name=seq}} object, a&lt;br /&gt;
{{maxword|name=midiflush}}, and a {{maxword|name=midiparse}}. These objects load a MIDI file and&lt;br /&gt;
output the raw bytes in response to &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt; messages&lt;br /&gt;
({{maxword|name=seq}}), shut off all sounding notes in a MIDI byte stream in response to a&lt;br /&gt;
&amp;lt;code&amp;gt;bang&amp;lt;/code&amp;gt; ({{maxword|name=midiflush}}), and parse and extract the pitch/velocity pairs&lt;br /&gt;
from a MIDI stream so that they can be used elsewhere ({{maxword|name=midiparse}}). This&lt;br /&gt;
allows our awesome MIDI sequence to be played by the sampler logic in the main&lt;br /&gt;
patch.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
MIDI-controllable samplers can be created using MSP {{maxword|name=buffer~}} and&lt;br /&gt;
{{maxword|name=groove~}} objects. Different parameters of sampler data (loop points,&lt;br /&gt;
sample name, base key) can be stored in {{maxword|name=coll}} files for easy access so that&lt;br /&gt;
you can easily switch samples depending on MIDI events within the same MSP&lt;br /&gt;
patcher logic.&lt;br /&gt;
&lt;br /&gt;
[[Category:Teaching Material]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>