Any Java FM Synthesis libraries?

I have been working on a game which saves all level info into a GZipped level file (through implementing Serializable).
Its been working well, but i wanted to add some Background Music.
I originally tried using WAV’s, but the file size was way too big for it to be at all feasible
I am currently working on MOD support, but I would LOVE the option to make FM Synthesis (Like on the Sega Genesis) through software. CPU’s have gone a long way since they were 7 MHz, so I am wondering if there is library that can do this?

JSyn, Beads, Minim, a few things on here by philfrei, and the audio engine inside PraxisLIVE all come to mind! :smiley: For the PraxisLIVE engine, there’s a bit playing around with FM here https://youtu.be/3cQ-8wZwsmY?t=21m53s

Are you hoping to use the Java Sequencer and have it play using the FM synthesizers that are on sound cards (or maybe they are standard now on OS)? That would make most sense, but I haven’t really investigated that option very deeply.

What I’ve done was to write a custom FM synthesizer and event system that generates the audio on the fly. But the library is pretty gnarly to use, and I haven’t put enough time into creating a way to import MIDI and run it with my event system. (On a wish list of projects to get to.) The concept I have is to write pieces on my DAW using NativeInstruments FM7 (now 8?), then import and play back via the parallel patches I created within Java. (I’ve got about 3 dozen of my patches recreated, so far, that are also on the FM7 and my DX7S.)

Probably too grandiose a vision. Was originally thinking, though, that this could be a respectable path to creating very lightweight scores that also allow dynamic response to game state. As long as mixes are under a few dozen synth parts at any moment, it doesn’t seem to be too big a drag on cpu (over playing multiple SF/X and score). (Does anyone else think this would be a worthwhile tool to follow through with building? Collaborators?)

Anyway, that is what I am up to. You can hear some sounds that I’ve enabled in a game I never finished, Hexara (sound track is an ambient generated atmosphere, not a song), and this proof-of-concept app live-mixes various sequencer motifs: Circle-Sound. Oh, the real time response is also shown off in the Java theremin which uses an FM synthesis algo to generate the sounds.

I should have started with a link to what Java includes in its api for sequencers! (instead of assuming you already knew about it)

Here is the start of a pretty good tutorial on the javax.sound.midi library. I’m guessing that the instructions for accessing a client’s built in FM sounds would be embedded in here somewhere. Also, I recall there were instructions as to creating a custom bank of sounds and using them.