Author Topic: tiny mci multimedia player  (Read 41367 times)

Siekmanski

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #15 on: August 09, 2014, 05:06:33 AM »
Same as attached picture here.
Creative coders use backward thinking techniques as a strategy.

caballero

  • Member
  • *****
  • Posts: 2160
  • Matrix - Noah
    • abre ojos ensamblador
Re: tiny mci multimedia player
« Reply #16 on: August 11, 2014, 04:22:28 PM »
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
The logic of the error is hidden among the most unexpected lines of the program

Siekmanski

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #17 on: August 11, 2014, 05:48:33 PM »
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.

caballero

  • Member
  • *****
  • Posts: 2160
  • Matrix - Noah
    • abre ojos ensamblador
Re: tiny mci multimedia player
« Reply #18 on: August 11, 2014, 06:00:31 PM »
I don't know. I will try it
The logic of the error is hidden among the most unexpected lines of the program

farrier

  • Member
  • **
  • Posts: 58
Re: tiny mci multimedia player
« Reply #19 on: August 12, 2014, 12:06:04 PM »
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!

caballero

  • Member
  • *****
  • Posts: 2160
  • Matrix - Noah
    • abre ojos ensamblador
Re: tiny mci multimedia player
« Reply #20 on: August 12, 2014, 04:40:34 PM »
When i've finished what i'm doing.
The logic of the error is hidden among the most unexpected lines of the program

farrier

  • Member
  • **
  • Posts: 58
Re: tiny mci multimedia player
« Reply #21 on: August 13, 2014, 06:08:48 AM »
Beautiful!
For the code is dark, and full of errors!
It's a good day to code!
Don't Bogart that code, my friend!

Gunther

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Re: tiny mci multimedia player
« Reply #22 on: August 13, 2014, 08:30:13 AM »
Hi Alfonso,

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.

caballero

  • Member
  • *****
  • Posts: 2160
  • Matrix - Noah
    • abre ojos ensamblador
Re: tiny mci multimedia player
« Reply #23 on: August 13, 2014, 04:22:38 PM »
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.
The logic of the error is hidden among the most unexpected lines of the program

Siekmanski

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #24 on: August 13, 2014, 07:59:01 PM »
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.

caballero

  • Member
  • *****
  • Posts: 2160
  • Matrix - Noah
    • abre ojos ensamblador
Re: tiny mci multimedia player
« Reply #25 on: August 13, 2014, 08:25:58 PM »
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.
 
The logic of the error is hidden among the most unexpected lines of the program

Siekmanski

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #26 on: August 13, 2014, 09:24:13 PM »
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

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #27 on: August 14, 2014, 11:02:53 AM »
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

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Re: tiny mci multimedia player
« Reply #28 on: August 14, 2014, 11:53:41 AM »
Alfonso,

the spectrum analizer looks good.

Marinus

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

  • Member
  • *****
  • Posts: 2725
Re: tiny mci multimedia player
« Reply #29 on: August 14, 2014, 07:20:53 PM »
Hi Gunther,

Quote
Why 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.