Sequencing in FTMlib


    Jul 08 2008 | 5:32 pm
    I need a flexible but very midi-savvy sequencer for a project I'm working on, and it looks like FTM is probably the way to go. There are a couple of things I need to know, though, in case there are any FTM experts here:
    1) How can I build "songs" programmatically in a way that still allows for midi file export/import? I see there are midi objects, sequences, and tracks, but I'm not sure how to put those all together to make a multi-track score (or song), which can be exported to other music programs. It seems like I'd add midi objects to sequences, then add those to a track (since track has the marker and tempo tracks), but I'm not sure about that...
    2) Does anyone know if there's a way of writing midi events by beat or tick position, rather than in milliseconds? I want to be able to programmatically add events and/or tempo changes on a tempo track, without worrying about re-calculating the positions all the time. Adding events using ticks, or beats (and divisions), makes this very simple.
    Any help appreciated.
    J.

    • Jul 09 2008 | 10:38 am
      On 8 juil. 08, at 19:32, jbmaxwell wrote:
      > I need a flexible but very midi-savvy sequencer for a project I'm
      > working on, and it looks like FTM is probably the way to go. There
      > are a couple of things I need to know, though, in case there are any
      > FTM experts here:
      Hi,
      We are all here:
      ftm@ircam.fr (see http://listes.ircam.fr/wws/info/ftm)
      > 1) How can I build "songs" programmatically in a way that still
      > allows for midi file export/import? I see there are midi objects,
      > sequences, and tracks, but I'm not sure how to put those all
      > together to make a multi-track score (or song), which can be
      > exported to other music programs. It seems like I'd add midi objects
      > to sequences, then add those to a track (since track has the marker
      > and tempo tracks), but I'm not sure about that...
      Yes, this is about how is works.
      In fact, MIDI standard files are particularly supported for importing
      files into FTM data structures. Exporting of MIDI standard files is
      also supported, but might have some restrictions that are to be
      explored. MIDI multi-track (format 1) files are imported and mixed
      into to a single "track" or "sequence" object (without keeping the
      information of the original partitioning into tracks) and neither the
      tempo markers nor the time signatures (even if imported and
      represented correctly) are exported back into MIDI files yet.
      When it comes to dynamically/algorithmically composing/modifying/
      recording/playing sequences, "track" and "sequence" are your friends.
      > 2) Does anyone know if there's a way of writing midi events by beat
      > or tick position, rather than in milliseconds? I want to be able to
      > programmatically add events and/or tempo changes on a tempo track,
      > without worrying about re-calculating the positions all the time.
      > Adding events using ticks, or beats (and divisions), makes this very
      > simple.
      As you saw, when importing, the temporality of MIDI files is
      transformed to a chronometric representation (in msec) also taking
      into account the tempo track in format 1 files (and assuming 60 bpm if
      no tempo is given).
      The objects "track" and "sequence" don't care much if your time unit
      is milliseconds or beats, but when exporting to a MIDI file, the time
      of the events are simply converted from msec into MIDI ticks without
      caring a lot about the original temporal structure (tempo changes,
      time-signatures, etc.).
      In summary I'd say, we are quite proud of the MIDI import, while for
      now, exporting does the strict minimum.
      Best
      Norbert
      > Any help appreciated.
      > J.
      >