Gamebuino Sound FX Creation Tool (GSFX GUI)

By Valden, 6 years ago

Controls: D-Pad: [Arrows / WASD] - A: [J] - B: [K] - Menu: [U] - Home: [I]
Enjoy games at full speed with sound and lights on the Gamebuino META!
Emulator by aoneill

The tool

This tool was designed as an easy and interactive method for creating sound FX directly on your Gamebuino. It features 64 saves slots (requires an SD card), export via Serial Monitor and up to 8 Sound per FX

Terms

- FX : A series of sounds that you can play in your game

- Sound : The smallest part of FX. Each sound has a given Length, Volume, Period (for sound pitching) and a Waveform. Volume and Period can be altered by sliding up or down the parameter through time

Controls :

UP/DOWN : Navigate

LEFT/RIGHT : Change value / Navigate

A : Hold to change value faster / Validate

B : Play your sound / Cancel

Menu : Open Menu Bar

ADD SOUND TO YOUR FX

Navigate to the Sound List at the bottom of the screen, then use Left/Right to go to the [+], and press A. You will see that a new Sound was added to your FX. You can edit it by selecting it in the Sound List. To do that, navigate to the youd you want to select using Left/Right, then press A.

How to play your sound in your own program :

To use the sound you created, you need to export export them, to do that, follow these steps :

1. Connect your Gamebuino to your PC via an USB cable

2. Launch your Arduino IDE

3. Go to Tools > Serial Monitor

4. On your Gamebuino, press the <key>Menu</key> key and navigate to file &gt; Export

5. Some code should appear in the Serial Monitor on your PC.

Now you have two choices :

- If you want to use your sound right away, simply copy the second part of the code that should look like the sample below in the .cpp or .ino where you want to use your sound.

const Gamebuino_Meta::Sound_FX sfx_0[] = {
    ...
};

Then, you just need to call gb.sound.fx(sfx_0); when you want your sound to play.

  • If you want to use your FX in various places of your program, it's recomended that you use a dedicated `.h` and `.cpp` file. In order to do that, follow these steps :
    • Create a `.h` and `.cpp` with the name that you want (like `sfx.h` for example).
    • In your `.h` file, include Gamebuino-Meta.h like so `#include <Gamebuino-Meta.h>`, add some header guards `#pragma once` then copy the first part of the output in the file.
    • In the `.cpp` file, include your `.h` like so   `#include "sfx.h"` and copy the second part of the output in the file
    • If everything is correct, you should have this
    // Your .H file
    #pragma once
    #include <Gamebuino-Meta.h>
    extern const Gamebuino_Meta::Sound_FX sfx_0[];
    extern const Gamebuino_Meta::Sound_FX sfx_1[];
    extern const Gamebuino_Meta::Sound_FX sfx_2[];
    ...
    // Your .CPP file
    #include "sfx.h"
    const Gamebuino_Meta::Sound_FX sfx_0[] = { ... };
    const Gamebuino_Meta::Sound_FX sfx_1[] = { ... };
    const Gamebuino_Meta::Sound_FX sfx_2[] = { ... };
    ...
  • If you want to play a FX, simply include your `.h` file like so `#include "sfx.h"` and call `gb.sound.fx(sfx_0);`