FX Synth for Arduboy

Description

FX Synth is Gamebuino sound effect maker.
I porting Arduboy. and I maked simple Sound function.
You can use your game. but It can use ONLY ARDUBOY LIBRARY2.
https://github.com/akkera102/09_fxsynth

How to Use

effect maker is simple. parameter is only 8.
You make uint8_t array[x][8] variable.

example/example.ino.

#include <Arduboy2.h>
#include "fx.h"

Arduboy2 ab;

PROGMEM const uint8_t soundfx[4][8] = {
	// INVADERS
	{1, 57, 57, 1, 1, 1, 5,  6},
	{0,  0, 68, 1, 0, 0, 7,  4}, // <---
	{1, 15, 57, 1, 1, 2, 7, 15},
	{0, 10, 60, 1, 0, 0, 7,  6},
};

void setup()
{
	ab.begin();

	FxInit(); // <---
}

void loop()
{
	if(!(ab.nextFrame()))
	{
		return;
	}

	if(ab.justPressed(LEFT_BUTTON))
	{
		FxPlay(soundfx[1]); // <---
	}

	ab.clear();

	ab.setCursor(0, 0);
	ab.print("FXSYNTH TEST!");
	ab.display();
	ab.pollButtons();

	FxUpdate(); // <---
}

Don’t forget FxInit(), FxUpdate().

Original Posts

http://gamebuino.com/forum/viewtopic.php?f=17&t=1018

Development

compiler : windows Arduino IDE 1.6.12

2 Likes

I love this! I have been hoping for better sound effects. All I know is the tone library. We are working on making Arduboy2 library official :slight_smile:

2 Likes

If by the tone library you mean ArduboyTones, there’s also ArduobyPlaytune and ATMlib, but the more choices the better!

2 Likes