English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Blitz Basic (https://eab.abime.net/forumdisplay.php?f=126)
-   -   [blitz] playing MED files - soooo slow.... (https://eab.abime.net/showthread.php?t=106652)

peceha 18 April 2021 11:36

[blitz] playing MED files - soooo slow....
 
Hi,
I've been trying to play MED file with BB2 and .. it works but ... the result you can hear on the video below.

At the very beginning of the video I start playing Agony tune inside HippoPlayer just to show that the converted file plays fine (converted to .med format with SoundStudio program).
Later on I start the same .med file from BB2 and the music does not play right.

https://www.youtube.com/watch?v=9YmNnl3QCdo

And here comes the code for my tests:
https://i.ibb.co/SKfp2LL/DSC-0530.jpg

Can anybody tell me where the mistake is?

Thanks

Cobe 18 April 2021 14:16

You made no mistake. I experienced the same many times. And than I switched to phx's library which I recommend.
However, the solution to your problem would be that you add protracker command for speed like Fxy at the beginning of the 1st pattern of the med file.

Also try octamed(exclusive?) command for speed 9xy.

Daedalus 18 April 2021 19:39

Yeah, it's possible that it's simply misinterpreting the speed it should play at. On the other hand, having the debugger running might be slowing things down significantly, and the VWait command isn't particularly efficient when it's used in a mostly empty loop like that where framerate sync isn't important. Try changing VWait to
Code:

Delay_ 1
and see if it makes any difference.

peceha 18 April 2021 20:22

I changed VWAIT to Delay_ 1 and switched off debugger but unfortunately that didn't change a thing...

then I followed @Cobe's recommendation tu use phx's library and... :great Now the music plays smoothly and at the correct speed

https://www.youtube.com/watch?v=bHu8L1S9qIU

Thanks

peceha 18 April 2021 21:42

Looks like I have small issue with the player.... cannot stop the music.

MTPlay Off
MTEnd

none of the above stops the playback - when my program quits to WB the music keeps playing... hmmm..

Cobe 18 April 2021 23:25

Hmm indeed. I've experienced that only if I ENDed without prior execution of those commands.

Galahad/FLT 18 April 2021 23:41

Maybe load the module up in Protracker and play it and see if its vblank or cia timed, Protracker will tell you.

It could be that Blitz doesn't support cia timed mods


All times are GMT +2. The time now is 05:47.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04179 seconds with 11 queries