<?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: need a flush update (some bug reports)</title>
		<atom:link href="http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 23:03:31 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-28953</guid>
					<title><![CDATA[need a flush update (some bug reports)]]></title>
					<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-28953</link>
					<pubDate>Wed, 29 Nov 2006 09:43:38 +0000</pubDate>
					<dc:creator>Stefan Tiedje</dc:creator>

					<description>
						<![CDATA[
						<p>flush has a completely useless restriction:<br />
Its restricted to notes from 0 to 127!</p>
<p>Its that useless, that I would call it a bug.</p>
<p>I represent microintervals with a cent representation. The middle C is <br />
6000, the D is 6200. A quartertone sharp of C is 6050&#8230;</p>
<p>I need to have a flush which does accept all integers (also negative <br />
numbers). I understand that the amount of polyphony flush can deal with <br />
might be restricted.</p>
<p>Suggestion: an additional parameter would set a mode without that <br />
restriction. (For the sake of the eventual, though very unlikely, <br />
possibility of breaking old patches.)</p>
<p>I&#8217;d rather like to have flush fixed, than adding another abhaXion to my <br />
collection&#8230;</p>
<p>I tried borax as workaround, it reports other notes as 0 to 127, but <br />
doesn&#8217;t flash them! this certainly needs to be fixed as well&#8230;<br />
Borax also doesn&#8217;t accept multiple triggers for the same note (as <br />
documented in the manual)&#8230;</p>
<p>By the way, k-slider if in a range exceeding 127 will not switch off <br />
notes in poly mode&#8230;.</p>
<p>And to fullfill the bugreport guide lines:</p>
<p>I expect flush to work with all integers,<br />
I expect borax to flush all held notes also those exceeding the 0-127 range.<br />
I expect k-slider to switch off notes exceeding the 0-127 range in <br />
polymode. (this is the least urgent of all, but seems just logical to be <br />
fixed&#8230; ;-)</p>
<p>All three to explore:</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 193 213 69 196617 prepend set;<br />
#P button 176 213 15 0;<br />
#P button 187 122 15 0;<br />
#P message 232 237 63 196617 20 , 20 , 135;<br />
#P number 193 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P message 193 263 50 196617 $1 0;<br />
#P message 245 141 63 196617 20 , 20 , 135;<br />
#P number 206 141 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P message 206 164 50 196617 $1 64;<br />
#P number 225 109 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P number 343 295 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P number 500 108 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P user kslider 63 66 35 1 120 48 19 7 1 128 128 128 128 128 128 255 255 <br />
255 0 0 0 0 0 0;<br />
#P number 63 108 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 63 242 40 196617 print f;<br />
#P newex 63 220 32 196617 pack;<br />
#P user kslider 313 66 35 1 120 48 19 7 1 128 128 128 128 128 128 255 <br />
255 255 0 0 0 0 0 0;<br />
#P button 433 168 15 0;<br />
#P newex 357 256 43 196617 print b;<br />
#P newex 357 234 32 196617 pack;<br />
#P newex 313 205 130 196617 borax;<br />
#P button 30 125 15 0;<br />
#P newex 63 196 32 196617 flush;<br />
#P number 313 108 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P comment 381 295 84 196617 number of notes;<br />
#P connect 4 3 5 0;<br />
#P connect 4 4 5 1;<br />
#P connect 7 0 4 2;<br />
#P connect 4 2 14 0;<br />
#P fasten 1 0 24 0 318 200 198 200;<br />
#P connect 1 0 4 0;<br />
#P fasten 19 0 4 0 198 289 294 289 305 202 318 202;<br />
#P fasten 16 0 4 0 211 184 318 184;<br />
#P fasten 17 0 24 0 211 161 198 161;<br />
#P connect 17 0 16 0;<br />
#P connect 11 0 2 0;<br />
#P connect 24 0 20 0;<br />
#P fasten 18 0 16 0 250 161 211 161;<br />
#P fasten 21 0 19 0 237 257 198 257;<br />
#P connect 20 0 19 0;<br />
#P connect 22 0 17 0;<br />
#P connect 23 0 20 0;<br />
#P connect 12 1 15 0;<br />
#P connect 8 1 13 0;<br />
#P connect 12 0 11 0;<br />
#P connect 5 0 6 0;<br />
#P connect 9 0 10 0;<br />
#P connect 2 1 9 1;<br />
#P connect 2 0 9 0;<br />
#P connect 8 0 1 0;<br />
#P connect 3 0 2 0;<br />
#P window clipboard copycount 25;</p>
<p>
&#8211; <br />
Stefan Tiedje&#8212;&#8212;&#8212;&#8212;x&#8212;&#8212;-<br />
&#8211;_____&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8211;(_|_ &#8212;-|&#8212;&#8211;|&#8212;&#8211;()&#8212;&#8212;-<br />
&#8211; _|_)&#8212;-|&#8212;&#8211;()&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;-()&#8212;&#8212;&#8211;www.ccmix.com</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89462</guid>
					<title><![CDATA[Re: need a flush update (some bug reports)]]></title>
					<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89462</link>
					<pubDate>Wed, 29 Nov 2006 14:42:03 +0000</pubDate>
					<dc:creator>Peter Castine</dc:creator>

					<description>
						<![CDATA[
						<p>Flush, like a lot of classic Max objects, is highly MIDI-centric.</p>
<p>The notion of having a parameter to override the default range is a  <br />
reasonable one, however I&#8217;d suggest following the lead of objects  <br />
like table, Histo, and random: an integer sets the range upper bound.  <br />
For complete consistency it would be the exclusive upper bound (which  <br />
confuses a lot of people but it&#8217;s consistent&#8230; I hope the  <br />
consistency people are reading this!-)</p>
<p>Flush almost certainly needs to allocate a buffer to track note on  <br />
events (or whatever you&#8217;e using it for) and that buffer wants to be  <br />
allocated at instantiation time.</p>
<p>In the above scenario you could handily deal with negative values  <br />
with the aid of a little wrapper abstraction.</p>
<p>An &#8216;unlimited&#8217; range is impossible since integers on a computer are  <br />
limited anyway, in Max to the range [-2,147,483,648 ..  <br />
2,147,483,647]. Sure, you might want to use that range but I&#8217;m pretty  <br />
sure that the current implementation of flush would require a 16  <br />
terabyte buffer to handle it.</p>
<p>Who has 16TB memory installed?</p>
<p>On 29-Nov-2006, at 10:43, Stefan Tiedje wrote:</p>
<p>> flush has a completely useless restriction:<br />
> Its restricted to notes from 0 to 127!<br />
><br />
> Its that useless, that I would call it a bug.<br />
><br />
> I represent microintervals with a cent representation. The middle C  <br />
> is 6000, the D is 6200. A quartertone sharp of C is 6050&#8230;<br />
><br />
> I need to have a flush which does accept all integers (also  <br />
> negative numbers). I understand that the amount of polyphony flush  <br />
> can deal with might be restricted.<br />
><br />
> Suggestion: an additional parameter would set a mode without that  <br />
> restriction. (For the sake of the eventual, though very unlikely,  <br />
> possibility of breaking old patches.)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;    <a href="http://www.bek.no/~pcastine/Litter/" rel="nofollow">http://www.bek.no/~pcastine/Litter/</a>    &#8212;&#8212;&#8212;&#8212;-<br />
Peter Castine             +&#8211;> Litter Power &#038; Litter Bundle for Jitter<br />
                                Universal Binaries on the way<br />
iCE:  Sequencing,  Recording &#038;<br />
       Interface  Building  for                   |home    | chez nous|<br />
       Max/MSP   Extremely cool                   |bei uns |  i nostri|<br />
       <a href="http://www.dspaudio.com/" rel="nofollow">http://www.dspaudio.com/</a>                   <a href="http://www.castine.de" rel="nofollow">http://www.castine.de</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89463</guid>
					<title><![CDATA[Re: need a flush update (some bug reports)]]></title>
					<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89463</link>
					<pubDate>Wed, 29 Nov 2006 14:45:04 +0000</pubDate>
					<dc:creator>Jean-Francois Charles</dc:creator>

					<description>
						<![CDATA[
						<p></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89464</guid>
					<title><![CDATA[Re: need a flush update (some bug reports)]]></title>
					<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89464</link>
					<pubDate>Thu, 30 Nov 2006 07:07:55 +0000</pubDate>
					<dc:creator>Stefan Tiedje</dc:creator>

					<description>
						<![CDATA[
						<p>Peter Castine wrote:<br />
> An &#8216;unlimited&#8217; range is impossible since integers on a computer are  <br />
> limited anyway, in Max to the range [-2,147,483,648 ..  2,147,483,647]. <br />
> Sure, you might want to use that range but I&#8217;m pretty  sure that the <br />
> current implementation of flush would require a 16  terabyte buffer to <br />
> handle it.</p>
<p>That would assume a pretty ineffective algorithm, I am sure there are <br />
other more memory effective ones. As I said I would not ask for <br />
unlimited polyphony, I&#8217;d be happy with 128 or 256 maximum voices and an <br />
undocumented unforeseable behaviour if exceeding it (like voice stealing <br />
and switching of old notes without being asked&#8230; ;)<br />
The old flush might have been optimized for speed which was an issue in <br />
68000 days for this kind of stuff&#8230;</p>
<p>Stefan</p>
<p>&#8211; <br />
Stefan Tiedje&#8212;&#8212;&#8212;&#8212;x&#8212;&#8212;-<br />
&#8211;_____&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8211;(_|_ &#8212;-|&#8212;&#8211;|&#8212;&#8211;()&#8212;&#8212;-<br />
&#8211; _|_)&#8212;-|&#8212;&#8211;()&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;-()&#8212;&#8212;&#8211;www.ccmix.com</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89465</guid>
					<title><![CDATA[Re: need a flush update (some bug reports)]]></title>
					<link>http://cycling74.com/forums/topic/need-a-flush-update-some-bug-reports/#post-89465</link>
					<pubDate>Thu, 30 Nov 2006 11:10:25 +0000</pubDate>
					<dc:creator>Peter Castine</dc:creator>

					<description>
						<![CDATA[
						<p>On 30-Nov-2006, at 8:07, Stefan Tiedje wrote:</p>
<p>> Peter Castine wrote:<br />
>> An &#8216;unlimited&#8217; range is impossible since integers on a computer  <br />
>> are  limited anyway, in Max to the range [-2,147,483,648 ..   <br />
>> 2,147,483,647]. Sure, you might want to use that range but I&#8217;m  <br />
>> pretty  sure that the current implementation of flush would  <br />
>> require a 16  terabyte buffer to handle it.<br />
><br />
> That would assume a pretty ineffective algorithm,</p>
<p>Not so much &#8216;ineffective&#8217; as simple and fast.</p>
<p>	const int kFlushArraySize = /*currently 128 */</p>
<p>	int stateArray[kMaxFlushArraySize];</p>
<p>	.<br />
	.<br />
	.</p>
<p>	// Set flag that note is &#8216;on&#8217;<br />
	stateArray[curNote] = 1;</p>
<p>	.<br />
	.<br />
	.</p>
<p>	// Set flag that note is &#8216;off&#8217;<br />
	stateArray[curNote] = 0;</p>
<p>	.<br />
	.<br />
	.</p>
<p>	// Check state of note<br />
	if (stateArray[curNote])<br />
		// do whatever&#8230;</p>
<p>This will generate about the fastest machine code possible. Working  <br />
with an array of bytes would reduce memory requirements by 75% but  <br />
would require additional machine code for testing state. Memory  <br />
requirements could be reduced by an additional 7/8 by using a bit  <br />
vector, but there is even more code involved. Disassembling the old  <br />
Mac Toolbox traps BitTest(), BitSet(), and BitClear(), which do  <br />
exactly that, is an educational experience I would highly recommend.</p>
<p>None of this is undoable, but I can well imagine that a very simple &#038;  <br />
fast algorithm held a lot of attraction when building the object. And  <br />
requiring 0.5kB for managing state of MIDI notes doesn&#8217;t seem  <br />
unreasonable.</p>
<p>> I am sure there are other more memory effective ones.</p>
<p>There are programming techniques for dealing with very large &#8216;sparse&#8217;  <br />
arrays, but they are quite intricate. I did this for ice.lattice and,  <br />
trust me, it is pretty knarly.</p>
<p>&#8211; Peter</p>
<p>DISCLAIMER: I do not claim that the pseudo-code above is how flush is  <br />
actually implemented. It&#8217;s just one, fairly typical, approach to the  <br />
task.</p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8211;    <a href="http://www.bek.no/~pcastine/Litter/" rel="nofollow">http://www.bek.no/~pcastine/Litter/</a>    &#8212;&#8212;&#8212;&#8212;-<br />
Peter Castine             +&#8211;> Litter Power &#038; Litter Bundle for Jitter<br />
                                Universal Binaries on the way<br />
iCE:  Sequencing,  Recording &#038;<br />
       Interface  Building  for                   |home    | chez nous|<br />
       Max/MSP   Extremely cool                   |bei uns |  i nostri|<br />
       <a href="http://www.dspaudio.com/" rel="nofollow">http://www.dspaudio.com/</a>                   <a href="http://www.castine.de" rel="nofollow">http://www.castine.de</a></p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

