<div dir="ltr">well, let me tell you how I did it, I can send some of my last work, but, as usual, needs some cleaning up and documenting.<div><br></div><div>But basically I&#39;m using [sigmund~], then getting &quot;tracks&quot; output to use all the partial information to feed an oscillator bank for resynthesis. This is pretty much what you can call a phase vocoder, hence you can tweak with it and mess around with partials.</div>
<div><br></div><div>I also have a patch where you can control the partials individually and very arbitrarily.</div><div><br></div><div>So, for spectral mapping, what I do is I try to map all the harmonic relationship from partials and &quot;detune&quot; them according to a different &quot;harmonic series&quot;.</div>
<div><br></div><div>It&#39;s a lot of work getting all of the data mapped and in order, then apply the math and stuff. It&#39;s also tricky because you need the right tuning of [sigmund~] to get better results according to the kind of musical audio signal that is coming through...</div>
<div><br></div><div>Anyway, anyone got a better idea than that?</div><div><br></div><div>I think that if you use FFT you will go crazy trying yo get this right, and I assume that [sigmund~] does work in the best way for this and it is based on FFT anywy (Am I right?).</div>
<div><br></div><div>Cheers</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/26 peiman khosravi <span dir="ltr">&lt;<a href="mailto:peimankhosravi@gmail.com" target="_blank">peimankhosravi@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Yes, your description of warp is correct. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Partial detection is more tricky because often the energy in 4 or more FFT bins amounts to one partial. So firstly, you need to derive the partials from the FFT data, then you need to quantise the partials&#39; frequencies.</div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">One possible cheat would be to trace the loudest FFT-bins and then transfer their energy to the bins whose frequencies are nearest to the harmonics of a given fundamental. </div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If I&#39;m not mistaken, at a sampling rate of 44100 and an FFT size of 4096, the frequency of bin 10 would be calculated as (44100/4096)*10=107.66. Just note that only FFT-size/2+1 bins are usable. That&#39;s the Nyquist frequency (half of the sampling frequency). If you take 107.66 as your fundamental (and zero all the bins below that) then you can do the following:</div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">For each analysis window...</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">

1- Detect the next FFT bin whose magnitude is above a certain threshold</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">2- Transfer the frequency and amplitude content of this bin to the nearest harmonic of the fundamental. So for input bin 15 (and a fundamental frequency of 107.66) this would be bin 20. The bin number to frequency mapping is linear so it&#39;s easy to calculate.      </div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Even, using fiddle~, you can get the fundamental frequency from the input and have it change dynamically from window to window. </div>

<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">You&#39;re likely to get some bubbly artefacts thought, but once you have a basic working patch you should be able to fine tune it. So you may want to group the bins so that you transfer not just the energy in one bin but also the bins around it. You might also want to do some averaging of the amplitude of 6 windows or so to avoid rapidly changing values, before you pass the signal into a threshold detector. I can do this in Csound but I&#39;m not that familiar with how FFT works in PD and I don&#39;t have a patch that does this. If I get the time I might make one next weekend though and post it here. </div>
<span class="HOEnZb"><font color="#888888">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">P    </div></font></span></div><div class="gmail_extra"><div class="im">
<br clear="all"><div>
<div dir="ltr"><div><br></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="comic sans ms, sans-serif"><b><a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> || <a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">RSS Feed</a> || <a href="http://spectralkimia.wordpress.com/" target="_blank">Concert News</a></b></font></div>

</div></div>
<br><br></div><div><div class="h5"><div class="gmail_quote">On 26 November 2013 11:48, Eran Sachs <span dir="ltr">&lt;<a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div dir="ltr">Peiman, <div>It works great! I&#39;ve been messing various sounds all day now, plus there&#39;s a thing in my computer with Barry Vercoe&#39;s name on it which I find oddly elevating.</div><div>However, if I understand the wrap function correctly, it substitutes bin values for values of other bins through whatever function you apply. But the bins are still all derived from the FFT procedure. <span style="font-size:12pt">Or am I missing something there?</span></div>

<div><br></div><div>What I would like to do is to move from bins to partials, so that they are essentially mapped to harmonic overtones of a given fundamental according to nearest match. Like a clever phase-vocoder Autotune of some kind. </div>

<div><br></div><div>Is there a way to do that, to the best of anyone&#39;s knowledge? <br><br>Much obliged,</div><div>E.<br><div><hr>Date: Mon, 25 Nov 2013 15:12:50 +0000<div><div><br>Subject: Re: [PD] spectral mapping, anyone?<br>

From: <a href="mailto:peimankhosravi@gmail.com" target="_blank">peimankhosravi@gmail.com</a><br>To: <a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a><br>CC: <a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>; <a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a>; <a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a><br>

<br><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">yes csound6 should work on windows too as far as I know.</div></div><div><br clear="all"><div><div dir="ltr"><div>
<br></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="comic sans ms, sans-serif"><b><a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> || <a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">RSS Feed</a> || <a href="http://spectralkimia.wordpress.com/" target="_blank">Concert News</a></b></font></div>


</div></div>
<br><br><div>On 24 November 2013 22:06, Eran Sachs <span dir="ltr">&lt;<a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a>&gt;</span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">





<div><div dir="ltr">Thanks Peiman.<div>Alas, I&#39;m living the life of a PC/Windows user. AFAICT, no csound6? </div><div>Z<br><br><div><hr>Date: Sun, 24 Nov 2013 20:27:39 +0000<div><br>Subject: Re: [PD] spectral mapping, anyone?<br>


</div>From: <a href="mailto:peimankhosravi@gmail.com" target="_blank">peimankhosravi@gmail.com</a><br>To: <a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a><br>CC: <a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>; <a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a>; <a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a><div>


<div><br><br><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">With spectral warping you can do any frequency-based manipulation, depending on the transfer function. I have one for pd but it requires Csound to be installed and a couple of other externals. See attached. On an intel mac and with pd vanilla 4.5.3/4 this should just work out of the box as long as you have csound 6 installed.  </div>



<div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">P</div><div style="font-family:arial,helvetica,sans-serif">
<br></div><div style="font-family:arial,helvetica,sans-serif"><br></div></div><div><br clear="all"><div><div dir="ltr"><div><br></div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="comic sans ms, sans-serif"><b><a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> || <a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">RSS Feed</a> || <a href="http://spectralkimia.wordpress.com/" target="_blank">Concert News</a></b></font></div>



</div></div>
<br><br><div>On 24 November 2013 20:12, Eran Sachs <span dir="ltr">&lt;<a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a>&gt;</span> wrote:<br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">






<div><div dir="ltr">oops, I messed up the names. sorry. Once more, with feeling:<div><br><div><span style="font-family:Calibri;font-size:12pt">Josep</span>,<div><div>Making harmonic sounds sound inharmonic can be down with spectral shifting. Try looking at Hilbert~ or at spec2_shift~ on extended.<br>



<br></div></div><div>But Alexandre, I&#39;d also would be interested in stuff that can manipulate the spectrum.  </div><div>I also made a little graphic control to all the cross-synthesis objects in FFTease. if anyone is interested I can post.</div>



<div><div><br></div><div><span style="font-size:12pt">A few years ago I tried to replicate the technique that Trevor Wishart refers to as &quot;Spectral Focusing&quot;, namely - one that moves the other way - from inharmonic to harmonic sonds, by moving from bins to partials (a little like FFTease&#39;s pvtune~, but moving bins to nearest matching </span>partial<span style="font-size:12pt">).</span></div>



<div><span style="font-size:12pt"><br></span></div><div>I&#39;m still looking for such an object. Does anyone have any suggestions? </div><div><span style="font-size:12pt"><br></span></div><div>Zax.</div><br></div><div><div>



<hr>From: <a href="mailto:eransachs@hotmail.com" target="_blank">eransachs@hotmail.com</a><br>To: <a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>; <a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a><br>



Date: Sun, 24 Nov 2013 21:58:50 +0200</div><div><div><br>CC: <a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a><br>Subject: Re: [PD] spectral mapping, anyone?<br><br>


<div dir="ltr">Alexandre,<div>Making harmonic sounds sound inharmonic can be down with spectral shifting. Try looking at Hilbert~ or at spec2_shift~ on extended.<br><br></div><div>But Jaime, I&#39;d also would be interested in that. </div>



<div><span style="font-size:12pt">A few years ago I tried to replicate the technique that Trevor Wishart refers to as &quot;Spectral Focusing&quot;, namely - one that moves the other way - from inharmonic to harmonic sonds, by moving from bins to partials (a little like FFTease&#39;s pvtune~, but moving bins to nearest matching </span>partial<span style="font-size:12pt">).</span></div>



<div><span style="font-size:12pt"><br></span></div><div>I&#39;m still looking for such an object. Does anyone have any suggestions? </div><div><span style="font-size:12pt"><br></span></div><div>Zax.</div><div><br><div><br>



<div><div><hr>Date: Sun, 24 Nov 2013 01:05:29 -0200<br>From: <a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a><br>To: <a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a><br>



CC: <a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a><br>Subject: Re: [PD] spectral mapping, anyone?<br><br><div dir="ltr">Hi, I&#39;m Alexandre, I can send you stuff<div><br></div><div>cheers</div></div>



<div><br><br><div>2013/11/11 Jaime E Oliver <span dir="ltr">&lt;<a href="mailto:jaime.oliver2@gmail.com" target="_blank">jaime.oliver2@gmail.com</a>&gt;</span><br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">These are older, but I understand E. Lyon might re-release them?<div><br></div><div><a href="http://www.somasa.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/FFTease/" target="_blank">http://www.somasa.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/FFTease/</a></div>




<div><br></div><div>J<br><div><br></div><div><br></div><div><br><div><div><div><div>On Nov 11, 2013, at 7:23 AM, Jeppi Jeppi &lt;<a href="mailto:jeppiot@hotmail.com" target="_blank">jeppiot@hotmail.com</a>&gt; wrote:</div>




<br></div></div><blockquote><div style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">




<div><div><div dir="ltr">Hi,<div>just looking for some ready to be used spectral mapping effects implemented in pd, anything available?</div><div>Specifically, just a way to slightly remap harmonics to make pitched sounds inharmonic.</div>




<div>There is a paper by Alexandre <a href="http://www.uni-weimar.de/medien/wiki/images/Dissonance_Model_Toolbox_in_Pure_Data.pdf" style="font-size:12pt" target="_blank">http://www.uni-weimar.de/medien/wiki/images/Dissonance_Model_Toolbox_in_Pure_Data.pdf</a> but I couldn&#39;t find the link to the sources.</div>




<div><br></div><div><br></div><div>Many thanks in advance!</div><div>Josep m</div><div><br></div></div></div></div>_______________________________________________<br><a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a><span> </span>mailing list<br>




UNSUBSCRIBE and account-management -&gt;<span> </span><a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br></div></blockquote></div><br></div></div></div>




<br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a></div></div></div></div>                                               </div>
<br>_______________________________________________
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a></div></div></div></div></div>                                               </div></div>
<br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div></div></div></div></div>                                               </div></div>
</blockquote></div><br></div></div></div></div></div>                                               </div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>