DSPRelated.com
Forums

Power Chords

Started by Tim Wescott June 13, 2015
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 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));
~~~ Try 1.4983 instead of 1.5. Steve
Tim Wescott <seemywebsite@myfooter.really> writes:

> 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?
Don't you need a 3D printer instead of Scilab? Or did you mean the musician definition, like a D7-5/C? -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
On Sat, 13 Jun 2015 21:16:24 -0400, Randy Yates wrote:

> Tim Wescott <seemywebsite@myfooter.really> writes: > >> 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? > > Don't you need a 3D printer instead of Scilab? Or did you mean the > musician definition, like a D7-5/C?
I might need a 3D printer if I wanted to make a power _cord_, but I meant the guitar version. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
>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
I don't have SciLab, so this is speculation without testing. The signal you are generating is going to exceed +1 and -1, so perhaps the buzzing you are hearing is the signal being clipped. Ced --------------------------------------- Posted through http://www.DSPRelated.com
On 14/06/2015 02:34, Tim Wescott wrote:
> On Sat, 13 Jun 2015 21:16:24 -0400, Randy Yates wrote: > >> Tim Wescott <seemywebsite@myfooter.really> writes: >> >>> 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? >> >> Don't you need a 3D printer instead of Scilab? Or did you mean the >> musician definition, like a D7-5/C? > > I might need a 3D printer if I wanted to make a power _cord_, but I meant > the guitar version. >
Not forgetting it is really the guitar + overdrive [+ other stuff] + tube amp (Fender, Marshall, Vox et al)... 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;
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).
> >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
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!
> >f = 500; // Hz > > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com
Also, that is not a frequency that corresponds to a note on the chromatic scale. You will irritate any musician friends you play it for. Try 440, or for more fun, try 440 and a separate one with 432, and ask them which sounds better. Ced --------------------------------------- Posted through http://www.DSPRelated.com
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? >
Look at the waveform or spectrograph of the waveform if you can. It's gonna sound like a double reed ( say a bassoon), not a power chord. Here's how organ stops work: https://en.wikipedia.org/wiki/List_of_pipe_organ_stops Many electronic organs use the same nomenclature. -- Les Cargill
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. -- www.wescottdesign.com