+9640News Posted April 6 Share Posted April 6 In an earlier post in another topic, I took the Extended basic example code for the AXELF theme song and converted it to MDOS. Source code is provided for anyone wanting to see the MDOS code. To be noted, extended basic uses duration in milliseconds while the MDOS XOP's use 1/60th's of a seconds for duration. Thus, I used the MDOS Math XOP's to convert the duration to floating point, divided by 1000 to get the decimal portion of time, then multipled by 60 to get the number of 60th second intervals all in floating point. Then, converted that back to an integer to call the sound routine. Another sound routine checked to see when the current sound was completed before playing the next array. Enjoy, and feel free to use the code base to convert any other music/sound files to MDOS. Beery AXELF-MDOS.zip 2 2 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted April 6 Share Posted April 6 Nice. . . Quote Link to comment Share on other sites More sharing options...
+9640News Posted April 6 Author Share Posted April 6 Thanks. It wasn't that hard to do with the original extended basic program having data statements and values instead of unprintable characters. This is probably the first time I have used the MATH XOP's in a program in 30 years. I did see something if there is room in the XOP, an additional opcode I would like to add. I was pointing to a wrong buffer converting the last math command back to an integer and the sounds were playing at the wrong speed. I had to add some debug code to see why the notes were playing too long. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.