flutter_soloud icon indicating copy to clipboard operation
flutter_soloud copied to clipboard

feat: SoundFont or PCM Support

Open jtkeyva opened this issue 1 year ago • 2 comments

Description

Ability to play SF2 files

PCM

This library does not audibly make sound, it only generates the PCM waveform.

To actually hear something, you need to pass the generated PCM waveform to your device's speakers using PCM.

https://pub.dev/packages/dart_melty_soundfont

Requirements

  • [ ] Checklist of requirements to be fulfilled

Additional Context

Add any other context or screenshots about the feature request go here.

jtkeyva avatar Nov 16 '24 07:11 jtkeyva

Actually, there is the #144 issue for this and the Audio buffer stream PR that will be merged soon. You will be able to generate audio PCM data in different formats and create your own audio source (I think also using that package) inside an Isolate.

There are 2 examples:

  1. receive PCM audio from a websocket and play them while receiving
  2. generate audio inside an insolate and then play

alnitak avatar Nov 16 '24 07:11 alnitak

that's great to hear, looking forward to testing it! any tips on implementing the melty_soundfont appreciated. or actually maybe even an example would be a nice demo to show what you can do

jtkeyva avatar Nov 17 '24 05:11 jtkeyva

Stream buffer is resolving this supporting s8, s16le, s32le, f32le and Opus. Closing.

alnitak avatar Jul 04 '25 05:07 alnitak

Stream buffer is resolving this supporting s8, s16le, s32le, f32le and Opus. Closing.

Thanks, I don't see any mention of SoundFont or how to do so. Any tips or example greatly appreciated thx

jtkeyva avatar Jul 04 '25 17:07 jtkeyva

SoundFont is a file containing the sounds (instruments) that can be played by MIDI or other software. I don't think this plugin will ever support MIDI, but supporting PCM as a stream could be a step forward.

To read sf2 files, you can search on pub.dev and dart_melty_soundfont seems promising and I think you can use it with flutter_soloud.

alnitak avatar Jul 04 '25 18:07 alnitak

SoundFont is a file containing the sounds (instruments) that can be played by MIDI or other software. I don't think this plugin will ever support MIDI, but supporting PCM as a stream could be a step forward.

To read sf2 files, you can search on pub.dev and dart_melty_soundfont seems promising and I think you can use it with flutter_soloud.

thank you. a quote from a year or so ago: that's great to hear, looking forward to testing it! any tips on implementing the melty_soundfont appreciated. or actually maybe even an example would be a nice demo to show what you can do

i just don't know where to start by connecting melty with soloud? any help appreciated thanks

jtkeyva avatar Jul 05 '25 20:07 jtkeyva