<?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"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Easy Way of Windowing A Buffer</title>
		<atom:link href="http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 22:27:08 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-43592</guid>
					<title><![CDATA[Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-43592</link>
					<pubDate>Wed, 29 Apr 2009 19:45:10 +0000</pubDate>
					<dc:creator>Mike S</dc:creator>

					<description>
						<![CDATA[
						<p>Hi All, I&#8217;m chopping up an audio file in to specific sections which are then stored and used in the grain.bang object.</p>
<p>As the segmenting is based on pitch i am getting clicks at either end of the edit. This is happening with the windowing of the grain bang also.</p>
<p>I wanted to know if there&#8217;s an easy way performing an operation on a buffer that fades in and out?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156419</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156419</link>
					<pubDate>Wed, 29 Apr 2009 21:08:34 +0000</pubDate>
					<dc:creator>MIB</dc:creator>

					<description>
						<![CDATA[
						<p>first thing that comes to mind is a [function] object in combination with [line~] and a [*~]</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156420</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156420</link>
					<pubDate>Wed, 29 Apr 2009 21:08:45 +0000</pubDate>
					<dc:creator>flies</dc:creator>

					<description>
						<![CDATA[
						<p>If you want to do this directly to the buffer then it&#8217;s real easy to do if you don&#8217;t need to do it while audio is running.</p>
<p>you can read a buffer sample by sample with peek (or poke, i forget) and then use the sample index as the argument to a windowing function (eg triangle: 1 &#8211; 2/sampleLength*abs(index-sampleLength/2).  multiply the sample by the windowing function and peek it into a new buffer.</p>
<p>If you want to do this dynamically to new buffers, then you might be better off not manipulating actual buffers and instead add a windowing function separately.  one solution is to write your windowing function to a buffer.  Read your grain with wave~ and use the same ramp driving the wave~ to read the window and *~ them together.</p>
<p>ramp -> A<br />
A-> wave~ grain -> B<br />
A-> wave~ window -> C<br />
B * C = windowed grain</p>
<p>here&#8217;s a schematic with a really simple grain scheduler.  This would be improved by putting everything after the sel object inside a poly~ so that you don&#8217;t interrupt one grain to start another.  (also, scheduling grains via control path has given me lots of problems. ) </p>
<div class="pre">
<pre>#P outlet 133 344 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 231 105 100 9109513 set grain length;
#P flonum 189 104 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 189 128 57 9109513 prepend set;
#P flonum 129 152 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 129 172 37 9109513 0 , 1 $1;
#P window linecount 2;
#P comment 197 163 100 9109513 create ramp in response to bang;
#P window linecount 1;
#P newex 129 193 27 9109513 line~;
#P newex 129 127 28 9109513 sel 1;
#P window linecount 2;
#P comment 197 59 100 9109513 generate bangs at random intervals;
#P window linecount 1;
#P newex 129 103 31 9109513 > 990;
#P newex 129 79 62 9109513 random 1000;
#P toggle 129 30 15 0;
#P newex 129 57 45 9109513 metro 10;
#P newex 132 314 27 9109513 *~;
#P newex 170 261 67 9109513 wave~ window;
#P newex 103 261 58 9109513 wave~ grain;
#P connect 2 0 16 0;
#P connect 9 0 0 0;
#P connect 9 0 1 0;
#P connect 11 0 9 0;
#P connect 12 0 11 0;
#P connect 13 0 12 0;
#P connect 14 0 13 0;
#P connect 8 0 12 0;
#P connect 6 0 8 0;
#P connect 5 0 6 0;
#P connect 3 0 5 0;
#P connect 4 0 3 0;
#P connect 0 0 2 0;
#P connect 1 0 2 1;
#P window clipboard copycount 17;</pre></div>
<p>hope this helps</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156421</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156421</link>
					<pubDate>Thu, 30 Apr 2009 12:50:10 +0000</pubDate>
					<dc:creator>stefantiedje</dc:creator>

					<description>
						<![CDATA[
						<p>look into trapezoid~ fed by the position oulet&#8230; Can&#8217;t get much easier&#8230;</p>
<p>
<div><span id="toggle156421-0" class="patchtoggle" onmousedown="toggleMaxPatch('post156421-0', 'er156421-0');">&#8211; Pasted Max <span id="maxversion156421-0"></span> Patch, click to <span id="er156421-0">expand</span>. &#8211;</span> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="110" height="14" class="clippy" ><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param NAME="FlashVars" value="copied=copied!&#038;copyto=copy to clipboard"/><param name="bgcolor" value="#FFFFFF"/><param name="wmode" value="opaque"/><embed src="/wp-content/plugins/bbpress-copy-compressed/clippy.swf"  width="110" height="14"   name="clippy"  quality="high"  allowScriptAccess="always"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="text=----------begin_max5_patcher----------%0A334.3oc0SsraCCBD7L9q.wwJ2Hu3VEkdr260doJphX1jPkMXYiayCk7sWCFm%0AlVklGJRUpG.zN6xNCCv5HBahYAVynOPegRHqiHDOjCfDhIrBwhrbQsuLlF%2Bv%0AL4MVbWJKtv5guYaOjtoPoyQqubd.rTXylqzydsByrczAoiFjDS4ICcK..cQC%0ARniCaRI8stktaS669Ti1pEEnOyyXkTnE6wrow1SMDP6frKKwNdY0pYZQNaGM%0AtVVqV4S6TgCcSTjaJ95LEaknDWYTxszjAP6XzAMoze2j3odaAF1s.2eLSh%2Bu%0AzjlUYLuiaoOs7wloSwpK0hBuif63mw6H3xsH9Irn3Kxr70vxU5e9qyexb3e2%0AAqMMUY8LFtjoeczjXsUoEVkQuWMs%2BVnvtZlqjRzmNIfTnjkFk1Fj.c7AuMOW%0AEAmohR9SUDbBEwuBE0FrI5S.g5eNfA%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post156421-0" style="display:none;visibility:hidden;" >
<div class="patchtoggleInfo"><small>Copy <b>all</b> of the following text.Then, in Max, select <em>New From Clipboard</em>.</small></div>
<div class="patchtogglediv">
<pre><code id="pastedcode156421-0">----------begin_max5_patcher----------
334.3oc0SsraCCBD7L9q.wwJ2Hu3VEkdr260doJphX1jPkMXYiayCk7sWCFm
lVklGJRUpG.zN6xNCCv5HBahYAVynOPegRHqiHDOjCfDhIrBwhrbQsuLlF+v
L4MVbWJKtv5guYaOjtoPoyQqubd.rTXylqzydsByrczAoiFjDS4ICcK..cQC
RniCaRI8stktaS669Ti1pEEnOyyXkTnE6wrow1SMDP6frKKwNdY0pYZQNaGM
tVVqV4S6TgCcSTjaJ95LEaknDWYTxszjAP6XzAMoze2j3odaAF1s.2eLSh+u
zjlUYLuiaoOs7wloSwpK0hBuif63mw6H3xsH9Irn3Kxr70vxU5e9qyexb3e2
AqMMUY8LFtjoeczjXsUoEVkQuWMs+VnvtZlqjRzmNIfTnjkFk1Fj.c7AuMOW
EAmohR9SUDbBEwuBE0FrI5S.g5eNfA
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p><p>
Stefan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156422</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156422</link>
					<pubDate>Thu, 30 Apr 2009 16:00:16 +0000</pubDate>
					<dc:creator>Mike S</dc:creator>

					<description>
						<![CDATA[
						<p>thanks for the replies everyone</p>
<p>i am now working on with peek and poke to do the windowing</p>
<p>as my samples will vary in size, ideally i&#8217;d like the shorter ones to be windowed completely, but for the longer samples i&#8217;d prefer if it didn&#8217;t window the entire thing, just the start and end points of it.</p>
<p>is there a way to do this by altering the patch below?</p>
<p>
<div><span id="toggle156422-0" class="patchtoggle" onmousedown="toggleMaxPatch('post156422-0', 'er156422-0');">&#8211; Pasted Max <span id="maxversion156422-0"></span> Patch, click to <span id="er156422-0">expand</span>. &#8211;</span> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="110" height="14" class="clippy" ><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param NAME="FlashVars" value="copied=copied!&#038;copyto=copy to clipboard"/><param name="bgcolor" value="#FFFFFF"/><param name="wmode" value="opaque"/><embed src="/wp-content/plugins/bbpress-copy-compressed/clippy.swf"  width="110" height="14"   name="clippy"  quality="high"  allowScriptAccess="always"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="text=----------begin_max5_patcher----------%0A979.3ocyXssahCCD8Y3qvJZenshR8k3j38s86Xa0p.XndK4hHF0tsp8aecl.%0AEZaBwEBFDRNjw4xYNYlyL1uzum2nrmjEdneh9MpWuW52qGXpzPuUm2yKI9ow%0AyiKfKyKQVTDOS5MnZNs7IMXegLdR7rXU55YTS.6Yi960DFes0oYo5z3DIL2u%0AVnhm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.CbKpHVEsWtgWNEUQmk%0AnhaEpb8WPlMhneB6GcTQsJZm5X8JJ6rDU1nWIbaXkvl5MBGSTPpUPae9Xtse%0Agp2WqIfTeGiJ94nD5m5kqgvJgaC0spXCFe.M7YN409%2BGEubg9.%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post156422-0" style="display:none;visibility:hidden;" >
<div class="patchtoggleInfo"><small>Copy <b>all</b> of the following text.Then, in Max, select <em>New From Clipboard</em>.</small></div>
<div class="patchtogglediv">
<pre><code id="pastedcode156422-0">----------begin_max5_patcher----------
979.3ocyXssahCCD8Y3qvJZenshR8k3j38s86Xa0p.XndK4hHF0tsp8aecl.
EZaBwEBFDRNjw4xYNYlyL1uzum2nrmjEdneh9MpWuW52qGXpzPuUm2yKI9ow
yiKfKyKQVTDOS5MnZNs7IMXegLdR7rXU55YTS.6Yi960DFes0oYo5z3DIL2u
Vnhmudlrk54Rs9e4xJ334gtaqapP8LLAgNDuxb5xDUp4d.fQWYLOVO9dU5r+
rPNVW8jnzHy8fBXvne4HwX48Gu44T8xgGDoz3q86WNLvRRIU9nwO+BmjTnyJ
hSxKdqVRAuGjRgZVZ4zHuoyyh0eONhrCNhK.dgyKODBmPwMRRz8fjFmkjHS0
egkFEmNCoyPOpRmj8XcLEUzNScf9OgBNNkVdqHgeK9OdO7+lxbBwLlXXs9c3
oLsgQphBfaEEQbWdS9BYtLcBpPpqkV7O5zBoUZgDggLk1hT1GZYzRsNqVgTJ
qQGrLMxaaPXWdOMnxA.wQ96icn2zbEi74wik04lDwoLvmD.bBG9zxwGg39cU
DsV9H5jxGzs3CF2c5.pzoYugzxhZkAHA6AoTU0zT9btpPuoLpk+oyDQHgPKI
DVkpJgMjuSUjnNUEgv6XUj0tCluVMry0DaHDYzxoSkK1QPB6PBR9HabvsXDr
oPZH4HzgkA2lGRsz.8rgFnQgkttOqRTI7HvCM0VQ1CxliTvQcSSlrcz5feTk
qCNsPbDZxrAW+JDt1NLwg6cbQm0l4JRACsYxnsnDR5z7Bbv4SdgODOvhXaZ6
vQ4ER4C6Huv2MgHr1ol.fTBBbW4EMRU9qFdQrOzhJEha15PmspDeH8gJ.ok.
dKTDqion5HnfCif530qQ8q13GSgWtqRrV9bsDy9n4BRMC1b7ayPVrP+PHpwO
3HD6znBrH5rQ.1WT0SVD2ppycZCZBwYCMvBpJDGHrZ+M5vzE4S4KPlgKtFOj
eUd1iWbwOTjqKGoWSt7F5kWdyE3g9WsskaucfYr1BW3S5tmshFWka0Z3z1Es
fKwrB0zOu07v6oz9GI2hrkKFu1CVq8hHu+llXJsqRi0JyxA25hLodnMv4d0j
IRX90tZhZRdlQnYEHP2U6mZqwjQ1CQaCS9tES9VfIXkAawlNAT3VA0IfoHsB
JraAkvJlJzoe9f0TXIpvNDUg1fpx8I37CU3HGiJ6x.CbKpHVEsWtgWNEUQmk
nhaEpb8WPlMhneB6GcTQsJZm5X8JJ6rDU1nWIbaXkvl5MBGSTPpUPae9Xtse
gp2WqIfTeGiJ94nD5m5kqgvJgaC0spXCFe.M7YN409+GEubg9.
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156423</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156423</link>
					<pubDate>Thu, 30 Apr 2009 20:47:04 +0000</pubDate>
					<dc:creator>flies</dc:creator>

					<description>
						<![CDATA[
						<p>I can&#8217;t open your patch cuz i&#8217;m still on max 4.6</p>
<p>this is one of those cases where doing it in javascript would be way easier IMHO, but i&#8217;ve solved the problem for you with max. (since i have important other work to do, i spent some time doing this for you.  i&#8217;m logical that way.)</p>
<p>the basic idea is that you have a windowing function, in this case a gaussian/bell curve, and you read through it, pausing at the maximum if your buffer is long enough.</p>
<p>I tried to make all the steps clear inside the patch, but let me know if you have any questions.</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 18.;<br />
#P window linecount 1;<br />
#P comment 216 327 57 9109522 logic;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 3;<br />
#P comment 648 272 57 9109513 scale width of bell with fade time *;<br />
#P comment 103 129 66 9109513 length of buffer &#8211; fade time;<br />
#P window setfont &#8220;Sans Serif&#8221; 18.;<br />
#P window linecount 7;<br />
#P comment 805 84 213 9109522 if length of buffer is less than minimum , make a gaussian window for it ; if length of buffer is larger than minimum , make a &#8220;psuedo-gaussian&#8221; window for it ;;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P comment 366 439 69 9109513 window output;<br />
#P outlet 440 493 15 0;<br />
#P comment 282 333 13 9109513 C;<br />
#P comment 497 318 13 9109513 B;<br />
#P comment 238 302 13 9109513 A;<br />
#P window linecount 7;<br />
#P comment 18 424 265 9109513 LOGIC ; fadeTime = minBuf/2 ; A if index<fadetime then output index ; B else if minBuf/2<index<(lengthOfBuf-fadeTime) then output minBuf/2 which is the top of the bell curve ; C if index > (lengthOfBuf-fadeTime) then output the distance from index to lengthOfBuf ;;<br />
#P window linecount 1;<br />
#P newex 174 129 64 9109513 expr $i1-$i2/2;<br />
#P button 482 320 15 0;<br />
#P button 298 333 15 0;<br />
#P button 218 299 15 0;<br />
#P newex 335 329 76 9109513 expr $i2 -$i1+$i3;<br />
#P number 292 220 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 335 300 138 9109513 if $i1>$i3 then $i1 else out2 $i2;<br />
#P button 430 241 15 0;<br />
#P button 364 237 15 0;<br />
#P newex 199 268 146 9109513 if $i1< $i2/2 then $i1 else out2 $i1;<br />
#P newex 385 217 34 9109513 gate 2;<br />
#P newex 375 141 27 9109513 + 1;<br />
#P flonum 524 253 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P message 524 185 18 9109513 $1;<br />
#P newex 524 221 27 9109513 / 2;<br />
#P window linecount 2;<br />
#P comment 440 121 93 9109513 test if buffer length is less than min;<br />
#P window linecount 1;<br />
#P newex 406 141 28 9109513 sel 0;<br />
#P newex 399 184 34 9109513 gate 2;<br />
#P newex 405 118 27 9109513 < ;<br />
#P newex 422 50 45 9109513 loadbang;<br />
#P window linecount 3;<br />
#P comment 470 62 100 9109513 long buffer threshold ; set it to whatever you prefer ;;<br />
#P window linecount 1;<br />
#P message 422 81 23 9109513 100;<br />
#P number 352 32 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P message 298 166 52 9109513 0 , $1 4000;<br />
#P newex 298 189 40 9109513 line;<br />
#P window linecount 6;<br />
#P comment 726 279 100 9109513 * 0.375 sets minimum value to about 0.001 ; increase for wider envelope at the cost of louder blips , vice versa ;;<br />
#P window linecount 1;<br />
#P newex 605 269 38 9109513 * 0.375;<br />
#P comment 466 372 43 9109513 index;<br />
#P comment 560 252 66 9109513 fade time;<br />
#P flonum 438 438 50 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 605 299 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 528 418 33 9109513 * 128.;<br />
#P user multiSlider 520 438 196 92 0. 127. 1 3177 15 0 0 2 0 0 0;<br />
#M frgb 0 0 0;<br />
#M brgb 255 255 255;<br />
#M rgb2 127 127 127;<br />
#M rgb3 0 0 0;<br />
#M rgb4 37 52 91;<br />
#M rgb5 74 105 182;<br />
#M rgb6 112 158 18;<br />
#M rgb7 149 211 110;<br />
#M rgb8 187 9 201;<br />
#M rgb9 224 62 37;<br />
#M rgb10 7 114 128;<br />
#P number 427 371 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 443 388 172 9109513 expr exp(-($f1-$f2)*($f1-$f2)/($f3*$f3));<br />
#P comment 613 389 176 9109513 bell curve: exp(-(index-center)^2/width^2);<br />
#P comment 635 316 56 9109513 width of bell;<br />
#P comment 395 32 100 9109513 &#8220;length of buffer&#8221;;<br />
#P user panel 156 262 357 102;<br />
#X brgb 148 173 215;<br />
#X frgb 0 0 0;<br />
#X border 1;<br />
#X rounded 0;<br />
#X shadow 0;<br />
#X done;<br />
#P connect 16 0 38 0;<br />
#P fasten 28 0 29 0 390 264 204 264;<br />
#P connect 29 0 35 0;<br />
#P connect 17 0 38 1;<br />
#P connect 14 0 33 0;<br />
#P connect 16 0 15 0;<br />
#P connect 15 0 14 0;<br />
#P connect 32 0 36 0;<br />
#P connect 17 0 29 1;<br />
#P connect 29 1 32 0;<br />
#P connect 32 0 34 0;<br />
#P connect 28 0 30 0;<br />
#P fasten 26 0 34 1 529 277 373 277;<br />
#P fasten 20 0 27 0 410 138 380 138;<br />
#P fasten 27 0 28 0 380 192 390 192;<br />
#P fasten 27 0 21 0 380 176 404 176;<br />
#P fasten 26 0 32 1 529 277 404 277;<br />
#P fasten 38 0 34 2 179 322 406 322;<br />
#P connect 16 0 20 0;<br />
#P connect 20 0 22 0;<br />
#P fasten 14 0 28 1 303 216 414 216;<br />
#P connect 19 0 17 0;<br />
#P connect 17 0 20 1;<br />
#P connect 16 0 21 1;<br />
#P fasten 28 1 5 0 414 358 432 358;<br />
#P fasten 29 0 5 0 204 358 432 358;<br />
#P fasten 32 1 5 0 468 358 432 358;<br />
#P fasten 34 0 5 0 340 358 432 358;<br />
#P connect 28 1 31 0;<br />
#P connect 4 0 9 0;<br />
#P connect 9 0 43 0;<br />
#P connect 5 0 4 0;<br />
#P fasten 38 0 32 2 179 295 468 295;<br />
#P connect 32 1 37 0;<br />
#P connect 7 0 6 0;<br />
#P fasten 17 0 25 0 427 107 529 107;<br />
#P fasten 22 0 25 0 411 181 529 181;<br />
#P connect 25 0 24 0;<br />
#P connect 21 1 24 0;<br />
#P connect 24 0 26 0;<br />
#P connect 26 0 4 1;<br />
#P connect 4 0 7 0;<br />
#P connect 26 0 12 0;<br />
#P connect 12 0 8 0;<br />
#P connect 8 0 4 2;<br />
#P window clipboard copycount 49;</fadetime></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156424</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156424</link>
					<pubDate>Thu, 30 Apr 2009 21:19:38 +0000</pubDate>
					<dc:creator>Mike S</dc:creator>

					<description>
						<![CDATA[
						<p>hi flies</p>
<p>thanks for the help, there seems to be a lot of connections in that patch that i&#8217;ll have to hunt down</p>
<p>i know it&#8217;s pushing it a bit but is there perhaps a more elegant(read simple) way of doing this</p>
<p>attached is my patch posted above</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156425</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156425</link>
					<pubDate>Thu, 30 Apr 2009 23:19:38 +0000</pubDate>
					<dc:creator>flies</dc:creator>

					<description>
						<![CDATA[
						<p>there&#8217;s surely a more elegant way of doing it. </p>
<p>the difficulty is that you&#8217;re complicating the problem by requiring a conditional response.  Whereas before you just had to elongate the triangle to the length of the buffer, now you want to have two different kinds of responses depending on the buffer length.</p>
<p>Rather than giving you a cleaner fish, i&#8217;m going to attempt to fashion a pole for you.  Basically, you just break the problem down into parts and then create the parts you need and fit them together.</p>
<p>i&#8217;ll scheme out what you want your patch to do, and hopefully you&#8217;ll how my solution works a little better, or find your own solution.</p>
<p>1) determine if the buffer length L is less than the minimum M<br />
2.a) if yes, use old windowing procedure<br />
if no:<br />
2) create a ramp up of fixed length M/2<br />
3) followed by a flat region of length L-M<br />
4) followed by a ramp down of length M/2</p>
<p>You could implement steps 2-4 in several ways.  one would be to write three window segments (ramp up, flat, ramp down) and trigger them at the appropriate times (which is to say, route your index to the right function).  Another would be to multiply your triangle function so that it goes up above one and then clip it at one to get a trapezoid.  with a teensy bit of algebra, you could make it so that it hits one at the right place coming up and down.  Since you already wrote the triangle expr i&#8217;m guessing you can do this without too much trouble.</p>
<p>The way i implemented steps 2-4 is as follows:  use a windowing function of length M W(x).  my window is nice and smooth and fancy-pants, but a triangle works just as well.  for x<m /2, the window ramps up, for x>M/2 it ramps down, W(M/2) is exactly 1.  Now, you&#8217;re reading through the buffer from positions 1 to L, let the position you&#8217;re reading be called i.  When reading the buffer from indices 1 to M/2 (i</m><m /2), just use W(i) to ramp up.  for i in the range M/2 to L-M/2, map i to M/2 so that you get a window of W(M/2)=1.  finally, for L-M/2<i<L, map i to the range M/2 to M so that you get the ramp down that you want.</p>
<p>just think clearly and break the problem down into parts you can solve.</p>
<p>i&#8217;m sorry this is so mathematical, i&#8217;m in the middle of writing a paper on mathematical ecology.</p>
</m></p>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156426</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156426</link>
					<pubDate>Fri, 01 May 2009 06:09:18 +0000</pubDate>
					<dc:creator>Tokyo Rose</dc:creator>

					<description>
						<![CDATA[
						<p>hey, not sure what you mean by windowing a buffer~, storing a window into a buffer? or taking the audio stored in a buffer~, windowing it, and then writing it back into the buffer~?&#8230;.</p>
<p>in any case, just in case it helps, this is a pseudo-hanning window(a hanning window with variable attack-release defined in milliseconds). Doesn&#8217;t require a buffer~ and is pretty simple. I came up with this because I wanted short grains to be windowed nicely, while longer beat-cutting could also be windowed(for clicks) without reducing the impact of a percussive hit, if you like this, let me know as I&#8217;ve just coded an external that does it all with one single object and I can pass this on to you. but if I&#8217;m completely misunderstanding what you want, i wish you the best of luck in finding the right solution for you:</p>
<p>
<div><span id="toggle156426-0" class="patchtoggle" onmousedown="toggleMaxPatch('post156426-0', 'er156426-0');">&#8211; Pasted Max <span id="maxversion156426-0"></span> Patch, click to <span id="er156426-0">expand</span>. &#8211;</span> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="110" height="14" class="clippy" ><param name="allowScriptAccess" value="always" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param NAME="FlashVars" value="copied=copied!&#038;copyto=copy to clipboard"/><param name="bgcolor" value="#FFFFFF"/><param name="wmode" value="opaque"/><embed src="/wp-content/plugins/bbpress-copy-compressed/clippy.swf"  width="110" height="14"   name="clippy"  quality="high"  allowScriptAccess="always"  type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer"  FlashVars="text=----------begin_max5_patcher----------%0A2014.3oc6ak0aiaCD94jeED9ocacbEuzQQQA1EnEn.8ot4shEKjknsUWYQUI%0Apj8.a9sWdH4X63jHYQoj3s.Fxh5fb327wYFNj5qme1j47OwJm.9YveCN6rud%0A9Ymouj5BmUW9rIqC%2BTTZXo9wlDwWulkIlL0bOA6SB80%2Bqv04Wlrl0biE7LQV%0Anrr5luoHILc6WIhmxKLMqyLeBFh8lJOyi.gdtpyzWBOE.m4.de8KlUslWIRY%0ABsj3zzPEKm20ZRIbkIeQKbP3LZ.E56Ueu7PQzpjrkenfEILULw2alirFvpit%0AT0QjytBVRVibAquXRrtqym%2BOWPmntz2N%2Bb0go8Dn%2BSNO%2B2xhOEwYLQisxmTd%0Aj1cbFaab9chvBwoHRi7C1BoC5LRiNFjdMqrLbI6NHMzwYzv3l9h4RhOmyL02%0AjIGKTFn4oTsEBjuFU82p4mubGo1Y5VGf2GhitKh6AsI4FOSSsAuoJNgCt3Wu%0Ae7G71zvnO9LiouHLRKh3CoxPybtesEDqo7Xejg%2Bq0CHbGn9dNGihXdkPvy1.%0AyaSJfOHonMb24gYKuk%2BdndcfopccZFou2381xRUMcRFa2G1GgoX0CinNA9O.%0AC3AwU2.aRvQy.uUhJfK4f%2BHKQHIxR5w2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PNcblEAdl.vzA0TGaitTekV%0AmAPZ6qVsMARfeNJSiavM313IDSGWYpMV3w8IeOxBe67%2BC%2BL43PB%0A-----------end_max5_patcher-----------&#038;copied=copied!&#038;;copyto=copy to clipboard"  bgcolor="#ffffff"  wmode="opaque" /> </object></div>
<div id="post156426-0" style="display:none;visibility:hidden;" >
<div class="patchtoggleInfo"><small>Copy <b>all</b> of the following text.Then, in Max, select <em>New From Clipboard</em>.</small></div>
<div class="patchtogglediv">
<pre><code id="pastedcode156426-0">----------begin_max5_patcher----------
2014.3oc6ak0aiaCD94jeED9ocacbEuzQQQA1EnEn.8ot4shEKjknsUWYQUI
pj8.a9sWdH4X63jHYQoj3s.Fxh5fb327wYFNj5qme1j47OwJm.9YveCN6rud
9Ymouj5BmUW9rIqC+TTZXo9wlDwWulkIlL0bOA6SB80+qv04Wlrl0biE7LQV
nrr5luoHILc6WIhmxKLMqyLeBFh8lJOyi.gdtpyzWBOE.m4.de8KlUslWIRY
Bsj3zzPEKm20ZRIbkIeQKbP3LZ.E56Ueu7PQzpjrkenfEILULw2alirFvpit
T0QjytBVRVibAquXRrtqym+OWPmntz2N+b0go8Dn+SNO+2xhOEwYLQisxmTd
j1cbFaab9chvBwoHRi7C1BoC5LRiNFjdMqrLbI6NHMzwYzv3l9h4RhOmyL02
jIGKTFn4oTsEBjuFU82p4mubGo1Y5VGf2GhitKh6AsI4FOSSsAuoJNgCt3Wu
e7G71zvnO9LiouHLRKh3CoxPybtesEDqo7Xejg+q0CHbGn9dNGihXdkPvy1.
yaSJfOHonMb24gYKuk+dndcfopccZFou2381xRUMcRFa2G1GgoX0CinNA9O.
C3AwU2.aRvQy.uUhJfK4f+HKQHIxR5w2SDcrwTjw1Nr1YZW34t91Te.mA9Sd
XL3c7pr3eOI86JcAUarIvUqJHjtqJ7rop3WtbURIHmWHR3Y.4oUkrXffCJiB
k5EwJFnPNzgAVTvWCbT2ABh4WmoNSWTMReF3xUrrof4eFDFGK6ufvL.ewhRl
XJ3Z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f06HssdJ48fs1DDxlNei9bTJ6DX
AAqUMPi8exfY+GEX2HeTrnSECOPie2ALpezQkuA1WhCi1vwuJrXCHGVI3qXo
4eP9.a1nY7HETrEZsXwxhPi4FX22l3Gv5EO6tUXa0na8tnG0341hNpokHPpq
ut9Q3.DTeFT1GbH69xGZXV8Bt64b6JgoNZ+o2ssdV+V5M.3deaeZITc8cU9k
7phnFpc8p3KkgMMdLqTjjEp1rja8Ppm4VivqRhiYYaqzVmDmySxD0x.38GjI
ZcQxo8hDxCqx1A1U+Gh3soTOEVOXaDV+tIsPGhR9LYmr9CYYmBHssbLkp6MA
J1S+fbbK5E60UezdAwUIclsAQcOh52aQ0MnEh5d8mGGvkSzSu0vHFPt9q65P
kH2o.VezzaUm2WcQa5ftntx+0DJSzYlDfu04HOyJFo0QpB8UGgZSWnizo9JS
sYfJ0qiTbCj4Wy.7aJXCYE1FYsCVkoN929woP727kpzSYk30FCfcjthcz1oM
eqkDy91j1ed4d1guGY0sixpwJr4qCsVVCn82LPavUDtabfZJZSznlzftWIr9
OrbNxz5RiQOgzYmKldhw3Lg3sko5lRlOR2ZUhtTe4OtCfMjwv08d9TZuqak+
.pLNdSgQY3mp+f57vOy2DBVFdTcgdJqnVElw3FXLA2VY54F8CMtxDps7rNOj
vy70+6QaJzWUZv.HpihGc73R8QCfmaaHSv1HSirIBXahZXDwIZazciqYKRal
M.FMt5Nm1HS9iJNgaiKasuxwCmZkqYzHiSsJMPNcblEAdl.vzA0TGaitTekV
mAPZ6qVsMARfeNJSiavM313IDSGWYpMV3w8IeOxBe67+C+L43PB
-----------end_max5_patcher-----------</code></pre></div>
</div>
</p>						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156427</guid>
					<title><![CDATA[Re: Easy Way of Windowing A Buffer]]></title>
					<link>http://cycling74.com/forums/topic/easy-way-of-windowing-a-buffer/#post-156427</link>
					<pubDate>Sun, 03 May 2009 21:15:29 +0000</pubDate>
					<dc:creator>Eric Lyon</dc:creator>

					<description>
						<![CDATA[
						<p>> I wanted to know if there&#8217;s an easy way <br />
> performing an operation on a buffer that fades in and out?</p>
<p>You could try the &#8220;fadein&#8221; and &#8220;fadeout&#8221; messages of my object buffet~.</p>
<p><a href="http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/">http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/</a></p>
<p>Eric</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

