[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] MIDI file track selection

From: Camilo Polymeris
Subject: [fluid-dev] MIDI file track selection
Date: Mon, 21 Nov 2011 17:10:53 +0000

Hello all,
I want to load a MIDI file from memory, then add some (but not all) of
its tracks to a player. I am trying the following:


fluid_player_t * tmpPlayer = new_fluid_player(synth);
fluid_player_add_mem(tmpPlayer, data, len);
int i;
int trackn = 0;
fluid_track_t * tmpTrack;
trackTo = MIN(trackTo, fluid_player_count_tracks(tmpPlayer));
for (i = trackFrom; i < trackTo; i++)
  fluid_player_add_track(player,  fluid_player_get_track(tmpPlayer, i));


That is, loading a temporary player from memory, copying the range
(trackFrom, trackTo) to a new player, then deleting the first player.
As you can see, I use a lot of "private" functions to accomplish this,
which is not a good thing. Among other problems, I have issues with
track ownership and track numbers.
Is there another way to do this? What would you recommend?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]