News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

tiny mci multimedia player

Started by avcaballero, July 28, 2014, 06:25:24 AM

Previous topic - Next topic

Siekmanski

Creative coders use backward thinking techniques as a strategy.

avcaballero

Hello, some changes done

Now buttons work as expected: open, play/pause, stop, sequential/repeat, info. The others do nothing for now.

Tooltip changes in buttons with double function when is due, also in volume track bar.

Track bars work fine:
* status bar follows the playing position and you can interactuate with it for positioning the playing where you want.
* volume bar works fine, but the order to mci don't.

ToDo list:
* Add spectrum analyzer. Will we achieve to synchronize it with music?
* Add play list.
* Get into live buttons that for now don't work
* Make the file name oscillate in its field in status bar when doesn't fit
* Change font icons for image icons. It will increase in some kb the resulting size
* Polish the code.

Other:
* I have noticed that in some cases the file length returned by mci is not right
* It seems that mp3 are followed in milliseconds but films don't ???

Thank you all,
alfonso

Siekmanski

Hi avcaballero,

Quote
ToDo list:
* Add spectrum analyzer. Will we achieve to synchronize it with music?

Is it possible to get access to the raw audio data with the MCI api?
Creative coders use backward thinking techniques as a strategy.

avcaballero


farrier

It would be nice to see the source code for this player

A chance to educate!

tia,

farrier
For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

avcaballero

When i've finished what i'm doing.

farrier

For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

Gunther

Hi Alfonso,

Quote from: avcaballero on August 12, 2014, 04:40:34 PM
When i've finished what i'm doing.

that would be nice. You should perhaps it integrate in your tutorials. Only an idea.

Gunther
You have to know the facts before you can distort them.

avcaballero

That's the idea. A tuto on sound programming... phewww, much work. If everything works and have time. Does anyone want to participate? Here's a preview of the  spectrum analizer. Now "just" get it work.

Siekmanski

Hi avcaballero,

If it's ok with you, i'll make a minimalistic example with an oscilloscope and a spectrum analyzer.
For that i'm gonna use DirectSound for the music and Direct3D9 for the graphics.
Did search for getting access via MCI to the raw audio data but, couldn't find anything.
To keep it simple, the program will load a .WAV file ( 16 bit, Stereo, 44100 sample rate )
Think i need a week or so to write it.....
Creative coders use backward thinking techniques as a strategy.

avcaballero

Yes, it's very ok to me. If you like, i will include into the tuto and credit you as the author with your nickname, or real name, what you want, otherwise it would be nice to me just for learn.

Source code would be nice, but even better if it is accompanied by some explained notes. Will your code be masm? When i have time, or anybody else who wants, would translate it to nasmx/fasm/tinyc.

My aim is to make a tuto on sound, in the whole as i can, ie, midi, wavs, mp3, etc with differents ways of playing them (not only mci, but direct sound, playsound, etc, revive old dos crappy sounds, etc). This will require threads. I'd like to write code to play mods/xm, in a simply way, just for play them in demos/games.

Very important, synchronizing sounds and graphics.

I don't have previous experience with none of them, i'm learning as i a program.

So, very much things to do, so if any one want to contribute with code/explanation would be welcome.

Regards.

Siekmanski

Yes, it will be written in MASM.
The sound data will be converted to a 32 bit floating point sound buffer so we can do some fast SIMD coding.
For the spectrum analyzer i'll use FIR bandpass filters for each frequency band we want to show on the screen.
The graphics will be synchronized to the screen refresh rate and the sound playing at that moment.
I'll try to keep it as simple as possible ( no fancy speed tricks etc.... )

Marinus
Creative coders use backward thinking techniques as a strategy.

Siekmanski

Hi avcaballero,

Just found an old ( very bad ) modplayer routine on my old harddisk.
This was an attempt to make a Protracker the same as on the Amiga.  :biggrin:
Never finished it......

click on "disk op." to load a mod file, and then play
Creative coders use backward thinking techniques as a strategy.

Gunther

Alfonso,

the spectrum analizer looks good.

Marinus

Quote from: Siekmanski on August 14, 2014, 11:02:53 AM
Just found an old ( very bad ) modplayer routine on my old harddisk.
This was an attempt to make a Protracker the same as on the Amiga.  :biggrin:
Never finished it......

click on "disk op." to load a mod file, and then play

works with Windows 7-64 and my High Definition AMD Audio Device. Why haven't you finished the software? By the way, the wasteland file sounds very TECHNO. Only for strong nerves.  :lol: :lol: :lol:

Gunther
You have to know the facts before you can distort them.

Siekmanski

Hi Gunther,

QuoteWhy haven't you finished the software? By the way, the wasteland file sounds very TECHNO. Only for strong nerves. :lol: :lol: :lol:

Maybe i'll pick it up some day......
The wasteland mod was made by a german demo group called "Red Sector" in 1989, they had strong nerves. :lol: :lol: :lol:
Creative coders use backward thinking techniques as a strategy.