FX Synth - make sound effects easily!

Share your games and programs with the community.

FX Synth - make sound effects easily!

Postby yodasvideoarcade » Wed Aug 13, 2014 4:08 pm

Here's my sound-effects editor. You can use it to create nice sounding effects for your games in a very simple way. And the best: You can edit the sounds directly on your gamebuino and listen to the actual sounds while editing!

Image

If you like it, I'd be happy to recieve some comments and donations on Paypal to yoda@yodasvideoarcade.com

Controls:

UP/DOWN to move cursor up and down (flashing on the left side)
LEFT/RIGHT to change the slider-value in the line of the cursor.
A to play the sound.
B to change the waveform (square / noise, shown in the top-left corner)

How to implement the sounds?

Very easy. Take this code at the end of your source:

Code: Select all
void playsoundfx(int fxno, int channel) {
  gb.sound.command(0,soundfx[fxno][6],0,channel); // set volume
  gb.sound.command(1,soundfx[fxno][0],0,channel); // set waveform
  gb.sound.command(2,soundfx[fxno][5],-soundfx[fxno][4],channel); // set volume slide
  gb.sound.command(3,soundfx[fxno][3],soundfx[fxno][2]-58,channel); // set pitch slide
  gb.sound.playNote(soundfx[fxno][1],soundfx[fxno][7],channel); // play note
}


Then put this in the beginning of your code, where you define your variables:

Code: Select all
const int soundfx[3][8] = {
  {1,2,3,4,5,6,7,8}, // sound 0
  {1,2,3,4,5,6,7,8}, // sound 1
  {1,2,3,4,5,6,7,8}, // sound 2
};


Each line of 8 numbers represents one sound. Of course you have to change the "3" in the definition-line to the number of sounds you're using, and add/delete lines so it matches. Change the numbers 1-8 to what the editor shows you on screen:

- The first number is the value next to the waveform (either 0 or 1).
- The other numbers are on the right side, top to bottom.

Then, if you want to play a sound in your game, just call

Code: Select all
playsoundfx(number,channel);


... where "number" is the sound-number (0, 1, 2 etc.) and "channel" is the playing channel. "0" is the first channel. If you didn't change your settings.c, you can only use one channel. To use more than one channel, change it in your settings.c to 4 sound channels, as I did in the new Asterocks and Invaders.

What are the parameters?

Basic sound and pitch:
- Waveform is the basic-waveform of your sound, either square or noise. Switch with B-button.
- Slider next to the waveform is the basic-pitch of your sound. Left is low, right is high.

Modulation of the pitch:
- PMD means pitch modulation depth. The exact middle of the slider is no modulation. On the left is downward, right is upward.
- PMT means pitch modulation time. 0 is no pitch-modulation. 1 is very quick, 2 is slower etc.

Modulation of the volume:
- VMD means volume modulation depth. 0 on the left is no modulation, 1 is volume gets lower, 2 is volume gets lower faster etc.
- VMT means volume modulation time. 0 is no modulation. 1 is fastest modulation.

Generals:
- VOL is the general volume of the sound (0 to 7, 0 is silent).
- LEN is the length of the sound (0 is nothing, higher values are longer) in 1/20secs.
- MEM is the memory-location. The editor holds 13 sounds at a time. Don't forget to write them down, since you can't save them.
You can use the MEM locations to try how different sounds for your game go together.
Last edited by yodasvideoarcade on Sun Sep 07, 2014 12:32 am, edited 1 time in total.
http://www.yodasvideoarcade.com/gamebuino.php
Download my gamebuino-games here! Paqman, Asterocks, Invaders, Killrace
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: FX Synth - make sound effects easily!

Postby Skyrunner65 » Wed Aug 13, 2014 4:19 pm

An editor on the Gamebuino? Genius!
"Gotta Go Fast!" ~Skyrunner65
GitHub
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: FX Synth - make sound effects easily!

Postby Jolly » Wed Aug 13, 2014 4:59 pm

That's so cool. :O
LSDJ for Gamebuino. :D
Jolly
 
Posts: 40
Joined: Fri Jul 25, 2014 9:07 pm
Location: Germany

Re: FX Synth - make sound effects easily!

Postby erico » Wed Aug 13, 2014 6:53 pm

That looks great!
User avatar
erico
 
Posts: 675
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: FX Synth - make sound effects easily!

Postby jonnection » Wed Aug 13, 2014 9:19 pm

I gotta be honest with you.

Could have used a little bit more cowbell.

http://vimeo.com/91715361

Sorry, I meant PROGMEM. :lol:
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: FX Synth - make sound effects easily!

Postby Joff » Fri Aug 15, 2014 6:58 pm

Great application Yoda, this was much needed, thanks!

I used it to create sound FXs with my newly released game:

http://gamebuino.com/forum/viewtopic.php?f=17&t=1025
Joff
 
Posts: 5
Joined: Thu Aug 14, 2014 10:20 pm

Re: FX Synth - make sound effects easily!

Postby SpikeSpiegel » Sat Aug 23, 2014 12:42 pm

Hello,

First, thanks for your work, your games are awesomes (invaders, paqman...) and fxsynth is very usefull. But i have some troubles to implement some sounds in my games (BlockBuino, ShootBuino, SnakeAbcBuino).
Ingame some sounds aren't rendering like they are in fxsynth.

So, this is what i have done:
Declare 4 channels in settings.c:
Code: Select all
#define NUM_CHANNELS 4


Game sounds declaration:
Code: Select all
const int soundfx[4][8] =
{
  {0,34,75,1,0,1,7,11}, // LINE_COMPLETED
  {0,33,53,1,0,5,7,3},  // ROTATE
  {0,30,34,10,0,1,7,25} // GAME_OVER
};


For rendering, i am using your method:
Code: Select all
void playsoundfx(int fxno, int channel) {
  gb.sound.command(0,soundfx[fxno][6],0,channel); // set volume
  gb.sound.command(1,soundfx[fxno][0],0,channel); // set waveform
  gb.sound.command(2,soundfx[fxno][5],-soundfx[fxno][4],channel); // set volume slide
  gb.sound.command(3,soundfx[fxno][3],soundfx[fxno][2]-58,channel); // set pitch slide
  gb.sound.playNote(soundfx[fxno][1],soundfx[fxno][7],channel); // play note
}


GAME_OVER and LINE_COMPLETED are not rendered correctly. Do i miss something ?
(Framerate is by default 20)

Thanks.
SpikeSpiegel
 
Posts: 1
Joined: Fri Aug 01, 2014 4:04 pm
Location: FRANCE

Re: FX Synth - make sound effects easily!

Postby rodot » Sun Aug 24, 2014 6:15 pm

To make sound effects you should use gb.sound.playPattern

gb.sound.command and gb.sound.playNote are not meant to be used like that.
See the reference page to see the existing functions, sound page to understand how sound works (and why you should use patterns), and download page to get the sound composer (aka tracker).
User avatar
rodot
Site Admin
 
Posts: 1292
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: FX Synth - make sound effects easily!

Postby DFX2KX » Tue Aug 26, 2014 11:18 pm

Oh, hey, this is neat!

Might use it for music more then sound effects, but it at least gives me a sense of what's going on.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: FX Synth - make sound effects easily!

Postby yodasvideoarcade » Wed Sep 03, 2014 3:21 pm

For me, the tracker doesn't work, it gives me an error after launch.

But if it works, and especially if there's other sounds/music going on at the same time, this sound-fx player may not be working properly, since the music-system can also influence the values.

When the tracker works for me, I will try to adjust the editor accordingly, so it uses the pattern-system for playing the effects.
http://www.yodasvideoarcade.com/gamebuino.php
Download my gamebuino-games here! Paqman, Asterocks, Invaders, Killrace
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Next

Return to Games Gallery

Who is online

Users browsing this forum: No registered users and 1 guest

cron