News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to synchronize music with led

Started by treena_12, February 06, 2005, 09:23:25 AM

Previous topic - Next topic

treena_12

How can I synchronize music with leds using asm?
Is it also possible to build a miniature fountain without destroying your circuit and leds?


Thanks a lot for your time.

pmpnfrsh

Are you talking leds as in Light Emitting Diodes?

Im not quite sure exactly what you want to do and/or how external leds would connect to your computer. However.

If it is the "hard-disc in use" led that you want to synchronize w/ music, the is sure to be a windows api function you could use to manipulate it. (look it up on msdn.microsoft.com)

Once you find that function, you would then have to write the code to play an mp3 file (or whatever format you music is in). In the music-play code you could then call the function to turn that hd light on and off whenever you want.

That is a lot to do. You can get a lot of *detailed* help from msdn.microsoft.com and google.com.

Iduno if you are talking about something completly different - i.e. with external leds. You certainly cant build a minature fountain with the hd light  :lol

Sorry i cant help more

donkey

First, since you failed to explain completely the hardware involved I will make a couple of assumptions..

1. The LED's are external, ie not part of your PC
2. You are using MS Windows
3. You are playing either a WAV or MP3 or some other kind of music file on a PC
4. You want the LED's to follow the "beat" of the music and pulse for each "beat"
5. You already have a driver that you can use to send a pulse to the LED's

This is not an easy problem, first you must decide how to detect a "beat", generally this is done using a particular channel frequency and slaving the LED's to that at some predetermined amplitude. For example once the channel reaches a certain decibel level you pulse the LED's. In order to do this you would need to have access to the audio drivers data stream, a difficult proposition. A much easier way is to use WinAmp and it's API to get the spectrum analyzer information and use that as your reference. Track one channel of your choosing and pulse the LED's accordingly. I am not familiar with the WinAmp API other than to control music from my applications but the NullSoft site has full documentation and should be able to answer all your questions.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

lifewire

synchronizing music with leds is very hard, synchronizing leds on music is somehow easier :toothy

QuoteIf it is the "hard-disc in use" led that you want to synchronize w/ music, the is sure to be a windows api function you could use to manipulate it. (look it up on msdn.microsoft.com)

not really, at least i can't believe that it exists.

what donkey said is true, you can maybe improve it with a (digital) low pass filter to sync on bassdrums and such, in stead of amplitude detection. digital low pass filters can be very easy to implement, usually they are just some delays, multipliers and adders with some feedback stuff.

treena_12

Thanks for all the info and straightening things . Pardon my ignorance. :red
I am required to pass a project on our subject Microprocessor (ICs). This should be  interfaced on the computer using the parallel port and assembly language to make it work. If it's not a bother could you please give me procedures and schematics on how to do it?
Using external  Light Emitting Diodes or light bulbs, I need to create different sequences with the lights that would be synchronized on a song. Now that I realized that programming the song along with the lights would be a difficult task, I'll just play the song with  the programmed sequence of lights. Could you please help me?

Thanks for reading my post.   

donkey

Hi treena_12

We have a policy here of not doing peoples homework for them. We can offer suggestions, guidelines and even general information on how to do what you need but that is all. You don't learn anything and generally neither do we so there is no point to it and frankly, it is also dishonest. If you come up with something we would be happy to critique it and to help you debug it. However, if you can find a way to give me the degree instead of yourself, I would be happy to do the work to earn it.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable