Forums > MaxMSP

how to build a analog-style frequency divider

June 8, 2006 | 8:43 pm

I want to build an octave down effect in max msp, one which produces a pulse
wave for every 4 zero-crossings. (omitting DC) any audio wave will cross
zero two times, so in two periods it crosses 4 times. So the problem boils
down to counting zero crossings at sample-perfect timing.

my guess is that it will have something to do with +=~ feeding sah~ or
count~ or something, but i can’t figure it out.

of course it’s fairly trivial to simply pitch down any input by half, there
are very many ways of doing it, but this particular way interests me b/c it
sounds ugly.


June 8, 2006 | 9:53 pm

This is how I achieved this… as dirty as possible!

pa


June 9, 2006 | 1:05 am

sweet. For some reason i thought that zerox~ output a float, but this is
awesome. ty :)


June 9, 2006 | 4:07 am

please don’t do that, it doesn’t get through to the forum.
can you post it as text?
thanks
isj


June 9, 2006 | 7:39 am

Isn’t there a PerColate object that does this ? Weave~ ?? Not as much fun as building your own, of course…
cheers
Roger


June 9, 2006 | 8:30 am

> i assume you attached to your e-mail?
> please don’t do that, it doesn’t get through to the forum.
> can you post it as text?

I did send a picture of the patch. Sorry, I tried to help ;-)

pa


max v2;
#N vpatcher 34 313 325 704;
#P toggle 91 17 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 33 252 45 196617 ctlin 7 1;
#P newex 91 39 39 196617 adc~ 1;
#P newex 80 252 79 196617 biquad~;
#P window setfont Helvetica 9.;
#P user filtergraph~ 23 53 64 32 21 9;
#X frgb 170 170 170;
#X brgb 210 210 210;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#X rgb6 122 74 74;
#X autoout 1;
#X scale 1;
#X logamp 1;
#X spectrum 0;
#X fullspect 0;
#X domain 20 22050;
#X range 0.0625 16.;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 50. 500. 5000.;
#X mode 1;
#X gainmode 0;
#X displaydot 0;
#X params 72.316696 1. 0.784078;
#X fconstrain 30. 19845.;
#X aconstrain 0.0625 16.;
#X qconstrain 0.5 25.;
#X done;
#P window setfont "Sans Serif" 9.;
#P newex 90 95 79 196617 biquad~;
#P newex 80 225 51 196617 *~;
#P newex 121 180 49 196617 clip~ 1 2;
#P newex 221 179 42 196617 sig~ -1;
#P newex 171 179 35 196617 sig~ 1;
#P newex 121 202 110 196617 selector~ 2;
#P newex 121 158 60 196617 bitand~ 2 1;
#P newex 121 136 26 196617 +=~;
#P user gain~ 80 273 13 38 158 0 1.071519 7.94321 10.;
#P newex 80 343 30 196617 dac~;
#P newex 90 115 41 196617 zerox~;
#P fasten 13 0 9 0 96 90 85 90;
#P connect 9 0 12 0;
#P connect 12 0 2 0;
#P connect 14 0 2 0;
#P connect 2 0 1 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 15 0 13 0;
#P fasten 11 0 12 1 28 248 98 248;
#P connect 2 0 1 1;
#P fasten 11 0 10 1 28 88 108 88;
#P connect 0 1 3 0;
#P connect 3 0 4 0;
#P connect 4 0 8 0;
#P connect 8 0 5 0;
#P connect 5 0 9 1;
#P connect 6 0 5 1;
#P connect 7 0 5 2;
#P pop;


June 9, 2006 | 4:37 pm

On 9-Jun-2006, at 10:30, Pierre Alexandre Tremblay wrote:
>> i assume you attached to your e-mail?
>> please don’t do that, it doesn’t get through to the forum.
>> can you post it as text?
>
> I did send a picture of the patch. Sorry, I tried to help ;-)

There are times when the image is actually quite helpful (for
instance, trying to demonstrate something that needs a variety of
3POs, or for simple patches where rebuilding is more informative than
mere Copy & Paste). But it is hard on the poor forum readers.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/


June 10, 2006 | 4:13 am

Quote: Peter Castine wrote on Fri, 09 June 2006 10:37
—————————————————-
> On 9-Jun-2006, at 10:30, Pierre Alexandre Tremblay wrote:
> >> i assume you attached to your e-mail?
> >> please don’t do that, it doesn’t get through to the forum.
> >> can you post it as text?
> >
> > I did send a picture of the patch. Sorry, I tried to help ;-)
>
> There are times when the image is actually quite helpful (for
> instance, trying to demonstrate something that needs a variety of
> 3POs, or for simple patches where rebuilding is more informative than
> mere Copy & Paste). But it is hard on the poor forum readers.
>
—————————————————-
i agree, they should allow it on the forum too. how about the archives? does it get through there?

anyway, thanks for the patch…


June 12, 2006 | 2:12 pm

small optimization: i think if you just subtract 1 from the bitand~ output
then you can skip the selector and get the same output with a few fewer
signals tied up. (it’d be phase inverted as compared with the selector
output)

but this totally sounds like teh shit. ty.


Viewing 9 posts - 1 through 9 (of 9 total)