denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Mixer for midi playback?


From: Nils Gey
Subject: Re: [Denemo-devel] Mixer for midi playback?
Date: Tue, 17 Feb 2009 18:44:34 +0100

> I am not sure what the performance/feature difference would be for "Live
> midi out". What can be obtained with the "live midi out" method? To me
> it just sounds like a lot of extra work for no benefit. Maybe I am
> missing something.

The benefits are indeed plenty. 

For live-midi I will use the term "streaming" from now on.

First I am not sure if its true that export2file is really just as fast (in 
terms of latency - speaking of miliseconds) streaming output. This is noticable 
and if you have some over 50ms lag when pressing [Play] Denemo will seem to be 
laggy and slow. A UI has to react fast. 

But besides that:
Streaming content can be changed in time. You could write Filters that just 
ignore several parameters like dynamic and switch them on and off. Good for 
make analyzing by ear more easy. 

Also you could leave the input open while playing. This is possibly not a 
desired Denemo feature for notation-edit, but it would be possible anyway, like 
Richard said, too. In my experience this "recording while play along" is alwasy 
broken and buggy and you never get the desired notation, but for simple tasks 
with heavy quantizing(spelling?) like only allowing notes on 8th it would be 
possible to do some musical notes while listening to a piece (alternate tones 
and chords). This is especially useful for composing.

I got the the impression that some calculating would be easier, too. Like a 
field (in the status bar) which measure you play currently, how long this piece 
will take (in seconds) and how much already played.

In syncing with other Jackapps ("JACK Transport" - which is basically the 
reason why JACK exists) this is a must. In synched apps one has to be the 
timemaster, telling how fast the tempo/bpm is and if and when tempochanges 
occur. Normally its up to the user to keep it clean and enter all tempochanges 
in all synched apps. But if you forget one or simply want to do an experiment 
one has to be the boss. If Denemo is not the time-master it has to accept 
tempo-changes on-the-fly and should ignore its own.

Thats the transport struct: 
http://www.jackaudio.org/files/docs/html/structPOST__PACKED__STRUCTURE.html

This is a different thing from a function that just changes the overall-tempo 
inside Denemo and keep the relative tempo the same (of course this is not 
implented at the moment).

Another thing is step-playback. Define a ryhthmic interval ("quarter") and on 
every keypress Denemo plays the next on.

Slightly different is "Play the notes @ cursor". I'm not sure if exporting will 
do the trick in time.

And there are tons and tons of more reason why Livi-Midi out is the desired 
thing. Not reasons but confirmation is that all the other apps with midi, like 
Rosegarden, QTractor, Epichord and the direct concurents of Denemo (NtEd, 
Canorus and MuseScore) do it this way.

Nils

> 
> > I don't know whether he has plans to
> > work on live MIDI but I am sure he would welcome extra manpower.
> 
> 
> 
> 
> > I wrote up how I think it could be done some while ago  (5 Jan 2009)- 
> > here it is what I wrote:
> > 
> > > What is meant [by MIDI out] is (at a minimum) to be able to point to a
> > > place in the
> > > score and have denemo promptly start outputting MIDI to libjack. The
> > > MIDI events it would output would correspond to the notes from the
> > > pointed place onwards in the score, including the prevailing
> > > dynamic/crescendo, midi instrument/channel (anything else? - embedded
> > > MIDI commands I guess). Notes that are hanging on at the given point
> > > would not be sounded (so if the given point just contained notes tied
> > > from previous notes, nothing would be heard until a new note started).
> > > The tempo would be a prevailing tempo at the note concerned (so we
> > > would
> > > allow an embedded MIDI command that would change the tempo).
> > > 
> > > The actual jackmidi connection is trivial, of course, and someone on
> > > #denemo came up with a sample
> > > http://trac.jackaudio.org/browser/trunk/jack/example-clients/midiseq.c
> > > which shows how to do that.
> > > It is not intended that the user should be allowed to edit the score
> > > while it is being played. So the value of the gui->changecount
> > > variable
> > > is fixed for any given playback.
> > > 
> > > What would require a little design is how to create the MIDI events
> > > from
> > > the denemo data. I think I have a good idea how to do this:
> > > An initialization stage would be good, partly to avoid excessive
> > > computation while playing & also for convenience of coding. So if this
> > > MIDI output system has not been initialized since the last edit to the
> > > score the first thing that happens is INITIALIZATION: this creates a
> > > list of MIDI events, with links from the notes in the score to first
> > > event that that note triggers. (As mentioned notes that are tied to
> > > earlier notes have no MIDI event).
> > [creating a MIDI event from the Denemo objects is something for which
> > code already exists (for writing to file)]
> > 
> > > On requesting playback from a given note, the MIDI events are simply
> > > shovelled out to jackmidi.
> > > There are some extras that are easily incorporated - silencing staffs
> > > etc. but the real work is the INITIALIZATION task.
> > > 
> > > I think it can be done as follows:
> > >         INITIALIZATION: run a special version of exportmidi.c which
> > > instead of
> > > writing to a file creates a list (GList* midi_events in the
> > > DenemoScore
> > > structure) of MIDI events, putting a link from each note (etc) to the
> > > MIDI event which it causes.
> > > 
> > > To determine if INTIALIZATION is needed, we need to set a variable
> > > (gui->midichangecount) that is set to the gui->changecount when
> > > INITIALIZATION is run, so that if the comparison
> > > midichangecount==changecount fails when the play request is received
> > > we
> > > know INITIALIZATION is needed again.
> > > 
> > 
> > This may be too cryptic - but the gist is that we need the basic wiring
> > up to be done first, and then we could add DenemoDirectives to
> > mute/change track or whatever you can do with MIDI (MIDI is not my
> > field).
> > 
> > > Another feature I miss is the zooming function. I don't think I can
> > > help there, but I have seen something is planned.
> > ??? zooming the Denemo display is quite a long way off, if it is
> > reasonably possible, which I am not sure it is. The print-preview is,
> > however, being developed (and may be able to meet your needs?)
> > 
> > Richard
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Denemo-devel mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/denemo-devel
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel
> 


-- 
Nils Gey <address@hidden>




reply via email to

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