[solved] the [sin] operator in gen~ versus [cos~] in Max
Hi
I am using the following simple algorithm in gen~ to create a 'fat' unipolar Hanning window (for use in my granulator engine). I believe I stumbled upon this idea more by good luck than advanced trigonometry.
phasor~ --> [gen~ triangle --> sin]. This creates a broad sinewave window, of the same frequency and phase as the phasor. I can increase the width of the resultant window by inserting a scalar >1 between triangle and sin operators, and also change the shape of the window by altering the 'peak' value to triangle.
My question is why can I not achieve this in MSP? I phase-shifted the phasor ramp and then repeated the above algorithm but I just get a bipolar wave at twice the frequency. Does the sin operator in gen just return the sine value of its input or is it doing something else?
Brendan
(again, apologies for screenshot, but Max7 licence has expired)

In gen, sin and cos do not take 0-1 phase input like their MSP or PD counterparts. Instead they take normal mathematical input of the range 0-twopi.

Ah Joshua, many thanks!
ps
phasor --> expr~ abs($v1-0.5(*2) for the triangle 0-1;
then
expr~ ($v1*$f2) / (3.14156*2)
At the risk of pushing my luck, is it possible to manipulate the 'peak' value (a la [triangle~]) using this algorithm - I'm aiming for a vanilla PD version of my Max granulator and have no native [triangle~] object ;)
Many thanks
Brendan
Thanks buddy, but I can't Copy Compressed from clipboard - Max licence recently expired ;) I will get round to updating Max soon, just gotta find a feckin job first; been unemployed since January, job market is *slim pickins* - 2 Master's degrees, a PhD and a teaching diploma and I cannot even get *arrested* ffs :(
(I'm gonna get booted off the forum LOL, no Max licence and asking PD-centric questions)
Hey Brendan,
I didn't know how to contact you with a pm. So sorry to choose this way.
Is there any update of your 'granary~' patcher back from 2015?
I'm looking to replace my elasticx~ external from a very old patcher. Thanx so much.
My contact would be peerbaierlein at gmx dot de
I’ll email you later today.
Ps I haven’t used elasticx in years, or grainstretch, but these are two examples of externals that are way more developed than Granary. If you want to me to add specific functionality to Granary that you feel is missing, then please do shout and I will do my best to improve Granary 😉