Pages: 1 [2]   Go Down
Author Topic: Playing simultaneous tones?  (Read 1690 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

never mind, I get it now.

What about http://sealedabstract.com/code/bassdll-an-arduino-piezo-music-library/? What does this one do, and how would I use it? (sorry for prolonging this thread, I just want to learn as much as I can)
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Playing simultaneous tones?

Use the hardware pwm modules or even with timer isrs if the frequencies aren't too high.
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are basically two ways to generate sound from the Arduino -

1) using the timers to generate squarewaves

2) using DDS to generate waveforms which may include square, triangle, sine, noise and many others.

DDS has the advantage that you can easily add envelopes to create a more interesting sound, you can also add more channels or mix multiple channels into fewer channels etc. Then you can get into waveshapers, digital filters, wavefolding etc etc etc.

Peizo projects will tend to be based on 1) the output volume is not controlled by software, only the frequency, a lot like just using the tone library.

With the timer based methods you can fake envelopes to a degree by dropping the fequency rapidly which creates and effect similar to a note tailing off as it decays for a more interesting sound.

Duane B

rcarduino.blogspot.com
« Last Edit: January 27, 2013, 07:48:47 am by DuaneB » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 27
// no comment
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume bassDLL uses DDS, judging from your description. How would I use it?
Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am not sure that it does, but if you want to I can only point you to the same Illutron B project that I have suggested in the past. The post includes a nice external link to a DDS introduction which generates a sinewave, the post itself then goes into more detail on creating musical sound.

If you pm me your email address i can send you the code.

I know that in the past you have concluded that its too complicated, it isnt really I have extensivley commented the code and if you want to take the next step to better sound its as good a step as any.

Duane B
Logged


Pages: 1 [2]   Go Up
Jump to: