6 months ago
Hello, I have a question. Is there other way to compose music for Gamebuino Meta other than playing it from .WAV files ? I mean there is a sound effects generator, so maybe do music generator this way ?? I mean generate square,triangle, noise waves multi-channel or FM synth. Is there such possibility ?
NEW 6 months ago
By default there are four sound channels enabled. You can change that in config-gamebuino.h
Sound effects work independent from channels and you can only play one at a time, starting a new sound effect will stop an already playing one. Currently sound effects only support
gb.sound.play() it'll automatically find a free sound channel for you to return that. Now, there are multiple things you can play with
gb.sound.play(): a raw buffer, a wav file, a pattern and a custom handler.
A raw buffer is just a raw
uint8_t buffer you play back, which has the amplitudes for every single call of the interrupt, so basically like a wav file in flash.
Well, playing back a wav file, you are probably familiar with that
Gamebuino Classic -like patterns, however, no effects are available and only square waves.
Now, this is where it gets interesting. You can easily define completely custom sound handlers and use those! These can use internally a pattern or a raw buffer. So, you could write your own sound handler that generates square waves into a buffer based off of <something> and then play back with that custom sound handler multiple different things at the same time
You must be logged in in order to post a message on the forum