Is there a way to get fluidsynth to play in just intonation, or more generally select the intonation of this soft synth?
It looks like Fluidsynth just interprets MIDI data, so it is really up to who/what is providing this data to make tuning adjustments. One could design a MIDI in-out tuning "converter" that took in MIDI 12-TET notes from a simple controller and output those notes with the tuning adjusted to a specified 12-note scale.
You can't take arbitrary 12-TET input and "change the tuning" to just intonation. You would need to make some decisions about which justly-tuned notes you want to be using, and of course the scale changes based on the key of the piece. And if you have any modulations, you need to re-tune the entire scale. Not to mention, even if you are interpreting 12-TET music with JI, depending on the context of two different notes, they may result in two different correct tunings. So you will (likely) have more than 12 tones to work with after translating to JI.
I have somewhere on my computer an OpenMusic patch that does just that. It’s far from perfect, as I just wanted to play a little bit with OM, which I hadn’t use in a long time. I could make it available if you’re interested.
Here’s how it works: each note is sent to a different MIDI channel — yep, that means you use most channels just for a single instrument. Each channel’s pitch wheel is set slightly differently in order to achieve whatever temperament you’ve set the patch too.