I'd like to add a tune to my project. For some reason I can't find how to do this.
And I don't want a really complex system like in the SDMMCWavPlayer-example.
I'm trying to find a simple way to create a tune.
I assume it is possible to write a frequency and duration for every note? What would the code look like?
And a second question:
Is it possible to convert a sound to some format and just load it in to the pic? I saw something like this done in this page:
http://www.romanblack.com/picsound.htm
Would this work? And if yes, then how?
Thank you already in advance.
How to produce sound
Moderators: David Barker, Jerry Messina
Re: How to produce sound
[quote="yllis"...Is it possible to convert a sound to some format and just load it in to the pic? I saw something like this done in this page:
http://www.romanblack.com/picsound.htm
Would this work? And if yes, then how?
Thank you already in advance.[/quote]
The quality is poor.
Norm
http://www.romanblack.com/picsound.htm
Would this work? And if yes, then how?
Thank you already in advance.[/quote]
The quality is poor.
Norm
- Senacharim
- Posts: 139
- Joined: Tue Aug 10, 2010 5:19 pm
- Location: Ventura, CA
Given the limitations of an 8bit PIC so far as queuing and raw processing power, getting good quality sound will be difficult.
For just any sound, connect a PWM pin of the PIC to a speaker and you should be able to produce tones. (I've not yet tried this myself, but it's on my eventual 'to do' list.)
For just any sound, connect a PWM pin of the PIC to a speaker and you should be able to produce tones. (I've not yet tried this myself, but it's on my eventual 'to do' list.)
Surviving Member
Bermuda Triangle Battalion
from 2026 to 1992
Voted "Most likely to time travel"--Class of 2024.
Bermuda Triangle Battalion
from 2026 to 1992
Voted "Most likely to time travel"--Class of 2024.
Re: How to produce sound
I believe you will need a SD wav player if more than a second or two of recorded sound.yllis wrote:I'd like to add a tune to my project. For some reason I can't find how to do this.
And I don't want a really complex system like in the SDMMCWavPlayer-example.
I'm trying to find a simple way to create a tune.
I assume it is possible to write a frequency and duration for every note? What would the code look like?
Thank you already in advance.
Steve's SDMMCWavPlayer is good or to do a port of code based on Steve's earlier work see PIC iPod wav player.
Norm