Square to Sine ideas?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I'm glad to hear you are back to looking at the MAX7400 chip.
I should mention that EPROMS, counters and other support chips are overkill.

A cheap and fast modern microprocessor, 8 bit or 16 bit, can easily generate MULTIPLE clocks and "tone" squarewaves that the 7400's require.

Just a rough guess, I'd say one microprocessor can generate 4 or more pairs of clocks and "tone" squarewaves on the output pins.

The processor is much more flexible than hardware and you could generate special effects through the programming of the micro.

Now that I think of it, cutting the signal to the input of the MAX7400, will cause this type of 8th order filter to "ring". You can get an automatic decay of the tone. I'm not sure how practical this is however.

Now the bad news. The MAX7400s are a bit expensive and distributors are often out of stock.

In any case, I'll be following this thread to see what you come up with.

Very interesting project.
 
[quote author="stickjam"](sorry about the blank reply - writing a new one now....)[/quote]
I'm looking pretty hard at the MAX7426. The price seems reasonable given the quantity I'd be using (nearly 100). I am considering the use of hand-selected and probably combined caps to set the cutoff frequency of each filter instead of clocking them externally. Otherwise I'll need to come up with hardware or software to generate 182 simultaneous signals! :shock:

Here's why...

The essence of what I'm doing is creating a modern hardware replica of an antique mechanical device that has 91 outputs, each of which present a continuous sine wave of constant frequency and amplitude. The original design of that box certainly has many compromises as far as intonation goes, but that intonation is what gives the original Hammond its character that is lacking from more "correctly tempered" clones.

The instrument I am upgrading has a smaller version of this, comprised of a master 1Mhz clock driving a pair of "top octave generator" chips that produce very high pitched 12 equal-tempered tones, output as pulse waves. Each of those pulse waves go into a chain of six binary counters to produce 72 square waves representing six octaves of the scale. Those square waves go into simple RCRC filters which produce the outputs.

That existing circuit has the following problems that hamper the authenticity of the sound that this organ is trying to imitate...
- There aren't enough harmonics (72 instead of 91)
- The intonation is not the same as is provided by the gear ratios of the original mechanics.
- The preponderance of odd harmonics in the "sine-ish waves" that result from the simple filtering of square waves
- The current circuit depends on old MOS chips made out of "Unobtainium" that use two strange negative supply rails.
The result is rather thin sounding and full of out-of-character harmonics when you play certain combinations of notes.

The ideal device I'd like to create would be likewise generated from a single master clock feeding into some type of improved circuit to generate the 12 top octave frequencies. Those would feed into chains of seven standard CMOS divide-by-2 stages to create 84 continuous square waves that go into 84 filters to generate sine waves. But wait, didn't I say 91?

It turns out that the topmost 7 harmonics would have theoretically needed tonewheels that had 256 teeth, which weren't possible to produce in the 1930's, so instead they used wheels with 192 teeth running at a different ratio. To get those frequencies, some sort of "divide-by-1-1/3" off of 7 of the top-octave frequencies would be needed.

I'm still working on various options for the top-octave generator. The gear ratios that I need to duplicate can be found here: http://www.dairiki.org/HammondWiki/GearRatio I'm considering a microprocessor solution for that part - any suggestions are welcome.

Yes, I know I'm crazy. Aren't we all? :wink:

-Bob
 
You are really into this!
OK.
Great minds think alike :roll:
We both just got the bright idea that the 7400's don't really need a clock.
The internal oscillator can be used by putting a cheap variable cap on the osc pin.

You just need to provide the correct squarewave inputs.
To make things interesting, you can add "color" to each note.
These are, after all, low pass filters.

Here is an example:
1kHz squarewave in, cap adjusted to give an internal clock of 100 kHz.
You get a 1 kHz sine wave out.
If you move the internal oscillator up from 100 kHz you begin to see the sine wave start to distort or "square up", adding "color" to the note.

My understanding is that the original organ cut the tone wheel pedal notes
differently to intentionally add harmonics.

You may need a different trick to do that.

Just some random thoughts that popped into my head.

anyway, best of luck with this interesting project.
 
[quote author="zapnspark"]
If you move the internal oscillator up from 100 kHz you begin to see the sine wave start to distort or "square up", adding "color" to the note.

My understanding is that the original organ cut the tone wheel pedal notes
differently to intentionally add harmonics.

You may need a different trick to do that.

Just some random thoughts that popped into my head.

anyway, best of luck with this interesting project.[/quote]

Thanks. :sam: I'm on track with you there! :thumb: I'm hoping the design plays in my favor there since those bottom 12 "complex tonewheels" produce additional odd harmonics--mostly the 3rd and 5th. The pedals on the X5 actually sound good--I might just leave those as simple RCRC filters.

If there's interest, I'll pull out the digital camera and post some "organ porn" before I start tearing into it. It's certainly colorful in there and there's a whole lot of wire!
 
Putting a top-octave chip in a box marked "Hammond" is like putting frets on a violin. It is just wrong.

It becomes a machine, not a musical instrument.

Even with frets, a guitar (fretted large pizzicato violin) never has all notes or all harmonics in perfect tune. Guitarists also have string bending, but you don't.

After you improve the filtering and the harmonic structure, you will also need to add wow-and-flutter to the TO chip. (That slight vibrato is part of why some intervals are tolerable on Hammond which reek on pipe organ.)

And from what you say, you want two TO chips to get the floating un-locked top register.

It may really be as much work as sitting down with 88 can-tops, a nail, and a file.
 
[quote author="PRR"]Putting a top-octave chip in a box marked "Hammond" is like putting frets on a violin. It is just wrong.

It becomes a machine, not a musical instrument.

Even with frets, a guitar (fretted large pizzicato violin) never has all notes or all harmonics in perfect tune. Guitarists also have string bending, but you don't.

After you improve the filtering and the harmonic structure, you will also need to add wow-and-flutter to the TO chip. (That slight vibrato is part of why some intervals are tolerable on Hammond which reek on pipe organ.)

And from what you say, you want two TO chips to get the floating un-locked top register.

It may really be as much work as sitting down with 88 can-tops, a nail, and a file.[/quote]
LOL! Exactly! That's why I considered shoehorning a real tonewheel generator in the box--unfortunately, I'd have to reduce it to a single manual organ to make space for one. I'll probably use a varactor in the master clock to inject a bit of wow and flutter.

Getting rid of those TO chips that are in there and replacing them with something that more exactly duplicates the original gear ratios is a major goal for me.

That means I need to figure out how to multiply the frequency of a signal by 85/104, 71/82, 67/73, 105/108, 103/100, 84/77, 98/80, 96/74, 88/64, 67/46, and 108/70. :? Almost makes me wonder if I'm better off with 12 separate oscillators, but I'm thinking there's got to be a better way.
 
It seems to me you are coming to 91 sine wave generators phase locked to a digital frequency divider... :cool:
 
[quote author="stickjam"]
That means I need to figure out how to multiply the frequency of a signal by 85/104, 71/82, 67/73, 105/108, 103/100, 84/77, 98/80, 96/74, 88/64, 67/46, and 108/70. :? Almost makes me wonder if I'm better off with 12 separate oscillators, but I'm thinking there's got to be a better way.[/quote]

If that remains the goal (to use only one reference oscillator) there are straightforward techniques out there for fractional n/m synthesis using phase-locked loops. Essentially, you divide the reference oscillator with one digital programmable counter and the VCO with another, and feed the counter outputs to the phase detector. Your desired output signal appears on the VCO output. Devil's in the details, as usual.

EDIT: The Wiki page is not too bad: see the paragraph "Feedback path and optional divider" in particular: http://en.wikipedia.org/wiki/Phase-locked_loop

EDIT 2: this subject gives an excuse to plug a book I'm reading and loving: "How Equal Temperament Ruined Harmony (and Why You Should Care)" by Ross Duffin, ISBN 0393062279.
 
[quote author="Wavebourn"]It seems to me you are coming to 91 sine wave generators phase locked to a digital frequency divider... :cool:[/quote]

...running of an intentionally slightly unstable clock. Pretty much.

This and bcarso's post have really gotten me thinking maybe I should take some more time thinking about the application of PLLs in this. After all, the AC synchronous motor and flywheels that drove the old mechanical tone generator was itself phase-locked to the AC power line frequency. (There was mention earlier in this thread about the time it would take a PLL to settle in at low frequencies--that was certainly the case with the old Hammonds any time they took a brief power blackout--the sound was very interesting and used by more than one artist--Tony Banks for one (Stagnation off the Genesis' Trespass album))

Unfortunately, I have not come across an explanation for PLL design I've been able to understand and/or apply in the audio frequency domain. Most writings about PLLs I can find are oriented to cell phones and spread-spectrum wireless communication. :? As you said, bcarso, the devil is in the details. With PLLs it's the details that devil me.

Specifically, what PLL chip, schematic and passive component values would I need to derive these frequencies from a single master clock of what frequency?



Anyone with PLL chops care to take a stab at it? I'll prototype it! (You can click on the image above to download a CSV file of the data)
 
Epiphany! :idea: :!: :cool:

I did some digging and after all these decades PLL frequency synthesizers finally make sense to me. Looks like I can get within +/-0.0085% of the frequencies of the original tonewheel generator! :thumb:

Back to the drawing board... :sam:
--Bob
 
[quote author="bcarso"][quote author="Wavebourn"] ...(or a MOSFET inverter like bcarso suggests)....[/quote]
I suggested?[/quote]

Oops... Sorry, it was Adam's posting:

[quote author="adamasd"] I think the 4049 Hex inverter made may favorite oscillators for the top octave, do not recall why though.
[/quote]

One inverter for the integrator, 2 for comparator with hysteresis loop, and one more for a triangle to sine converter. For VCO a photo resistor in the integrator may be used.
 
> "How Equal Temperament Ruined Harmony (and Why You Should Care)"

It seemed like a good idea at the time. Ever tune a baroque pianoforte? (We won't even think about pipe organ tuning.)

> you are coming to 91 ....generators...

OK, think about pipe organ tuning. Hundreds of individual tone generators. No way to lock the fundamentals together (even if you have a theory of how to map infinite intervals onto a finite instrument). Plus none of the harmonics are exact intervals from the fundamental. And their overtone stretch changes as the wind comes up and fades away.

And you don't buy organ pipes as $0.39 CMOS chips. You at least have to hammer old lead pots into sheets, roll and fold and crimp. Good pipes use magic alloys. Other pipes use selected wood. True, you may be able to bend an overtone with a dent in the pipe instead of changing discrete capacitors, but knowing where to put the dent is the hard part.

And then there is the keyboard matrix. By 1900 it looked like a pre-EES telephone exchange. Before that it was a wooden puzzle.

Find a surplus market-dump of those refrigerator magnets which record voice memos. Wire the play buttons to your keyboard and call it Mellotron.
 
Have you checked out Allen Organ?

http://www.allenorgan.com/

They did a digi organ 30 years ago, still going strong...

"The artistry of Allen's pipe organ sound is founded on the science of digital technology. As the inventor of the digital organ, Allen has unparalleled experience in the two key areas of this computer-based technology - sampling and voicing. Authentic pipe organ sound is created by digitally recording "samples" of individual pipes from actual pipe organs, with the same exacting methods used to record CDs. These digital samples are stored in the computer memory of the digital organ. Because of the large amount of memory incorporated in our organs, we store more sound information, and can retain even the most subtle nuances of the original pipe sounds. While Allen's proprietary technology allows us to achieve an unprecedented purity of sound, the expertise of our sampling specialists ensures that precisely the right individual pipe organ sounds are chosen for recording. Carefully selecting the individual sounds for their complementary qualities guarantees that the many individual pipe sounds will perform together flawlessly. Should you require new or different sounds for your Allen organ, the Dynamic Memory technology available in many of our models allows us to change your organ's stored samples quickly and easily, on-site at your location.

Allen truly sets the standard for authentic pipe organ sound. Our unmatched ability to create the feel and response of the best mechanical pipe organs brings the majesty of traditional sound to your worship, while the flexibility we engineer into every Allen organ guarantees you an instrument to meet your needs well into the 21st century.
 
Somebody already has elluded to this....

You could use capacitors with constant current, as ramp generators, ramping up and down via a comparator charging and discharging them (triangle wave generation) and throw that into some diodes to soft clip them into a sine wave.

It's how old wavetek function generators do it at least.
 
[quote author="dshay"]Somebody already has elluded to this....

You could use capacitors with constant current, as ramp generators, ramping up and down via a comparator charging and discharging them (triangle wave generation) and throw that into some diodes to soft clip them into a sine wave.

It's how old wavetek function generators do it at least.[/quote]

Is that what this existing circuit in the Hammond X-5 is trying to accomplish? http://home.comcast.net/~stickjam/X-5_018.jpg Zoom in to the upper right quadrant of the image and observe the uppermost "C Note" filters. The buss the diodes connect to are common to all notes and is AC-coupled to ground through a 100uF 'lytic (on the next page of the schemo, not shown)

Unfortunately, it's not producing a very good sine. The rising portion of the wave is pretty good. However, as it comes down from the peak, there's a kink in the curve and the wave falls faster until it hits a reverse kink at the valley where it smooths back into a sine shape.

Last night I patched into my DAW the output from one of those MAX lowpass chip samples that was being fed a square wave from one of the X5's divider chips. I ran an spectral plot on it--just one peak sitting above a -45dB noise floor*. Can't get much more sine-y-er than that.

Although those MAX chips seem like a "magic bullet," if anyone has an idea how those existing filters in the schematic above can be improved passively, that would surely save a bunch of silicon, cash and time.

--Bob

*Ironically, for a Hammond tone generator -45dB is too good. :roll: I'm already planning to throw a high-value resistor on every generator output with the other end bussed together to a pot to ground to provide variable amounts of generator leakage -- another "Hammond Sound" characteristic that provides a "breath" to the sound similar to what harp vibrations do on a piano.
 
First, I gotta apologise, I'm just beginning, so we'll quickly get over my head. It just so happens that my first year instructor had me pouring over our old junk function generators for fun because I'm bored in DC class.

But the triangle to sine wave generators I've seen use four diodes, similar to whats in the upper right hand corner of this schematic...

http://www.paia.com/KRUKits/K23/K23.pdf

I think they'll spread out the breaking points giving you a rounder sine.

Otherwise, if you're starting off with a squarewave, maybe filter out the harmonics with a LPF so you only got one tone?

Just some ideas.
 
Go take a look at the Maxim MAX274 and MAX275. They contain multiple 2nd-order active filters which can be cascaded. The poles are programmed with external resistors. We use the MAX275 in one of our industrial sensors. They cost about $5.00 each but they would give you a low parts count. Linear Technology makes a bunch of similar parts. Contact them and ask for applications help from your local LTC rep. They're very good with applications help. DW.
 
Maxim has a whole bunch of active filter IC's. Go here -

http://para.maxim-ic.com/results.mvp?q=filt&an_1=Family&av_1=Active%20Filters

They range in price from under $2. each to $4. each and up. Many different filter topologies. DW.
 
Thanks. Yeah, I've been looking at those Maxim chips. The most intriguing are the clock-tunable ones, particularly to make the thing transposeable - by octaves.

--Bob
 

Latest posts

Back
Top