<?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: ANN: munger1~ port (from the Percolate library) with new stuff</title>
		<atom:link href="http://cycling74.com/forums/topic/ann-munger1-port-from-the-percolate-library-with-new-stuff/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/ann-munger1-port-from-the-percolate-library-with-new-stuff/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 02:43:34 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/ann-munger1-port-from-the-percolate-library-with-new-stuff/#post-30782</guid>
					<title><![CDATA[ANN: munger1~ port (from the Percolate library) with new stuff]]></title>
					<link>http://cycling74.com/forums/topic/ann-munger1-port-from-the-percolate-library-with-new-stuff/#post-30782</link>
					<pubDate>Tue, 13 Mar 2007 04:01:31 +0000</pubDate>
					<dc:creator>ico</dc:creator>

					<description>
						<![CDATA[
						<p>Greetings all,</p>
<p>For the impatient, download at:<br />
<a href="http://ico.bukvic.net/Max/munger1~_1.0.0.tar.gz" rel="nofollow">http://ico.bukvic.net/Max/munger1~_1.0.0.tar.gz</a><br />
(270KB, includes source, Linux-Pd-i386, Mac-Max-i386, and Win32-Max-i386<br />
binaries, and 3 cases of beer)</p>
<p>OVERVIEW<br />
========</p>
<p>munger1~ (March 12, 2007 1.0.0 release)<br />
a realtime multichannel granulator<br />
a.k.a. the swiss-army-knife of realtime granular synthesis</p>
<p>a flext (cross-platform PD &#038; Max/MSP) port of<br />
the munger~ object from the PeRColate library (0.9 beta5)</p>
<p><a href="http://www.music.columbia.edu/PeRColate/" rel="nofollow">http://www.music.columbia.edu/PeRColate/</a></p>
<p>Original PeRColate library by:</p>
<p>Dan Trueman <a href="http://www.music.princeton.edu/~dan/" rel="nofollow">http://www.music.princeton.edu/~dan/</a><br />
R. Luke DuBois&#8217;s <a href="http://www.lukedubois.com/" rel="nofollow">http://www.lukedubois.com/</a></p>
<p>Flext port and additions by:<br />
Ivica Ico Bukvic <a href="http://ico.bukvic.net" rel="nofollow">http://ico.bukvic.net</a><br />
Ji-Sun Kim <a href="mailto:hideaway@vt.edu">hideaway@vt.edu</a><br />
<a href="http://www.music.vt.edu" rel="nofollow">http://www.music.vt.edu</a></p>
<p><a href="http://www.cctad.vt.edu" rel="nofollow">http://www.cctad.vt.edu</a></p>
<p>Released under GPL license<br />
(whichever is the latest version&#8211;as of this release, version 2)<br />
For more info on the GPL license please visit:</p>
<p><a href="http://www.gnu.org/copyleft/gpl.html" rel="nofollow">http://www.gnu.org/copyleft/gpl.html</a></p>
<p>ACKNOWLEDGEMENTS<br />
================</p>
<p>Many thanks to Dan Trueman for open-sourcing this great object!</p>
<p>SOURCE INSTALL<br />
==============</p>
<p>If you simply intend to use prebuilt binaries, please skip to the INSTALL<br />
section. Otherwise take a big breath and read on&#8230;</p>
<p>1) You need stk library which can be downloaded from:</p>
<p><a href="http://ccrma.stanford.edu/software/stk/" rel="nofollow">http://ccrma.stanford.edu/software/stk/</a></p>
<p>2) You need to also install latest flext library (this is a library that<br />
allows for creation of externals for both Max/MSP and PD using the same<br />
source). Version 0.4.x can obtained from the following link:</p>
<p><a href="http://grrrr.org/ext/flext/" rel="nofollow">http://grrrr.org/ext/flext/</a></p>
<p>Latest CVS version (0.5.1) is found in the Pure-Data CVS (this one is<br />
recommended):</p>
<p><a href="http://sourceforge.net/cvs/?group_id=55736" rel="nofollow">http://sourceforge.net/cvs/?group_id=55736</a></p>
<p>3) If you are using latest CVS version (0.5.1) Before compiling the source<br />
you will need to add the following to the top of the flext/source/flstk.h<br />
file right below the #define __FLSTK_H:</p>
<p>#ifdef PI<br />
#undef PI<br />
#endif</p>
<p>This step will probably become quickly obsolete once Thomas updates CVS.<br />
Until then, this is needed to be able to compile flext against stk.</p>
<p>4) To compile flext, read flext instructions (it boils down to running<br />
build.sh with appropriate parameters and then editing two simple config<br />
files, i.e. &#8220;build pd gcc build&#8221; or &#8220;build max gcc&#8221; or &#8220;build max msvc&#8221;<br />
etc.)</p>
<p>Your will need to edit buildsys/config-
<platform -compiler-pdormax>.txt to<br />
adjust paths to various folders.</platform></p>
<p>Then you will need to edit config.txt file. You do not need to include<br />
SndObj for this external but you do need stk option to be properly set. On<br />
Windows+MSVC, STK flag at the time of this release does not work, so you<br />
will have to use included testmunger1 MSVC project file and adjust path<br />
settings to compile munger1~.</p>
<p>5) Once stk and flext are compiled, go into munger1~ folder and type:</p>
<p>
<path to flext folder>/build.sh
<platform> <compiler> <build /clean/install></build></compiler></platform></path></p>
<p>NB: on Mac <build /clean/install> is not needed. On Windows, please use MSVC<br />
and open the testmunger1 project file in the root of the folder.</build></p>
<p>6) Once compiled, your binary will be created in a <maxorpd -platform><br />
subfolder (i.e. pd-linux, or max-darwin), followed by another subfolder<br />
which reflects whether a threaded or singlethread flext was used. Inside you<br />
will find your external.</maxorpd></p>
<p>INSTALL<br />
=======</p>
<p>You can either use the prebuilt externals (found in the bin/ folder) or ones<br />
built using the &#8220;SOURCE INSTALL&#8221; instructions above. Binaries are provided<br />
for Intel-based Macs, Win32, and Intel-based Linux OS. The included prebuilt<br />
binaries DO NOT REQUIRE you to install flext or stk as these are statically<br />
linked.</p>
<p>1) Copy the external in your externals folder (i.e. /usr/lib/pd/extra or<br />
C:Program FilesCycling &#8217;74MaxMSP 4.6Cycling &#8217;74externals, or<br />
&#8220;Applications/MaxMSP 4.6/Cycling &#8217;74/externals)</p>
<p>2) Copy appropriate help file (found in the help/ folder) into the help<br />
folder (i.e. /usr/lib/pd/doc/5.reference or C:Program FilesCycling<br />
&#8217;74MaxMSP 4.6max-help, or &#8220;Applications/MaxMSP 4.6/max-help)</p>
<p>NB: Pd help file has a &#8220;.pd&#8221; extension, while Max/MSP help file has a<br />
&#8220;.help&#8221; extension.</p>
<p>3) Start your app (PD or Max) and create object called munger1~. Right-click<br />
(ctrl-click on Macs) and select &#8220;help&#8221; and this should open the help file<br />
with additional documentation.</p>
<p>Questions? See OVERVIEW for contact and Q&#038;A info.</p>
<p>Enjoy!</p>
<p>FAQ<br />
===</p>
<p>The following is Ico&#8217;s FAQ, so it may or may not reflect other project<br />
participants&#8217; opinions, including original author(s) of munger~, flext, etc.</p>
<p>Q: Why porting to flext?<br />
A: Flext library (by Thomas Grill) is a layer which allows creation of<br />
externals for both Max/MSP and PD without any alterations to the code<br />
(obviously once it is adapted to use flext). While there have been a number<br />
of Max/MSP < -> PD external ports in the past, many of them have become<br />
outdated because such attempts required either maintaining one code full of<br />
ugly #ifdefs, or worse&#8211;maintaining two sources. Either way, what usually<br />
turned out to be the case is that original authors did not have the time,<br />
interest, or simply the software/hardware to deal with the newly generated<br />
overhead and/or test the code, while volunteers who made the original<br />
porting efforts eventually moved on to other projects. The result was/is<br />
outdated and/or broken externals. Flext circumvents this problem by allowing<br />
one clean code to compile on both platforms while also supplying in many<br />
cases cleaner (more legible) API and (as a whipped cream on top)<br />
object-oriented environment (C++).</p>
<p>Q: Why bother with PD < -> Max/MSP cross-platform compatibility&#8230;<br />
   &#8230;when I use only <insert -your-favorite-application-here>?<br />
   &#8230;</insert><insert -your-favorite-application-here> is better?<br />
A: Choice is what makes us human (this is also what makes Arts so vibrant<br />
and exciting). And while everyone&#8217;s welcome to express their own<br />
preferences, we also have to realize that in this case these same<br />
preferences are also the main cause of a virtual divide which manifests<br />
itself at everyone&#8217;s detriment. Wouldn&#8217;t it be nicer if we could share<br />
externals transparently, or even better, open PD patches in Max and<br />
vice-versa? This would help in both the cross-pollination of ideas as well<br />
as creative efforts. This project has also taught me that creating<br />
flext-ready externals is as easy if not easier (due to the aforesaid API&#8217;s<br />
legibility) than native objects (whether that be PD or Max/MSP). Finally, if<br />
all else fails, such externals are bound to reach wider audience, and are<br />
much easier to maintain if cross-platform compatibility is to be pursued.</insert></p>
<p>Q: If flext is so cool, why don&#8217;t we see more porting efforts?<br />
A: Good question. The fact is that flext is much more widely known among PD<br />
users than it is among the Max/MSP community, so this seemingly one-way road<br />
may have contributed to the current situation. One could only hope that<br />
projects like this may help reverse this unfortunate trend.</p>
<p>Q: So, is all really that peachy in the flext-land?<br />
A: Well, our lives teach us that nothing is truly free in this world. Flext<br />
is no exception. Its &#8220;fees,&#8221; however are not tied to our checkbooks. Rather,<br />
they manifest themselves in a slightly greater CPU overhead in signal flow<br />
due to message translation. Thus, one could consider flext a &#8220;middle-person&#8221;<br />
between the <app -of-your-choice> and the external. This, however, in today&#8217;s<br />
world is so negligible that during the testing phase I was unable to measure<br />
any noticeable CPU-overhead difference.</app></p>
<p>Another consideration is that flext might not be complete (see KNOWN ISSUES<br />
for an example). That being said, in its current state it did the trick for<br />
a relatively complex external such as munger~ or even FFTEASE collection<br />
which had been ported several years ago. All this leads me to believe that<br />
it is more than ready for the day-to-day use.</p>
<p>Q: I already have Dan and Luke&#8217;s awesome PeRColate lib. Why should I<br />
download this one?<br />
A: This is a cross-platform port of the latest version with several new<br />
features. Thus, it allows for those platforms which have not had the beta6<br />
available (Linux, Windows) to finally dig into all the goodies it brings.<br />
Plus you also get the cool stuff such as verbose modes, discrete panning,<br />
more thorough documentation, up to 500 grains per sample (instead of 50), up<br />
to 24-channel output (instead of 2 or 16, depending which one you used),<br />
etc.</p>
<p>KNOWN ISSUES<br />
============</p>
<p>munger1~ has been tested extensively on Linux+PD, OSX+Max/MSP and<br />
Win32+Max/MSP setups, suggesting that it should work on other setups as<br />
well. Your mileage may vary, though.</p>
<p>Currently there is only one known issue in the wild which requires changes<br />
to flext in order to be fixed. Namely, if you use munger1~ object in<br />
conjunction with an external buffer in PD (known as an array) and if you<br />
dubiously decide to delete that particular buffer in the middle of your<br />
performance while munger1~ is still associated with it, this will<br />
[unsurprisingly] crash PD. Max/MSP currently has a check implemented against<br />
that via flext layer so Max/MSP will simply stop outputting anything until<br />
buffer is reset. The flext author is aware of this and PD fix should appear<br />
in the flext CVS hopefully soon. That being said, the lingering question is<br />
why would you want to do this in the first place&#8230;</p>
<p>FYI, even though munger1~ allows up to 500 simultaneous grains per sample<br />
and has been compiled with all available optimizations (SSE, Altivec is<br />
supposedly available via flext but has not been tested), on MBP (Core Duo<br />
1.83GHz) I was unable to get more than 160 simultaneous grains per sample<br />
(or ~32,000 grains/second) without dropouts, even though CPUs were not<br />
getting maxed out, so something else might be the cause of this limitation<br />
(flext?). Win32 machine (3-year old AMD64 3000+) fared marginally better at<br />
around 165 simultaneous grains per sample (or ~33,000 grains/second) before<br />
its CPU was maxed out. Linux on the same AMD64 3000+ hardware fared the<br />
best. It topped off at 47,999 grains per second at 48KHz sampling rate which<br />
for some reason the sampling rate appears to be the upper limit (i.e. if you<br />
run PD or Max/MSP at lower sampling rates, your upper limit will be<br />
restricted to the sampling rate), even though the code allows for multiple<br />
initiations of grains per cycle. This, however, is also the way original<br />
munger~ works.</p>
<p>An interesting bit is that while on Linux/PD combo 48K grains are already<br />
reached when we get 64 simultaneous grains, on Win32/Mac even 160<br />
simultaneous grains yield only ~32-33K grains. Could this be a flext bug?</p>
<p>Best wishes,</p>
<p>Ivica Ico Bukvic, D.M.A.<br />
Composition, Music Technology, CCTAD, CHCI<br />
Virginia Tech<br />
Dept. of Music &#8211; 0240<br />
Blacksburg, VA 24061<br />
(540) 231-1137<br />
(540) 231-5034 (fax)<br />
<a href="mailto:ico@vt.edu">ico@vt.edu</a></p>
<p><a href="http://www.music.vt.edu/people/faculty/bukvic/" rel="nofollow">http://www.music.vt.edu/people/faculty/bukvic/</a></p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

