Kyma Forum
  Kyma Sound Exchange
  Harmonics Generation

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Harmonics Generation
David McClain
Member
posted 03 May 2002 02:14         Edit/Delete Message   Reply w/Quote

harmonics_gen.kym

 
Attached is a sound that generates harmonics and adds them to a main stereo mix. Controls in the VCS set the amount of gain applied in a compressor with a 10 ms attack and a 1 ms delay (from the Kyma library), what dB level of harmonics to mix in with the main mix, and a high-pass filter tuning from 500 Hz to 6 KHz for controlling which components of the main mix get to generate harmonics.

I'm using a Sine wavetable to generate the harmonics. The attenuator between the compressor and the wavetable imposes a -6 dB gain with sign inversion so that only the middle half of the wavetable will be used no matter what, and it will be sign inverted so that when added back to the main mix it will constructively add. The main mix is delayed by the compressor delay so that time alignment is preserved.

This is pretty plain stuff for most Kyma users. But my question is the following:

1. I tried generating a lookup table that contains only the cubic and higher terms of the sine expansion so that this wavetable would generate ONLY harmonics. It did not sound as good to me... Why?

2. Using a sine function generates only odd harmonics - no even harmonics. Try flipping the radio button in the wavetables to utilize a polynomial with either even or odd or both, and tell me if you think it sounds better than a sine? I didn't think so, and it sounds in many respects similar to the sine minus the linear term.

Why should adding a little of the main mix back in along with harmonics sound better than just adding harmonics? (i.e., keeping the linear term in the sine) I'm adding back in at a level of -15 dB by default which is a small amount.

Secondly, I hear many people talk about the warmth of tube amplifiers and the "even harmonics" they generate. Same with magnetic tape recording. Yet looking at the plate characteristics of tubes and the B-H saturation curves of magnetic tape, I can't help but believe they meant to say "odd harmonics". Both of these curves exhibit similar qualities. A class-A amplifier will have odd symmetry just like a magnetic B-H curve -- just like the middle half of the sine wavetable curve (after sign inversion).

Finally, if mag tape and tube amps sound so good, why doesn't it sound good when we take only the output of the wavetable distorters, instead of mixing back in trace amounts with the original mix?

Anyone want to venture an opinion or two?

- DM

[OH! Sorry, my faulty memory... Class-A tube amps are not odd-symmetry. These are grid biased into the "linear" region of the plate characteristics. I was incorrectly thinking Class-B (well-tuned push-pull configuration). So a Class-A tube amp would be expected to have some even and odd harmonic distortion at high drive levels...

I don't know if a tape B-H curve would have both even and odd harmonics. A B-H curve has hysteresis and so it does not retrace the same odd-symmetry curve on the downswing as it followed on the upswing. I'd have to give this more thought. But around the origin there is odd symmetry so odd harmonics would be a dominant feature here.]

[This message has been edited by David McClain (edited 03 May 2002).]

IP: Logged

David McClain
Member
posted 03 May 2002 04:33         Edit/Delete Message   Reply w/Quote

tube_simulation.aif

 
Okay, here is a simple minded Class-A tube simulation wavetable. To use it just plug it into the distortion wavetables in the previous sound, and then remove the negating -6 dB attenuators ahead of the wavetables. This wavetable can handle the full input range.

I constructed it by requiring that the curve be defined by two parameters, A, and B, in the equation

Out = In + A * In^2 + B * In^3 when In > 0

and Out = In for In <= 0.

I also required that the slope at the origin be unity and that the slope at full input amplitude be zero, and everywhere in between the slope had to be positive. The result is that A = -1 and B = 1/3. So the equation of this wavetable is

Out = In - In^2 + In^3/3 for In > 0
Out = In for In <= 0.

This wavetable will produce 2nd and 3rd order harmonics. I have to say it sounds pretty good too -- about like the sinewave distortion.

So I come back to the same original question. This wavetable continues to pass along some of the original signal with the generated harmonics. I think the sound improvements I hear are significantly affected by adding back some of the original high-pass signal. But drum strikes do have noticeable energy at 3-6 KHz, from the added harmonics.

- DM

[Note: you can't get this curve by switching the wavetable Sounds over to polynomial form with coefficients 0 1 -1 {1/3}. This will generate the same curve only for positive input levels, but the negative levels will be affected by another curve and not the straight line provided by this AIF file.]

[Note Too: using this curve in the wavetable Sound will produce a DC offset in the output signal. You might want to follow those wavetables with another high-pass filter to remove that DC offset.]

[This message has been edited by David McClain (edited 03 May 2002).]

IP: Logged

SSC
Administrator
posted 03 May 2002 10:41         Edit/Delete Message   Reply w/Quote
My guess would be that by adding in the original signal to the distorted signal you could have the possibility of phase cancellation of the odd-harmonics, which may be similar to adding energy to some of the even harmonics.

IP: Logged

David McClain
Member
posted 04 May 2002 10:31         Edit/Delete Message   Reply w/Quote

harmonics_gen.kym


tube_simulation.aif


tube_simulation_distortion_only.aif

 
Oops! I see that I gave you all the wrong version of the distortion Sound. The -6 dB pad belongs in front of the wavetable in each leg. Here it is corrected, along with two additional versions. The two new versions incorporate the tube simulation, and the tube simulation harmonics alone.

When I listen to the tube harmonics alone, added to the main mix, I can barely hear any effect, all the way up to harmonic mix level 0 dB. Going higher, of course, adds plenty.

But I find this interesting... it appears that the "improvement" I detect with the other two harmonics generators has a lot to do with adding back in more of the original signal above the HF cutoff, e.g., 1.5 or 2 KHz. The harmonics themselves are virtually imperceptible at the mix back levels used, i.e., -24 to -15 dB. Hence I ought to hear the same basic improvement simply by EQ'ing a dB or two of this same HF band.

Now I thought long and hard about what SSC suggested. I know better now than to reply too quickly to suggestions made by these folks. I am still thinking about the possible cancellation of odd harmonics sounding like the addition of even harmonics. Could be...

But so far, I am inclined to believe that harmonics have little to do with anything in these particular sounds. So I'm still not sure why mag tape or Class-A tube amps sound "better" to some folks. I wonder if it also has to do with restricted bandwidth? That should make sound become "warmer" and less digitally "brittle".

Puzzled...

- DM

IP: Logged

capy66n320user
Member
posted 04 May 2002 16:42         Edit/Delete Message   Reply w/Quote
Hi David,

Perhaps the links listed below might help you. W.M. Leach had written a number of articles for Audio Magazine in the late '70's and early '80's explaining the effects of "Transient Intermodulation Distortion" and how it related to the fact that tube amplifiers sounded better than transistor amplifiers.
http://users.ece.gatech.edu/~mleach/
http://users.ece.gatech.edu/~mleach/lowtim/bckgrnd.html

IP: Logged

David McClain
Member
posted 04 May 2002 19:34         Edit/Delete Message   Reply w/Quote
Hey! Thanks!!!

- DM

IP: Logged

Graham Breed
Member
posted 12 May 2002 06:16         Edit/Delete Message   Reply w/Quote

guitar.kym

 
I wouldn't know a Class A tube amp if it came up and bit me on the nose. But I have been playing with distortion for my guitar effects. See the attached file or http://www.microtonal.co.uk/kyma/guitar.kym if it didn't come through right.

The main trick is to partly rectify the signal before the gain, so the positive and negative parts are amplified (and clipped) differently. This is what gives tubes their reported even harmonics and is close to what distortion pedals do with diodes. The asymmetry knob controls it. 0 is normal clipping, 0.5 is a half wave rectification.

It certainly does give a warmer sound to my ears, and more so than David's examples. I'm not restricting the bandwidth at all. It's not so much that even harmonics sound better than odd ones, but straight clipping gives you only odd harmonics and mixing in some even ones improves the sound. This only works for a sinewave input anyway, but is a good rule of thumb for harmonic sounds.

I've also got an arctan waveshaper in there to round off the clipping. That isn't so important. It's the "smoothing" knob.

I couldn't get polynomial waveshapers to do the right thing. Now we have these IOC things I might be able to use one of them. Putting EQ before and after the distortion lets you control what frequencies get distorted.


IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c