DSPRelated.com
Forums

Power Chords

Started by Tim Wescott June 13, 2015
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)? -- Rick
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. -- www.wescottdesign.com
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. Isoltated tones do tend to sound like crap. Can you capture a wav or mp3 file and post it? Maybe somebody's ears can help sort it out. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
> >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.
> > > >-- >www.wescottdesign.com
I misread your parentheses in my comment about the amplitude exceeding the range. I actually installed SciLab and it worked fine for me, no buzzing at all, just a tone. (Linux version) Have you tried saving it out to a .wav file and playing the file through the system player? Did anybody do a search on "432 hz"? Ced --------------------------------------- Posted through http://www.DSPRelated.com
Power chords rely on strings that are not tuned to rational ratios which are then applied to a strong non-linearity. This creates lots of intermodulation components. Also you should make sure to interpolate before the non-linearity to avoid folded distortion components. 

Bob
<radams2000@gmail.com> wrote:

>Power chords rely on strings that are not tuned to rational ratios which >are then applied to a strong non-linearity. This creates lots of >intermodulation components.
I agree. You need something intermodulating somewhere in the 3 Hz to 20 Hz range, or else it isn't a killer power chord. Steve
On Saturday, June 13, 2015 at 7:21:43 PM UTC-5, Tim Wescott 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? > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
Tim, I put the following in Matlab, and it sounds fine. What are you calling buzzing Maurice Givens
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? -- Rick
On Sun, 14 Jun 2015 23:38:32 +0000, 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. > > Isoltated tones do tend to sound like crap. Can you capture a wav or > mp3 file and post it? Maybe somebody's ears can help sort it out.
I have tried it with a 1:2^(5/12) ratio. I couldn't hear a difference. I'll see if I can post something. -- www.wescottdesign.com
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