Complex sound production

Sanct

New Member
Hi
I'm looking to try and create a complex sound using the Picaxe8 through a piezo sounder. I have seen the downloads for ringtones but I'm not trying to create a tune, more of an inteligent multi faceted sound.
Will I need other components in order to give depth etc?
Has anyone had experience in doing this?
Thanks in advance.
:)
 

Rickharris

Senior Member
Short answer - very hard - there was some discussion about using mulitple pics to produce complex sounds - try a search on sound.
 

profmason

Member
Great link! Neat idea. Off the top of my head it seems like the picaxe limitation of 250 uS executions delays would naively limit you to producing 2kHz signals. This is a about a 10th the minimum speed he is running at. If you were to fetch values from an EEPROM that would probably cut your rate in half again! YIKES! Maybe it work for James Earl Jones.
Well Kudos to whoever gets it working. I have too many projects going right now!

have fun!
 

hippy

Ex-Staff (retired)
The PICAXE probably is probably too slow to bit-bang out sound, but it can be done by other micro's programmed to do the job. There's the SID mentioned ( hard to obtain these days ) plus things like SoundGin.

Using PWM and an RC circuit to create an analogue output, to generate a 1kHz tone requires the PWM duty to be updated at least once every 500uS, every 25uS to get 40kHz sampled 'CD quality'. That's well within the capability of a modern processor able to do much more on top, but the PICAXE has its work cut out doing other things so just desn't have enough left over to work well in that task. It may do better than I expect ( especially a 28X1 at 20MHz, or over-clocked further ) but it would not be my choice for sound generation.

This fits with my philosophy that the PICAXE is absolutely fine for what it does, but it needs 'smart peripherals' and 'co-processors' to do some specific things. I don't see that as a detraction, just a fact of life.
 

Sanct

New Member
The PICAXE probably is probably too slow to bit-bang out sound, but it can be done by other micro's programmed to do the job. There's the SID mentioned ( hard to obtain these days ) plus things like SoundGin.

Using PWM and an RC circuit to create an analogue output, to generate a 1kHz tone requires the PWM duty to be updated at least once every 500uS, every 25uS to get 40kHz sampled 'CD quality'. That's well within the capability of a modern processor able to do much more on top, but the PICAXE has its work cut out doing other things so just desn't have enough left over to work well in that task. It may do better than I expect ( especially a 28X1 at 20MHz, or over-clocked further ) but it would not be my choice for sound generation.

This fits with my philosophy that the PICAXE is absolutely fine for what it does, but it needs 'smart peripherals' and 'co-processors' to do some specific things. I don't see that as a detraction, just a fact of life.
Thanks Hippy
I am a newbie to this. So if you were looking for a microproc. that you wanted to use purely for short burst 'clever' sound using a piezo(over 100Db). Maybe also a basic LED to show battery life(on/off) What spec chip would you look at? :confused:

I need something that is cost effective and readily available.
Thanks in advance
 

Sanct

New Member
Just looked at the SoundGIN it does seem very capable but
there was this comment made on linked blog.

((SoundGIN! Wasn't Parallax just working on something like this? And wasn't it going to cost a grip? Looks like it's just a nicely-pre-programmed Microchip PIC18F1320. This sounds pretty great... especially for $25.

Although it makes me think... if its just a pre-programmed PIC18F1320, if we had the firmware source, we could make our own Soundgin for much less than $25... I'm seeing $2.69 at Newark))

Is this something I could do?
Or am I off the mark?
:confused:
 

slurp

Senior Member
It's all a question of effort...

Putting the harware to one side have you see the supporting PC software for this device?

I'm thankful that PICaxe devices are lowcost but not everyone uses the same business model... I guess that's why the SoundGIN (and other BASIC controlers) have such a high price tag.

Best regards,
Colin
 

benryves

Senior Member
The VMusic2 module contains a VS1003 codec, featuring a programmable DSP. It might be possible to write some software to generate sounds that could run on the device. I intended on writing a simple SN76489 emulator for the chip, but gave up after never managing to get any of the sample VSDSP programs working.
 

hippy

Ex-Staff (retired)
Thanks Hippy
I am a newbie to this. So if you were looking for a microproc. that you wanted to use purely for short burst 'clever' sound using a piezo(over 100Db). Maybe also a basic LED to show battery life(on/off) What spec chip would you look at? :confused:

I need something that is cost effective and readily available.
Almost any micro which runs at a decent speed should do the job although you haven't specified exactly what sort of sound you want. SID, SoundGin and most other sound generators can generate sound that's acceptable for audio ( ie Musical ) use. Not sure what you'll get ( or conversely need ) if you are driving a 100dB piezo ! Piezo's are probably best driven by a square wave signal than an audio waveform I'd have thought.

This desired "clever sound" is a little enigmatic in terms of definition and it may be possible to generate something usable with a PICAXE using the SOUND commands. You're really asking us to solve a problem when you haven't said exactly what the solution needs to be.

SoundGin is just a programmed 18F1320 and anyone can write their own sound generating software if they put their mind to it. The cost mark-up covers the effort of the SoundGin programmers in providing a ready-to-go solution. You're paying not just for the chip and the time the programmers put in, but also a comprehensive PC-based test/control program, documentation, shipping and manufacturing costs and support.

If someone wants to develop their own sound generator as a project, and has a fairly relaxed timescale, a low-cost do it yourself approach is fine, but if they consider their time worth $10 an hour, they have just 2.5 hours to finish the project. If it's going to take longer then the SoundGin is more cost effective, and readily available.

I think the best way to get round any confusion and get your project up and running as fast as possible is to define exactly what this "clever sound" is. It's easier then for people to suggest what you will likely need rather than what may do what you need.

You can also start developing your project using what the PICAXE does support ( eg SOUND ) and worry about the final sound as a separate sub-project.
 

Jeremy Leach

Senior Member
I'd also not underestimate the complex sounds you might be able to get from combining the outputs from two (or more) 08M picaxes.
 

Sanct

New Member
Sorry if my 'complex sound' statement sounded a little vague.My project is really developing as I find out what technology I can use.
I'm trying to create a multi zoned alarm system that has very distinct alert warning for each zone.
The SoundGIN noises seem to fit the criteria very well.
Hope this clarifies.

Kind regards and thanks
Sanct
 

hippy

Ex-Staff (retired)
It's well worth trying the SOUND command with a variety of different frequencies and timings, some quite peculiar and very distinctive sounds can be created with it.
 
Top