Connect with us

Changing Signal Frequency And Frequency Overtones Respectively

Discussion in 'General Electronics Discussion' started by peleg68, Jun 21, 2015.

  1. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    How can I build a circuit that receives a sound signal(not a pure frequency) and outputs a modified signal so that the properties of the sound are kept but the main frequency is changed and all it's overtones are changed respectively?

    The circuit also needs to be able to "convert" to different frequencies, I assume this can be done with a variable resistor.

    I'm a newbie, I don't know much about electronics, I have an idea for a project and I need help.

    Thanks in advance!
     
  2. duke37

    duke37

    5,252
    725
    Jan 9, 2011
    Welcome to the forum.

    A resistor will not help, this is a complex job.
    You could analyse the incoming signal using a fast computer running a fast fourier transform. This would give the frequency of the fundamental and the harmonics. The frequencies could then be changed and the signal reconstituted. This is beyond my ability.
     
  3. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    I would really like to do this completely electrically with no computers/micro-controllers involved.

    But, suppose for a moment I managed to isolate the fundamental frequency and the harmonics, how can I change their frequency?

    Thanks for the help.
     
  4. hevans1944

    hevans1944 Hop - AC8NS

    4,250
    2,001
    Jun 21, 2012
    Who are you as a newbie, who admittedly "don't know much about electronics," to come here and tell the experts on this forum how to solve your problem? What does it mean to "do this completely electrically?" This whole forum is about how to do things electrically using appropriate technology, and that sometimes means computers/micro-controllers are required.

    We are not about hand-waving here, where you make a non-nonsensical statement such as " I assume this can be done with a variable resistor." Why would you assume anything when you have no idea what a solution would be? Why would you even assume a solution exists when you can not state your requirements clearly and unambiguously? Let us start with a quote from your original post:

    What, precisely, does this mean? If the properties of the sound are kept, but the main frequency and all it's overtones are changed, what exactly are those properties that are NOT changed? What is a modified signal, and how could it possibly keep the properties of the original sound if the sound is modified? What, exactly, is modified in the original sound? Why does this modification not change the properties of the sound? How do you determine or specify what the main frequency is? Is this the frequency with the loudest amplitude? The frequency that occurs most often?

    Let me pose a hypothetical: suppose you are listening to someone singing but you would like them to sing in another key, higher or lower. Most professional singers can easily shift to a different key, thereby changing their "main frequency and all its overtones". But no one can sing in any arbitrary key. That is why there are basses, tenors, sopranos, and the like. Everyone who sings has a particular range of notes which they can sing comfortably. But along comes @peleg68 with his "magic box" and it allows anyone to sing in any key! Just hold up your pitch-pipe and play a note to set the key and then start singing. The "magic box" will do all the work for you, converting your singing to whatever key you have selected... all done purely electrically without the use of computers/micro-controllers. You see, it's all magic! Never once did his hands leave his arms or his body! Pay the man!

    Well of course you would assume that. After all it is a "magic box". Either dial in the variable resistor or use the pitch-pipe option (extra cost for that model) to "convert" to different frequencies. No problemo.

    You're welcome. We cater to newbies here, but ideas are a dime a dozen. Rather than make uninformed assumptions about how to solve a problem, you need to tell us what you want to do, not set out limitations on how to do it. If you knew how to do it, you wouldn't be here asking.

    The most common way is to heterodyne the spectral bandwidth of the fundamental and the harmonics with a local oscillator, shifted higher or lower in frequency with respect to the fundamental. The result will be a spectrum of frequencies that is the sum of the local oscillator frequency and the original spectrum of frequencies, as well as another spectrum of frequencies that is the difference between the local oscillator frequency and the original spectrum of frequencies. You then apply a band-pass filter to select which spectrum you want.

    Note that this is NOT what you would do to shift the key someone sings in, but that is my hypothetical.
     
    peleg68, Martaine2005 and davenn like this.
  5. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    Electrically is not synonymous with electronically.
    By "electrically" I mean using only a PCB, no computers involved.
    Electronically means using computers and micro-controllers.

    Thankfully, duke37 explained that it isn't as simple as I think it is.
    I thought this can be done with a variable resistor, I was wrong.
    I'll explain what I mean using an example of how it can be done with a computer:
    On Audacity, there is an option to change the pitch of a sound. This however simply makes it play faster or slower according to the requested pitch.
    This creates a problem - when I change to different pitches the resulting sound will be at different lengths, this can be fixed with the change tempo effect on Audacity.
    This way the harmonics and all other non-frequency related properties are kept but the main frequency is changed.

    As duke 37 explained, the main frequency can be detected by analyzing the signal with a Fourier transform.
    Actually, these "magic boxes" are being used quite a lot in the music industry for vocals.
    This is not, however, what I'm looking for.
    I want to process the signal from an electromagnetic pick-up sensing a vibrating string so that tuning will not be needed for accurate pitches.
    I'm trying to grasp how this works:
    How do I choose the frequency of the local oscillator?
    How do I choose the amount of filtering?

    Thank you very much hevans1944, you have very helpful.
     
  6. davenn

    davenn Moderator

    13,323
    1,769
    Sep 5, 2009
    seriously

    that's a really crazy statement
     
  7. peleg68

    peleg68

    8
    0
    Jun 21, 2015
  8. hevans1944

    hevans1944 Hop - AC8NS

    4,250
    2,001
    Jun 21, 2012
    Just because you found it on the Internet doesn't necessarily make it so. The sources you cite are not authoritative, they are opinions, just as your statement, quoted below, is an opinion, not a fact.
    I doubt anyone here would presume that "electrically" is synonymous with "electronically". Electronically IS a sub-set of electrically however. I happen to have a degree in electrical engineering, but much of what I was taught involved not only electricity and electrical circuits but also electronics and electronic circuits. I know the difference, but apparently you do not. Maybe to you, using only a PCB (printed circuit board?) means "electrically" but there are plenty of electronic circuits built on a PCB, a radio for example. There is a LOT of electronics in use today that does not involve either computers or micro-controllers, so your idea of what "electronically" means is just plain WRONG.

    Here at Electronics Point we cherish conciseness and clarity... we see so little of it lately, along with poor grammar and spelling... because without it either a problem cannot be solved or, worse, the wrong problem is "solved," wasting the time of everyone involved.

    You, OTOH, have finally stated what you want to DO rather than telling us how to do it. I like that:

    That sounds like a useful thing to do. But I wonder if a mis-tuned string might have undesirable effects on other strings tuned in an harmonic relationship to each other? Seems to me like you would need to "process" all the strings (on a guitar, for example) to get everything working right.

    Unfortunately I am not a musician and know very little about stringed instruments, or the tonal relationships amongst the various strings. But I have observed how musicians tune their guitars after replacing a broken string. It seems to be a long laborious process with a lot of back and forth string plucking and fingering of the fret board before they finally get the guitar tuned to their satisfaction, which mainly means it "sounds right." Moreover, when that finally happens, a simple strum across all the strings sounds pleasant and all the strings work together to make fingering of notes and chords sound harmonious. It is obvious, even to the untrained ear, when it isn't done right.

    So, yeah, if you can pull that off, I suppose it would be a wonderful thing to have. But I can't help you. I have no idea how to even approach the problem.

    The heterodyne frequency shifting I mentioned simply moves an entire spectrum linearly up or down in frequency, I don't think that is what you want to do, if I understand the problem correctly. Perhaps someone else here in the forum has some ideas on how to solve the problem.
     
    davenn likes this.
  9. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    I understand my mistake, I guess I should be less quick to assume things.
    Well, being able to change the frequency is the whole point, that way I can have a few of these "magic boxes" as you call it on an instrument and I can take the same signal and have a few outputs, each with a different frequency.
    That way, I won't need a bunch of strings, only one string that creates the basic sound that gets converted to different pitches.

    Yeah, that's what made me confused - the heterodyne can get main frequency to be different but the overtones won't change respectively and the amplitude of each frequency is different.
    I understand there is no way around it, i'll have to do some coding and have a micro-controller or a computer in it, I just hope this can be done quickly enough as it would need to be a playable instrument at one point, I don't want any weird delays on it.

    If it isn't , though, I can make it a fretted instrument with a robot thing going quickly up and down the string to fret it, this would probably be noisy and the machine won't last long with moving parts.

    Thank you hevans1944.
     
  10. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    In addition to the problem Hop stated in the interaction between strings, there is another more fundamental reason that your scheme would not work. If the string could be tuned off by 1/2 a semitone or more, you could not determine which note it is actually playing to correct it. Not to mention that all the string might very well be off by that amount.

    Bob
     
  11. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    Why would I want the note it is actually playing? It isn't playing a note unless it's tuned perfectly anyway, I'll just convert the pitch accordingly.
     
  12. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    Okay, say the string is mistuned and it is playing an F# when it should be playing an Eb. How do you convert it to Eb?

    Bob
     
  13. hevans1944

    hevans1944 Hop - AC8NS

    4,250
    2,001
    Jun 21, 2012
    Well, I will sleep on this and maybe some inspiration will occur... Music is mathematically challenging. But from where I am looking at it now, the approach mentioned by @duke37 appears to be the only viable approach... and it will be extremely complicated to "sort out" the Fourier spectrum components in real time to determine what needs to be multiplied in the frequency domain (not linearly shifted, because the harmonic relationships must be preserved), and what frequency components can be discarded. Then the "package" has to be converted, again in real time, back to the time domain for audio output. This is possibly the same approach that the major music studios you mentioned use for shifting the singing key of performers. Not only is it way complicated (well, the electronics doesn't care... but we humans have to conceive and design it), it is also expensive.

    There are specialized devices, digital signal processors (DSPs), that can perform your task in real time, but I know nothing about them other than the fact that Elecraft used DSPs to process the audio in my KX3 amateur radio transciever. It requires a specially trained engineer to understand DSPs and know how to program them, but they shouldn't be hard to find. It is a fertile field of endeavor.

    Best of luck on your project!

    73 de AC8NS
    Hop
     
  14. Merlin3189

    Merlin3189

    250
    69
    Aug 4, 2011
    I wonder if a PLL tone decoder (something like NE567) set to the nominal frequency of each string and with the output gating or switching an oscillator at the exact nominal frequency would work? A tone near a nominal frequency would cause that PLL to lock on and the oscillator generate the exact frequency.
    This does not generate the harmonics of course, but you could follow the oscillator with a harmonic generator and filters to attenuate the harmonics to simulate the tonal balance of a guitar string. (Or go the full monty and instead of the oscillator trigger the playback of a recorded guitar string correctly tuned, a la MOOG synthesiser!!)

    This is not a perfect solution. The lock on delay was too great and varied with the deviation of the input signal, there was no nice decay and it was very difficult to determine the length of the note. The higher freq PLLs could be triggered by harmonics of lower notes. But it might be a start for someone with more of a bee in his bonnet. And it could be built without a CPU and without a printed circuit board, so is presumably purely electrical :confused: (BTW Heavans, why did you assume PCB was a board? In electronics I'd guess the same. But since peleg says,
    then in transformer I might have been more expecting this)
    PCB.jpg
     
  15. Merlin3189

    Merlin3189

    250
    69
    Aug 4, 2011
    Ooops! I see others have posted while I was writing and they have made me realise that my idea is much too simple anyway. Each string may be producing half a dozen different notes, so I'd need not 6 PLLs, but more like 36 or more.
    So you'd definitely be better off going for an electronic solution with DSP FFT to sort out what signals are there and lots of intelligence to sort out what it all means. Then digital synthesis of whatever it decides should have been the signal.

    With a CPU, there is no reason why it cannot know rules of harmony, chord structures, rhythms and whatever else might be useful. In many ways it is like speech recognition - use tonal analysis to extract the basic features of the sound, then apply knowledge of phonics, words and language structure to guess at what is being said.

    You could even give it the score for what you are going to play and have it analyse the timing, expression, dynamics or whatever makes your playing distinctive in the input, and apply it to its synthesis of that score.

    But wouldn't it be simpler just to build an electronic guitar tuner to ensure the guitar were correctly tuned in the first place? If you can't actually produce the right notes on a guitar, are you any more likely to be able to do the more subtle things that are involved in making music? Synthesisers can play pitch perfect and spot on rhythm, but not many people rate their music as good as an imperfect human player.

    And another BTW

    Well I did. And for my money neither says what peleg said.

    In the second one, the person asking the question states "Most people would refer to computers as being electronic, whereas a flashlight would be described as electric." But no one says that is the definition of electronic.
    The general consensus seemed (IMO wrongly) that the difference is complexity - electronics is complex circuits and electricity is simple circuits.

    The first one made a fair but oversimplified attempt, admitting that the distinction is "blurry", with the main point seeming to be that electric currents were to do with energy / power effects and electronics with conveying information - "electronics devices manipulate current ...<to do> interesting things" And at least they do mention valves and transistors as being electronic (even if they are only switching on a torch.)

    I agree it is difficult to define something like this, but that's all the more reason to be circumspect about doing so.
     
    Last edited: Jun 22, 2015
    hevans1944 likes this.
  16. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    That seems like really bad design, what if I would need to play a-tonal music, it has no rules you can never guess what would be next, in fact, a-tonal music is the perfect music to break such a system.
    And also, developing it would incredibly hard and time-consuming.
    That would basically eliminate the option for improvisation and don't even start talking about swing.

    Firstly, I'm not talking about a guitar.
    But, yeah, I reached a conclusion that an automatic tuner would be the easiest solution, only that would require playing a note every time you need to tune it, I guess that's not too bad.
    Basically it would need to be something like "Roadie" only hidden inside the instrument and completely automatic so that human mistakes couldn't interfere with the tuning.
    I love synthesizers(when their controlled by humans) the only problem with them is that the harmonics aren't nearly as reach as on a physical instrument, the oscillators, even on the very best synths have a robotic sound.
    This is why I wanted something that has the convenience and flexibility of a synth by has the sound of a string instrument.

    Thank you everyone very much! I really appreciate your kindness!!
    I know how newbies like me can be a pain in the ass....
     
  17. Merlin3189

    Merlin3189

    250
    69
    Aug 4, 2011
    Points taken peleg. It just shows that I'm a technician rather than an artist, and I hadn't even thought about squeaky gate music;)

    I had thought with lots of processing power one could mimic the tonal quality of any instrument, but what I forgot is the way a player can vary the tonal quality of an instrument and monitor the effect as he is playing. It would be very difficult to capture all the data for these subtle effects.

    On a facaetious note, with atonal music does it matter if the instrument is out of tune?:confused:
     
  18. peleg68

    peleg68

    8
    0
    Jun 21, 2015
    If the music was perfectly atonal - meaning the notes have no consonant harmonic relationship with one another then you wouldn't notice the difference, it would sound just as dissonant.
    But pretty much all atonal music has remnants of tonality, meaning, the composer composed the "melodies" so that they would have consonant relationships with each other even though there isn't a key signature and all of the 12 tones are being used equally.
    Which means when you play atonal music in an out-of-tune instrument the difference will almost always be noticed by someone who knows the piece well and someone who hasn't heard it before might notice it's out of tune and might not, it mostly depends on how much of these tonal remnants are there in the piece.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-