I'm looking to create a small circuit that plays a melody which will b used in place of an expensive movement on a jewelry box. Yes this is fo my mother and yes it is soooo sweet of me :)
I'm a pianist so to make this gift even more personal I would use a mid which I recorded for the song. I'd like to fit 4 minutes worth. Th circuit must be low cost in small quantities and I'd prefer to use an AV since I've already got the development tools. I'd like the sound qualit to be reasonable, no piezoelectric buzzer.
On Thu, 21 Feb 2008 14:16:26 -0600, I said, "Pick a card, any card" and "Joel" instead replied:
Dissect one of those birthday cards that plays musing. Use a PIC or other chip to turn it on. The current can't be that much. They last forever and a day on the tiniest battery.
Shame on you, Ulf, for pushing AVR32. You know very well that the 8 bit AVR is more than enough to handle simple midi tone like jewelry boxes. In fact, the AVR butterfly is all he needs.
The 4M bits data flash in the butterfly can play several minutes of simple tones; unless the OP wants high quality wave sounds, which would not be anything like jewelry boxes.
If you want to do the AVR thing, though, I can see some basic scheme where you store a sequence of tones at, say, 32nd-note timesteps. The main loop generates the audio waveform; you could time it with loops or interrupts. Doing polyphony would be a challenge. Output through a resistor ladder. Op-amp buffer to small speaker. Battery life might be a problem.
create a small circuit that plays a melody which will be
for
midi
The
AVR
quality
I don't need to play Midi but that is how I will record the song. Th MP3, Stereo, and MP3 suggestions seem a bit overkill, I tried a small AV and a buzzer like the Butterfly's, using the GCC port of the Butterfl code and it was just not good enough.
less
This is more along the lines of what I'm looking for. I'd like polyphon though. Is there a setup similar to a Winbond powerspeech chip that could use? Like a small AVR, a DAC, and SPI memory big enough to hold th notes? What would this involve?
I am surprised that toy electronics designers haven't weighed in here. When I have time, I disassemble electronic toys which strike me as being feature rich at low prices and power consumption to at least document the silicon that isn't obscured (such as COB). One outstanding example is the 'Rumble Robot' which can play polyphonic melodies as well as speak with good fidelity. The MCU is the Jaztek 21000 series which seems to have free tools and may be an option in small quantities unlike other volume-targeted micros. Here is a list of appropriate PDFs which apply to some degree to this line (clues for a search engine):
ICE and dev/sim tools for Win32 are freely available the last time I checked.
I have no personal experience with this micro yet but it interested me enough to collect the docs, tools, app notes and example code. The onboard RAM can play up to six minutes of audio, depending on format, which may be useful for a jewelry box.
I am sure that there are a vast number of other options that others may recommend, if the toy folks would care to pitch in ;)
Well I found some of the PDFs. They look great. The development syste seems to be called JazEasy but I can't seem to find it, the manufacturer' website, or anywhere to buy the chips. Help?
If you can generate an interrupt at the final sample rate, just use some (up to ten for piano, six would be sufficient for a guitar) 32 bit phase accumulators and add a frequency specific phase increments to the phase accumulators. Use the 8-12 highest bits from the phase accumulator to access the actual sample value from a look up table (LUT).
In typical NCO (numerically controlled oscillator) application, the LUT would contain the amplitudes for a single sine wave cycle to generate a pure sine wave on an arbitrary frequency. However, for a musical instrument, you could store a more complex periodic waveform with some harmonics into the LUT. You could even use a different LUT for the attack and decay part of the note to vary the harmonic contents during the note.
When storing complex waveforms, the highest harmonic number should be sufficiently low that the highest_tone x highest_harmonic is less than fs/2 to avoid aliases.
If I were giving away a present like this, then I would want it to sound like a Steinberg piano, not a Mattel toy. (Hope Guy Macon doesn't read this...)
The Dream chips contain either a 64 or 128 channel multithreaded DSP so it is easy to handle multiple MIDI channels.
--
Best Regards,
Ulf Samuelsson
This is intended to be my personal opinion which may,
or may not be shared by my employer Atmel Nordic AB
I am with Ulf on this one. The sound of a real music box is a thing of beauty. You really don't want it to sound like a Mattel toy. (Which, by the way, is likely to average 6 bits per sample for spoken words and 4 bits for musical beeps.)
Then again, there are some really cheap Chinese music box movements that sound *worse* than a Mattel toy... :(
Fitting two 200 Watt 15" speakers in a jewelry box? Unless of course a Steinberg sounds nothing like a Steinway.
--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.