electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
The not-so-Magnificent Seventh
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Tony Deff



Joined: May 25, 2008
Posts: 51
Location: Suffolk, UK

PostPosted: Wed Sep 07, 2011 2:23 pm    Post subject: The not-so-Magnificent Seventh
Subject description: Using a pseudo-square-wave of ratio 7:9 to promote the 8th harmonic in lieu of the 7th
Reply with quote  Mark this post and the followings unread

The "thickness" of a chord depends not only on how many extraneous notes are included, but also on the inter-action between each note and the harmonic spectrum of every other note. A chord that sounds acceptable when played with a flute-like voice can sound very "muddy" when voiced with more harmonically-complex ramps or square-waves. That's why orchestration / arranging is an art — a skilled arrangement (perhaps a record you've heard with an intriguing sound, or a film soundtrack that moulds so well to the visuals that it inspires you to buy the sheet-music), can be so disappointing as to sound totally "wrong" when simplified and transcribed for the turgid tones of a piano.

In the context of our somewhat artifical equal-temperament scale, some harmonics are considered discordant, primarily the 7th., 11th. & 13th.
This comment refers to 12-tone E.T. tuning: for other tuning systems, different harmonics will cause problems. The complex relationship between timbre and scale used has been studied by several researchers. There are many references on the web: you can listen to some sound examples at : http://sethares.engr.wisc.edu/xentone.html

How harmonics clash against their nearest equal-temperament note is shown (in cents) at
http://electro-music.com/forum/phpbb-files/harmonic_logs_781.pdf (page 4 of 4, centre table)

Clash Of The Sevenths

The 7th. harmonic pitches 31 cents short of a minor seventh (two octaves up). That's almost one-third of a semitone, far too small to be a harmonious interval but far too large to be a chorus effect. It can also have significant levels; up to 14% of fundamental level in basic unfiltered waveforms (more in an oboe — admittedly, not everyone’s favourite timbre).
[ By way of comparison, the 9th harmonic differs from a tempered ninth note (2 octaves up) by only 4 cents.]

To express this in beats: an A7 chord on bass A2 = 110 Hz. has its 7th. harmonic (770 Hz.) beating against G5 (784 Hz.) at 14 beats per second (7 beats per second if an octave lower).

It's not just major/minor 7th chords that are affected: chords with added 2nd or 6th or suspended 4th hide a minor seventh in disguise, whereas the 9th. chord contains two such intervals.

To minimise the headache-factor of your music (therefore this does not apply to Heavy-Metal Laughing ), ensure bass notes are relatively pure, being adequately-filtered, or containing octave-related even harmonics. (A rectified sine-wave will qualify!)

Division by 7

Another way is to filter-out a troublesome harmonic. If a frequency is divided by n, then that original frequency (and all of its harmonics) will be absent from the resulting output. In other words, if we generate any waveform by summing 6 sequential outputs from a 4022 (or 4017) configured as a divide-by-7, the result will contain no 7th. harmonic (nor 14th. etc.). It will, however, contain even harmonics, including the "user-friendly" 8th., which is often absent in other waveforms. The two examples shown in Graphs 1 & 2 both contain 6th and 8th harmonics, but no 7th.
(Sorry, I cannot control the display sequence of attachments).

This is not a practical solution in most cases, as the required oscillator frequency is 7/8 that which would otherwise be required. Another solution is to use a wave-form that is very low in 7th.

Wrecked Angular Waves (Laughing Rectangular Waves!)

A square-wave is a special case in that what harmonics it contains are all in-phase and decrease in amplitude in a regular 1/n manner. It is also the only "heavy" wave, which gets larger the more you filter-off the upper harmonics. Surprised Shocked

When the duty-cycle is varied slightly from 50% (i.e. square-wave), the level of fundamental hardly changes, whereas the higher harmonics change rapidly. The phase coherency is destroyed, and the regular tail-off in amplitude is lost, which allows for some interesting exploration of exotic tone-colour.

In Graph 3, harmonics up to 11th are shown, in inverse proportion and "squared" (multiplied by themselves so as to give an idea of their relative power). The x-axis is calibrated for a divide-by-16, with an output duty-cycle from 4/16 to 9/16. It shows how, for a square-wave (duty-cycle = 8/16), odd harmonics peak and even harmonics null. Symmetry occurs around 50%, such that 9/16 is equivalent to 7/16 (they are merely voltage or phase inversions).

What you might think of as a fairly insignificant drop of 6.25% from 50% duty-cycle (to 7/16, purple dotted vertical cursor) shows the even harmonics rising from zero to significant near-equitable levels. (The 2nd harmonic has much the same level that the 5th has in a square wave or staircase or ramp and, unusual in the generation of wave-forms, the 6th is stronger than the 5th.)

More importantly for this discussion, the jarring 7th (purple) and 11th harmonics are hammered into near-oblivion. So, not only is this a waveform of different tone-colour, but it contains significant "user-friendly" 4th & 8th (at peak level) harmonics and is suitable for complex chords.

How to generate a 7:9 Rectangular Wave

Generation of a 7/16 or 9/16 rectangular pulse is achieved by merging one clock-period with the square output of a divide-by-16. This cannot be done with diodes alone (as can some simpler ratios). There are many possible combinations of NAND or NOR gates, with or without diodes, that could implement this; Fig 4 shows 1 possibilty, which decodes any 4 consecutive outputs of an octave divider (e.g. 4040).

Having gates that decode every octave of a note is no general solution either. Fig. 5 shows a counter that generates the ratio 7:9 directly, and has an enable input for synchronous octave control. When the enable is open-circuit, the output is 4 octaves lower than the input (i.e. divided by 16). (Two 4-bit counters are required for this purpose because you cannot achieve 9 low or high time-slots from the most-significant bit of 4-bit binary code.)

This circuit can easily be modified for other mark-space ratios, e.g. 5/16. Simply cutting the track between pins 3 & 14 results in a ratio of 3:5 (x=6 on the graph) but note that this is an octave higher.


Fig 4_NAND decode.jpg
 Description:
Here is just one possibility to decode 4 consecutive outputs from an octave-divider into a 9:7 waveform.
 Filesize:  5.65 KB
 Viewed:  2105 Time(s)

Fig 4_NAND decode.jpg



Fig 5_ Layout.jpg
 Description:
A strip-board layout to generate a 7:9 mark-space waveform, very low in 7th harmonic, but with significant 2nd, 4th, 6th and 8th. The input is a clock 4 octaves higher than the desired output, which replaces a 16-segment stair-case
 Filesize:  213.09 KB
 Viewed:  2106 Time(s)

Fig 5_ Layout.jpg



7-Segment Waveforms.jpg
 Description:
Graphs 1 & 2: Graphic mathematical simulations, showing how omitting f7, f14, f21 & f28 generates 7-segment waveforms. This proves that dividing by n results in the elimination of the nth harmonic from the result.
 Filesize:  83.44 KB
 Viewed:  188 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

7-Segment Waveforms.jpg



Harmonics at 43.75%.jpg
 Description:
Graph 3: Fragment of a half-cycle of f1 (x=0 to x=16) as it (and f7) peak at duty-cycle of 50% (8/16).
f7 & f8 swap their max/min status at x=7/16
 Filesize:  228.33 KB
 Viewed:  200 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Harmonics at 43.75%.jpg


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use