frequency division of sinusoidal waves

A

A. Walsh

Guest
I am wondering if there exists an electronic component which is able
to preform a frequency division of a sine wave (such as a divide by 2
or 4, etc). I am aware of dual flip-flop ICs that are able to freq.
divide square waves, but they are not particularly of interest to
myself unless I absolutely have to use one.
Thank you for your time.
A.W.
 
thebigbadme@hotmail.com (A. Walsh) writes:
I am wondering if there exists an electronic component which is able
to preform a frequency division of a sine wave (such as a divide by 2
or 4, etc). I am aware of dual flip-flop ICs that are able to freq.
divide square waves, but they are not particularly of interest to
myself unless I absolutely have to use one.
I am assuming that you want to preserve the shape of the sine wave,
if I understand your explanation.

Two related ideas might give you something to think about.

You might be able to get a voltage controlled oscillator, where the
input voltage determines the output frequency of the sine wave, and
then use a phase-lock-loop which is a little circuit that provides
an output that tells you whether two inputs are crossing zero at the
same time or not. The PLL output could be used to adjust the voltage
to the VCO and that would let you generate a sine wave that was a
fixed fraction of the frequency of your existing sine wave.

The other idea would be to use a 4-quadrant analog multiplier. This
is a little part that literally multiplies two input analog voltages,
positive or negative, and gives you the output voltage that is the
product. Then math says that sin(a)cos(b)=sin(a-b)+cos(a)sin(b).
You use your existing frequency as a, generate an appropriate b,
perhaps using the idea above. And the output will be two signals
added together. Filter out that cos(a)sin(b) and you are left with
sin(a-b) which will be at the lower frequency. You just need to figure
out what frequency b to generate. Great little parts, lots of fun
stuff you can do with multipliers, now that they are cheap, fast and
accurate. Thirty years ago it would have been impossible to spend
the money and time to build one of these for ordinary projects and
now they are a dollar or two in a chip.
 
Thank you for taking the time to respond. :)

I am not sure as to the capabilities of your suggestion,perhaps
you could provide me with some clarification as to the manner in which
the fixed fractioning would be able to be accomplished. The need is
for whatever the component to be able to take an input sine, and
perform said division, as well as to track not only variations of
frequency, such as if the input frequency shifts to any other given
value (which will actually only be within a set range, as yet to be
determined), but also that it be able to track as the amplitude of the
signal decays (I will be able to live without amp. decay tracking,
though it would mean slightly less versatility in use if this isn't
reasonably possible.) An explanation of what I am attempting to do
follows:
I have an interest in creating unique stimuli within the
perception range of humans; currently I wish to design, construct, and
implement the use of, circuitry which will be able to (when activated)
take the 'mixed output' signal from a pair of electric Bass guitar
pickups (the primary sine wave, as well as 3 to 6 of the harmonic sine
waves) use semi-narrow band pass frequency separation, so as to be
able to "treat" each sine individually, then pass each of the
resulting signals through another part of the circuit to divide the
respective frequencies (indeed you are correct in assuming that I wish
to preserve the sine shape, as I am not particularly interested in
mandatory wave clipping as a by-product of what I'm really after),
lowering them by an octave or two, possibly both, followed by the
mixing of the initial freq. as well as any of the treated freq. into a
single output. All of this will take place within the body of the
guitar at the flip of a switch, converting the signal path from an
un-tapped/modified route to one leading through the afore mentioned
circuit, with no other sort of control mechanism. The frequency band
separation I will be able to hardwire and tune to the specifics of
this particular instrument.
There are devices already manufactured that provide similar
functionality, however, they seemingly all have two major
characteristics which I find to be drawbacks: First, and foremost,
current devices make use of converting the input sine waves to square
waves, I don't want to make my instrument sound like a rusty buzz-saw,
thusly the desire to stick with sine wave shape; secondly seemingly
all current such devices also fail to to provide any significant
tracking of the waves (both in parallel across the multi-freq.
spectrum, as well as individually over the decay of amplitude.)
Dividing the signal into semi-narrow bands will hopefully allow for
more versatile tracking across freq.

If you could let me know regarding the fixed fractioning, I will
be ever grateful. Thanks again for stepping up to respond to my post.
-A.W.-

dont@agora.rdrop.com (Don Taylor) wrote in message news:<3fa3fa58$1_5@127.0.0.1>...
I am assuming that you want to preserve the shape of the sine wave,
if I understand your explanation.

Two related ideas might give you something to think about.

You might be able to get a voltage controlled oscillator, where the
input voltage determines the output frequency of the sine wave, and
then use a phase-lock-loop which is a little circuit that provides
an output that tells you whether two inputs are crossing zero at the
same time or not. The PLL output could be used to adjust the voltage
to the VCO and that would let you generate a sine wave that was a
fixed fraction of the frequency of your existing sine wave.

The other idea would be to use a 4-quadrant analog multiplier. This
is a little part that literally multiplies two input analog voltages,
positive or negative, and gives you the output voltage that is the
product. Then math says that sin(a)cos(b)=sin(a-b)+cos(a)sin(b).
You use your existing frequency as a, generate an appropriate b,
perhaps using the idea above. And the output will be two signals
added together. Filter out that cos(a)sin(b) and you are left with
sin(a-b) which will be at the lower frequency. You just need to figure
out what frequency b to generate. Great little parts, lots of fun
stuff you can do with multipliers, now that they are cheap, fast and
accurate. Thirty years ago it would have been impossible to spend
the money and time to build one of these for ordinary projects and
now they are a dollar or two in a chip.
 
thebigbadme@hotmail.com (A. Walsh) writes:
I have an interest in creating unique stimuli within the
perception range of humans; currently I wish to design, construct, and
implement the use of, circuitry which will be able to (when activated)
take the 'mixed output' signal from a pair of electric Bass guitar
pickups (the primary sine wave, as well as 3 to 6 of the harmonic sine
waves) use semi-narrow band pass frequency separation, so as to be
able to "treat" each sine individually, then pass each of the
resulting signals through another part of the circuit to divide the
respective frequencies (indeed you are correct in assuming that I wish
to preserve the sine shape, as I am not particularly interested in
mandatory wave clipping as a by-product of what I'm really after),
lowering them by an octave or two, possibly both, followed by the
mixing of the initial freq. as well as any of the treated freq. into a
single output. All of this will take place within the body of the
guitar at the flip of a switch, converting the signal path from an
un-tapped/modified route to one leading through the afore mentioned
circuit, with no other sort of control mechanism. The frequency band
separation I will be able to hardwire and tune to the specifics of
this particular instrument.
Ah, your input is different from what I expected, you have a mixture
of frequencies instead of just one. My original idea doesn't sound
like it will do what you are looking for.

Perhaps another idea might work. If you convert your analog signal to
digital and then you use digital signal processing (DSP) and the fast
fourier transform (FFT) that will turn your amplitude-versus-time into
amplitude-versus-frequency. Since your frequencies and amplitudes are
changing all the time there are tradeoffs for resolution and accuracy,
etc. If your amplitude and frequency was never changing you could use
lots and lots of samples and get very good information about exact
frequency and amplitude. But with changing signals you will probably
want to use fewer samples and get less detail, otherwise the changing
signals will corrupt the results. And you will need some filtering on
the input signal.

But with the amplitude-versus-frequency information you can then
reverse the whole process, but scaling this so all the output frequencies
are x times lower than the original. And you will need some filtering
on the output.

For something like symphony quality piano notes this process could be
really hard to do well enough to satisfy them. But for guitars and
rock you could probably get away with it. It would try to preserve
the sine wave amplitudes and frequencies, but scale the frequencies.

It seems like there should be other ways of doing this.

But the original ideas I offered would probably only work if there was
a single frequency present, not the sort of mixture of frequencies you
are going to get from a guitar pickup.
 
"Don Taylor" <dont@agora.rdrop.com> wrote in message
news:3fa479ef_5@127.0.0.1...
thebigbadme@hotmail.com (A. Walsh) writes:
I have an interest in creating unique stimuli within the
perception range of humans; currently I wish to design, construct, and
implement the use of, circuitry which will be able to (when activated)
take the 'mixed output' signal from a pair of electric Bass guitar
pickups (the primary sine wave, as well as 3 to 6 of the harmonic sine
waves) use semi-narrow band pass frequency separation, so as to be
able to "treat" each sine individually, then pass each of the
resulting signals through another part of the circuit to divide the
respective frequencies (indeed you are correct in assuming that I wish
to preserve the sine shape, as I am not particularly interested in
mandatory wave clipping as a by-product of what I'm really after),
lowering them by an octave or two, possibly both, followed by the
mixing of the initial freq. as well as any of the treated freq. into a
single output. All of this will take place within the body of the
guitar at the flip of a switch, converting the signal path from an
un-tapped/modified route to one leading through the afore mentioned
circuit, with no other sort of control mechanism. The frequency band
separation I will be able to hardwire and tune to the specifics of
this particular instrument.

Ah, your input is different from what I expected, you have a mixture
of frequencies instead of just one. My original idea doesn't sound
like it will do what you are looking for.

Perhaps another idea might work. If you convert your analog signal to
digital and then you use digital signal processing (DSP) and the fast
fourier transform (FFT) that will turn your amplitude-versus-time into
amplitude-versus-frequency. Since your frequencies and amplitudes are
changing all the time there are tradeoffs for resolution and accuracy,
etc. If your amplitude and frequency was never changing you could use
lots and lots of samples and get very good information about exact
frequency and amplitude. But with changing signals you will probably
want to use fewer samples and get less detail, otherwise the changing
signals will corrupt the results. And you will need some filtering on
the input signal.

But with the amplitude-versus-frequency information you can then
reverse the whole process, but scaling this so all the output frequencies
are x times lower than the original. And you will need some filtering
on the output.

For something like symphony quality piano notes this process could be
really hard to do well enough to satisfy them. But for guitars and
rock you could probably get away with it. It would try to preserve
the sine wave amplitudes and frequencies, but scale the frequencies.

It seems like there should be other ways of doing this.

But the original ideas I offered would probably only work if there was
a single frequency present, not the sort of mixture of frequencies you
are going to get from a guitar pickup.
Would be a real trick to do this in real time.
 
"Jimmy" <Gfender@carolina.rr.com> writes:
"Don Taylor" <dont@agora.rdrop.com> wrote in message
news:3fa479ef_5@127.0.0.1...
thebigbadme@hotmail.com (A. Walsh) writes:
I have an interest in creating unique stimuli within the
perception range of humans; currently I wish to design, construct, and
implement the use of, circuitry which will be able to (when activated)
...
Perhaps another idea might work.
signal->fft->change of time base->inverse fft

Would be a real trick to do this in real time.
Well I don't know about that. For example, TI's TMS320C6713 does
1.3 billion! floating point operations/second. And it is a $30
part, consumes 2/3 watt of power. A rough guess for say 512 point
fft's would mean about 18000 floating point operations... ask Derive
to do a quick calculation... humm you could do 722222 of those
fft's every second, Ah, need to do an inverse at the same time,
that means you could only do about three hundred and sixty thousand!
fft&ifft operations on 512 point data sets every second. Those
numbers literally boggle the mind, well at least they boggle my
mind. Anything more than a few hundred transforms a second on audio
make no sense at all.

And I only picked the 6713 because the ad happened to be laying
here, they have integer processors that go the same speed or faster
for the same prices. And TI has app notes for carefully crafted
fft/ifft code that you can just use as-is. You need to balance
number of points versus sample speed versus resolution. And do
filtering on the input and output. I'd guess the processor would
spend 99.99% of its time idle waiting for the next data point.

Over ten years ago someone who meant well, but was out near the fringe,
paid me a few dollars to write him a little program for a 2Mhz Z80 to
hunt for factors of 64 bit numbers, that he would enter, using trial
division, he was very clear about how he wanted the code written.
If I remember the details, for "bad" examples, it took about a
megasecond (roughly a couple of weeks) to find a factor or to declare
it prime. For even numbers it was nearly instantaneous :) Looking
at the new DSP parts this couple of weeks on a Z80 could be compressed
into a fraction of a second today, still using the algorithm that he
specified. Amazing what the speed of processors are today.
 
Thought I'd make a follow up to this quest...
your second post spurred me to research Fourier Transformations; and I
must say, it seems that there might be something that I can do. I'd
likely to quickly clarify: if I was interested in playing straight
rock and roll music, and going for a circuit that was just good enough
to accomplish what I'm after, I would probably take the route of
people who have come before me ;). After reading about a company who
designed a hearing aide to do pretty much exactly what I need (for
people who do not have the greatest of capacity to hear the higher
registers, the device reproduces the sound information at lower freq.
rates; not for guitars), I spent the day pondering over a number of
things.
If I really wanted to have absolute precision in the freq.
shifting, it's possible that I could rig something up using an old 486
cpu at the core to analyze all of the functions needed, matching even
the most slight of harmonics. This does not, in particular, appeal to
me; I don't want to have to figure out the logistics of retro-fitting
a computer into a 3.5x4.5x2 inch hole within the bass guitar, plus,
this would mean that I would be pretty much locked into the digital
domain... and we all know what can happen when digital circuits fail
to function in the ways which we expect. Though, with an analogue
circuit there are potentially more things able to go wrong due to the
environmental circumstance. None-the-less, if ever I am out some
place playing and suddenly the bass begins to malfunction (aside from
being easier to explain to people why the sounds of an analog
disruption happen, as opposed to say... the sound of a dieing modem
from a bass guitar...) there may not be such a ready way to 'solve'
the problem so to speak if a digital failure happens, such as the
commonality of certain tools, where as one might be able to jerry-rig
a fix out of things found in most small town hardware stores.
So, what to do aside from out-right main-boarding the bass? The
hearing aide people describe a modified DFT, which from the results of
their testing seems to be able to track with the variations in a human
voice (primary freq., residual harmonics, overtones, etc). So cool.
Amplitude/voltage regulation aside, essentially pop open the back of
the Bass, wire the hearing aide in series between the pickups and the
output-jack, configured, of course, with a bypass switch, and good to
go. But then I got to thinking: even if it were really that simple
(which isn't likely), it still locks me into the digital domain.
After having experienced the thrills of a multitude of musical
instrumentation, learning to play piano, baritone tuba, guitar,
pan-flute, violin, dulcimer, diggerido, the bass (upright, and
electric), cello, as well as a variety of other stringed instruments
plus having years of choral experience, though all of the above only
to a moderate level... by no means am I attempting to imply anything
about my ability to manipulate anything musical with any lack-luster
skill; and then recently learning about the history of the advent of
the piano... and all the trouble faced in designating a standard
tunning (which by the way, I'm told, is that all keys that one might
wish to play the piano in are equally out of tune from the natural
harmonics.) I've decided that I wish to fore-go the whole advent of
digital music, and spent the afternoon de-fretting the electric bass
guitar that this whole modification will be used in conjunction with
(I'm also a budding audiophile). As an added benefit of using
analogue, interesting results have been known to suddenly show up with
partial, and at times acceptable, 'failures' of electronic
representations of functions.
Having said that, and still wishing to come up with some sort of
solution... and also remembering one of the basic principles of
electronics: if it is possible to build a circuit of the digital
nature, then it is also possible to construct a similar circuit of the
analogue nature (though precision, over-all life continuity, and at
times rate of speed for circuit completion, may be sacrificed)... I
have now begun to look into continuous Fourier transform circuits.
It may also come as a surprise for you that I'm just a 20 year
old college student, and that I'm interested in more than the crude
aspects of making noise. But what can I say, I like to have fun, and
that's why I am very glad that you have taken up aide-ing me with this
particular quest, thank you much.

Oh yeah, perhaps you might be able to answer an almost totally
unrelated question:
Does such a device exist, which acts principley as a pot. though wired
so as at the maximum setting in one direction the resistance in
negligible, followed by an "off", or relatively high resistance at
about the median of the range, with the max. setting on the other end
also being with negligible resistance (though from another circuit
path)? Essentially what I'm after is this: A volume knob which takes
the direct feed from a set of guitar pickups, and functions over half
of the overall range as a standard volume control, but ending (being
"off") at the mid-point, and then switching to a mirrored volume
function on the other half, but in place of straight signal, taking
input from the circuit that I'm working on to do all the freq.
modification. (kind of like a volume knob/effect pedal on/off switch
rolled into one) If such a thing does not already exist (meaning
purely mechanical, I'm fairly sure that there are ICs which can do
something along these lines), does it seem reasonable to think that
someone could, given the tools required to assemble it into a pot.
style, actually build one? I really will only be running the whole
machine at "full on" volume, but I don't want to blow any speakers
along the way switching from straight feed to processed (I use
outboard volume controls, such as on an amp, or preamp if recording,
to adjust the play volume, or, if there is a need for sudden change, I
modify the dynamics of my playing style, and don't use volume controls
anyways)
Anyways, thanks again.
-A.W.-

dont@agora.rdrop.com (Don Taylor) wrote in message news:<3fa479ef_5@127.0.0.1>...
from an
Ah, your input is different from what I expected, you have a mixture
of frequencies instead of just one. My original idea doesn't sound
like it will do what you are looking for.

Perhaps another idea might work. If you convert your analog signal to
digital and then you use digital signal processing (DSP) and the fast
fourier transform (FFT) that will turn your amplitude-versus-time into
amplitude-versus-frequency. Since your frequencies and amplitudes are
changing all the time there are tradeoffs for resolution and accuracy,
etc. If your amplitude and frequency was never changing you could use
lots and lots of samples and get very good information about exact
frequency and amplitude. But with changing signals you will probably
want to use fewer samples and get less detail, otherwise the changing
signals will corrupt the results. And you will need some filtering on
the input signal.

But with the amplitude-versus-frequency information you can then
reverse the whole process, but scaling this so all the output frequencies
are x times lower than the original. And you will need some filtering
on the output.

For something like symphony quality piano notes this process could be
really hard to do well enough to satisfy them. But for guitars and
rock you could probably get away with it. It would try to preserve
the sine wave amplitudes and frequencies, but scale the frequencies.

It seems like there should be other ways of doing this.

But the original ideas I offered would probably only work if there was
a single frequency present, not the sort of mixture of frequencies you
are going to get from a guitar pickup.
 
Though I must say... going the TI chip route does sound oftly
tempting...
tell you what Don, if I take a shot that way, perhaps making similar
things for other people, and come up with a sizable amount of spare
change, I'll send a chunk your way. Of course, seeing as I'd keep the
whole circuit filed under public domain, that spare change jar may not
grow with any significant rate. None the less, I'll take a look into
it {grin}
-A.W.-

dont@agora.rdrop.com (Don Taylor) wrote in message news:<3fa60b42_5@127.0.0.1>...
"Jimmy" <Gfender@carolina.rr.com> writes:
"Don Taylor" <dont@agora.rdrop.com> wrote in message
news:3fa479ef_5@127.0.0.1...
thebigbadme@hotmail.com (A. Walsh) writes:
I have an interest in creating unique stimuli within the
perception range of humans; currently I wish to design, construct, and
implement the use of, circuitry which will be able to (when activated)
...
Perhaps another idea might work.
signal->fft->change of time base->inverse fft

Would be a real trick to do this in real time.

Well I don't know about that. For example, TI's TMS320C6713 does
1.3 billion! floating point operations/second. And it is a $30
part, consumes 2/3 watt of power. A rough guess for say 512 point
fft's would mean about 18000 floating point operations... ask Derive
to do a quick calculation... humm you could do 722222 of those
fft's every second, Ah, need to do an inverse at the same time,
that means you could only do about three hundred and sixty thousand!
fft&ifft operations on 512 point data sets every second. Those
numbers literally boggle the mind, well at least they boggle my
mind. Anything more than a few hundred transforms a second on audio
make no sense at all.

And I only picked the 6713 because the ad happened to be laying
here, they have integer processors that go the same speed or faster
for the same prices. And TI has app notes for carefully crafted
fft/ifft code that you can just use as-is. You need to balance
number of points versus sample speed versus resolution. And do
filtering on the input and output. I'd guess the processor would
spend 99.99% of its time idle waiting for the next data point.

Over ten years ago someone who meant well, but was out near the fringe,
paid me a few dollars to write him a little program for a 2Mhz Z80 to
hunt for factors of 64 bit numbers, that he would enter, using trial
division, he was very clear about how he wanted the code written.
If I remember the details, for "bad" examples, it took about a
megasecond (roughly a couple of weeks) to find a factor or to declare
it prime. For even numbers it was nearly instantaneous :) Looking
at the new DSP parts this couple of weeks on a Z80 could be compressed
into a fraction of a second today, still using the algorithm that he
specified. Amazing what the speed of processors are today.
 
thebigbadme@hotmail.com (A. Walsh) writes:
Having said that, and still wishing to come up with some sort of
solution... and also remembering one of the basic principles of
electronics: if it is possible to build a circuit of the digital
nature, then it is also possible to construct a similar circuit of the
analogue nature
I thought a bit about this but I cannot think of an analog circuit
that divides all input frequencies by n but doesn't change the
amplitudes. Maybe someone else can think of a solution.

Oh yeah, perhaps you might be able to answer an almost totally
unrelated question:
Does such a device exist, which acts principley as a pot. though wired
so as at the maximum setting in one direction the resistance in
negligible, followed by an "off", or relatively high resistance at
about the median of the range, with the max. setting on the other end
also being with negligible resistance (though from another circuit
path)?
Take two slide pots. put them side by side. Gang the sliders together
so they both move the same distance in the same direction at all times.

Now you want to wire these up in parallel BUT you want to connect up
the contacts at the ends of the two pots in opposite directions. Or,
to try to say this another way, you are trying to wire pot A up so it
increases as you slide it to the left and you are wiring pot B up so it
decreases as you slide it to the left. Great, so what, one pot will
increase while the other pot decreases, and vice versa. Now what?
Ah, but now connect the two wiper contacts on the pots together!
and the criss-cross connected end contacts to whatever expects to
have a pot connected there.

In the middle of the range you will have two pots at half range and
in parallel, giving you 1/4 the resistance marked on the part. And
as you slide towards either end one of the pots will have a lower
and lower resistance in parallel with a higher and higher (and thus
unimportant) resistance and so it will go towards zero as you slide
towards either end and be a maximum in the middle.

Back on your frequency divider, if you decide to go digital, I'd
suggest a part that has memory internal that you can program and
don't need external memory to add. Then get a part that has the
analog to digital and digital to analog converters built into the
part. That limits your selection of parts but it should give you
a 1-chip solution. If it fails you unplug it, plug in a replacement
and go back to playing.
 
dont@agora.rdrop.com (Don Taylor) wrote in message news:<3fa71665_5@127.0.0.1>...
thebigbadme@hotmail.com (A. Walsh) writes:
Having said that, and still wishing to come up with some sort of
solution... and also remembering one of the basic principles of
electronics: if it is possible to build a circuit of the digital
nature, then it is also possible to construct a similar circuit of the
analogue nature

I thought a bit about this but I cannot think of an analog circuit
that divides all input frequencies by n but doesn't change the
amplitudes. Maybe someone else can think of a solution.

What sort of circuit would be able to do this with changing the
amplitude, as I might be able to rig a sort of pre-amp device pre or
post... sure not the best solution, but until I take some hard core
time to research building conceptual electronics, it could allow proof
of concept, as well as a chance to play around and see if such a
process is desireable.
Thanks for your time,
A.W.
 

Welcome to EDABoard.com

Sponsor

Back
Top