Open Adaptive Music Library module for godot engine

License

oamlGodotModule

Open Adaptive Music Library module for godot engine

For info on oaml check out https://github.com/oamldev/oaml

Usage

Clone the repository inside your godot/modules dir:

  cd godot
  cd modules
  git clone --recursive https://github.com/oamldev/oamlGodotModule

Now rebuild godot and then you can use the module inside a gdscript, check oamlGodotDemo for an example.

Owner
oamldev
Open Adaptive Music Library
oamldev
Comments
  • Godot 3.0 compatibility

    Godot 3.0 compatibility

    Hi,

    Considering Godot 3.0 is now officially out, is there a reflection currently going on as to the fate of this module?

    I am looking forward to see oaml support on latest Godot and could give it a go on my spare time, however with the massively breaking changes on Godot audio system I would be glad to get your insight as to what the general (re-)design should be.

    Thanks a lot for your awesome work on oaml.

  • Making the oamlGodotModule Inherit from Node?

    Making the oamlGodotModule Inherit from Node?

    Have you considered making the oamlGodotModule inherit from the Godot Node class, instead of from Reference? If so, were there any issues with doing so? Making it inherit from the Node class would make OAML slightly simpler to use it within Godot.

    At present, OAML can only be used in Godot by instancing a variable within a script. Making it inherit from Node would have the following advantages:

    1. It would allow Godot scripts to "extend" the oamlGodotModule class, making it possible for it to be a singleton. At present to make an OAML singleton in Godot, it is necessary to e.g. create a script extending the Node base class itself, and having OAML there as a member variable.

    2. Scenes could instance OAML directly as nodes.

    If you approve of the idea, I can make a pull request with the necessary changes.

  • Make the PlayTrack Functions Return their Result

    Make the PlayTrack Functions Return their Result

    One very useful thing in the OAML API is that the PlayTrack functions return a code containing their result, as then if the play track call failed, a less restrictive one can be issued (e.g. trying PlayTrackByGroupAndSubgroupRandom first and if that fails then using PlayTrackByGroupRandom instead).

    Though the OAML return codes are not exposed via the OAML module, I think it would still be very useful to return a boolean (with true on success) for play track calls, as that would deliver what seems to be the most important information to me (whether the call was successful or not). This pull request implements that, making each PlayTrack function return true if the internal call resulted in an OAML_OK code, and false otherwise.

  • Added oamlGodotModule::ReadDefsFile function

    Added oamlGodotModule::ReadDefsFile function

    This pull requests allows ReadDefsFile to be called from the oamlGodotModule class, necessary for loading multiple OAML definitions (as I do in Wyrmsun for instance; and I am currently adapting Wyrmsun's engine Wyrmgus to become a Godot module).

  • Missing c++11 flags?

    Missing c++11 flags?

    Trying to compile Godot with this very module leads to a compilation error on aif.cpp.

    How to reproduce (tested on Linux Mint):

    # Shallow clone Godot
    git clone --depth 1 https://github.com/godotengine/godot.git my_compiler_issue
    cd my_compiler_issue
    
    # Add oamlGodotModule as submodule
    git submodule add https://github.com/oamldev/oamlGodotModule.git modules/oamlGodotModule
    git submodule update --init --recursive
    
    # Compile!
    scons platform=x11 tools=no bits=64 target=release_debug
    

    Which will result in:

    ...
    [Initial build] Compiling ==> modules/mbedtls/register_types.cpp
    [Initial build] Compiling ==> modules/oamlGodotModule/oamlGodotModule.cpp
    [Initial build] Compiling ==> modules/oamlGodotModule/register_types.cpp
    [Initial build] Compiling ==> modules/oamlGodotModule/oaml/src/ByteBuffer.cpp
    [Initial build] Compiling ==> modules/oamlGodotModule/oaml/src/aif.cpp
    In file included from /usr/include/c++/5/thread:35:0,
                     from modules/oamlGodotModule/oaml/include/oamlBase.h:26,
                     from modules/oamlGodotModule/oaml/include/oamlCommon.h:85,
                     from modules/oamlGodotModule/oaml/src/aif.cpp:28:
    /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
     #error This file requires compiler and library support \
      ^
    In file included from modules/oamlGodotModule/oaml/include/oamlCommon.h:85:0,
                     from modules/oamlGodotModule/oaml/src/aif.cpp:28:
    modules/oamlGodotModule/oaml/include/oamlBase.h:37:7: error: 'thread' in namespace 'std' does not name a type
      std::thread *bufferThread;
           ^
    modules/oamlGodotModule/oaml/include/oamlBase.h:38:7: error: 'mutex' in namespace 'std' does not name a type
      std::mutex mutex;
           ^
    scons: *** [modules/oamlGodotModule/oaml/src/aif.x11.opt.debug.64.o] Error 1
    scons: building terminated because of errors.
    

    Is there any workaround to get this correctly? I guess this is related to commit "Added a thread (using std::thread) that processes the audio tracks, t…" in oamldev/oaml (https://github.com/oamldev/oaml/commit/00c247ead6b134e4ed5f0caa0fe6e6d6f7c013f9). Looks like subsequent fix is not effective on every configuration.

    Thanks a lot for your efforts!

  • May I ask why your code does not inherit AudiostreamPlayback?

    May I ask why your code does not inherit AudiostreamPlayback?

    I got bored and dabbed at your code a bit based on the random steam announcement.

    https://steamcommunity.com/games/370070/announcements/detail/1805287364811530718

    I believe audioplayer receive a reference of Audiostream which exports an audiostreamplayback which has the state. May I ask how your code plays audio without using Godot internal's audio drivers?

    https://github.com/godotengine/godot/blob/master/scene/audio/audio_stream_player.h#L49

    https://github.com/godotengine/godot/blob/master/scene/audio/audio_stream_player.cpp#L176

    https://github.com/godotengine/godot/blob/master/scene/audio/audio_stream_player.h#L49

  • oamlGodotModule Node Inheritance

    oamlGodotModule Node Inheritance

    This pull request makes the oamlGodotModule class inherit from Node instead of from Reference, for the reasons detailed in issue #8 . Namely, it can now be instanced directly, without needing to be a member variable of a node.

    For example: without this change, I had to have an otherwise empty node containing OAML in order to use the latter. I called this node "music_player", and the oamlGodotModule instance "oaml_module". To interact with OAML, then, I needed to make calls like this:

    music_player.oaml_module.play_track("MenuTheme")
    

    With this pull request, I can instance OAML directly as a node. So I removed the parent node from the process, and renamed the oamlGodotModule instance to "music_player", and now I call it directly, like this:

    music_player.play_track("MenuTheme")
    
  • Replace exported method names with snake_case equivalents

    Replace exported method names with snake_case equivalents

    This looks more Godot-ish, right?

    This breaks all kind of compatibility with previous versions of the module. I'm of course open to discussion as to what could reduce havoc in your opinion.

  • Bad link to oaml repository (missing LoadTrackProgress)

    Bad link to oaml repository (missing LoadTrackProgress)

    Hello and thank you for this Godot module. I would like to report following issue: Link to oaml repository (@ 6e3081d) is not up-to-date to compile oamlGodotModule, indeed LoadTrackProgress function was introduce in commit 07a9724

    Here is the error log: compiling oamlGodotModule.cpp (g++) modules/oamlGodotModule/oamlGodotModule.cpp: In member function 'float oamlGodotModule::LoadTrackProgress(String)': modules/oamlGodotModule/oamlGodotModule.cpp:117:20: error: 'class oamlApi' has no member named 'LoadTrackProgress'; did you mean 'LoadTrack'?

    Replacing oaml directory with oaml master (git clone https://github.com/oamldev/oaml.git) compile correctly

Sensirion SCD30 CO2 sensor i2c driver module for Golang

Sensirion SCD30 CO2 sensor i2c driver module for Golang Overview With this module Sensirion SCD30 CO2 sensor can be accessed throug i2c bus. Implement

Oct 9, 2022
Elytrium Billing: Module-based billing platform made with Go

In development Elling - Elytrium Billing Module-based billing platform made with Go The main idea of this product - make a stable billing platform for

Jun 4, 2022
A simple project/module generated tool written in go

A module generator written in go This is a project/module generator written in go. It is intended to generate standard project/module layouts in the t

Oct 17, 2022
Module to ease interaction with Pact's development server & ScalableBFT

go-pact Module to ease interaction with Pact's development server & ScalableBFT Install go install github.com/jfamousket/go-pact@latest Functions H

Dec 9, 2021
A go module for "friendly" IDs

go-eyed A go module for "friendly" IDs. THIS MODULE IS INCOMPLETE AND NOT CURRENTLY BEING MAINTAINED. THEREFORE, IT SHOULD NOT BE USED Contribution If

Dec 17, 2021
ProtonMail module for waybar/polybar/yabar/i3blocks

protoncheck  lightweight, fast waybar/polybar/yabar/i3blocks module to check the amount of unread emails in a ProtonMail inbox. Installation You may

Sep 27, 2022
Golang-module-references - A reference for how to setup a Golang project with modules - Task Management + Math Examples

Golang Module Project The purpose of this project is to act as a reference for setting up future Golang projects using modules. This project has a mat

Jan 2, 2022
Flesch-go - Go-based implementation of the Flesch reading ease readability formula module.

flesch-go Go-based implementation of the Flesch reading ease readability formula module. Thanks for the flesch-index project. Installation Run the fol

Nov 9, 2022
Go-poolsuite - Poolsuite FM player as Go module

go-poolsuite Poolsuite FM (formerly Poolside FM) player as a Go module. Example

May 4, 2022
Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Jan 21, 2022
An interactive menu for Magisk's module installer with tools to alter Android

JD's Toolbox I'll update this with some details later, just getting the source code out for now... LICENSE The source code for JD's Toolbox is release

Jan 24, 2022
Unik is a Go module for running Go programs as unikernels, without an underlying operating system

Unik is a Go module for running Go programs as unikernels, without an underlying operating system. The included demo is a functional Gio GUI prog

Oct 21, 2022
modver - a Go package and command that helps you obey semantic versioning rules in your Go module.

Modver This is modver, a Go package and command that helps you obey semantic versioning rules in your Go module. It can read and compare two different

Dec 12, 2022
Go module that provides primitive functional programming utilities.

Functional Functional provides a small set of pure functions that are common in functional programming languages, such as Reduce, Map, Filter, etc. Wi

Jun 12, 2022
community search engine

Lieu an alternative search engine Created in response to the environs of apathy concerning the use of hypertext search and discovery.

Dec 24, 2022
Weaviate is a cloud-native, modular, real-time vector search engine
Weaviate is a cloud-native, modular, real-time vector search engine

Weaviate is a cloud-native, real-time vector search engine (aka neural search engine or deep search engine). There are modules for specific use cases such as semantic search, plugins to integrate Weaviate in any application of your choice, and a console to visualize your data.

Jan 5, 2023
Self hosted search engine for data leaks and password dumps
Self hosted search engine for data leaks and password dumps

Self hosted search engine for data leaks and password dumps. Upload and parse multiple files, then quickly search through all stored items with the power of Elasticsearch.

Aug 2, 2021
IBus Engine for GoVarnam. An easy way to type Indian languages on GNU/Linux systems.

IBus Engine For GoVarnam An easy way to type Indian languages on GNU/Linux systems. goibus - golang implementation of libibus Thanks to sarim and haun

Feb 10, 2022
A BPMN engine, meant to be embedded in Go applications with minim hurdles, and a pleasant developer experience using it.

A BPMN engine, meant to be embedded in Go applications with minim hurdles, and a pleasant developer experience using it. This approach can increase transparency for non-developers.

Dec 29, 2022