Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hello! SynthEngine is pure GML and runs on the same thread that your game's logic runs, and generating audio buffer data is an expensive job. Using SynthEngine to power the music in your game is definitely something that can be done, but the music it can produce (without causing performance issues) will be limited. For example, having only one or two oscillators should not cause issues. See this example video of me playing a small tune with a single oscillator and 4 note polyphony:

If you are open to sharing your project with me (or an isolated example project) I'd be happy to take a look at it for you and see if I can help.

One avenue of exploration may be to have some parts of your music be from an audio asset and some parts (like a melody line or lead voicing) be generated by SynthEngine. Keeping them in sync represents an upfront challenge, but it should be possible.

Thank you for the response! 
I think this confirms that this wouldn't be viable for my use case. I have upwards of 4 polyphonic synths at once, and the goal was to create hours of music with a small file-size.

It's not imperative to my project, just something cool i wanted to do, so it makes sense to leave it behind and just focus on good compression practices.

I noticed in the pro demo if i set the polyphonic number to 16 and played 7-8 notes my fps would drop as well. It was a good learning experience!

Thanks again for the response and I'll probably find a use for the project down the line :)

No problem! I think your assessment is correct, hours of music probably won't be feasible. I think SynthEngine serves best as "single instrument" use-case rather than a full replacement for music. To accomplish that a lot of pre-rendering would be necessary, which would ultimately just be trading file size for load times (which is less than desirable).

I'm glad you've enjoyed using it so far regardless, please feel free to share any future creations you make with it, I'd love to see 👍