<?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>AudioResearchBlog</title>
	<atom:link href="http://audiores.uint8.com.ar/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://audiores.uint8.com.ar/blog</link>
	<description>Covering all audio related stuff with special focus on programming and digital signal processing</description>
	<lastBuildDate>Fri, 06 Sep 2013 13:01:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AP-Gen new release (LADSPA and VST support)</title>
		<link>http://audiores.uint8.com.ar/blog/2013/09/06/ap-gen-new-release-ladspa-and-vst-support/</link>
		<comments>http://audiores.uint8.com.ar/blog/2013/09/06/ap-gen-new-release-ladspa-and-vst-support/#comments</comments>
		<pubDate>Fri, 06 Sep 2013 13:01:57 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/?p=601</guid>
		<description><![CDATA[AP-Gen speeds up and eases the plugin development through base source code generation, both for different standards and operating systems, thus achieving that the developer can focus on his goal, the digital audio processing. To achieve this, starts from normalized &#8230; <a href="http://audiores.uint8.com.ar/blog/2013/09/06/ap-gen-new-release-ladspa-and-vst-support/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em><a href="http://code.google.com/p/ap-gen">AP-Gen</a> speeds up and eases the plugin development through base source code generation, both for different standards and operating systems, thus achieving that the developer can focus on his goal, the digital audio processing.</p>
<p>To achieve this, starts from normalized definitions and uses a template engine. These definitions could be general abstractions of the plugin, like amount and type of inputs and outputs of data or controls, or more specific ones, like the kind of the build system, metadata and even details of each architecture. On the other hand, the templates are the elements that maintain the common features of each standard.</p>
<p>The advantage of this way of working is that, once high level aspects are established, next step can be to develop the signal processing function. Leaving aside, among other things, all the repetitive work of writing library code, programming language or current standard details, and each architecture compilation issues.</p>
<p>Support to new standards can be added in a modular form.</em></p>
<p><a href="https://ap-gen.googlecode.com/files/AP-Gen-0.14.zip">AP-Gen V.014.zip</a></p>
<p><strong>News:<br />
* LADSPA support added.</p>
<p>Features:<br />
* VST support (native and cross-compiled in linux with mingw).<br />
* LADSPA support.<br />
* Plugin generation examples for vst, ladspa and clam.<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2013/09/06/ap-gen-new-release-ladspa-and-vst-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VST cross compiling in Linux</title>
		<link>http://audiores.uint8.com.ar/blog/2013/07/29/vst-cross-compiling-in-linux/</link>
		<comments>http://audiores.uint8.com.ar/blog/2013/07/29/vst-cross-compiling-in-linux/#comments</comments>
		<pubDate>Mon, 29 Jul 2013 22:34:29 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[specifications]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/?p=532</guid>
		<description><![CDATA[1. Install mingw32 and wine: $ sudo apt-get install mingw32 $ sudo apt-get install wine 2. Download Steinberg VST SDK 2.4 and unzip it. 3. Create a PLUGIN_NAME.def file: LIBRARY &#160; &#160; '' DESCRIPTION '' EXPORTS &#160; &#160; main=VSTPluginMain 4. &#8230; <a href="http://audiores.uint8.com.ar/blog/2013/07/29/vst-cross-compiling-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>1.</strong> Install mingw32 and wine:<br />
$ sudo apt-get install mingw32<br />
$ sudo apt-get install wine</p>
<p><strong>2.</strong> Download <a href="http://www.gersic.com/vstsdk/">Steinberg VST SDK 2.4</a> and unzip it.</p>
<p><strong>3.</strong> Create a PLUGIN_NAME.def file:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">LIBRARY &nbsp; &nbsp; ''<br />
DESCRIPTION ''<br />
EXPORTS &nbsp; &nbsp; main=VSTPluginMain</div></div>
<p><strong>4.</strong> Create a Makefile like this one:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># change this to the location of your unpacked VST SDK:<br />
VSTSDKDIR = ../../vstsdk2.4<br />
<br />
# Change the plugin name here (same name than .h file)<br />
PLUGIN_NAME = PLUGIN_NAME<br />
<br />
CPP &nbsp; &nbsp; &nbsp; = i586-mingw32msvc-g++<br />
<br />
VST_OBJ = $(VSTSDKDIR)/public.sdk/source/vst2.x/vstplugmain.o $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffect.o $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffectx.o<br />
<br />
OBJ &nbsp; &nbsp; &nbsp; = $(PLUGIN_NAME).o $(VST_OBJ)<br />
<br />
LIBS &nbsp; &nbsp; &nbsp;= -L. --add-stdcall-alias -lole32 -lkernel32 -lgdi32 -luuid -luser32 -mwindows --no-export-all-symbols --def $(PLUGIN_NAME).def<br />
<br />
CXXINCS &nbsp; = -I&quot;$(VSTSDKDIR)/pluginterfaces/vst2.x&quot; -I&quot;$(VSTSDKDIR)/public.sdk/source/vst2.x&quot; -I&quot;$(VSTSDKDIR)&quot; -I&quot;$(VSTSDKDIR)/vstgui.sf/vstgui&quot; -I.<br />
BIN &nbsp; &nbsp; &nbsp; = $(PLUGIN_NAME).dll<br />
CXXFLAGS &nbsp;= $(CXXINCS) -DBUILDING_DLL=1 -mwindows -O3<br />
RM &nbsp; &nbsp; &nbsp; &nbsp;= rm -f<br />
<br />
.PHONY: all clean<br />
<br />
all: $(PLUGIN_NAME).dll<br />
<br />
clean:<br />
&nbsp; ${RM} $(OBJ) $(BIN)<br />
<br />
# not we're using mingw dllwrap tool<br />
DLLWRAP &nbsp; = i586-mingw32msvc-dllwrap<br />
<br />
DEFFILE &nbsp; = lib$(PLUGIN_NAME).def<br />
<br />
STATICLIB = lib$(PLUGIN_NAME).a<br />
<br />
$(BIN): $(OBJ)<br />
&nbsp; # note the --driver-name is equal to the compiler executable name for mingw<br />
&nbsp; $(DLLWRAP) --output-def $(DEFFILE) --driver-name $(CPP) --implib $(STATICLIB) $(OBJ) $(LIBS) -o $(BIN)<br />
<br />
%.o: %.cpp<br />
&nbsp; $(CPP) -c $&lt; -o $@ $(CXXFLAGS)<br />
<br />
$(VSTSDKDIR)/public.sdk/source/vst2.x/vstplugmain.o: $(VSTSDKDIR)/public.sdk/source/vst2.x/vstplugmain.cpp<br />
&nbsp; $(CPP) -c $(VSTSDKDIR)/public.sdk/source/vst2.x/vstplugmain.cpp -o $(VSTSDKDIR)/public.sdk/source/vst2.x/vstplugmain.o $(CXXFLAGS)<br />
<br />
$(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffect.o: $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffect.cpp<br />
&nbsp; $(CPP) -c $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffect.cpp -o $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffect.o $(CXXFLAGS)<br />
<br />
$(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffectx.o: $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffectx.cpp<br />
&nbsp; $(CPP) -c $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffectx.cpp -o $(VSTSDKDIR)/public.sdk/source/vst2.x/audioeffectx.o $(CXXFLAGS)</div></div>
<p><strong>5.</strong> Compile it. Run make in the base dir of your project.</p>
<p><strong>6.</strong> Try it. Load the generated .dll file in a vst host (like <a href="http://www.hermannseib.com/english/vsthost.htm">this one</a>)</code></p>
<p>Alternatively use <strong>AP-Gen</strong> to easy all the process: <a href="http://code.google.com/p/ap-gen/">http://code.google.com/p/ap-gen/</a></p>
<blockquote><p>AP-Gen speeds up and eases the plugin development through base source code generation, both for different standards and operating systems, thus achieving that the developer can focus on his goal, the digital audio processing.</p></blockquote>
<p>Just write the definition file and run something like this:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ &nbsp;./ap-gen.py examples/vst-example-plugin-def.xml</div></div>
<p><em>Good luck.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2013/07/29/vst-cross-compiling-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reasons to not use locks: Priority inversion and general purpose vs realtime OS</title>
		<link>http://audiores.uint8.com.ar/blog/2013/07/21/reasons-to-not-use-locks-priority-inversion-and-general-purpose-vs-realtime-os/</link>
		<comments>http://audiores.uint8.com.ar/blog/2013/07/21/reasons-to-not-use-locks-priority-inversion-and-general-purpose-vs-realtime-os/#comments</comments>
		<pubDate>Sun, 21 Jul 2013 23:49:22 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/?p=528</guid>
		<description><![CDATA[&#8220;Let’s say your GUI thread is holding a shared lock when the audio callback runs. In order for your audio callback to return the buffer on time it first needs to wait for your GUI thread to release the lock. &#8230; <a href="http://audiores.uint8.com.ar/blog/2013/07/21/reasons-to-not-use-locks-priority-inversion-and-general-purpose-vs-realtime-os/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;Let’s say your GUI thread is holding a shared lock when the audio callback runs. In order for your audio callback to return the buffer on time it first needs to wait for your GUI thread to release the lock. Your GUI thread will be running with a much lower priority than the audio thread, so it could be interrupted by pretty much any other process on the system, and the callback will have to first wait for this other process, and then the GUI thread to finish and release the lock before the audio callback can finish computing the buffer — even though the audio thread may have the highest priority on the system. This is called priority inversion.&#8221;</em></p>
<p><em>&#8220;Real-time operating systems implement special mechanisms to avoid priority inversion. For example by temporarily elevating the priority of the lock holder to the priority of the highest thread waiting for the lock. On Linux this is available by using a patched kernel with the the RT preempt patch. But if you want your code to be portable to all general purpose operating systems, then you can’t rely on real-time OS features like priority inheritance protocols.&#8221;</em></p>
<p>(Update: On Linux, user-space priority inheritance mutexes (PTHREAD_PRIO_INHERIT) have been available since kernel version 2.6.18 together with Glibc 2.5. Released September 19, 2006. Used in Debian 4.0 etch, 8 April 2007. Thanks to Helge for pointing this out in the comments.)</p>
<p><strong>Realtime programming and more reasons to not use locks: </strong><a href="http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing">http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing</a></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2013/07/21/reasons-to-not-use-locks-priority-inversion-and-general-purpose-vs-realtime-os/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>High abstraction level audio plugins specification (and code generation)</title>
		<link>http://audiores.uint8.com.ar/blog/2010/05/17/high-abstraction-level-audio-plugins-specification-and-code-generation/</link>
		<comments>http://audiores.uint8.com.ar/blog/2010/05/17/high-abstraction-level-audio-plugins-specification-and-code-generation/#comments</comments>
		<pubDate>Mon, 17 May 2010 03:08:00 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[ideas]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[CLAM]]></category>
		<category><![CDATA[ClubAudioFiuba]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[signal processing]]></category>
		<category><![CDATA[specifications]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/2010/05/17/high-abstraction-level-audio-plugins-specification-and-code-generation/</guid>
		<description><![CDATA[If you ever wrote at least 2 audio plugins in your life, for sure you have noticed you had to write a lot of duplicated code. In other words, most of the times, writing a plugin there is very little &#8230; <a href="http://audiores.uint8.com.ar/blog/2010/05/17/high-abstraction-level-audio-plugins-specification-and-code-generation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you ever wrote at least <b>2</b> audio plugins in your life, for sure you have noticed you had to write a lot of duplicated code. In other words, most of the times, writing a plugin there is very little entropy from your code.</p>
<p>My first approach to this problem was some years ago when i did a simple code generator of the base code of a clam plugin (see these <b>clam-devel</b> threads for more info &#8216;<a href="http://www.mail-archive.com/clam-devel@llistes.projectes.lafarga.org/msg01345.html">Commit #11195: templated plugins generator</a>&#8216; and &#8216;<a href="http://www.mail-archive.com/clam-devel@llistes.projectes.lafarga.org/msg02257.html">Frontend for automatic generation of plugin code</a>&#8216;)</p>
<p>Now i&#8217;m with a simple but i think powerful project (derived from the needs i noticed at <a href="http://groups.google.com/group/club_de_audio_fiuba">club de audio de la fiuba</a>) to have an application to generate code of different standards using XML based specifications. Then, as before, you nearly only need to write the signal processing code of the plugin (and can forget about the mechanical work).</p>
<p>The idea is to get VST, LADSPA, lv2, CLAM, Audio Units and possibly others standards base code ready to compile for different operating systems and using different build systems. Indeed, once finished, will be easy to implement new modules for others plugins specifications since will consist only into implement an interface.</p>
<p>My proposed xml specification (comments and suggestions are welcome!), showed as a clam plugin definition example is here. Basically contains metadata, input and output ports and controls and other build definitions:<br />
<span style="font-size: 18px"></p>
<div class="codecolorer-container xml geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt; ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;">&lt; !DOCTYPE AudioPlugin SYSTEM <span style="color: #ff0000;">&quot;AudioPluginDef.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;audioplugin</span> <span style="color: #000066;">Version</span>=<span style="color: #ff0000;">&quot;0.1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;metadata<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>TestRtPlugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is a test realtime audio plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;authors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Fulano, Sultano, Mengano<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/authors<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copyright</span> <span style="color: #000066;">Year</span>=<span style="color: #ff0000;">&quot;2010&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Club de Audio FIUBA<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copyright<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;license<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>GPL<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/license<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/metadata<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;inputs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;port</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;L Input&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>AudioInPort<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;port</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;R Input&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>AudioInPort<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;control</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;Gain&quot;</span> <span style="color: #000066;">Min</span>=<span style="color: #ff0000;">&quot;0.&quot;</span> <span style="color: #000066;">Max</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">DefaultValue</span>=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>InControlFloat<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/control<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/inputs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;port</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;L Output&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>AudioOutPort<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;port</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;R Output&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>AudioOutPort<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/port<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;outputplugin</span> <span style="color: #000066;">Standard</span>=<span style="color: #ff0000;">&quot;CLAM&quot;</span> <span style="color: #000066;">BuildSystem</span>=<span style="color: #ff0000;">&quot;Scons&quot;</span> <span style="color: #000066;">OS</span>=<span style="color: #ff0000;">&quot;Linux&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;basetemplatename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Default<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/basetemplatename<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;clam_defaultconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> <span style="color: #808080; font-style: italic;">&lt;!-- &nbsp;CLAM plugin specific configuration --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;baseclass<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Processing<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/baseclass<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;withconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>True<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/withconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/clam_defaultconfig<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/outputplugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/audioplugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p></span></p>
<p>I also thought about an UID (Uniqued ID) field at metadata, there is not showed in the example since is not needed to clam plugins.</p>
<p>There is also a <a href="http://en.wikipedia.org/wiki/Document_Type_Definition">.dtd</a> file to check the correctness of the plugin spec.</p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2010/05/17/high-abstraction-level-audio-plugins-specification-and-code-generation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some experience with CLAM inside an audio club at FIUBA, Argentina</title>
		<link>http://audiores.uint8.com.ar/blog/2010/03/11/some-experience-with-clam-inside-an-audio-club-at-fiuba-argentina/</link>
		<comments>http://audiores.uint8.com.ar/blog/2010/03/11/some-experience-with-clam-inside-an-audio-club-at-fiuba-argentina/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 02:21:15 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[CLAM]]></category>
		<category><![CDATA[ClubAudioFiuba]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[signal processing]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/2010/03/11/some-experience-with-clam-inside-an-audio-club-at-fiuba-argentina/</guid>
		<description><![CDATA[(Note: I wrote this as something to tell to the clam-devel mailing list about some of my source-code commits) About eight months ago, there was a foundation of something like an &#8220;audio club&#8221; in my university [1]. As soon i &#8230; <a href="http://audiores.uint8.com.ar/blog/2010/03/11/some-experience-with-clam-inside-an-audio-club-at-fiuba-argentina/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>(Note: I wrote this as something to tell to the clam-devel mailing list about some of my source-code commits)</p>
<p>About eight months ago, there was a foundation of something like an &#8220;audio club&#8221; in my university [<a href="http://code.google.com/p/club-audio-fiuba">1</a>]. As soon i learned about that, i quickly got in touch with them and noticed that there was a major interest in analog issues (the only audio area with at least elective, courses in the university). So i told them about all the cool things that are available and ready to do with digital audio, mostly signal processing related. I talked in general, but of course i also talked about <a href="http://clam-project.org/">clam</a>, with all its prototyping, real-time and easy development of plugins features. Even many of them ended installing and using it, and some even developing with more or less help. One thing to notice is that most of them are students from first years and most (but not all) are students with a basic programming level (because they are from electronics) but strong dsp knowledge (behind this is an university with more emphasis in theory than practice)<br />
We started specifying plugins from a more abstract level (inputs/outputs/controls) and generating the source code base using<br />
<strong>CLAM&#8217;s Templated Plugins Code Generator </strong>[<a href="http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/">2</a>] and prototyping some simple applications. But one of the things we ended up doing was to take advantage of clam as platform to prototype medic related applications like filter <a href="http://en.wikipedia.org/wiki/Electrocardiography">ECG</a> signal from noise in realtime, and some like _vice-versa_, i mean applying some processing knowledge from that area to audio.</p>
<p>Some of that work (one hour per week average) it&#8217;s now in the <a href="http://groups.google.com/group/club_de_audio_fiuba">repo</a>, most remarkable i think are filters work, by above the adaptative notch one (which even was used as a demo of a <a href="http://comelec.googlegroups.com/web/Analisis2_SteepestDescent.pdf?hl=es&#038;gda=-kJWU08AAAAt5-J96t0XnyxHkmJ7hfv0lkXF42FhAhzvNCGsvr91nr7XnfnP6pqsbzqK09OP4zsx49I1D3wZsUnK-MhAJdbCnHMhSp_qzSgvndaTPyHVdA">talk of one of the members about the steepest descent algorithm and its application to filter ECG signals</a>)</p>
<p>Some development screenshots:<br />
<a href="http://clam-project.org/wiki/Image:FilterByCoefExample.jpg">http://clam-project.org/wiki/Image:FilterByCoefExample.jpg</a><br />
<a href="http://clam-project.org/wiki/Image:FilterExample-LP-HP.jpg">http://clam-project.org/wiki/Image:FilterExample-LP-HP.jpg</a><br />
<a href="http://clam-project.org/wiki/Image:ThreeBandFilterOutputWithWhiteNoiseAsInput.jpg">http://clam-project.org/wiki/Image:ThreeBandFilterOutputWithWhiteNoiseAsInput.jpg</a><br />
<a href="http://clam-project.org/wiki/Image:GaussianWhiteNoiseHistogram.jpg">http://clam-project.org/wiki/Image:GaussianWhiteNoiseHistogram.jpg</a><br />
<a href="http://clam-project.org/wiki/Image:UniformWhiteNoiseHistogram.jpg">http://clam-project.org/wiki/Image:UniformWhiteNoiseHistogram.jpg</a></p>
<p>[0] <a href="http://www.fi.uba.ar/">FIUBA</a>: Engineering Faculty of Buenos Aires University<br />
[1] Group: <a href="http://code.google.com/p/club-audio-fiuba">http://code.google.com/p/club-audio-fiuba</a><br />
     Source code repo: <a href="http://groups.google.com/group/club_de_audio_fiuba">http://groups.google.com/group/club_de_audio_fiuba</a><br />
[2] <a href="http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/">http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2010/03/11/some-experience-with-clam-inside-an-audio-club-at-fiuba-argentina/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showing a little about CLAM as a prototyping tool at the Audio Club of FIUBA</title>
		<link>http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/</link>
		<comments>http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 02:10:03 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[CLAM]]></category>
		<category><![CDATA[ClubAudioFiuba]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[signal processing]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/</guid>
		<description><![CDATA[Last week, at the recent &#8216;audio club&#8217; of my university, I was showing how to work with the CLAM framework as a tool to prototype realtime audio signal processing applications in a simple and fast way. We started with an &#8230; <a href="http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last week, at the recent &#8216;audio club&#8217; of my university, I was showing how to work with the <a href="http://clam-project.org/">CLAM</a> framework as a tool to prototype realtime audio signal processing applications in a simple and fast way.</p>
<p>We started with an example network to show some about the NetworkEditor capabilities: <a href="http://audiores.uint8.com.ar/files/networks/karaoke.clamnetwork">karaoke.clamnetwork</a><br />
<img id="image209" src="http://audiores.uint8.com.ar/blog/wp-content/uploads/2009/08/karaoke.jpg" alt="Karaoke" /></p>
<p>After that, we continue with a simple &#8216;diodo distortion&#8217; plugin:</p>
<p>We specified and generated the source code base in this way:<br />
<img id="image210" src="http://audiores.uint8.com.ar/blog/wp-content/uploads/2009/08/spec-distorsion-diodo.jpg" alt="Especificación de distorsión tipo diodo" /></p>
<p>We wrote this code:</p>
<div class="codecolorer-container cpp geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">bool</span> Do<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">bool</span> result <span style="color: #000080;">=</span> Do<span style="color: #008000;">&#40;</span> mEntrada.<span style="color: #007788;">GetAudio</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, mSalida.<span style="color: #007788;">GetAudio</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mEntrada.<span style="color: #007788;">Consume</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mSalida.<span style="color: #007788;">Produce</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> result<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">bool</span> Do<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> Audio<span style="color: #000040;">&amp;</span> in, Audio<span style="color: #000040;">&amp;</span> out<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">int</span> size <span style="color: #000080;">=</span> in.<span style="color: #007788;">GetSize</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">const</span> DataArray<span style="color: #000040;">&amp;</span> inb <span style="color: #000080;">=</span> in.<span style="color: #007788;">GetBuffer</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DataArray<span style="color: #000040;">&amp;</span> outb <span style="color: #000080;">=</span> out.<span style="color: #007788;">GetBuffer</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span> size<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> <span style="color: #0000dd;">fabs</span><span style="color: #008000;">&#40;</span>inb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #000080;">&gt;</span><span style="color:#800080;">0.8</span> <span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> inb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #000040;">&amp;</span>lt<span style="color: #008080;">;</span><span style="color: #0000dd;">0</span>.<span style="color: #008080;">?</span> <span style="color: #000040;">-</span><span style="color:#800080;">0.8</span><span style="color: #008080;">:</span><span style="color:#800080;">0.8</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> inb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span></div></div>
<p>And built this net to try it:<br />
<img id="image212" src="http://audiores.uint8.com.ar/blog/wp-content/uploads/2009/08/diodo-distorsion.jpg" alt="Red para probar distorsión de diodo" /></p>
<p>The source code of the plugin ready to be compiled is here: <a href="http://audiores.uint8.com.ar/files/code/CLAM_plugins/pluginDistorsiónDiodo_ClubAudioFiuba.tar.gz ">pluginDistorsiónDiodo_ClubAudioFiuba.tar.gz</a></p>
<p>As extra, I leave here <a href="http://audiores.uint8.com.ar/files/code/CLAM_plugins/pluginDistorsiónDiodoConControlDeClipping_ClubAudioFiuba.tar.gz">pluginDistorsiónDiodoConControlDeClipping_ClubAudioFiuba.tar.gz</a> the same diode distortion, but with a clipping control to set the threshold when playing.</p>
<p>They liked these kind of prototyping features a lot, so probably we&#8217;re going to keep using it at the club.</p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2009/08/17/showing-a-little-about-clam-as-a-prototyping-tool-at-the-audio-club-of-fiuba/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Interactive CLAM programming (with python)</title>
		<link>http://audiores.uint8.com.ar/blog/2008/08/03/interactive-clam-programming/</link>
		<comments>http://audiores.uint8.com.ar/blog/2008/08/03/interactive-clam-programming/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 01:00:09 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[CLAM]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[signal processing]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/2008/08/03/interactive-clam-programming/</guid>
		<description><![CDATA[Recently I been playing with python bindings for the CLAM library. Here is a demo demonstrating how to interactively build a network and play a file using the IPython shell: &#160; Related scripts: playfile.py fft_example.py. &#160; PyCLAM source. INSTALL.]]></description>
			<content:encoded><![CDATA[<p>Recently I been playing with python bindings for the <a href="http://clam.iua.upf.edu/">CLAM</a> library. Here is a demo demonstrating how to interactively build a network and play a file using the <a href="http://ipython.scipy.org/moin/About">IPython</a> shell:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/XgJsqo2_-Ng&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/XgJsqo2_-Ng&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>&nbsp;<br />
Related scripts: <a href="http://audiores.uint8.com.ar/files/code/python/playfile.py">playfile.py</a> <a href="http://audiores.uint8.com.ar/files/code/python/fft_example.py">fft_example.py</a>.<br />
&nbsp;<br />
<a href="http://clam-project.org/clam/trunk/CLAM/pyclam">PyCLAM source</a>. <a href="http://clam-project.org/clam/trunk/CLAM/pyclam/INSTALL">INSTALL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2008/08/03/interactive-clam-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CLAM processing generator script (example of use)</title>
		<link>http://audiores.uint8.com.ar/blog/2008/07/07/clam-processing-generator-script-example-of-use/</link>
		<comments>http://audiores.uint8.com.ar/blog/2008/07/07/clam-processing-generator-script-example-of-use/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 20:58:49 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[CLAM]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/2008/07/07/clam-processing-generator-script-example-of-use/</guid>
		<description><![CDATA[This script is about a basic code generation of a CLAM plugin. In some point I think this is some kind of meta-programming or perhaps the term &#8220;automatic programming&#8221; fits better. The basic idea is to specify some basic features &#8230; <a href="http://audiores.uint8.com.ar/blog/2008/07/07/clam-processing-generator-script-example-of-use/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This script is about a basic code generation of a <a href="http://www.clam.iua.upf.edu/">CLAM</a> plugin. In some point I think this is some kind of <a href="http://en.wikipedia.org/wiki/Metaprogramming">meta-programming</a> or perhaps the term &#8220;<a href="http://en.wikipedia.org/wiki/Automatic_programming">automatic programming</a>&#8221; fits better. The basic idea is to specify some basic features of the planned new processing in a plain text and then, generate some code with the script, saving in this way many of the often repetitive and mechanical work needed to set-up a new processing from scratch. Main intention is to allow concentrate in the Do() function or plugin details quickly.</p>
<p>As an example, I will reproduce here how I worked with me some time ago:<br />
&nbsp;<br />
One day, in the irc #clam channel:<br />
&#8220;[11:51] &#60;groton&#62; Consul, do you know if there is any trigger-like processing unit, list when the volume gets louder than a threshold or something like that&#8221;</p>
<p>I&#8217;m not Consul in the irc (I&#8217;m <a href="http://h.ordia.com.ar/">hordia</a>), but next day at my console&#8230;</p>
<p>cd CLAM/scripts/TemplatedPluginsGenerator<br />
vi ThresholdTrigger.template</p>
<p><span style="font-size: 14px"></p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Name:ThresholdTriggerTemplate<br />
BaseClass:Processing<br />
i:AudioInPort,Audio Input<br />
ic:0,1,Threshold<br />
oc:0,1,Trigger</div></div>
<p></span></p>
<p>In words, this means a Processing template named &#8220;ThresholdTriggerTemplate&#8221; using &#8220;Processing&#8221; as a base class and with one input of &#8220;AudioInPort&#8221; type named &#8220;Audio Input&#8221;, with one in control in the 0..1 range named &#8220;Threshold&#8221; and one out control named &#8220;Trigger&#8221;. Of course, you can add as many inputs/outputs of ports or controls as you want.<br />
&nbsp;</p>
<p>This script creates the template:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./TemplateGenerator.py ThresholdTrigger.template</div></div>
<p>&nbsp;<br />
And this one the processing plugin:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./TemplatedPluginsGenerator.py ThresholdTrigger ThresholdTriggerTemplate &quot;Hernán Ordiales&quot; GPL 2008</div></div>
<p>Again in words, this means create a new processing called &#8220;ThresholdTrigger&#8221; based on the &#8220;ThresholdTriggerTemplate&#8221; filling the copyright with my name plus the current year and the license with the GPL text.</p>
<p>&nbsp;<br />
A final edit just typing the required code for the Do() function:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd CLAM/plugins/ThresholdTrigger<br />
vi ThresholdTrigger.hxx</div></div>
<p><span style="font-size: 14px"></p>
<div class="codecolorer-container cpp geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339900;">#include &lt;cmath&gt;</span><br />
<br />
<span style="color: #0000ff;">bool</span> Do<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">bool</span> result <span style="color: #000080;">=</span> Do<span style="color: #008000;">&#40;</span> mAudioInput.<span style="color: #007788;">GetAudio</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;mAudioInput.<span style="color: #007788;">Consume</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">return</span> result<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">bool</span> Do<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> Audio<span style="color: #000040;">&amp;</span> in<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">int</span> size <span style="color: #000080;">=</span> in.<span style="color: #007788;">GetSize</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">const</span> DataArray<span style="color: #000040;">&amp;</span> inb <span style="color: #000080;">=</span> in.<span style="color: #007788;">GetBuffer</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;TData threshold <span style="color: #000080;">=</span> mThreshold.<span style="color: #007788;">GetLastValue</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">bool</span> trigger <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>size <span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>std<span style="color: #008080;">::</span><span style="color: #0000dd;">fabs</span><span style="color: #008000;">&#40;</span>inb<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #000080;">&gt;</span>threshold<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;trigger <span style="color: #000080;">=</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;mTrigger.<span style="color: #007788;">SendControl</span><span style="color: #008000;">&#40;</span>trigger<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<span style="color: #000080;">&lt;</span><span style="color: #000040;">/</span>size<span style="color: #000080;">&gt;&lt;</span><span style="color: #000040;">/</span>cmath<span style="color: #000080;">&gt;</span></div></div>
<p></span></p>
<p>At this point, just remains add the <a href="http://iua-share.upf.es/wikis/clam/index.php/Building_a_processing_library">basic SConstruct file for a CLAM plugin</a>, compile it with the corresponding clam_prefix and install it:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">scons install clam_prefix=$CLAM_PATH<br />
NetworkEditor</div></div>
<p>And ready to use&#8230;</p>
<p>This example it&#8217;s very simple and has a poor implementation but was just to show the idea of how those scripts can save a lot of work. </p>
<p><strong>Update:</strong> I made a frontend for these scripts: <a href="http://iua-share.upf.edu/wikis/clam/index.php/Image:PluginCodeGenerator.png">ProcessingCodeGenerator</a></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2008/07/07/clam-processing-generator-script-example-of-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Distortion rack prototype</title>
		<link>http://audiores.uint8.com.ar/blog/2008/01/05/distortion-rack-prototype/</link>
		<comments>http://audiores.uint8.com.ar/blog/2008/01/05/distortion-rack-prototype/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 16:09:50 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[CLAM]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/?p=179</guid>
		<description><![CDATA[A nice prototype: &#160; &#160; And the net behind:]]></description>
			<content:encoded><![CDATA[<p>A nice prototype:</p>
<p><center><a href="http://audiores.uint8.com.ar/blog/wp-content/uploads/2008/01/distortion-clam-rack.png"  alt="prototype"><img id="image177" src="http://audiores.uint8.com.ar/blog/wp-content/uploads/2008/01/distortion-clam-rack_mini.png" alt="CLAM distortion rack prototype" /></a></center></p>
<p>&nbsp;<br />
&nbsp;</p>
<p>And the net behind:</p>
<p><center><a href="http://audiores.uint8.com.ar/blog/wp-content/uploads/2008/01/rack-net.png"  alt="prototype"><img id="image177" src="http://audiores.uint8.com.ar/blog/wp-content/uploads/2008/01/rack-net_mini.png" alt="CLAM distortion rack prototype" /></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2008/01/05/distortion-rack-prototype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LADSPA versions of my recent simple distortions</title>
		<link>http://audiores.uint8.com.ar/blog/2007/12/17/ladspa-versions-of-my-recent-simple-distortions/</link>
		<comments>http://audiores.uint8.com.ar/blog/2007/12/17/ladspa-versions-of-my-recent-simple-distortions/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 04:41:04 +0000</pubDate>
		<dc:creator>hordia</dc:creator>
				<category><![CDATA[plugins]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[CLAM]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[specifications]]></category>

		<guid isPermaLink="false">http://audiores.uint8.com.ar/blog/?p=175</guid>
		<description><![CDATA[After prototype different kind of simple distortions in NetworkEditor i managed to port all them to ladspa plugins. Despite the fact that the task was less difficult than i had expected at first, prototype with CLAM first worth a lot. &#8230; <a href="http://audiores.uint8.com.ar/blog/2007/12/17/ladspa-versions-of-my-recent-simple-distortions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After prototype different kind of simple distortions in NetworkEditor i managed to port all them to <a href="http://www.ladspa.org/">ladspa</a> plugins. Despite the fact that the task was less difficult than i had expected at first, prototype with CLAM first worth a lot. Probably, if i had begun coding directly to <a href="http://www.ladspa.org/">ladspa</a> source, reach the same status would be taken to me 10 or more times more. I think also was very interesting as &#8220;development process&#8221;, instead of modeling for example with matlab, you could easy modeling (among other things) in CLAM, and then, if you want/need make your final product by your own.</p>
<p>More, the other day i learned that is already possible to compile <a href="http://www.ladspa.org/">ladspa</a> plugins directly from CLAM networks&#8230; very cool! Though i think this feature is not completely ready yet and i&#8217;m still have to dig in it, i don&#8217;t think that i have lost time porting manually because now i have a better knowledge and understanding about <a href="http://www.ladspa.org/">ladspa</a> specification that for sure will be useful to work with this (for me &#8220;new&#8221;) feature, that probably needs some fixes. </p>
<p>About the ladspa plugins programming, i just downloaded the sdk from <a href="http://www.ladspa.org/">ladspa.org</a>, read some of the ladspa.h file and some basic examples (the ones from sdk) and that was enough to handle the basis. Ah, i had to ask for some <a href="http://www.ladspa.org/">ladspa</a> ID&#8217;s for my plugins here: ladspa at muse.demon.co.uk</p>
<p>On the other hand i&#8217;ve forwarded my distortion examples to musix distro folks and some of them indeed have tried it and made a couple of <a href="http://jack-rack.sourceforge.net/">jack-rack</a> presets and audio demos. More info about this here: <a href="http://www.musix.org.ar/wiki/index.php/DSP-es#Presets">DSP-es#Presets</a>, <a href="http://www.musix.org.ar/ogg/disthordian/">ogg demos and jack-rack presets</a>, and <a href="http://www.musix.org.ar/wiki/index.php/Distorsion_para_guitarra_disthordian">patchs review</a>.</p>
<p>Next step (in my TODO list): produce <a href="http://www.ladspa.org/">ladspa</a> binaries directly from CLAM networks.</p>
<p>I have uploaded these plugins here: <a href="http://audiores.uint8.com.ar/files/code/LADSPA_plugins/disthordian/index.php">disthordian ladspa plugins</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://audiores.uint8.com.ar/blog/2007/12/17/ladspa-versions-of-my-recent-simple-distortions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
