Output specific frequencies with digital electronics

Click For Summary

Discussion Overview

The discussion revolves around the design of a breadboard instrument that can produce specific musical frequencies using digital electronics. Participants explore various methods for generating these frequencies, including the use of oscillators, frequency dividers, and digital-to-analog converters (DACs). The focus is on practical implementation rather than theoretical concepts.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using push buttons or logic switches to play notes, expressing concerns about finding the right resistor and capacitor combinations.
  • Another participant inquires about the specific musical scale of interest, noting that some scales are easier to generate from a high-harmonic oscillator and questions the importance of phase control in harmonics.
  • A suggestion is made to use a microcontroller to program the frequencies, while another participant expresses a desire to avoid microcontrollers and instead use a high-frequency stable oscillator with frequency dividers.
  • One participant discusses the challenge of producing different notes from frequency dividers, indicating a need for combinations of resistors and capacitors to achieve desired frequencies.
  • There is a mention of the blues scale and the ratios of frequencies associated with it, with a participant expressing frustration over how to mathematically divide a main frequency to achieve the required ratios.
  • Several participants mention the potential use of waveform generator ICs or DACs to synthesize arbitrary waveforms, with some expressing uncertainty about how to implement these solutions.
  • One participant shares links to resources for audio frequency synthesizer ICs, indicating a search for practical components.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best approach to generate the desired frequencies. Multiple competing views are presented, including the use of microcontrollers, oscillators, frequency dividers, and DACs, with varying levels of interest and expertise expressed.

Contextual Notes

Participants express uncertainty regarding the practical implementation of frequency division and the relationships between the frequencies in the blues scale. There are also limitations noted in the availability of certain ICs and the complexity of synthesizing the desired waveforms.

Who May Find This Useful

This discussion may be useful for hobbyists and engineers interested in electronic music synthesis, particularly those exploring non-microcontroller-based methods for generating musical frequencies.

TOONCES
Messages
24
Reaction score
0
I'm trying to figure out how to build a breadboard instrument using either push buttons or logic switches as they keys that will play each note. The issue that i am having is that I don't think finding all of the perfect resistor and capacitor combinations for each note is a good idea. So, i want to use digital hardware to produce the frequencies. Any ideas how?
 
Engineering news on Phys.org
What specific musical scale are you interested in? See

http://www.phy.mtu.edu/~suits/Physicsofmusic.html

Some scales are easier than others to generate from a single high-harmonic crystal oscillator. Are you concerned about the phase of the harmonics?

Bob S
 
The simplest method is to use a microcontoller and program it with every note.

Another way is to start with a high frequency stable oscillator, and then have a switched frequency dividers to generate various notes.
 
Bob S.-

I was looking to just do The basic notes A,B,C,D,E,F,and G maybe with sharps and flats if the design is simple or small enough.
I'm not sure if i should be concerns about the phase of the sound. Can you elaborate on why i would need to?

what-

I wanted to avoid using a micro controller to program the frequencies.

I was looking at using the divider setup that you mentioned. i am just not sure on how to do so. Looking at the frequencies of musical notes I've noticed that i can produce different octaves of the notes by dividing but not different notes. I'm not positive on this but pretty sure. So what i am seeing is that i would need to use several combinations of resistors and capacitors to produce a divideable frequency to further produce different octaves of that frequency.

Is that a practical way of approaching this?
 
TOONCES said:
Bob S.-

I was looking to just do The basic notes A,B,C,D,E,F,and G maybe with sharps and flats if the design is simple or small enough.
I'm not sure if i should be concerns about the phase of the sound. Can you elaborate on why i would need to?
What do chords sound like if you don't control the phase of all the harmonics, or are you planning on playing only one note at a time?
By the way, what musical scale are you planning on using?

Bob S
 
Bob S said:
What do chords sound like if you don't control the phase of all the harmonics, or are you planning on playing only one note at a time?
By the way, what musical scale are you planning on using?

Bob S

I only plan on playing one note at a time. Also, I was looking at the blues scale (no reason in particular).
This is the blues scale given on the website:

Note
of Blues Scale Ratio
1 1
2 6/5
3 4/3
4 45/32
5 3/2
6 9/5
7 2

I'm looking to use one main frequency and divide it into the rest. Everything in the circuit is pretty much set. The only part I can't figure out is how to divide the main frequency accordingly. For example, there is no way of dividing a frequency by five and then multiplying it by 6 (as far as I know). I was thinking there may be some way of doing some math and getting all the fractions listed above into a form with 1 as the numerator. That way i would be able to divide by one number to get a good frequency. (thinking about it now that doesn't seem like it'll work but still, food for thought.)

This is frustrating me to no end so any help is greatly appreciated and I'll post the final circuit if anyone can give me some assistance.
 
Apologies if I'm being patronizing, as I do not know your level of background / knowledge.

What you *could* do is to control a Digital-to-Analog Converter (DAC) and synthesize an arbitrary waveform that you then feed to an amplifier. This is (basically) the same way your PC / laptop or MP3 player generates not only 'pure tones' but also play the whole gamut of music and sounds that we play through them these days:
http://en.wikipedia.org/wiki/Digital-to-analog_converter

However, since you're more interested in playing individual notes, you may be interested in waveform generator ICs, or better yet, sinewave generators (these would produce 'pure' tones probably quite similar to what you hear from most tuners). For instance, the Fairchild ML2035 is SPI-settable: you simply tell it which frequency to produce, and it outputs that frequency!
http://media.digikey.com/pdf/Data Sheets/Fairchild PDFs/ML2035.pdf

...Unfortunately, they don't seem to make it anymore, and none of the major players seem to have it in stock (as seen at www.findchips.com) Maxim doesn't make/sell the MAX038 family anymore either, which was a far more robust IC. You may be able to find one of these if you look hard enough (or Digikey or Mouser may actually be able to quote you for some of these) Not sure if this shows the ascendancy of DACs or what, but they seem to be a dying breed these days!

About the only one of these I CAN find is the Exar ICL8038, from one vendor (though I didn't look terribly hard):
http://www.jdr.com/interact/item.asp?itemno=ICL8038CCPD

Good luck!

EDIT: This page also summarizes the three ICs I mentioned:
http://www.siliconfareast.com/waveform-gen.htm
 
Last edited by a moderator:
MATLABdude said:
Apologies if I'm being patronizing, as I do not know your level of background / knowledge.

What you *could* do is to control a Digital-to-Analog Converter (DAC) and synthesize an arbitrary waveform that you then feed to an amplifier. This is (basically) the same way your PC / laptop or MP3 player generates not only 'pure tones' but also play the whole gamut of music and sounds that we play through them these days:

I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.
 
  • #10
TOONCES said:
I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.

Did you even read my link? I'm thinking not...

EDIT -- we tend to frown on new posters here who aren't willing to do most of the work on their questions themselves...
 
  • #11
-Berkeman

I did read your link, it directed me to a list of micro-controller links that previously stated i was avoiding.

I did not mean to be so condescending in my reply, but I use google as well. It is not always a good source of information. Which is why I came here and have been coming here for some time.

My problem will be solved one way or another. I am not using this forum to get the work done for me, just assistance to an issue I am facing. Please redirect your patronization for myself somewhere else, as i believe it is not tolerated.

---

Now, relating to my problem.

I have decided to use a 555 timer for my main frequency, because every other oscillator i have used has been very unreliable (or i have been too sleepy while working). I have a set frequency that i developed from the scale i posted earlier. I am about to start experimenting with counters to try to divide the signal's frequency to the appropriate amount. Unfortunately, i only have access to divide-by-2 +divide-by-8 counters, and the frequencies I need to divide into to won't do this so well. If i can't determine any other solution I may end up getting some weird values, which may not sound so well in the end.
 
  • #12
The links in the hit list that I skimmed appeared to be frequency synthesizer ICs that could be used stand-alone OR with a uC as the master. I understood that one of your requests was that no uC would be involved, so I was surprised that you didn't mention something about the synthesizers in the link.

Are you familiar with how frequency synthesizers work? They can give you all kinds of strange effective divide ratios. It does seem like it would be easiest for you to use an audio frequency synthesizer IC at the core of your circuit, and figure out what you want to put around it to select the multiply/divide numbers.

Are you up for using a PAL or some other logic to control the IC?
 
  • #13
berkeman said:
Are you familiar with how frequency synthesizers work? They can give you all kinds of strange effective divide ratios. It does seem like it would be easiest for you to use an audio frequency synthesizer IC at the core of your circuit, and figure out what you want to put around it to select the multiply/divide numbers.

-I feel like what I am am doing is creating a frequency synthesizer in the first place. Maybe with just more specific frequencies? I'm not too familiar with how frequency synthesizers work.

berkeman said:
Are you up for using a PAL or some other logic to control the IC?

- PLL? and I have no problem changing the circuit up at all. What did you have in mind?
 
  • #14
TOONCES said:
I'm trying to avoid using micro-controllers to just give me what I want. I guess I want to do it the old fashioned way. .

I'm not sure how I would control a DAC to "synthesize a waveform" like you say.

Basically what I plan on doing is getting a main frequency (some sort of oscillator), then dividing it into the 7 frequencies of a blues scale, then i will input those signals into a multiplexer which is controlled by logic switches to give a "Breadboard instrument" of sorts.

The issue that i am having is that i am not sure how to divide the main frequency into the required frequencies. I don't necessarily mean "required". What i want is the relationship between the frequencies. The relationship is in one of my earlier posts (blues scale).

I don't need to have just one main frequency, but i didn't want to settle with making multiple oscillators with the set components that i have. With a setup like this i would get multiple outputs that don't relate as well as i would like and that would take up way more space than i would like (with more problems to add to that).

I hope this explanation is more. . . explanitive? Thanks for all the help I've been receiving (especially the google search hehe). More is still needed. Also, try to excuse my grammar, I have ten million things to do and can't think very straight at the moment.

If you look at the Wikipedia link on Digital-to-Analog Converters I gave, you'll see two waveforms about a quarter of the way down (beside the basic ideal operation and practical operation sections). If you wanted to output a sine wave, you'd need to tell the DAC to output, say, 0V at one particular moment, and then a few microseconds later, tell it to output 0.1V.

The key idea is that the DAC will output whatever voltage value you tell it to. You need to update the value the DAC outputs every few milliseconds so that you get something that looks like a sinusoid on the oscilloscope. Usually it isn't perfect, but it'll often be good enough (you just need to choose the right DAC for your particular application!)

That said, it sounds like you just want something that connects a particular biasing network to a 555 whenever one button is pressed. That's easy enough to do with some SPST or DPST buttons, and a handful of capacitors / resistors.

EDIT: The description of the DAC above is in contrast to the frequency synthesizer that Berkeman (and to a lesser extent, myself) have been telling you about. Instead of continuously telling the DAC what voltage value it should be outputting at any particular moment, you just tell the frequency synthesizer, "Make me a sinusoid of this frequency! Engage!"
 
  • #15
TOONCES said:
-I feel like what I am am doing is creating a frequency synthesizer in the first place. Maybe with just more specific frequencies? I'm not too familiar with how frequency synthesizers work.



- PLL? and I have no problem changing the circuit up at all. What did you have in mind?

A frequency synthesizer uses a VCO as part of the PLL building block, along with a programmable divider in the feedback comparison path. That is how you are able to synthesize different frequencies of various multiply & divide ratios:

http://en.wikipedia.org/wiki/Frequency_synthesizer

wikipedia.org said:
The key to the ability of a frequency synthesizer to generate multiple frequencies is the divider placed between the output and the feedback input. This is usually in the form of a digital counter, with the output signal acting as a clock signal.
 

Similar threads

Replies
7
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
Replies
17
Views
6K
  • · Replies 22 ·
Replies
22
Views
2K