Discussion:
[fluid-dev] Play non-soundfont audio files, for one-shots, movie quotes, etc
Geoff Plitt
2018-07-10 00:41:28 UTC
Permalink
If the answer to this is "no, fluidsynth was not designed for that" I
totally understand.

Been playing with it for a while and love it, used several Soundfonts that
I liked.

But once in a while I want to add a single audio file to play, like a movie
quote (for example) or a simple one-shot sound that does not warrant
building a sound font. So:

===> Does Fluidsynth's roadmap include (or can you right now do) SFZs or
one-shot audio playback of, say, WAV files?

If not, I guess I can run a separate audio player in another
process/program and trigger it separately, but it would be cool to keep it
all within Fluidsynth.
Ceresa Jean-Jacques
2018-07-10 02:17:23 UTC
Permalink
Hello
But once in a while I want to add a single audio file to play, like a movie quote (for example) or a simple one-shot sound that does not warrant building a sound font.
 

 

If the question is "does Fluidsynth synthesizer are able to play a sound without any soundfont file", the answer is "no".

Fluidsynth being a SF2 synthesizer plays sound samples coming from SF2 soundfont. If the sample is defined to be played as a one shot (not lopped), Fluidsynth will play it "one shot".

 

With a soundfont editor you can add a sample coming from a WAV file and add a new preset to play this sample. Doing this seems simpler that doing the job in an other

specific audio player.

 

Fluidsynth does't play samples described by SFZs format.

Regards

jjc
Message du 10/07/18 02:42
De : "Geoff Plitt"
A : "FluidSynth mailing list"
Objet : [fluid-dev] Play non-soundfont audio files, for one-shots, movie quotes, etc
If the answer to this is "no, fluidsynth was not designed for that" I totally understand.
Been playing with it for a while and love it, used several Soundfonts that I liked.
But once in a while I want to add a single audio file to play, like a movie quote (for example) or a simple one-shot sound that does not warrant building a sound font. So:
===> Does Fluidsynth's roadmap include (or can you right now do) SFZs or one-shot audio playback of, say, WAV files?
If not, I guess I can run a separate audio player in another process/program and trigger it separately, but it would be cool to keep it all within Fluidsynth.
Antoine Schmitt
2018-07-10 14:52:58 UTC
Permalink
Check the ramsfont.h include file. It allows for treating raw audio samples as sound fonts, and thus allowing to apply all the fluidsynth note playing, effects, , sequencer, etc.. in realtime.
You have to load the audio file yourself though and add the samples to the ramsfont by code.
Hope this helps
Antoine
Post by Ceresa Jean-Jacques
Hello
But once in a while I want to add a single audio file to play, like a movie quote (for example) or a simple one-shot sound that does not warrant building a sound font.
If the question is "does Fluidsynth synthesizer are able to play a sound without any soundfont file", the answer is "no".
Fluidsynth being a SF2 synthesizer plays sound samples coming from SF2 soundfont. If the sample is defined to be played as a one shot (not lopped), Fluidsynth will play it "one shot".
With a soundfont editor you can add a sample coming from a WAV file and add a new preset to play this sample. Doing this seems simpler that doing the job in an other
specific audio player.
Fluidsynth does't play samples described by SFZs format.
Regards
jjc
Message du 10/07/18 02:42
Objet : [fluid-dev] Play non-soundfont audio files, for one-shots, movie quotes, etc
If the answer to this is "no, fluidsynth was not designed for that" I totally understand.
Been playing with it for a while and love it, used several Soundfonts that I liked.
===> Does Fluidsynth's roadmap include (or can you right now do) SFZs or one-shot audio playback of, say, WAV files?
If not, I guess I can run a separate audio player in another process/program and trigger it separately, but it would be cool to keep it all within Fluidsynth.
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Geoff Plitt
2018-07-10 18:54:01 UTC
Permalink
Ramsfont looks cool! Is it exposed by command-line at all? Any instructions
how end-user can use it with modifying code?
Post by Antoine Schmitt
Check the ramsfont.h include file. It allows for treating raw audio
samples as sound fonts, and thus allowing to apply all the fluidsynth note
playing, effects, , sequencer, etc.. in realtime.
You have to load the audio file yourself though and add the samples to the
ramsfont by code.
Hope this helps
Antoine
Le 10 juil. 2018 à 04:17, Ceresa Jean-Jacques <
Hello
Post by Geoff Plitt
But once in a while I want to add a single audio file to play, like a
movie quote (for example) or a simple one-shot sound that does not warrant
building a sound font.
If the question is "does Fluidsynth synthesizer are able to play a sound
without any soundfont file", the answer is "no".
Fluidsynth being a SF2 synthesizer plays sound samples coming from SF2
soundfont. If the sample is defined to be played as a one shot (not
lopped), Fluidsynth will play it "one shot".
With a soundfont editor you can add a sample coming from a WAV file and
add a new preset to play this sample. Doing this seems simpler that doing
the job in an other
specific audio player.
Fluidsynth does't play samples described by SFZs format.
Regards
jjc
Post by Geoff Plitt
Message du 10/07/18 02:42
Objet : [fluid-dev] Play non-soundfont audio files, for one-shots, movie
quotes, etc
If the answer to this is "no, fluidsynth was not designed for that" I totally understand.
Been playing with it for a while and love it, used several Soundfonts that I liked.
But once in a while I want to add a single audio file to play, like a
movie quote (for example) or a simple one-shot sound that does not warrant
===> Does Fluidsynth's roadmap include (or can you right now do) SFZs or
one-shot audio playback of, say, WAV files?
If not, I guess I can run a separate audio player in another
process/program and trigger it separately, but it would be cool to keep it
all within Fluidsynth.
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
_______________________________________________
fluid-dev mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
--
https://twitter.com/GeoffreyPlitt
http://facebook.com/geoffrey.plitt
Tom M.
2018-07-12 12:47:20 UTC
Permalink
Post by Geoff Plitt
Ramsfont looks cool! Is it exposed by command-line at all?
No.
Post by Geoff Plitt
Any instructions how end-user can use it?
No, and I cannot recommend using it. It has been removed recently.

In fact, you dont even need ramsfont for your use-case. You just need to use fluid_synth_alloc_voice() to create a voice that you then make playing with fluid_synth_start_voice():

http://www.fluidsynth.org/api-unstable/synth_8h.html#a005a5e8e6b34eb5a44b41d9020ce32d5

fluid_synth_alloc_voice() itself needs a fluid_sample_t that contains the raw 16bit integer PCM sound data, which you'll have to load yourself. See new_fluid_sample() and fluid_sample_set_sound_data():

http://www.fluidsynth.org/api-unstable/sfont_8h.html#ab72ff39f5b1bd0c48620451770be3fd5

Links refer to the new 2.0 API, as you probably dont want to write a program for a soon outdated fluidsynth 1.1.

Tom

Garth Hjelte
2018-07-11 23:27:16 UTC
Permalink
Post by Ceresa Jean-Jacques
But once in a while I want to add a single audio file to play, like a movie quote (for example) or a simple one-shot sound that does not warrant building a sound font.
If the question is "does Fluidsynth synthesizer are able to play a sound without any soundfont file", the answer is "no".
Fluidsynth being a SF2 synthesizer plays sound samples coming from SF2 soundfont. If the sample is defined to be played as a one shot (not lopped), Fluidsynth will play it "one shot".
With a soundfont editor you can add a sample coming from a WAV file and add a new preset to play this sample. Doing this seems simpler that doing the job in an other specific audio player.
Fluidsynth does't play samples described by SFZs format.
JJC is right, but I get what you are saying. SF editors are usually big complicated beasts. I've authored Translator, a Mac/Win program that converts any format to any format - inst files, bank files like SF, and single sound files (WAVE, etc.), and it can be a beast too. Wouldn't be wonderful to have something quick and easy to create a SF really quickly (no beast)? Like if there was a menu option within Finder/Explorer to quickly create it without thinking? I'll work on that.

*--------------------------------------------------------------------------*
| Garth Hjelte |
| See ALL NEW Squirrel, Alysia, and TJ pics at www.chickensys.com/squirrel |
| Updated July 23rd, 2016 |
*--------------------------------------------------------------------------*
Loading...