Skip to content
  • Albert Gräf's avatar
    Overhaul of fluid~ to add SMMF support and soundfont search, fixes #692. · e4365f43
    Albert Gräf authored
    This adds support for the SMMF MIDI message format,
    cf. https://bitbucket.org/agraef/pd-smmf.
    
    It also adds canvas/path search for soundfont files, so that these can
    be found more easily without having to use absolute pathnames, as well
    as a few cosmetic changes to help and error messages.
    
    In default "legacy" mode, the object is 100% backwards-compatible
    (except for the soundfont file search), so that existing patches will
    continue to work without any changes.
    
    In SMMF mode, which is invoked with the new -smmf option (used either as
    a creation argument, or with the "init" message), the SMMF message
    format can be used to denote MIDI messages. Legacy messages still
    continue to work in SMMF mode as well, except the "note" and "bend"
    messages which are used in both formats with the same argument count but
    different argument order. However, the corresponding shortcuts "n" and
    "b" of the legacy format still work even in SMMF mode.
    
    Rationale: SMMF offers the following advantages over the legacy message
    interface that fluid~ currently uses:
    
    - It covers all MIDI voice messages, as well as system exclusive
      messages. (Note that sysex support is particularly interesting in the
      context of fluidsynth because it allows to pass tuning data using
      sysex messages following the MIDI Tuning Standard (MTS), which
      fluidsynth readily supports.)
    
    - It enforces a close 1-1 correspondence between the Pd MIDI objects and
      the message format (it uses the same basenames as message selectors,
      and has the arguments in the right order to easily interface with the
      Pd MIDI objects).
    
    - It is is readily supported by some helper abstractions (midi-input.pd
      and midi-output.pd, available at https://bitbucket.org/agraef/pd-smmf).
    
    - Last but not least, it is compatible with pd-faust and pd-faustgen2
      which makes it very easy to integrate Faust- and soundfont-based
      synthesis in Pd.
    e4365f43