<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>The DSP Dimension</title>
	<link>http://www.dspdimension.com</link>
	<description>Signal Processing Tutorials &#38; Software</description>
	<pubDate>Wed, 27 May 2009 07:37:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>The DSP Dimension Releases DIRAC 1.5, Announces qDIRAC for Mobile Devices</title>
		<link>http://www.dspdimension.com/admin/news-dirac-150-qdirac/</link>
		<comments>http://www.dspdimension.com/admin/news-dirac-150-qdirac/#comments</comments>
		<pubDate>Wed, 27 May 2009 07:35:00 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/the-dsp-dimension-releases-dirac-15-announces-qdirac-for-mobile-devices/</guid>
		<description><![CDATA[Mainz/Germany, May 27th, 2009 - The DSP Dimension today announces that version 1.5 of its award winning DIRAC polyphonic audio Time Stretching &#38; Pitch Shifting solution is now available for download. Version 1.5 fixes minor problems that were present in previous versions and makes the library ANSI C-callable. Version 1.5 might require minor changes to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Mainz/Germany, May 27th, 2009 </em>- The DSP Dimension today announces that version 1.5 of its award winning DIRAC polyphonic audio Time Stretching &amp; Pitch Shifting solution is now available for download. Version 1.5 fixes minor problems that were present in previous versions and makes the library ANSI C-callable. Version 1.5 might require minor changes to your code due to minor changes in the API, please see the enclosed documentation for more details. The free DIRAC LE version has also been updated and can be downloaded from The DSP Dimension&#8217;s &#8220;Download&#8221; page on http://www.dspdimension.com.</p>
<p>The DSP Dimension also announces &#8220;qDIRAC&#8221; a new version of DIRAC optimized for mobile devices/streaming applications. &#8220;qDIRAC&#8221; is optimized for Linux and covered by the same license as the desktop version of STUDIO. It has a considerably smaller memory footprint, leaves allocating memory to the caller so it can preserve state information across sessions and threads and is optimized to make best use of the limited MIPS that are available on mobile/embedded devices. The DSP Dimension expects to make it available at the end of June 2009.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/news-dirac-150-qdirac/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C# Version of Our Pitch Shifting Tutorial Code</title>
		<link>http://www.dspdimension.com/admin/pitch-shifting-using-the-ft-csharp-code/</link>
		<comments>http://www.dspdimension.com/admin/pitch-shifting-using-the-ft-csharp-code/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 07:59:32 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/pitch-shifting-using-the-ft-csharp-code/</guid>
		<description><![CDATA[Mainz, 24. April 2009 - We&#8217;re happy to announce that Michael Knight has kindly provided a C# version of the code accompanying our &#8220;Pitch Shifting Using the Fourier Transform&#8221; article. You can get it from here: http://sites.google.com/site/mikescoderama/pitch-shifting
]]></description>
			<content:encoded><![CDATA[<p><em>Mainz, 24. April 2009 -</em> We&#8217;re happy to announce that Michael Knight has kindly provided a C# version of the code accompanying our &#8220;<a href="http://www.dspdimension.com/admin/pitch-shifting-using-the-ft/">Pitch Shifting Using the Fourier Transform</a>&#8221; article. You can get it from here: <a href="http://sites.google.com/site/mikescoderama/pitch-shifting" target="_blank">http://sites.google.com/site/mikescoderama/pitch-shifting</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/pitch-shifting-using-the-ft-csharp-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Letter from the Author</title>
		<link>http://www.dspdimension.com/admin/letter-11-08/</link>
		<comments>http://www.dspdimension.com/admin/letter-11-08/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 10:43:21 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/letter-11-08/</guid>
		<description><![CDATA[Hello,
thank you all for your continued interest in our web site! In 2009 we will be celebrating the DSPDimension&#8217;s 10th anniversary and thanks to you we have come a long way and are now among the top 10 sites in the field.
Unfortunately, my schedule and the growing number of comments are currently preventing me from [...]]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>thank you all for your continued interest in our web site! In 2009 we will be celebrating the DSPDimension&#8217;s 10th anniversary and thanks to you we have come a long way and are now among the top 10 sites in the field.</p>
<p>Unfortunately, my schedule and the growing number of comments are currently preventing me from personally responding to all your great comments directly on our web site. Because of this I just wanted to remind you that we have a forum at <a href="http://www.surroundsfx.com/forum/viewforum.php?f=11" target="_blank">http://www.surroundsfx.com/forum/viewforum.php?f=11</a> that would be more appropriate for anything more complex than a simple one-way comment. I am regularly checking the forum and there are quite a few other people there who can answer any questions you might have in case I am not available. The forum membership is absolutely free and anyone can register.</p>
<p>Again thank you for your interest in our web site and articles and I am looking forward to answering your questions in our forum as soon as possible.</p>
<p>Happy Thanksgiving and best regards</p>
<p>Stephan Bernsee</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/letter-11-08/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HeadAcoustics ArtemiS 9 Now Includes DIRAC</title>
		<link>http://www.dspdimension.com/admin/artemis-9/</link>
		<comments>http://www.dspdimension.com/admin/artemis-9/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 06:48:51 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/artemis-9/</guid>
		<description><![CDATA[Mainz, April 17th, 2008 &#8212; The latest version 9 of HeadAcoustics&#8217; software ArtemiS (short for &#8220;Advanced Research TEchnology for Measurement and Investigation of Sound&#8221;), an advanced measurement software that is industry standard for vibration analysis now includes DIRAC for time stretching and pitch shifting  of measured data. Read the full article on new features [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.dspdimension.com/wp-content/uploads/2008/04/artemis.png" alt="artemis.png" align="left" /><em>Mainz, April 17th, 2008 &#8212; </em>The latest version 9 of HeadAcoustics&#8217; software ArtemiS (short for &#8220;Advanced Research TEchnology for Measurement and Investigation of Sound&#8221;), an advanced measurement software that is industry standard for vibration analysis now includes DIRAC for time stretching and pitch shifting  of measured data. Read the full article on <a href="http://www.head-acoustics.de/downloads/eng/artemis/Whats_new_in_ArtemiS_9_e.pdf" target="_blank">new features in ArtemiS 9 here</a>.</p>
<p>According to their web site, ArtemiS is a recording, analysis and playback software, which was developed to deal with tasks in the field of sound and vibration quickly and efficiently. Simultaneous listening, analyzing and interactive filtering is of vital importance when using ArtemiS. Because only then - while using your own ears - can sound problems be effectively detected or target sounds defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/artemis-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DIRAC Licensing Options Changed</title>
		<link>http://www.dspdimension.com/admin/dirac-licensing-options-changed/</link>
		<comments>http://www.dspdimension.com/admin/dirac-licensing-options-changed/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 17:25:57 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/dirac-licensing-options-changed/</guid>
		<description><![CDATA[Mainz, March 3rd, 2008 &#8212; The DSP Dimension today announce that effective immediately DIRAC will only be available for licensing on an up-front one time payment basis. Since nine out of ten of our licensees use the up-front option the recurring licensing fee of the annual licensing option involved too much bookkeeping on our part [...]]]></description>
			<content:encoded><![CDATA[<p><em>Mainz, March 3rd, 2008 &#8212; </em>The DSP Dimension today announce that effective immediately DIRAC will only be available for licensing on an up-front one time payment basis. Since nine out of ten of our licensees use the up-front option the recurring licensing fee of the annual licensing option involved too much bookkeeping on our part to be actually profitable. We are still open to customized licensing options if you cannot afford or don&#8217;t want the off-the-shelf options that we offer, in this case we kindly ask you to get in touch with us to provide you with a custom tailored solution. Licensees currently using the annual licensing option can switch to a non-recurring licensing contract by paying a one-time fee of EUR 980. Please get in touch with us in order to  have your contract changed accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/dirac-licensing-options-changed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DIRAC LE 1.3 Released</title>
		<link>http://www.dspdimension.com/admin/dirac-le-13-released/</link>
		<comments>http://www.dspdimension.com/admin/dirac-le-13-released/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 13:07:18 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/dirac-le-13-released/</guid>
		<description><![CDATA[Mainz, November 13, 2007 &#8211; The DSP Dimension announce the immediate availability of version 1.3 of their free commercial grade DIRAC Time Stretching and Pitch Shifting library for Windows and MacOS X. Version 1.3 fixes many minor issues that were present in earlier versions and integrates both the bug fixes and improvements from the PRO [...]]]></description>
			<content:encoded><![CDATA[<p><em>Mainz, November 13, 2007 </em>&#8211; The DSP Dimension announce the immediate availability of version 1.3 of their free commercial grade DIRAC Time Stretching and Pitch Shifting library for Windows and MacOS X. Version 1.3 fixes many minor issues that were present in earlier versions and integrates both the bug fixes and improvements from the PRO into the LE version. The new version is a free download off our download page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/dirac-le-13-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Site Redesign</title>
		<link>http://www.dspdimension.com/admin/site-redesign/</link>
		<comments>http://www.dspdimension.com/admin/site-redesign/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 15:26:43 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/site-redesign/</guid>
		<description><![CDATA[Mainz, October 21, 2007 &#8212; As this web site is slowly but surely approaching its ten years anniversary in 2009 we have decided that it is time for a change. We wanted to steer clear of the old plain html design that was messy to maintain and tedious to update and go for a fully [...]]]></description>
			<content:encoded><![CDATA[<p><em>Mainz, October 21, 2007 &#8212; </em>As this web site is slowly but surely approaching its ten years anniversary in 2009 we have decided that it is time for a change. We wanted to steer clear of the old plain html design that was messy to maintain and tedious to update and go for a fully configurable Blog system instead. We are happy to announce that the move to our new system has been completed in no time thanks to the wonderful WordPress software. The good news is that this allows you to comment on some of our articles, providing us with immediate feedback and help on how to improve things. The bad news is that some of our &#8220;fun stuff&#8221; articles had to go, because there was no way to conceptually integrate them with the new web site content. But worry not - we still keep the entire old site around for you in case you need something. You can find it at <a href="http://oldsite.dspdimension.com" target="_blank">http://oldsite.dspdimension.com</a>. Please bear with us if some of the new pages have broken links or missing images - we are in the process of double checking everything right now and expect to have it up and running by the end of this week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/site-redesign/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Frequently Asked Questions (FAQ)</title>
		<link>http://www.dspdimension.com/admin/frequently-asked-questions-faq/</link>
		<comments>http://www.dspdimension.com/admin/frequently-asked-questions-faq/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 00:11:26 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[Questions &amp; Answers]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/2007/10/21/frequently-asked-questions-faq/</guid>
		<description><![CDATA[I have a nice web site at www.###.com - could you please link to it?
Chances for this are rather slim. While I do support sites that contain free resources, I carefully select them for their educational content and their relation to the topics discussed here. I want this page to be a pleasant experience for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I have a nice web site at www.###.com - could you please link to it?<br />
</strong>Chances for this are rather slim. While I do support sites that contain free resources, I carefully select them for their educational content and their relation to the topics discussed here. I want this page to be a pleasant experience for those visiting it (about 10 - 20,000 people per month) and I do not want to clutter it with banner ads and lots of links.</p>
<p><strong>I have created a program with the code from your page and it does not work<br />
</strong>Check your code. If it still doesn&#8217;t work, check your code again. If it still doesn&#8217;t work then email me. The code presented here has been used by several student&#8217;s classes, is used in more than a dozen products and has been carefully tested by more than 30 people. The chance that the problems you&#8217;re experiencing are in the part of the code presented here is slim. The most common error is about data types. The algorithms presented here expect the data to be in 32bit IEEE754 floating point format, which is the standard format for single precision floating point on today&#8217;s desktop computers. However, the data stored in your sound file will most probably be of a different format. Make sure you are aware of the differences and the conversion needed before you assume the error is in my part of the code. If in doubt, use my MiniAIFF library to access your sound files, it takes care of all the necessary file and data conversion related details.</p>
<p><strong>I am a musician and wish to start programming my own algorithms. Where do I start?<br />
</strong>First, you buy a computer and some software development tools, like CodeWarrior. Then you should start learning a modern programming language, like C and C++. It is a good idea to make yourself familiar with some free audio/plug in SDKs, like VST. After that, you should read some basic DSP textbooks, like Sophocles Orfanidis &#8220;Introduction to Digital Signal Processing&#8221;, or Oppenheim and Schafer &#8220;Discrete Time Signal Processing&#8221;. The book from Rick Lyons comes to mind, which has been favorably mentioned by many students. After that, if you&#8217;re still convinced this is what you want, delve into the DSP literature, take an online course at Bores.com and expand your knowledge according to your preferences.</p>
<p><strong>May I use your tutorials/code in my commercial/non-commercial application, thesis, lecture, etc.?</strong><br />
Yes. Please make sure, however, that you give credit where credit is due.</p>
<p><strong>As I was reading the section on the lowest and highest frequencies needed to recreate an input signal, I noticed a discrepancy that I still cannot figure out. You say that the lowest frequency is the frequency that completes exactly half its period in the signal. In mathematical terms that would be: fmin = pi rad * 1 / NT sec = pi / NT rad/sec N = number of samples T = sampling interval However, the DFT defintion given at: <a href="http://ccrma.stanford.edu/~jos/mdft/DFT_Definition.html" target="_blank">http://ccrma.stanford.edu/~jos/mdft/DFT_Definition.html</a> uses 2pi / NT rad/sec. Why does the DFT definition not use the minimum frequency?<br />
</strong>The discussion on my page refers to a real-valued transform, like the sine or cosine transform, before it actually introduces the DFT. This makes sense because the complex arithmetics required for the DFT would further complicate things and make them less intuitive. The DST and DCT have a twice as dense &#8220;frequency grid&#8221; spacing than the DFT, which is why JOS is introducing the factor 2 (btw., if you take a close look on the actual DFT in listing 1.2 on my page you&#8217;ll see that it is also using the factor 2 spacing)</p>
<p><strong>I read your article &#8216;The DFT &#8216;à Pied&#8217;. In the article, you state: &#8220;&#8230;every signal, however complex, can be represented by a sum of sinusoid functions that are individually mixed&#8221;. I was curious to whether sinusoids could be replaced with square waves. Would the results from this square wave DFT differ substantially from a sinusoid DFT, and if they&#8217;re the same, how come no-one seems to have developed a fast integer FFT around the concept? Is there something I&#8217;m missing here?<br />
</strong>Yes you can indeed use other functions than the sin/cos basis functions, but they need to have certain mathematical properties in order to work for this purpose. Also, you cannot simply replace them. Even though the results might seem similar at first glance, try inverting the transform to check if you get back your original waveform - you will not. Using square waves (or triangular waves, trapezoidal waves, sawtooth waves) requires some additional work, most notably the introduction of the Moebius function. One example:<br />
A square wave can be approximated by the sum of sinusoids mixed at the following ratios:</p>
<blockquote><p><em>sqr(x) = sin(x) + (1/3)sin(3x) + (1/5)sin(5x) + (1/7)sin(7x) + (1/9)sin(9x)&#8230; =<br />
sqr(x) = SUM[k=1&#8230;N] (1/(2k-1))sin((2k-1)x)<br />
</em></p></blockquote>
<p>Conversely, a sine wave can be approximated by the series of square waves starting with:</p>
<blockquote><p><em>sin(x) = sqr(x) - (1/3)sqr(3x) - (1/5)sqr(5x) - (1/7)sqr(7x) + (0/9)sqr(9x)&#8230; =<br />
sin(x) = SUM[k=1&#8230;N] (mu(2k-1)/(2k-1))sqr((2k-1)x)<br />
</em></p></blockquote>
<p>The sign of the square wave components is determined by the Moebius function mu(), that&#8217;s the reason for the 9x component being zero. <a href="http://www.dspdimension.com/wp-content/uploads/2007/10/sin-sqr.jpg" target="_blank"><img src="http://www.dspdimension.com/wp-content/uploads/2007/10/sin-sqr.jpg" align="right" height="179" width="387" /></a><br />
Using other functions than the sin/cos pairs can be important, for example if you only have square wave generators to reconstruct the signal. Calculating the Fourier transform coefficients from the square wave coefficients is possible, so you can also do filtering and synthesis in the square wave domain. There is a research area named &#8220;arbitrary waveform analysis&#8221; or &#8220;common waveform analysis&#8221; (since square, sawtooth etc. waves are &#8220;common waveforms&#8221; in electronics) that deal with the topic. Indeed, transforms based on waveforms other than sin/cos waves are available.</p>
<h4>Recommended further reading: Y. Wei, Q. Zhang: &#8220;Common Waveform Analysis: a new and practical generalization of Fourier analysis&#8221;, Kluwer Academic Publishers, Boston, MA, 2000.</h4>
<p><em> </em></p>
<p><a title="numbers" name="numbers"></a><strong>I&#8217;m trying to reproduce the numbers you list in the tables accompanying your &#8220;Pitch Shifting Using the Fourier Transform&#8221; article, but I can&#8217;t figure out how to calculate the frequency values.<br />
</strong>The estimated true frequency F from the bin phase p (at bin i) is calculated from the overlap factor s, the sample rate R and the size of the DFT frame size N as:</p>
<blockquote><p><em>Fi = (R/N) * (i + pi*s/(2π))</em><em><br />
</em></p></blockquote>
<p>Explanation: The frequency resolution in Hz is given by R/N. Two neigbouring bins are therefore R/N Hz apart. The phase of a bin is limited by the arc tangent function to the interval ±π/2. We can expand this interval by taking the sign into account when calculating the phase angle, therefore our maximum phase deviation is ±π. This means that the phase of a bin can vary by ±π depending on its frequency deviation from the bin&#8217;s center frequency.<br />
Taking the overlap into account: the more overlap we have, the larger is our frequency area that the bin frequency can sweep since there is less time between the individual measurements (DFT frames) and we therefore get a higher resolution within the ±π interval. We could also say that the same deviation in phase means double deviation in frequency if our DFT frames are twice as densely spaced.</p>
<p><strong>I think there might be a problem with you pitch shifter when you have two or more frequency components that fall into the same bin. For example: 1) If you have 2 freq. components that fall into separate FFT frequency bins, you are OK. Each freq. component will be shifted by the same ratio. (ex. 10%) 2) If you have 2 freq. components that fall into the same FFT frequency bin, but they appear at different times, you are still OK, each freq. component will proportionally be shifted by the same ratio. 3) However, if you have 2 freq. components that fall into the same FFT frequency bin, and they happen at the same time, BOTH COMPONENTS WILL BE SHIFTED BY THE SAME AMOUNT, which means, different ratios. Is this a known issue?<br />
</strong>Indeed, your observation is correct - this is related to the resolution properties of the DFT.<br />
For the case you mention, there are two different scenarios:<br />
1) Consider two closely spaced sinusoids in your input signal that fall into the same bin, for example at 500 and 505 Hz. In this case, they will be shifted both by the same amount (doubling the frequency will move them to 1000 and 1005 Hz instead of 1000 and 1010 Hz) because scaling the bin frequency just heterodynes (frequency shifts) everything within the bin bandwidth. The net effect of this shift might not be prominent enough to be noticed by the listener - depending on the DFT size (and the resulting bin frequency resolution). For small DFT sizes however this might cause the resulting sound to be inharmonic and metallic.<br />
2) Scaling two closely spaced frequencies that are initially NOT located within the same bin might move them closer together for a bin frequency scaling factor &lt; 1.0 which might eventually cause them to fall into the same bin. In that case, the net phase effect should be calculated differently from the way it is done in the code now. I&#8217;ve not taken this into account in the present version to keep the code readable.<br />
One might also argue that closely spaced frequencies will cause a low frequency modulation (&#8221;beating&#8221;) in the signal, which will result in yet another bin getting involved in the process. Therefore, the pitch shifter introduced at the DSP Dimension web site is actually a simplified version of a much more complex process if you really want to do it &#8220;right&#8221; <img src='http://www.dspdimension.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/frequently-asked-questions-faq/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DIRAC-based TimeFactory2 MacOS X Standalone Software Released</title>
		<link>http://www.dspdimension.com/admin/dirac-based-timefactory2-released/</link>
		<comments>http://www.dspdimension.com/admin/dirac-based-timefactory2-released/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 14:12:44 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[*NEWS*]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/2007/04/18/dirac-based-timefactory2-macos-x-standalone-software-released/</guid>
		<description><![CDATA[April, 2007 &#8212; We are happy to announce the availability of a cooperation product with the Germany based company Prosoniq, one of the industry leaders in audio editing and processing software. The new version 2 of Prosoniq&#8217;s &#8220;TimeFactory&#8221; application was designed and developed by our development team and uses key technology like our DIRAC time [...]]]></description>
			<content:encoded><![CDATA[<p><em>April, 2007 &#8212; </em>We are happy to announce the availability of a cooperation product with the Germany based company Prosoniq, one of the industry leaders in audio editing and processing software. The new version 2 of Prosoniq&#8217;s &#8220;TimeFactory&#8221; application was designed and developed by our development team and uses key technology like our DIRAC time stretching and pitch shifting. See their web site here for more details and a free demo version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/dirac-based-timefactory2-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MiniAiff - Reading and Writing Soundfiles Made Easy</title>
		<link>http://www.dspdimension.com/admin/miniaiff/</link>
		<comments>http://www.dspdimension.com/admin/miniaiff/#comments</comments>
		<pubDate>Sat, 21 Oct 2006 20:31:43 +0000</pubDate>
		<dc:creator>Bernsee</dc:creator>
		
		<category><![CDATA[MiniAiff]]></category>

		<guid isPermaLink="false">http://www.dspdimension.com/admin/miniaiff-reading-and-writing-soundfiles-made-easy/</guid>
		<description><![CDATA[Have you ever wondered if there&#8217;s a way to access sound files as easily as reading and writing plain text files? Did you ever need to try out some DSP code and finally found yourself struggling with code from others just to get the sound file format right?
If you have, here&#8217;s something for you.
I&#8217;m happy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://downloads.dspdimension.com/miniaiff.zip"><img src="http://www.dspdimension.com/wp-content/uploads/2007/10/download.png" align="right" /></a>Have you ever wondered if there&#8217;s a way to access sound files as easily as reading and writing plain text files? Did you ever need to try out some DSP code and finally found yourself struggling with code from others just to get the sound file format right?</p>
<p>If you have, here&#8217;s something for you.</p>
<p><img src="http://www.dspdimension.com/wp-content/uploads/2009/05/xcode-project.gif" alt="miniAIFF" align="right" />I&#8217;m happy to present MiniAiff, world&#8217;s simplest AIFF sound file interface. It is cross platform, which means it works on any operating system, any computer (well, all of those I had access to, that is&#8230;) and it&#8217;s so simple to use you cannot do a thing wrong. And, above all, it&#8217;s entirely free. Play with the fun stuff and let the computer do the nasty bit twiddling for you to stream the data of your application to an AIFF sound file, without even knowing what an &#8220;AIFF&#8221; is and what it means exactly.</p>
<p><strong>What is it?</strong><br />
To see if this is really for you, here&#8217;s what it is: MiniAiff is a set of routines written in the C programming language that allow reading from and writing to sound files in AIFF fomat. It comes as as static library (.LIB) that links against your existing C or C++ project. At the time of writing, I provide the MiniAiff static library for the following platforms and compilers:</p>
<ul>
<li>MacOS X Universal 32/64bit Binary with Xcode</li>
<li>x86 Linux with gcc</li>
<li>Win9x, XP, Vista under Microsoft Visual C++ 6 and Visual Studio 2008</li>
</ul>
<p>I might provide support for other platforms soon when I have some time to get it done. If you need the library for a different platform and it&#8217;s not available here give me a buzz and I&#8217;ll see what I can do.</p>
<p><strong>Why AIFF files?</strong><br />
Well, honestly, I&#8217;m kind of a Mac dude so this choice was pretty obvious. The truth is, I had the AIFF code I wrote sitting around for quite some time now and I was fed up re-using it and tweaking it whenever I needed to add soundfile functionality to my projects. So I decided to make it a library of easy to use routines and be done with it once and for all. Since I figured others might have the same problem, here I am sharing it with you.<br />
AIFF is a very common standard, just like the &#8220;Wave&#8221; file format. Most players and software programs can play and convert both types of files, so the difference is purely one of my personal taste. &#8220;AIFF&#8221; means Audio Interchange File Format, which also has a nice ring to it when we&#8217;re talking about a cross-platform library.</p>
<p><em> Anyway, here it is - enjoy!</em></p>
<p><strong><em> </em></strong><br />
<strong>What do I need to use it?<br />
</strong>Well, first of all, a computer, obviously. You also need a development environment such as Microsoft Visual C or Xcode/gcc. MiniAiff makes calls to fread(), fwrite() so you need to include the stdio libraries in your project or you will get a link error. Usually, they are linked against by default so you don&#8217;t have to do anything special, but I thought I&#8217;d mention it again.</p>
<p><strong> </strong><br />
<strong>How do I use it?<br />
</strong>There are example applications included with the library. I suggest you download them and have a look. I will explain the functions contained in the library in greater detail below - you will also find these explanations in the accompanying .h files.</p>
<table bgcolor="#ffffff" border="0" cellpadding="6" cellspacing="0">
<tr>
<td valign="top"><font face="Verdana" size="-2"><strong>Function</strong></font></td>
<td valign="top"><font face="Verdana" size="-2"><strong>Description</strong></font></td>
</tr>
<tr>
<td valign="top"><font face="Verdana" size="-2"> </font></td>
<td valign="top"><font face="Verdana" size="-2"> </font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">const char</font><font face="Verdana" size="-2"> *<strong>mAiffGetVersion</strong>(</font><font color="#003399" face="Verdana" size="-2">void</font><font face="Verdana" size="-2">);</font></td>
<td valign="top"><font face="Verdana" size="-2">Returns a pointer to a string containing the current library version</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffReadData</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">float</font><font face="Verdana" size="-2"> **data, </font><font color="#003399" face="Verdana" size="-2">unsigned long</font><font face="Verdana" size="-2"> startFrame, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numFrames, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numChannels</font><font face="Verdana" size="-2">);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffReadDataFromChannel</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">float</font><font face="Verdana" size="-2"> *data, </font><font color="#003399" face="Verdana" size="-2">unsigned long</font><font face="Verdana" size="-2"> startFrame, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numFrames, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> channel);</font></td>
<td valign="top"><font face="Verdana" size="-2">Reads data from the position &#8220;startFrame&#8221; in the AIFF file specified in *filename, converts it into the range [-1.0, +1.0) and returns it as float in data[0&#8230;numChannels-1][0&#8230;numFrames-1]. If an error occurs, mAiffReadData() returns a negative error code. If all goes well, mAiffReadData() returns the number of frames actually read. If it returns with 0, the end of the file has been reached or exceeded by your request. </font><font face="Verdana" size="-2">If numChannels is different from the number of channels in the file only the channels that are available in the file will be read.</font><font face="Verdana" size="-2">mAiffReadDataFromChannel is optional and allows specifying a channel to read from if the file is a multi-channel audio file. If the desired channel is not available the function reads data from the highest numbered channel. </font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffInitFile</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">float</font><font face="Verdana" size="-2"> sampleRate, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> sampleSize, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numChannels</font><font face="Verdana" size="-2">);</font></td>
<td valign="top"><font face="Verdana" size="-2">Opens and clears a new file for writing. If you do not call this function prior to writing to an audio file with mAiffWriteData(), the data you write will be appended to the file. If the file does not exist and you do not call mAiffInitFile() prior to calling mAiffWriteData() writing to the file will fail.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffWriteData</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">float</font><font face="Verdana" size="-2"> **data, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numFrames</font><font face="Verdana" size="-2">, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numChannels</font><font face="Verdana" size="-2">);</font></td>
<td valign="top"><font face="Verdana" size="-2">Appends the data in data[0&#8230;numChannels-1][0&#8230;numFrames-1] to the audio file specified with *filename. If it completes successfully, it returns the actual number of frames appended to the file. If it fails, it returns an error code. If numChannels is different from the number of channels in the file only the channels that are available in the file will be filled with data.<br />
</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">float</font><font face="Verdana" size="-2"> <strong>**mAiffAllocateAudioBuffer</strong>(</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> numChannels, </font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> numFrames);</font><font color="#003399" face="Verdana" size="-2">void</font><font face="Verdana" size="-2"> <strong>mAiffDeallocateAudioBuffer</strong>(</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> numChannels</font><font face="Verdana" size="-2">);</font></td>
<td valign="top"><font face="Verdana" size="-2">Utility functions to allocate/deallocate a two-dimensional data array (each dimension being used as a separate audio channel).</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetNumberOfFrames</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td valign="top"><font face="Verdana" size="-2">Returns the number of sample frames contained in the specified file. If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetNumberOfChannels</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td valign="top"><font face="Verdana" size="-2">Returns the number of audio channels contained in the specified file.If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetWordlength</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td valign="top"><font face="Verdana" size="-2">Returns the wordlength of the audio data contained in the specified file. Possible wordlengths are 8bit, 16bit, 24bit and 32bit. If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetSampleRate</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td valign="top"><font face="Verdana" size="-2">Returns the sample rate of the audio data contained in the specified file. Although MiniAiff reads all sample rates, the files written will all be 44.1kHz at the moment. If your original sound file wasn&#8217;t recorded at 44.1kHz, you will experience a change in pitch of your audio material when you copy the input to the output. If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffWriteAppData</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">void</font><font face="Verdana" size="-2"> *data, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numBytes);</font></td>
<td valign="top"><font face="Verdana" size="-2">Writes a chunk of data to an AIFF file&#8217;s application specific chunk (APPL). No byte reversing is carried out - this is rather experimental and should only be used if you know what you&#8217;re doing. It is great for saving settings or other stuff to a file. An existing file with the same name will be overwritten.Only one chunk of appspecific data per file is supported - each call to this function initializes the file.Any data previously contained in that file may be lost - so you are advised to call this function BEFORE you add audio data to the file if you wish to add both audio and app specific data. If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffReadAppData</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename, </font><font color="#003399" face="Verdana" size="-2">void</font><font face="Verdana" size="-2"> *data, </font><font color="#003399" face="Verdana" size="-2">unsigned long</font><font face="Verdana" size="-2"> start, </font><font color="#003399" face="Verdana" size="-2">long</font><font face="Verdana" size="-2"> numBytes);</font></td>
<td valign="top"><font face="Verdana" size="-2">Reads a chunk of data from an AIFF file&#8217;s application specific chunk (APPL). No byte reversing is carried out - this is rather experimental and should only be used if you know what you&#8217;re doing. It is great for loading settings or other stuff from a file. If it fails, it returns an error code.</font></td>
</tr>
<tr>
<td height="56" valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetLowKey</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetHighKey</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetRootKey</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetGain</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetDetune</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td height="56" valign="top"><font face="Verdana" size="-2">Return the specified information from an AIFF files&#8217; instrument chunk. If an error occurs, an error code is returned. If no instrument chunk is present, the functions return 0.</font></td>
</tr>
<tr>
<td valign="top"><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffPutFilename</strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);<br />
</font><font color="#003399" face="Verdana" size="-2">int</font><font face="Verdana" size="-2"> <strong>mAiffGetFilename </strong>(</font><font color="#003399" face="Verdana" size="-2">char</font><font face="Verdana" size="-2"> *filename);</font></td>
<td valign="top"><strong><font color="#ff0000">*** deprecated in version 2.0 ***</font></strong><font face="Verdana" size="-2"><strong> </strong>Brings up an &#8220;Open File&#8221; or &#8220;Save File&#8221; dialog that lets you choose an input and output file. If a file was chosen and no error occurred, the function returns with a result != 0 and the path (including the selected files&#8217; name) in &#8220;filename&#8221;. If the dialog was cancelled or an error occurred, it returns with 0 and an empty string (&#8221;") in &#8220;filename&#8221;.</font></td>
</tr>
<tr>
<td colspan="2" valign="top"><font face="Verdana" size="-2"></p>
<hr /> </font></td>
</tr>
<tr>
<td colspan="2" valign="top"><font face="Verdana" size="-2"><strong>Please note on file and path naming conventions: </strong>In the &#8220;traditional&#8221; MacOS, directories are separated by a colon (&#8221;:&#8221;), while on the PC they are separated by a backslash (&#8221;\&#8221;). So if your audio file is named &#8220;song.aif&#8221; and is located in the folder &#8220;my audio&#8221; on your harddisk &#8220;my harddisk&#8221;, the path on the MacOS reads: &#8220;my harddisk:my audio:song.aif&#8221;. On the PC assuming &#8220;C&#8221; ist your hard disk, this path would be &#8220;C:\my audio\song.aif&#8221;. Note that in Xcode in OS X path names use the UNIX-type forward slash, so in this case your path from the above example would be &#8220;/Volumes/my harddisk/my audio/song.aif&#8221; </font></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.dspdimension.com/admin/miniaiff/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
