[Top][All Lists]

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

Re: [Denemo-devel] midi channel allocation

From: Jeremiah Benham
Subject: Re: [Denemo-devel] midi channel allocation
Date: Sun, 8 Nov 2009 08:16:28 -0600

On Sat, 7 Nov 2009 23:34:17 +0100
Nils <address@hidden> wrote:

> On Sat, 7 Nov 2009 14:39:21 -0600
> Jeremiah Benham <address@hidden> wrote:
> This is a general problem and maybe Muse solves it this way, but
> other software solves it differently. The good thing first: This is
> only the default behaviour, luckily you can enter channel and such
> changes at any time and in the end you can make it like you want it.
> Its important that we never lose sight that it should be possible to
> assign each midi port to any staff, even multiple staffs to only one
> port (a common usage).

I observed that rosegarden assigns a new channel for each track until
track 17. Tracks 17-33 have no midi channel at all. Then tracks at 34
or so start the cycle over again using track 1 again. 

I will choose a middle ground here and assign the midi channel to be a
remainder value of the staff number divided  by 16. This way if staff
17 will be assigned channel 1. 18 is 2. etc.... 
> I talked with Richard about this several times in IRC. The important
> point here is: Whats the lowest (or highest?) level? With normal
> midi, which is fluidsynth, you have one port (which is the virtual
> equivalent to the physical midi-port) and that is fluidsynth. This
> port has 16 channels so the channel is the level where the action
> happens with bank- and programchanges.
> Jackmidi takes this to a new level: Now the port is the container,
> you can have unlimited ports, for example for any staff a new one.
> The 16 channels per port now are a limitation that does no harm.
> What does this mean for Denemo?
> For Jackmidi it is like you said, Jeremiah. Each staff is a different
> jack-port by default (with the option to change that later) and since
> the channel doesn't matter it can be channel 1 all the time.
> But for Fluidsynth (and Midi-Export!!) its different. We have only
> one port there (and I recommend not to think of multiple
> fluid-instances) so we must use the channels. This means each staff a
> new channel.
> The problem is: How to control this? I don't know this, but its a
> reason more to work on independent sets of midi-settings for each
> staff. 

for each staff sharing same channel with different program we will
have to send program change before each sounded. 


> Maybe just take the existing preferences tab for each staff and use
> it exclusivly for Fluidsynth. And with Richards new Dynamic
> Directives we could script the Channelchange (and Bank and Program if
> needed) to only work for Jackmidi out.
> Nils
> > I created functions in midi.c. There are called 
> > 
> > get_midi_channel() 
> > get_midi_prognum()
> > 
> > They return an int representing the channel or prognum of the the
> > currently selected staff. It was copied and moved from away from
> > exportmidi.c to be used by other files. I noticed that denemo
> > allocates a new channel for each staff. Other programs don't do
> > this. Muse for example assigns channel 1 to each newly created
> > staff. I think this should be our default also. The problem with
> > making the channel number the same as the staff number is that you
> > can only have 16 different tracks then. I don't know what this will
> > do to midi playback because the channel can only be a number
> > between 0-15. This needs to be changed. I will change it but I
> > wanted to issue a warning.
> > 
> > Jeremiah
> > 
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > address@hidden
> >
> > 

reply via email to

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