DSPRelated.com
Forums

Power Chords

Started by Tim Wescott June 13, 2015
On Monday, June 15, 2015 at 8:04:47 AM UTC-4, Les Cargill wrote:
> rickman wrote: > > On 6/14/2015 7:38 PM, Eric Jacobsen wrote: > >> On Sun, 14 Jun 2015 17:54:57 -0500, Tim Wescott <tim@seemywebsite.com> > >> wrote: > >> > >>> On Sun, 14 Jun 2015 16:48:14 -0400, rickman wrote: > >>> > >>>> On 6/14/2015 4:34 PM, Tim Wescott wrote: > >>>>> On Sun, 14 Jun 2015 12:24:05 +0000, Bob Masta wrote: > >>>>> > >>>>>> On Sat, 13 Jun 2015 19:21:40 -0500, Tim Wescott > >>>>>> <seemywebsite@myfooter.really> wrote: > >>>>>> > >>>>>>> So, I'm trying to generate power chords in Scilab, and I'm just > >>>>>>> hearing ugly buzzing sounds. The closest I come to real power > >>>>>>> chords > >>>>>>> is if I allow things to distort heavily. > >>>>>>> > >>>>>>> f = 500; // Hz > >>>>>>> > >>>>>>> t = (0:22050)/22050; > >>>>>> > >>>>>> Dunno about Scilab, but is the above equivalent to 1/22050? If so, > >>>>>> then it seems like the general equation below should work. I'm > >>>>>> assuming that Scilab somehow knows that each y value is a separate > >>>>>> sample that is fed to an output stream. Also, you will need a long > >>>>>> stream, for the duration of the chord you want to hear, OR you will > >>>>>> need to loop it after one complete cycle (3 cycles of the > >>>>>> fundamental, > >>>>>> 2 cycles of the 5th). > >>>>>> > >>>>> In Scilab-ese (and Matlab-ese, for that matter), (0:22050) means a > >>>>> vector from 0 to 22050, stepping by one. So (0:22050)/22050 is 22051 > >>>>> samples from 0 to 1 in steps of 1/22050. playsnd plays a vector at a > >>>>> natural sampling rate of 22050, so the time vector is just one second > >>>>> worth of step times. > >>>> > >>>> What about amplitude? Someone asked if your sum might be overdriving > >>>> the output. Do you have any idea of the scale factor used by > >>>> playsnd(y)? > >>> > >>> It's linear for the range -1 to +1 (which is where I was -- sum of two > >>> sines times 1/2). Besides -- I played around with amplitude to make > >>> sure. > >>> > >> > >> A few things may be making it sound bad, and one might be the lack of > >> harmonics, which may be why it sounds a little better when overdriven. > >> > >> Another is what Steve Pope suggested a while back, which is to used a > >> tempered interval instead of the perfect interval, i.e., ~1.498 > >> instead of 1.5. Again, this will matter more with harmonics than > >> without. > > > > I thought the tempering worked because it brought some of the harmonics > > closer to the proper ratios. The music scale is based on the 12th root > > of 2 which gives good results for combinations of certain notes, but > > some of the harmonics don't align as well as we would like. Moving some > > of the notes of the scale a bit makes the harmonic alignment better. > > > > 1:1.5 is in perfect alignment. The first and fifth are in the ratio > > 1.33483985417 which is a bit off from 1.33_, so tempering helps. The > > seventh is at 1.498307076877 which is pretty durn close, but would be > > aligned in the other direction to reach 1.5. At 1.5 the third harmonic > > of the first is exactly the same as the second harmonic of the seventh. > > > > Am I remembering this wrong? > > > > > > No, you have it right. The "12th root of 2" scale is Equal Temperament. > There are other temperaments. They are all a compromise. > > -- > Les Cargill
There are many other factors at play. 1) If you look at the decay of a guitar string, you will see that the fundamental amplitude varies a lot and sometimes disappears completely. This is because the string has both transversal and longitudinal modes of vibration that are slightly different in frequency. This is why a good pitch detector is so hard to make. 2) You can't ignore the initial onset transients. If you were to record a power chord and make a loop out of just the middle part with no onset, and then start the volume from 0 and gradually increase it, you would probably not identify it as a power chord. 3) Acoustic feedback and string-to-string interactions. Carlos Santana would stand near his amp to get the sustain. And strings that are "almost" in a simple N/M relationship with their neighbors will interact and do all sorts of strange things (same with a piano). 4) Attitude. Have you tried smashing your computer against a wall? OK well that last one might not be based in pure science. but the point is that it's gloriously messy and non-linear and people who work in the music synthesis business spend years getting it right. You're unlikely to be able to do something convincing in a few days by adding some trig functions together in SciLab.Maybe a wavetable approach would be easier. Bob
On Sat, 13 Jun 2015 19:21:40 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:

>So, I'm trying to generate power chords in Scilab, and I'm just hearing >ugly buzzing sounds. The closest I come to real power chords is if I >allow things to distort heavily. > >f = 500; // Hz > >t = (0:22050)/22050; > >y = 0.5 * (sin(2 * %pi * f * t) + sin(2 * %pi * 1.5 * f * t)); > >playsnd(y); > >Clues for the clueless?
I'd back up a step and see if you can get a pure tone. "Ugly buzzing" isn't any issue with tuning, it's something to do with scaling or sampling issues. If your attempt at a pure tone sounds like a square wave, try scaling down the amplitude. If it never gets clean even at 1/2 or 1/4 of full-scale, then I'd wonder if there is a mismatch between the program and your sound card format. Could something have gotten left in an 8-bit mode (offset binary) instead of 16-bit (2s-complement)? That would sound like "ugly buzzing"! Best regards, Bob Masta DAQARTA v7.60 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE Signal Generator, DaqMusiq generator Science with your sound card!
On 6/15/15 8:04 AM, Les Cargill wrote:
> rickman wrote: >> On 6/14/2015 7:38 PM, Eric Jacobsen wrote: >>>
...
>>> >>> A few things may be making it sound bad, and one might be the lack of >>> harmonics, which may be why it sounds a little better when overdriven. >>> >>> Another is what Steve Pope suggested a while back, which is to used a >>> tempered interval instead of the perfect interval, i.e., ~1.498 >>> instead of 1.5. Again, this will matter more with harmonics than >>> without.
i don't think the difference between 700 cents and 702 cents should make any audible difference. ones electric guitar won't be perfectly tuned anyway and, even if it was, the differing string tension as you slap your fingers down on the E and A strings (or A and D strings) will detune things from perfect (or possibly detune from imperfect to "perfect").
>> >> I thought the tempering worked because it brought some of the harmonics >> closer to the proper ratios. The music scale is based on the 12th root >> of 2 which gives good results for combinations of certain notes, but >> some of the harmonics don't align as well as we would like. Moving some >> of the notes of the scale a bit makes the harmonic alignment better. >> >> 1:1.5 is in perfect alignment. The first and fifth are in the ratio >> 1.33483985417 which is a bit off from 1.33_, so tempering helps. The >> seventh is at 1.498307076877 which is pretty durn close, but would be >> aligned in the other direction to reach 1.5. At 1.5 the third harmonic >> of the first is exactly the same as the second harmonic of the seventh. >> >> Am I remembering this wrong?
4/3 (which is approximately 498 cents) is a perfect fourth, not a perfect fifth (which is 3/2 or 702 cents, note 498+702 = 1200). a perfect fifth is one octave down from the 3rd harmonic. a minor seventh interval is 1000 cents and approximately a frequency ratio 7/4 and is two octaves down from the 7th harmonic. on pianos, they try to put the hammer at 1/7 of the string length so that there are no string modes with the 7th harmonic which some folks have felt is a little dissonant sounding (i think it's okay at low amplitudes). Tim, your two sine waves make for a perfect fifth, and power chords are often a tonic, fifth, and the next octave (like E, B, E) and maybe the major third above that (G#), all cranked up to arc-weld and whatever amp distortion applied to that. but i wouldn't call a pair of sine waves at the tonic and fifth a "power chord". it will sound like a pair of tones. an interval.
> No, you have it right. The "12th root of 2" scale is Equal Temperament. > There are other temperaments. They are all a compromise.
different things get compromizes. if you do not have discrete-tuning (like a fretless bass or a fiddle or many other stringed instruments without frets or a singing voice), you need not compromize on "perfect" or "just intonation" at all. if you have a good ear for pitch, you can play just intonation in any key. but for discrete-pitch instruments, there are compromizes all over the place. and don't think that it will be always be equal-tempered. i don't think that's what you'll get with horns and other instruments with air columns except if the musician bends pitch a little with their lips or reed. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 15/06/2015 01:11, Cedron wrote:

> > Did anybody do a search on "432 hz"? >
Hmm, I wonder why you ask that? Those doing such a search will probably not find my web page, the very bottom of which does discuss 432: http://people.bath.ac.uk/masrwd/solfeggio/planetsolfeggio.html :-) Richard Dobson
On Sat, 13 Jun 2015 19:21:40 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:

>So, I'm trying to generate power chords in Scilab, and I'm just hearing >ugly buzzing sounds. The closest I come to real power chords is if I >allow things to distort heavily. > >f = 500; // Hz > >t = (0:22050)/22050; > >y = 0.5 * (sin(2 * %pi * f * t) + sin(2 * %pi * 1.5 * f * t)); > >playsnd(y); > >Clues for the clueless?
Hi Tim, You're received some good advice about checking amplitudes to make sure that single tones are not being distorted. Bob M is correct:-- this has nothing to do with tuning. In fact, your ratio of 1.5 will work well. The ratio of 1.4983 comes from 2^(7/12). Equal tempering, where each consecutive semitone is 2^(1/12) times the previous, was invented as a compromise. The ear actually wants to hear integral ratios: 3/2 (a perfect 5th, which you used), 4/3, etc. But if you tune a piano to be perfectly in tune to those integral ratios in the key of C, you will be way out of tune when you change to another key. Equal tempering simply compromises by making all keys equally out of tune. A sharp ear will hear that, and you will notice more pronounced 'beat frequencies' which are the result of difference tones. But there's no other way (aside from adding a lot more keys to the piano keyboard :-) Anyway, you should be able to stay with 1.5 for now, and it will sound fine if everything else is addressed. As for 'power chords': A typical overdriven guitar amp comes from several stages of gradual overload. Distortion boxes attempt to model that with diodes, since their forward characteristic is roughly logarithmic. First get a pure sine to play back correctly. Then try this to get more graceful overload: Split the positive and negative halves of the signal. Send all positive values to a log(x) conversion (base does not matter, as you know. It's only an amplitude scaling factor). Since you can't take a (real domain) log of a negative number, you need to flip polarity of all the negative values. Then send them thru the log(x), then flip them back to negative. Then add the log'd positive and negative sides back together. If you test that with a pure sine, you should see a very recognizable sine output, but with both the positive and negative peaks rounded off gradually. You don't want to hard clip those peaks, cause that generates bad-sounding high order harmonics.
On Mon, 15 Jun 2015 14:39:30 -0400, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On 6/15/15 8:04 AM, Les Cargill wrote: >> rickman wrote: >>> On 6/14/2015 7:38 PM, Eric Jacobsen wrote:
>>>> A few things may be making it sound bad, and one might be the lack of >>>> harmonics, which may be why it sounds a little better when overdriven. >>>> >>>> Another is what Steve Pope suggested a while back, which is to used a >>>> tempered interval instead of the perfect interval, i.e., ~1.498 >>>> instead of 1.5. Again, this will matter more with harmonics than >>>> without. > >i don't think the difference between 700 cents and 702 cents should make >any audible difference. ones electric guitar won't be perfectly tuned >anyway and, even if it was, the differing string tension as you slap >your fingers down on the E and A strings (or A and D strings) will >detune things from perfect (or possibly detune from imperfect to "perfect"). > >>> >>> I thought the tempering worked because it brought some of the harmonics >>> closer to the proper ratios. The music scale is based on the 12th root >>> of 2 which gives good results for combinations of certain notes, but >>> some of the harmonics don't align as well as we would like. Moving some >>> of the notes of the scale a bit makes the harmonic alignment better. >>> >>> 1:1.5 is in perfect alignment. The first and fifth are in the ratio >>> 1.33483985417 which is a bit off from 1.33_, so tempering helps. The >>> seventh is at 1.498307076877 which is pretty durn close, but would be >>> aligned in the other direction to reach 1.5. At 1.5 the third harmonic >>> of the first is exactly the same as the second harmonic of the seventh. >>> >>> Am I remembering this wrong?
> 4/3 (which is approximately 498 cents) is a perfect fourth, not a >perfect fifth (which is 3/2 or 702 cents, note 498+702 = 1200). a >perfect fifth is one octave down from the 3rd harmonic.
Hi Robert, You must be a musician. Perhaps the other reply was considering the 'inversion' of the P5 interval. IOW, from A to E is a P5th, a 3/2 ratio: 440hz to 660hz. But going from that E to an octave of the A will be P4th -- 660hz to 880hz, a 4/3 ratio. 3/2 * 4/3 = 2:1 (octave). (I'm sure you knew this already--posted for the benefit of others curious about the theory side).
>a minor seventh interval is 1000 cents and approximately a frequency >ratio 7/4 and is two octaves down from the 7th harmonic. on pianos, >they try to put the hammer at 1/7 of the string length so that there are >no string modes with the 7th harmonic which some folks have felt is a >little dissonant sounding (i think it's okay at low amplitudes).
Yeah, the 7th harmonic is a flatted 7th interval (technically a "minor 7th" interval, but it's also a component of dominant chords as well as minor 7th chords). I believe Helmholtz and Seashore have both published 'dissonance charts' which were generated by sounding two tones at a variety of intervals, and asking listeners about their opinions of consonance and dissonance. The 'minor 7th' interval is on the more dissonant side. I think there's another component though. The computing engine of the brain needs to place incoming tones into a ratiometric relationship. I believe that other intervals in the mix help to achieve that. IOW, sounding just a root and minor 7th interval is fairly dissonant. But if you sound a root, minor 3rd, fith, and the m7, all stacked up, the ear is able to place that m7 in correct harmonic context. It becomes more consonant. Interesting thread here. I didn't know you had a musical background.
>On 15/06/2015 01:11, Cedron wrote: > >> >> Did anybody do a search on "432 hz"? >> > >Hmm, I wonder why you ask that? Those doing such a search will probably >not find my web page, the very bottom of which does discuss 432: > >http://people.bath.ac.uk/masrwd/solfeggio/planetsolfeggio.html > >:-) > >Richard Dobson
Nice article. You captured what I was alluding to: "This has inspired an even more strange conspiracy theory, that the modern tuning standard of A=440 is a malefic influence, subversively introduced as a way of suppressing the more "sacred" frequency 432 and thereby somehow "detuning" humanity (how those directing this avoid being affected as well is not documented)." The answer to your parenthetic comment is easy: Let others listen to 440 music and save the 432 for yourself. Interesting stuff. I'm not one to believe much in numerology, because as you mention in your article, our numbering base is somewhat arbitrary as are our units of measure. The food for thought comes in when one considers the relationship between Schumann resonant frequencies and brain wave patterns. The music frequencies being discussed are many octaves above those, so it is hard to think that resonance plays a large role, but there is room for the possibility that some frequencies are more "in tune" with our natural state than others. I am not saying I believe 432 is a case of this. I did not realize that a 432 A corresponds to a 256 C. Ced --------------------------------------- Posted through http://www.DSPRelated.com
On 6/15/2015 2:39 PM, robert bristow-johnson wrote:
> On 6/15/15 8:04 AM, Les Cargill wrote: >> rickman wrote: >>> On 6/14/2015 7:38 PM, Eric Jacobsen wrote: >>>> > .... >>>> >>>> A few things may be making it sound bad, and one might be the lack of >>>> harmonics, which may be why it sounds a little better when overdriven. >>>> >>>> Another is what Steve Pope suggested a while back, which is to used a >>>> tempered interval instead of the perfect interval, i.e., ~1.498 >>>> instead of 1.5. Again, this will matter more with harmonics than >>>> without. > > i don't think the difference between 700 cents and 702 cents should make > any audible difference. ones electric guitar won't be perfectly tuned > anyway and, even if it was, the differing string tension as you slap > your fingers down on the E and A strings (or A and D strings) will > detune things from perfect (or possibly detune from imperfect to > "perfect"). > >>> >>> I thought the tempering worked because it brought some of the harmonics >>> closer to the proper ratios. The music scale is based on the 12th root >>> of 2 which gives good results for combinations of certain notes, but >>> some of the harmonics don't align as well as we would like. Moving some >>> of the notes of the scale a bit makes the harmonic alignment better. >>> >>> 1:1.5 is in perfect alignment. The first and fifth are in the ratio >>> 1.33483985417 which is a bit off from 1.33_, so tempering helps. The >>> seventh is at 1.498307076877 which is pretty durn close, but would be >>> aligned in the other direction to reach 1.5. At 1.5 the third harmonic >>> of the first is exactly the same as the second harmonic of the seventh. >>> >>> Am I remembering this wrong? > > > 4/3 (which is approximately 498 cents) is a perfect fourth, not a > perfect fifth (which is 3/2 or 702 cents, note 498+702 = 1200). a > perfect fifth is one octave down from the 3rd harmonic.
I thought the naming was from the half steps. It starts on the first (the fundamental) and the next key is the second, the next is the third and so on. Each key is the twelfth root of 2 above the last. So the fifth would be 1.059463094359**5 = or 1.33483985417. The seventh would be 1.059463094359**7 or 1.498307076877. What do I have wrong here? Ah! I checked our old friend, the Internet, and found that they count the intervals on the diatonic scale, not the semitones. So a "fifth" is seven semitones. It's been a while since I looked at a music theory book. I wonder if music will ever go metric? Will that make a "fifth" into 750 ml? -- Rick
<rbj@audioimagination.com> wrote:

>>> On 6/14/2015 7:38 PM, Eric Jacobsen wrote:
>>>> Another is what Steve Pope suggested a while back, which is to used a >>>> tempered interval instead of the perfect interval, i.e., ~1.498 >>>> instead of 1.5. Again, this will matter more with harmonics than >>>> without.
>i don't think the difference between 700 cents and 702 cents should make >any audible difference. ones electric guitar won't be perfectly tuned >anyway and, even if it was, the differing string tension as you slap >your fingers down on the E and A strings (or A and D strings) will >detune things from perfect (or possibly detune from imperfect to "perfect").
An electric guitar will not be perfectly tuned, but a synthesizer might be. Suppose we start with 110 Hz (a guitar's low "A") as the fundamenal. Its 9th harmonic is at 990 Hz as is the sixth harmonic of (3/2) * 220 Hz. Whereas the sixth harmonic of 1.498 * 110 Hz is at 988.6 Hz. Thus the 9th harmonic of 220 Hz will beat against the 6th harmonic of 1.498 * 220 Hz to produce a component at 1.4 Hz, which might well contribute some desirable quality to a "power chord", such as a pulsating effect. If you use the exact harmonic ratio of 3/2, you will not get that. Steve
robert bristow-johnson wrote:
> On 6/15/15 8:04 AM, Les Cargill wrote: >> rickman wrote: >>> On 6/14/2015 7:38 PM, Eric Jacobsen wrote: >>>> > ... >>>> >>>> A few things may be making it sound bad, and one might be the lack of >>>> harmonics, which may be why it sounds a little better when overdriven. >>>> >>>> Another is what Steve Pope suggested a while back, which is to used a >>>> tempered interval instead of the perfect interval, i.e., ~1.498 >>>> instead of 1.5. Again, this will matter more with harmonics than >>>> without. > > i don't think the difference between 700 cents and 702 cents should make > any audible difference. ones electric guitar won't be perfectly tuned > anyway and, even if it was, the differing string tension as you slap > your fingers down on the E and A strings (or A and D strings) will > detune things from perfect (or possibly detune from imperfect to > "perfect"). > >>> >>> I thought the tempering worked because it brought some of the harmonics >>> closer to the proper ratios. The music scale is based on the 12th root >>> of 2 which gives good results for combinations of certain notes, but >>> some of the harmonics don't align as well as we would like. Moving some >>> of the notes of the scale a bit makes the harmonic alignment better. >>> >>> 1:1.5 is in perfect alignment. The first and fifth are in the ratio >>> 1.33483985417 which is a bit off from 1.33_, so tempering helps. The >>> seventh is at 1.498307076877 which is pretty durn close, but would be >>> aligned in the other direction to reach 1.5. At 1.5 the third harmonic >>> of the first is exactly the same as the second harmonic of the seventh. >>> >>> Am I remembering this wrong? > > > 4/3 (which is approximately 498 cents) is a perfect fourth, not a > perfect fifth (which is 3/2 or 702 cents, note 498+702 = 1200). a > perfect fifth is one octave down from the 3rd harmonic. > > a minor seventh interval is 1000 cents and approximately a frequency > ratio 7/4 and is two octaves down from the 7th harmonic. on pianos, > they try to put the hammer at 1/7 of the string length so that there are > no string modes with the 7th harmonic which some folks have felt is a > little dissonant sounding (i think it's okay at low amplitudes). > > Tim, your two sine waves make for a perfect fifth, and power chords are > often a tonic, fifth, and the next octave (like E, B, E) and maybe the > major third above that (G#), all cranked up to arc-weld and whatever amp > distortion applied to that. but i wouldn't call a pair of sine waves at > the tonic and fifth a "power chord". it will sound like a pair of > tones. an interval. >
I still like the organ pipe stop metaphor, because that's how you get an "oboe" or "bassoon" sound with a pipe or electronic organ ( ignoring tone wheel, ROMpler or synthesizers ) Those don't sound like a power chord at all. If you somehow mix A440 and E660 in equal amplitude, you get something that sounds like a bassoon. https://en.wikipedia.org/wiki/Organ_stop#Mutations
> >> No, you have it right. The "12th root of 2" scale is Equal Temperament. >> There are other temperaments. They are all a compromise. > > different things get compromizes. if you do not have discrete-tuning > (like a fretless bass or a fiddle or many other stringed instruments > without frets or a singing voice), you need not compromize on "perfect" > or "just intonation" at all.
You do to an extent unless you are guaranteed no wolf intervals at any given stop position. Pure Pythagorean temperaments are only useable in a key-relative manner - for diatonic 8 note scales, what constitutes , say, an F# depends completely on the tonic note. The F# in the key of D is a different pitch from the F# in the key of B, etc.
> if you have a good ear for pitch, you can > play just intonation in any key. >
Right.
> but for discrete-pitch instruments, there are compromizes all over the > place.
Absolutely.
> and don't think that it will be always be equal-tempered.
Only things with electronic oscillators are guaranteed equal temperament.
> i > don't think that's what you'll get with horns and other instruments with > air columns except if the musician bends pitch a little with their lips > or reed. >
Many brass instruments have extra pipe slides to tune individual notes. The player makes the thing in tune. You may need to tune them differently for different keys.
> >
-- Les Cargill