how to build a analog-style frequency divider

Jun 8, 2006 at 8:43pm

how to build a analog-style frequency divider

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.

#26345
Jun 8, 2006 at 9:53pm

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

pa

#78648
Jun 9, 2006 at 1:05am

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

#78649
Jun 9, 2006 at 4:07am

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

#78650
Jun 9, 2006 at 7:39am

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

#78651
Jun 9, 2006 at 8:30am

> 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;

#78652
Jun 9, 2006 at 4:37pm

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/

#78653
Jun 10, 2006 at 4:13am

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…

#78654
Jun 12, 2006 at 2:12pm

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.

#78655

You must be logged in to reply to this topic.