Skip to content

Support for SF2 RMIDI files with embedded soundfonts #1356

@spessasus

Description

@spessasus

FluidSynth version

Execute fluidsynth --version and provide the output.

FluidSynth runtime version 2.3.5
Copyright (C) 2000-2024 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of Creative Technology Ltd.

FluidSynth executable version 2.3.5
Sample type=double

SF2 RMIDI specification

The feature request

Fluidsynth would be able to open RIFF midi (.rmi) files.
Bonus points for also reading the embedded sf2 file and using it.

Simple solution

  1. check if the file starts with RIFF instead of MThd
  2. check if the data chunk starts with RMID
  3. The first chunk is called data. The data of the chunk is the MIDI file (complete with MThd, etc).
  4. Loop through the following chunks (there may be a metadata INFO chunk. Read the DBNK chunk which is the soundfont's bank offset, others can be ignored)
  5. Find the chunk with header RIFF and the data that starts with 'RIFF' or 'DLS '. This is the embedded soundfont or dls. The provided file has an sf2 embedded, not dls.

Steps to reproduce

Please explain the steps required to duplicate the issue, esp. if you are able to provide a sample application. E.g. how to start fluidsynth, what shell commands to enter, what midi events to send, etc.

  1. get an .rmi file Example files
  2. fluidsynth soundfont.sf2 the_file.rmi

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions