Exact match. Not showing close matches.
PICList
Thread
'[PIC]: Making sounds with Pics'
2004\06\17@183253
by
Lindy Mayfield
A few people mentioned making different sounds with PICS, like bird chirps or other tones. This sounds like a good project to experiment with. I've looked on the internet for how to do this but have not been very successful.
Does anyone have any links or hints about this?
TIA Cheers,
Lindy
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2004\06\17@183914
by
Robert B.
I'm also curious about how this might be done. As a kid I had one of those
101 electronic projects, and I pulled out the old sound projects (machine
gun, police siren, burglar alarm) and they're all made with analog parts.
It seems like a D/A converter would be needed to reproduce any sort of sound
very accurately with a PIC, no?
{Original Message removed}
2004\06\17@190702
by
John J. McDonough
Well, yes, you need a DAC, but it doesn't necessarily need to be an
expensive store-bought one. (8 bit serial DACs can be had pretty cheaply,
however).
Imagine that you have a PIC pin connected to the hot end of a cap. When you
turn the output on, the cap will charge. When you turn it off, the cap will
discharge. Given an appropriate capacitor value, you can adjust the voltage
by adjusting the duty cycle of the output.
I have had good success getting extremely clean sine waves with this
technique with a regular port. I suspect you could do a lot better using a
PWM output, but I haven't fiddled with that. I haven't tried odd waveforms,
but I don't see why not.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
{Original Message removed}
2004\06\17@195751
by
Mike Singer
> A few people mentioned making different sounds with PICS, like bird
chirps
> or other tones. This sounds like a good project to experiment with.
I've
{Quote hidden}> looked on the internet for how to do this but have not been very
> successful.
>
> Does anyone have any links or hints about this?
>
> TIA
> Cheers,
> Lindy
> I'm also curious about how this might be done. As a kid I had one of
> those
> 101 electronic projects, and I pulled out the old sound projects
(machine
> gun, police siren, burglar alarm) and they're all made with analog
parts.
> It seems like a D/A converter would be needed to reproduce any sort of
> sound
> very accurately with a PIC, no?
Perhaps MicroChip App Notes are worth to start with, like:
AN655 D/A Conversion Using PWM and R-2R Ladders to Generate Sine and ...
Mike Singer.
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2004\06\17@195958
by
Jinx
2004\06\17@201709
by
Robert B.
Well I'll be.... thats one of the more clever things I've seen lately. I'd
tried making something like that with a capacitor network and diodes, but it
never came very close to actually working, so I stuck it out with an 8-bit
DAC. Thanks for the link, this will come in pretty handy for a few projects
on the back burner, too. It sounds like a simple voice recorder might be
possible using the ADC on many pics to record sounds, writing the sound
bytes to an external mem, and replaying using something similar to the R2R
DAC shown in the appnotes. Indeed, very clever, and it just might work.
{Original Message removed}
2004\06\17@203639
by
Lindy Mayfield
> > A few people mentioned making different sounds with
> > PICS, like bird chirps or other tones
>
> I was suggesting you use the piezo a la mobile phone, but
> you should have a look at this too
>
> http://www.romanblack.com/picsound.htm
That's a good one! Thanks.
Oh, and I understood your suggestion, but I thought that making songs would be too easy. (My university degree is in music theory. (-: )
What I'd really love to do (or be able to do) would be to build an analog synthesizer. Like with the wave/noise generators, ADSR, patch cables, etc. You could really get some nice sounds from those.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2004\06\18@043419
by
Alan B. Pearce
> A few people mentioned making different sounds with PICS, like bird chirps
> or other tones. This sounds like a good project to experiment with. I've
> looked on the internet for how to do this but have not been very
successful.
>
> Does anyone have any links or hints about this?
Check out Olin's halloween project at http://www.embedinc.com/pic/ as it
uses the PWM module to generate sounds on a 16F87x chip. He also has a
program there to make wav files into a form that can be stored in pic rom
space to do these sounds. You will also need his development environment to
assemble the project. Make sure you load the files in date order, oldest
first to get everything correctly located and most up to date.
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@060454
by
Tom Smith
John Iovine's PIC Microcontroller Project Book, Chapter 7 uses the SPO-256 speech synthesizer chip as a basis for an interesting project.
A more recent offering can be found in David Cook's Intermediate Robot Building, Chapter 18, which uses an LM386N-1 to drive a small (8 ohm) speaker. Cook discusses the system he developed to play tones and tunes. He provides sufficient information--about six pages--to roll your own. Cook uses the Motorola KX8 uC but adapting his method to a PIC should be trivial.
Cheers,
Tom
{Original Message removed}
2004\06\18@091651
by
Lindy Mayfield
>
> John Iovine's PIC Microcontroller Project Book, Chapter 7 uses
> the SPO-256 speech synthesizer chip as a basis for an
> interesting project.
>
This book I have. I couldn't find that part or a similar one, though, here in Germany. I'm sort of limited by what I can get at Conrad.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@143755
by
John N. Power
|
> From: Lindy Mayfield[SMTP:Lindy.Mayfield
KILLspamEUR.SAS.COM]
> Sent: Thursday, June 17, 2004 6:32 PM
> To: .....PICLISTKILLspam
.....MITVMA.MIT.EDU
> Subject: [PIC]: Making sounds with Pics
> A few people mentioned making different sounds with PICS, like
> bird chirps or other tones. This sounds like a good project to
> experiment with. I've looked on the internet for how to do this
> but have not been very successful.
> Does anyone have any links or hints about this?
> TIA
> Cheers,
> Lindy
Texas Instruments used to make the SN76477 and the SN76496.
These are listed as "sound generators" and were meant to be
used in video games to produce a variety of sound effects. They
contained a noise source and various envelope generators.
The former chip (and maybe the latter) are no longer made, but the
data sheets may be available somewhere. They showed how various
sounds were synthesized; this might give you some ideas.
John Power
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUT
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@164152
by
Lindy Mayfield
|
>
> Texas Instruments used to make the SN76477 and the SN76496.
> These are listed as "sound generators" and were meant to be
> used in video games to produce a variety of sound effects. They
> contained a noise source and various envelope generators.
> The former chip (and maybe the latter) are no longer made, but
> the
> data sheets may be available somewhere. They showed how various
> sounds were synthesized; this might give you some ideas.
>
> John Power
This is an interesting subject. I was looking at the embedinc website on their HAL project, and how they use PWM to make all sorts of sounds. It went right over my head, but it gave me ideas to experiment with.
Just the PWM output from this code produces a sound like a motor, sort of like the one from Pink Floyd's Welcome to the Machine:
test
banksel T2CON
btfss T2CON,TMR2IF
goto $-1
banksel CCPR1L
decf CCPR1L,f
banksel PR2
incf PR2,f
goto test
So it got me to thinking that with the proper algorithms and maybe a little help from some simple wave shaping components, one could get an awful lot of good sounds from a PIC easily.
Make the input voltage controlled and then it would be easy to build a sonar or IR controlled Theremin, or as another PIC project create a midi to control voltage converter.
It also got me to thinking about the difference between using tables to produce a wave as opposed to using an algorithm.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listserv
spam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@170531
by
Shawn Wilton
|
Hey Lindy,
I'm curious, are you hooking this up to a piezo or some other speaker?
Lindy Mayfield wrote:
{Quote hidden}>>Texas Instruments used to make the SN76477 and the SN76496.
>>These are listed as "sound generators" and were meant to be
>>used in video games to produce a variety of sound effects. They
>>contained a noise source and various envelope generators.
>>The former chip (and maybe the latter) are no longer made, but
>>the
>>data sheets may be available somewhere. They showed how various
>>sounds were synthesized; this might give you some ideas.
>>
>>John Power
>
>
> This is an interesting subject. I was looking at the embedinc website on their HAL project, and how they use PWM to make all sorts of sounds. It went right over my head, but it gave me ideas to experiment with.
>
> Just the PWM output from this code produces a sound like a motor, sort of like the one from Pink Floyd's Welcome to the Machine:
>
> test
> banksel T2CON
> btfss T2CON,TMR2IF
> goto $-1
> banksel CCPR1L
> decf CCPR1L,f
> banksel PR2
> incf PR2,f
> goto test
>
> So it got me to thinking that with the proper algorithms and maybe a little help from some simple wave shaping components, one could get an awful lot of good sounds from a PIC easily.
>
> Make the input voltage controlled and then it would be easy to build a sonar or IR controlled Theremin, or as another PIC project create a midi to control voltage converter.
>
> It also got me to thinking about the difference between using tables to produce a wave as opposed to using an algorithm.
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (
http://www.grisoft.com).
> Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
>
>
> --
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email
@spam@listservKILLspam
mitvma.mit.edu with SET PICList DIGEST in the body
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspam
mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@171839
by
Lindy Mayfield
|
I have it hooked up to both. With the piezo it sounds wimpy, but connected directly to my sound card it sounds kinda cool. For such a simple bit of code, that is.
Oh, if you tried it, I apologize. I wasn't totally complete. The prescaler is set to 16:
; PWM Configuration
movwf TRISB
banksel T2CON
movlw b'00000111' ; prescaler
movwf T2CON
(oh, be sure and set the volume very low to begin with.)
{Quote hidden}> Subject: Re: [PIC]: Making sounds with Pics
>
> Hey Lindy,
> I'm curious, are you hooking this up to a piezo or some other
> speaker?
>
>
> Lindy Mayfield wrote:
>
> >>Texas Instruments used to make the SN76477 and the SN76496.
> >>These are listed as "sound generators" and were meant to be
> >>used in video games to produce a variety of sound effects.
> They
> >>contained a noise source and various envelope generators.
> >>The former chip (and maybe the latter) are no longer made, but
> >>the
> >>data sheets may be available somewhere. They showed how
> various
> >>sounds were synthesized; this might give you some ideas.
> >>
> >>John Power
> >
> >
> > This is an interesting subject. I was looking at the embedinc
> website on their HAL project, and how they use PWM to make all
> sorts of sounds. It went right over my head, but it gave me
> ideas to experiment with.
> >
> > Just the PWM output from this code produces a sound like a
> motor, sort of like the one from Pink Floyd's Welcome to the
> Machine:
> >
> > test
> > banksel T2CON
> > btfss T2CON,TMR2IF
> > goto $-1
> > banksel CCPR1L
> > decf CCPR1L,f
> > banksel PR2
> > incf PR2,f
> > goto test
> >
> > So it got me to thinking that with the proper algorithms and
> maybe a little help from some simple wave shaping components,
> one could get an awful lot of good sounds from a PIC easily.
> >
> > Make the input voltage controlled and then it would be easy to
> build a sonar or IR controlled Theremin, or as another PIC
> project create a midi to control voltage converter.
> >
> > It also got me to thinking about the difference between using
> tables to produce a wave as opposed to using an algorithm.
> >
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuT
mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@184430
by
Jinx
2004\06\18@185924
by
David VanHorn
At 10:43 AM 6/19/2004 +1200, Jinx wrote:
>> Texas Instruments used to make the SN76477 and the SN76496.
>> These are listed as "sound generators" and were meant to be
>> used in video games to produce a variety of sound effects
>
>Here are a couple of others
The GI-AY-8910 went into a LOT of credit card terminals.
One particular firmware set had a bug that would skip into a test routine we wrote for the sound chip, and generate a falling screech, then explosion sound. An elegant way to crash, sort of..
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseME
spam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@192244
by
Lindy Mayfield
|
Just thinking out loud, but what would a PIC have to do to be a synthesizer?
One would need to start with the source, a wave form. This could either be generated mathematically or based on internal tables.
Next would be to manipulate the characteristics of the sound. There is the pitch, controlled by voltage, a good use for the A/D maybe. Duration would be controlled by software. Timbre would be the wave form. Volume, I don't know how that would be done.
The shaping of the sound's ADSR (attack, decay, sustain, release) could be done in software, I think (depending on how volume works).
{Quote hidden}> At 10:43 AM 6/19/2004 +1200, Jinx wrote:
>
> >> Texas Instruments used to make the SN76477 and the SN76496.
> >> These are listed as "sound generators" and were meant to be
> >> used in video games to produce a variety of sound effects
> >
> >Here are a couple of others
>
> The GI-AY-8910 went into a LOT of credit card terminals.
>
> One particular firmware set had a bug that would skip into a
> test routine we wrote for the sound chip, and generate a falling
> screech, then explosion sound. An elegant way to crash, sort
> of..
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistserv
TakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@192906
by
Lindy Mayfield
> Just thinking out loud, but what would a PIC have to do to be a
> synthesizer?
>
> One would need to start with the source, a wave form. This
> could either be generated mathematically or based on internal
> tables.
>
> Next would be to manipulate the characteristics of the sound.
> There is the pitch, controlled by voltage, a good use for the
> A/D maybe. Duration would be controlled by software. Timbre
> would be the wave form. Volume, I don't know how that would be
> done.
Just to try to answer myself (also based on doing a lot of reading) maybe the answer to this is the duty cycle. Hmmm. LED's go off in my head now.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseME
.....mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@194529
by
Jinx
> Next would be to manipulate the characteristics of the sound.
> There is the pitch, controlled by voltage, a good use for the
> A/D maybe. Duration would be controlled by software. Timbre
> would be the wave form. Volume, I don't know how that would be
> done.
You might want to do some calcs about how much processing time
this will take. Basic functions like duration and volume would be
fairly straightforward, but timbre/envelope/ASDR/filtering would be
quite time-consuming, especially in combination, which limits the
upper frequency.
I think my preference would be for the more demanding processes
to be voltage-controlled analogue circuits. For example using 4066
switches in a capacitor network controlled by PWM for a VCF (v-c
filter) or with no caps for a VCA (v-c amplifier). VCF and VCA ICs
are around, eg MC3340 which I have used for guitar tremolo pedals
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistserv
mitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@195401
by
Vern Jones
Hello Lindy,
A very good source of Musical Application Data can be found in Hal
Chamberlin's book "Musical Applications of Microprocessors" published by
HADEN books. ISBN 0-8104-5768-7. My copy was printing #9 Second Edition in
1993, you might try Amazon to see if a copy can still be found. A good part
of the book covers just about any synthesis method there is, with lots of
theory behind it. No doubt many of todays Musical instruments and Musical
instrument makers refered to this text.
Happy reading and building.
Vern
{Original Message removed}
2004\06\18@203420
by
Ishaan Dalal
|
Lindy,
Firstly, see if you can get a used copy of Hal Chamberlin's "Musical
Applications for Microprocessors" (1985). This is the "bible" of digital
music generation. Of course, it doesn't have too much code in it (but
whatever there is is in (GW)BASIC), mostly conceptual.
I assume the D/A stage is whatever you find works. I'll talk about the
generation stage. I made a half-complete analog synth project with a
PIC18 for school, though I used a 12-bit DAC since my synth had a
"karaoke" feature for an external stereo input.
To generate basic sines, a good way is to use Direct Digital Synthesis
(DDS). This involves one lookup table (LUT), that can be full, half or
quarter wave depending on how much precision you want and how much time
you want to spend coding the looparounds for half/quarter-wave tables.
There is an accumulator, which basically loops around the table at some
rate, producing an output sine of varying frequency based on the
accumulator rate. Depending on your accumulator precision, extremely
accurate tone generation is possible...down to the hundredths of
a Hz. Check out Analog Devices' excellent appnotes on DDS.
Square, sawtooth and triangles are obviously much easier to generate
(toggling, continuous increment/decrement), although these could also be
implemented using DDS.
The 18F's 8x8 multiplier lends itself to an excellent envelope
generator/rudimentary amplitude control (although the overall volume
control is much better done at the analog end, since you don't want to
be dropping overall precision of the output digital stream). How the
envelope generator would work would be to either use a segmented
envelope made of increment, decrement, max, min, OR, for a complex
envelope (curves/exponential/sine), again, either code it in, or to use
DDS again, only this time you would not be looping indefinitely around
the LUT.
Manual control of pitch, etc. is as simple as using one of the PIC ADCs
to sample a POT.
Of course, the reason why the project is half complete is a lot of
fancier things (tremolo, etc.) can be done in real-time with a DSP
instead of a high-end MCU. I was also looking at using inverse Fourier
transforms to directly generate multiple voice, multiple-timbre tones at
one go (all the above I talked about would entail using multiple PICs
for many "voices"...I had the DDS/linear-segmented ADSR doing either 3
unrelated fundamental-frequency tones or 4 octave-multiple (e.g. 220,
440, 880..) tones. My goal was to maintain a sample rate of 39.6125 KHz
(1/256th of 10 MIPS), because of my external audio input. So this was
all I could do in 255 instruction cycles. If you drop the sample rate,
naturally you could fit more voices/effects onto 1 PIC.
Since the new dsPICs are coming out, I'll probably port the project to
it and continue work on it in my spare time.
Cheers,
-Ishaan
Lindy Mayfield wrote:
> Just thinking out loud, but what would a PIC have to do to be a synthesizer?
>
> One would need to start with the source, a wave form. This could either be generated mathematically or based on internal tables.
>
> Next would be to manipulate the characteristics of the sound. There is the pitch, controlled by voltage, a good use for the A/D maybe. Duration would be controlled by software. Timbre would be the wave form. Volume, I don't know how that would be done.
>
> The shaping of the sound's ADSR (attack, decay, sustain, release) could be done in software, I think (depending on how volume works).
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservEraseME
EraseMEmitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@205325
by
Lindy Mayfield
Mucho Thanks!
>
> Lindy,
>
> Firstly, see if you can get a used copy of Hal
> Chamberlin's "Musical
> Applications for Microprocessors" (1985). This is the "bible" of
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspam_OUT
KILLspammitvma.mit.edu with SET PICList DIGEST in the body
2004\06\18@220322
by
Bob Ammerman
> Texas Instruments used to make the SN76477 and the SN76496.
> These are listed as "sound generators" and were meant to be
> used in video games to produce a variety of sound effects. They
> contained a noise source and various envelope generators.
> The former chip (and maybe the latter) are no longer made, but
> the
> data sheets may be available somewhere. They showed how various
> sounds were synthesized; this might give you some ideas.
>
> John Power
If someone is interested in playing with one of these, I think i _may_ have
one buried in one of my junk drawers. If you want it, you can have it (if I
actually still have it!)
Bob Ammerman
RAm Systems
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuT
spammitvma.mit.edu with SET PICList DIGEST in the body
More... (looser matching)
- Last day of these posts
- In 2004
, 2005 only
- Today
- New search...