Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle a module/tracker library that supports volume control and automatic (background) playback. #13

Open
supercom32 opened this issue Jan 1, 2018 · 0 comments

Comments

@supercom32
Copy link
Collaborator

Possible enhancement identified using the latest version of Dragon Basic under Linux (Commit ID: d2ce042)

With the previous closed-source version of Dragon Basic (including all community add-on libraries), the included module tracker supported volume control (fade in/fade out), as well as background music playback. While the new included library supports more tracker formats and arbitrary pattern/playback control, it lacks control for volume (fading in and out music).

In addition, in order to use the new library, users need to include update calls in the form of "modvblank" and "modframe" to their code at very specific timings in order for music to playback correctly. In the previous implementation of tracker support for Dragon Basic, users simply called "Nmod_Play" and music would play in the background automatically. This is useful since some games may not be written in such a way that "modvblank" and "modframe" can always be called when needed. An example of this is any game that does not use a "Main loop" for it's game engine (Ie. visual novels, or anything with arbitrary branching paths which may or may not block code execution until a user makes a decision). Unless you pepper "modvblank" and "modframe" everywhere (which still may not work due to timing), there is no single/central loop where you can add it to your code.

Note: I tried setting up interrupts using vBlanks, etc, to automatically handle playback in the background, but nothing seemed to work. Ether the interrupts took up 100% of the CPU time (Ie. By the time it finished another interrupt already triggered so it never returned back to my code - I suspect), or the music came out garbled because the timings were off (but it did return to my code).

@supercom32 supercom32 changed the title (Enhancement) Bundle a module/tracker library that supports volume control and automatic (background) playback. Bundle a module/tracker library that supports volume control and automatic (background) playback. Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant