Code Monkey home page Code Monkey logo

bambootrackerplayer's Introduction

BambooTrackerPlayer

GDExtension that can play Bamboo Tracker modules

About

BambooTrackerPlayer uses native code from Bamboo Tracker so that Godot games can import and play Bamboo Tracker modules. This means you can include .btm modules directly with your game if you wish to use them to make music for whatever reason, saving quite a lot of space. Most modern devices should be powerful enough to emulate a YM2608 in real time, but you can always double check with a profiler to see how demanding it is.

Requirements

  • Godot 4.2 or higher
  • Windows, Linux or Android for prebuilt binaries, build this repository yourself to generate a macOS version.

Basic usage

Download the latest package, and extract its contents. The .dll and .so files are native libraries that contain both the main BambooTrackerPlayer node class and the BambooTrackerModule resource class. importerplugin contains an editor plugin that imports .btm files as BambooTrackerModules, which a BambooTrackerPlayer can use. I recommend making a BambooTrackerPlayer an autoload, or rather a minimal stub script like the following that inherits from it:

extends BambooTrackerPlayer

func _ready() -> void:
    module = load("res://path/to/module.btm")
    PlayNewModule()

I recommend putting the native libraries in res://bin/, although you can always edit bambootrackerplayer.gdextension if you don't like this convention.

Use PlaySong(songNum: int, forceRestart: bool = false) or PlaySongFromName(songName: String, forceRestart: bool = false) to play songs from the module, and StopSong() to stop playing the current song. More advanced functionality will come later.

Building

Follow Godot's guide on how to build GDExtensions, since there's nothing hugely special about building this GDExtension.

bambootrackerplayer's People

Contributors

maxotaku11niku avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.