How to get pulse output on zero crossing

So I am trying to recreate the distortion of a sega genesis and found a guide.

It relies on creating positive and negative pulses on the zero crossing of the input. If the input is going from positive to negative it outputs a positive pulse, negative to positive a negative pulse. These pulses are then put through a low pass filter to get a wave that is mixed with the input to get a distorted version.

How could I go about getting this pulse behavior? Thanks for any help you could provide.

1 Like

a comparator with zero threshold? but that will detect any crossing, without any notion of upward or downward direction…
hmm very interesting challenge! i’ll try to look for solutions this afternoon! also very intrigued by your sega genesis project as a whole!

OR: maybe i’m stupid, but why not having a comparator set at +1 and one set at -1, then you’ll have your result but shifted in time (or in phase, if you prefer). then we have to figure out a way to shift them :smiley: mmmmh gonna plot something on paper then try on the 301! food for thought!

So I have been really interested in fm synthesis lately and am about to receive a Digitone. I had a hard time choosing between the Digitone and the MegaFM, which uses 2 genesis chips. I ultimately chose the Digitone as it is more flexible, is multitimbral, and there were some downsides to the MegaFM, it is noisy in a characterful way, but I would prefer to be able to have that if I wanted but still be able to make clean sounds. Also this is my first and likely only for a long time polyphonic synth so I wanted versatility.

I find recreating the flaws in things to be interesting. There are characteristic sounds that are embedded in our minds, and so much has to do with the inadequacies of electronics.

1 Like

ok im cracking it using @Joe’s compare units, a sine, an inverted copy of the sine. i will assemble a very raw unit and upload it so you can pick up from it if you want!
UPDATE: problem now is: when i low pass filter it the results are VERY different from what you see in those diagrams… i will upload the unit as is without filtering and you see what you can squeeze out if it.
UPDATE 2: i think i got it :smiley:

here it is.
you have top level tune and sine level control (so you can attenuate it the way you want).
diving in you’ll find the lowpass filter after the positive-negative pulse combo and you can try tweaking it for better results.
i don’t think the filter cutoff must track oscillator 1v/oct input so i did not assign it to the tune control, but you can try that as well.
sega osc.unit (23.7 KB)
you need Accents
let me know if this helps @warpigs330

edit: mmmh maybe i was wrong and in fact filter keytracking is needed. if not on high notes you have the pulse out pretty much disappear…
in both cases i’m experiencing huge differences in level on different octaves\registers… that might be a problem.
anyway, try with both key tracking on and off and see what works best. maybe attenuated keytracking? mmmmmh…

Interesting. thanks a ton, Ill play with in a bit. I have been really interested in wave shaping, distortion, and things like that lately. If you have any tips when it comes to sort of aliasing type tones or other digital distortion they would be greatly appreciated.

1 Like

yes, im interested in that as well, i also miss a lot my Tyme Sefari because of the infinite modes of destroying audio via realtime sample rate reduction, bitcrushing, changing format on the fly…
i want to experiment with two very high frequency sine osc and beatings (pretty much like the theremin) and see if we can get interesting aliasing effects but i don’t know yet if there are hard coded limits as to how high an osc freq can go.

back to your sega implementation, i think the filter tracking is necessary but the biggest problem i’m encountering is levelling the amplitude of the pulse signal. at low frequencies is pretty low, but gets higher and higher as we climb the octaves. i’m trying with keytracking VCA’s but i’m not cracking it, i can never get the proper settings. even tried tu assign the square of the tuning control to level with negative gain but no luck…pretty frustrating.

here the latest version:
sega osc.unit (23.7 KB)

1 Like

Don’t forget that any gate control can be configured to ‘trigger on rise’ or ‘trigger on fall’.


true that, but i think Joe’s comparator has the edit controls for the gate input disabled, probably because of the fact he already put triggering options on top level…

Do I need to do something here? I don’t remember specifically disabling (or enabling) anything. Although I think I might have put that unit together before Edit Controls was a thing?

1 Like

ah yes this is probably the reason :slight_smile:
well, if you have time to check it and see that’s an easy update, it might come useful to have the whole “trigger on rise\trigger on fall\gate\toggle” choice as in the common gate controls!
in this case i solved it using a copy of the sine output and a -1 vca to invert phase.

1 Like

Snowboard youre saying is we dont ned anything, its all in the gate control​:thinking::thinking:

Maybe I am getting something wrong but how is it different from mixing a sine wave with a synced square wave when one does not use the actual Yamaha chip?

well, the shape doesn’t look at all like a regular filtered square wave, and i managed to get very close to the shape in the diagrams @warpigs330 provided