Skip to content

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

@supercom32

Description

@supercom32

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).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions