Melody Circuit

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.

Any ideas, advice, etc?

Reply to
Joel
Loading thread data ...

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.

-- Ray

Reply to
Ray Haddad

On Fri, 22 Feb 2008 05:30:41 +0900, I said, "Pick a card, any card" and Ray Haddad instead replied:

Sorry. Missed the bit where you wanted to record your own music.

-- Ray

Reply to
Ray Haddad

Buy a cheap MP3 player. I've seen ones that take SD cards but have no memory of their own for less than 10UKP

Reply to
Deep Reset

"Joel" skrev i meddelandet news:JLSdnak2xa-HQSDanZ2dnUVZ snipped-for-privacy@giganews.com...

Running midi is fairly complex. YOu can check out the "Dream" MIDI chips at

formatting link

An MP3 player application might be a better alternative, but then an AVR32 would be a better choice. You can download compiler /AVR32 studio for free.

Raw storage of 4 minutes of 48 kHz stereo sound is 46 MBytes, but that would be simple to implement using a 64 MB NAND flash..

--
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
Reply to
Ulf Samuelsson

meddelandetnews:JLSdnak2xa-HQSDanZ2dnUVZ snipped-for-privacy@giganews.com...

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.

Reply to
linnix

small circuit that plays a melody which will be

formatting link

Yeah, why settle for MIDI in this day and age?

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.

Reply to
mng

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?

Reply to
Joel

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):

JA21000.pdf JA23000.pdf JA29287series.pdf JA21000PG.pdf JA23000PG.pdf JA292XXUM.pdf JA21XXXUM05.pdf JA29214.pdf JA292XXUM_CH.pdf

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 ;)

Michael

Reply to
msg

AVR

engine):

This looks like a great lead. I'll read up, thank you!

Reply to
Joel

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?

Reply to
Joel

Is your email address valid? I'll contact you offline to let you grab my collection.

Michael

Reply to
msg

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.

Paul

Reply to
Paul Keinanen

Yup my email is valid. Thanks again.

Reply to
Joel

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
Reply to
Ulf Samuelsson

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... :(

Reply to
Guy Macon

Does anyone have experience with these dream chips? Seems like som pretty serious silicon. How would I input the midi?

Reply to
Joel

"Joel" skrev i meddelandet news:usOdnZKB0vHceV_anZ2dnUVZ snipped-for-privacy@giganews.com...

Through the MIDI UART :-)

There is a P16 16 bit micro inside (Don't Ask!), and I guess that could feed the multithreaded DSPs from a flash connected to the P16 bus.

--
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
Reply to
Ulf Samuelsson

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
Reply to
Albert 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.