Real-Time MIDI Note Durations

Please note any discrepancies in any Gvox manual here. Please include page numbers with reports

Moderators: Hotch, Denkster, John Miller

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 4:44 pm

Doug Kerr wrote:Real-time MIDI input and voice assignment
It appears that during real-time MIDI input, all arriving notes are enrolled in voice 1 regardless of their MIDI channel.
You're speaking, presumably, of non-overlapping notes because in q's example (below) they may be assigned to other voices:
Voice_split_02N.gif
Voice_split_02N.gif (747 Bytes) Viewed 1770 times
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby Doug Kerr » Fri Oct 16, 2009 5:00 pm

polarbreeze wrote:
Doug Kerr wrote:Real-time MIDI input and voice assignment
It appears that during real-time MIDI input, all arriving notes are enrolled in voice 1 regardless of their MIDI channel.
You're speaking, presumably, of non-overlapping notes because in q's example (below) they may be assigned to other voices:
Voice_split_02N.gif

    [That is my example.]
Not upon arrival (which is what I have been discussing here). The assignment of some notes to other voices is done at the time of, and in connection, with the application of Guess Durations.

Doug
Doug Kerr
 
Posts: 4399
Joined: Sat Sep 15, 2007 10:38 pm
Location: Alamogordo, New Mexico, USA

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 6:02 pm

Doug Kerr wrote:
polarbreeze wrote:
Doug Kerr wrote:Real-time MIDI input and voice assignment
It appears that during real-time MIDI input, all arriving notes are enrolled in voice 1 regardless of their MIDI channel.
You're speaking, presumably, of non-overlapping notes because in q's example (below) they may be assigned to other voices:
Voice_split_02N.gif

    [That is my example.]
Not upon arrival (which is what I have been discussing here). The assignment of some notes to other voices is done at the time of, and in connection, with the application of Guess Durations.
Doug
OK, gottit. So, in order to investigate it, how do I create a score containing data that has not yet been assigned to multiple voices?
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby q » Fri Oct 16, 2009 6:11 pm

Doug Kerr wrote:The assignment of some notes to other voices is done at the time of, and in connection, with the application of Guess Durations.

polarbreeze wrote:OK, gottit. So, in order to investigate it, how do I create a score containing data that has not yet been assigned to multiple voices?

Just export a score to MIDI file. Then make sure all the data is in one track.

Or in Encore:

    Select all
    Press Command 1 (mac) ... to set all notes to voice 1
    (Revert to Raw if you don't want to see the note values)
q
Life is good with Encore 5 Mac OS 10.6.x — MacBook Pro /core i7 / Mac OS 10.4.11 — Mac G5 Dual 2.0 GHz
q
 
Posts: 3525
Joined: Thu Sep 13, 2007 7:24 pm
Location: San Francisco, East Bay Area

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 6:24 pm

q wrote:
Doug Kerr wrote:The assignment of some notes to other voices is done at the time of, and in connection, with the application of Guess Durations.

polarbreeze wrote:OK, gottit. So, in order to investigate it, how do I create a score containing data that has not yet been assigned to multiple voices?

Just export a score to MIDI file. Then make sure all the data is in one track.
q
Oh, oops, I guess I wasn't quite asking the right question. What I mean is, when notes are arriving from external MIDI (which is the case Doug is investigating), how to intercept the process after the notes are captured but before they get assigned to different voices.
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby Doug Kerr » Fri Oct 16, 2009 6:36 pm

polarbreeze wrote:Oh, oops, I guess I wasn't quite asking the right question. What I mean is, when notes are arriving from external MIDI (which is the case Doug is investigating), how to intercept the process after the notes are captured but before they get assigned to different voices.

I guess you mean, "how can I peek"?

After the inputtage, but before Guess Durations has been invoked (which, it now seems, is when they are assigned, if necessary, to different voices), I merely ask Encore to cough up its note data by having it play what it has into a MIDI monitor.

Doug
Doug Kerr
 
Posts: 4399
Joined: Sat Sep 15, 2007 10:38 pm
Location: Alamogordo, New Mexico, USA

Re: Real-Time MIDI Note Durations

Postby q » Fri Oct 16, 2009 6:37 pm

polarbreeze wrote:
q wrote:
Doug Kerr wrote:The assignment of some notes to other voices is done at the time of, and in connection, with the application of Guess Durations.

polarbreeze wrote:OK, gottit. So, in order to investigate it, how do I create a score containing data that has not yet been assigned to multiple voices?

Just export a score to MIDI file. Then make sure all the data is in one track.
q
Oh, oops, I guess I wasn't quite asking the right question. What I mean is, when notes are arriving from external MIDI (which is the case Doug is investigating), how to intercept the process after the notes are captured but before they get assigned to different voices.

Just turn off Prefs>Auto Guess/Beam. Then import your MIDI score.

Guess Durations does the auto voice assignments. When Auto Guess/Beam is off, Encore doesn't run Guess Durations on real-time input. So you primordial notes that Encore calls "raw data".

q
Last edited by q on Sat Oct 17, 2009 3:25 pm, edited 2 times in total.
Life is good with Encore 5 Mac OS 10.6.x — MacBook Pro /core i7 / Mac OS 10.4.11 — Mac G5 Dual 2.0 GHz
q
 
Posts: 3525
Joined: Thu Sep 13, 2007 7:24 pm
Location: San Francisco, East Bay Area

Re: Real-Time MIDI Note Durations

Postby Denkster » Fri Oct 16, 2009 6:38 pm

Hi Doug,
Doug Kerr wrote:Similarly, when we sequence a multi-staff score in Encore, all notes are sent out in a single MIDI sequence. They are tagged for the channel associated with the staff/voice in the Staff MIDI blah dialog. There is no indication of their staff origin (there would in fact be no

Something is missing here?

Object Models
I knew the object model of MIDI would be different from the object model of notation.
But that difference could be overcome with correct information translation between the models.

Mapping
Mapping - of information from the model of MIDI to notation Notation and back - is the crucial function of 'Guess Durations' respectively 'MIDI Playback'.
When channel information is lost at import of MIDI to Encore, the mapping of MIDI to Encore information is not good. That information loss, which you just highlighted, really worries me.

Object Models required
I need both object models, MID and notation (in as much detail as is relevant in the world of Encore users), with the definition of every object and with description of all relations between the objects, to determine the best possible translation between the two.

Encore functional description required
I need the functional description of the functions 'Guess Durations' and 'MIDI Playback', to determine if their design complies with the above mentioned bets possible translation.

Testing 'Guess Durations' and 'MIDI Playback'
Testing can start if the functional description of the functions 'Guess Durations' and 'MIDI Playback' are available.

Eveline
Denkster denkt door
PC (AsusM2N, AMD 64X2 6000+, 2GB; Matrox Parhelia AVP); W2K SP5; HP LJ6MP; Canon Pixma iP4200.
Laptop: Toshiba Portégé R600, 4 GB; Vista BU.
Denkster
 
Posts: 3351
Joined: Fri Sep 14, 2007 1:28 pm
Location: The Netherlands, 's-Gravenhage

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 6:53 pm

Doug Kerr wrote:I guess you mean, "how can I peek"?
Indeed - why didn't I think of putting it that way?!
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby q » Fri Oct 16, 2009 7:24 pm

Doug Kerr wrote:Similarly, when we sequence a multi-staff score in Encore, all notes are sent out in a single MIDI sequence. They are tagged for the channel associated with the staff/voice in the Staff MIDI blah dialog. There is no indication of their staff origin ...

Denkster wrote: 
Mapping
Mapping - of information from the model of MIDI to notation Notation and back - is the crucial function of 'Guess Durations' respectively 'MIDI Playback'.
When channel information is lost at import of MIDI to Encore, the mapping of MIDI to Encore information is not good. That information loss, which you just highlighted, really worries me.

Testing 'Guess Durations' and 'MIDI Playback'
Testing can start if the functional description of the functions 'Guess Durations' and 'MIDI Playback' are available.

    Agreed.

    q
Life is good with Encore 5 Mac OS 10.6.x — MacBook Pro /core i7 / Mac OS 10.4.11 — Mac G5 Dual 2.0 GHz
q
 
Posts: 3525
Joined: Thu Sep 13, 2007 7:24 pm
Location: San Francisco, East Bay Area

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 7:28 pm

Denkster wrote:Mapping
Mapping - of information from the model of MIDI to notation Notation and back - is the crucial function of 'Guess Durations' respectively 'MIDI Playback'.
When channel information is lost at import of MIDI to Encore, the mapping of MIDI to Encore information is not good. That information loss, which you just highlighted, really worries me.
It worried me too so I did an experiment. Starting from a Big Band score I had created in Encore, I exported it as a MIDI file and then re-imported it. I turned off "auto guess/beam" in order to avoid any reassignment of voices (according to the current hypothesis?) and then I invoked the guess and beam from the menu. The result is attached and it looks reassuringly similar to the original! Others may want to investigate the voice and channel assignments to see if this exercise revealed any anomalies.

Orange Colored Sky 3.enc.zip
(33.46 KiB) Downloaded 192 times

Orange Colored Sky 3.mid.zip
(10.66 KiB) Downloaded 183 times

Orange Colored Sky 3 reimported.enc.zip
(33.38 KiB) Downloaded 181 times
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby Doug Kerr » Fri Oct 16, 2009 8:51 pm

Hi, p,

polarbreeze wrote:]It worried me too so I did an experiment. Starting from a Big Band score I had created in Encore, I exported it as a MIDI file and then re-imported it. I turned off "auto guess/beam" in order to avoid any reassignment of voices (according to the current hypothesis?) and then I invoked the guess and beam from the menu. The result is attached and it looks reassuringly similar to the original! Others may want to investigate the voice and channel assignments to see if this exercise revealed any anomalies.

Thank you so for the nice suite of test data.

What seems to have happened here is this:

• For reference, in the original score, staves 1-16 (except for 10) were assigned to the correspondingly-numbered MIDI channels.

• Everything was in voice 1 except for the stuff in staff 14, which was in voice 2.

• In the exported MIDI file, Encore made a separate track for each staff. The channel numbers for the notes were preserved in the MIDI file, and can be seen in the event list display for the MIDI file in Cakewalk (the MIDI-editor sequencer I use).

• In the track properties display in Cakewalk, that channel number is shown as the "default" for the track.

    How does that happen? There is no "default track channel number" item in a MIDI file. But it seems that Cakewalk will take the channel number of the first note in a track as a property of the track. (It may be more complicated that that. Now that this has come before us, I'll do some more testing to probe that.)
• When Encore read in the MIDI file, it made a separate staff from each track.

• Encore assigned to each staff the channel number for the track we saw in Cakewalk (which was the channel number originally assigned to that staff).

    How does that happen? There is no "default track channel number" item in a MIDI file. My conjecture is that Encore follows an approach similar to that I mentioned above for Cakewalk. Now that this has come before us, I'll do some more testing to probe that.
• Everything in the reconstructed score is in voice 1. There was no need for Encore to do otherwise.

    There is of course nothing pertaining to "voices" in a MIDI file.
Thanks again so much for this wonderful set of information. (And a lovely piece of musical work, as well!)

Doug
Doug Kerr
 
Posts: 4399
Joined: Sat Sep 15, 2007 10:38 pm
Location: Alamogordo, New Mexico, USA

Re: Real-Time MIDI Note Durations

Postby Doug Kerr » Fri Oct 16, 2009 10:08 pm

A. It now appears that Cakewalk decides what the "default channel" is for a track (remember, this is an inferred track properties display item, not an actual item in the file) from the channel of the "initialization" events found at the very beginning of the track (volume, program, pan position, etc.).

If there are initialization events tagged for more than one channel, Cakewalk apparently declines to declare a "default channel" for the track. (This will be so if we have different channels assigned to the different voices on a staff in Encore.)

B. It now appears that Encore, reading in a MIDI file, for each track assigns a MIDI channel to the resulting staff based on the channel of the first initialization event encountered in the track.

It might be more complicated than that, as for example where there are several different kinds of initialization events with an inconsistent distribution of channels. My guess would still be that the first initialization event encountered controls. I do not at present intend to pursue that subtlety further.

Doug
"How do it know?"
-question often asked about a Thermos bottle.
Doug Kerr
 
Posts: 4399
Joined: Sat Sep 15, 2007 10:38 pm
Location: Alamogordo, New Mexico, USA

Re: Real-Time MIDI Note Durations

Postby polarbreeze » Fri Oct 16, 2009 10:12 pm

Doug Kerr wrote:What seems to have happened here is this...
Hey, nice work, Doug. Fast too! I have to take some time to digest all that. Meanwhile I'm missing a piece of knowledge about MIDI files. I'm not familiar with the concept of "track" in a MIDI file. All my MIDI education has been in the context of a real-time MIDI data stream and (as far as I know anyhow), there is no concept of "track" there - it has meaning only in the file. Can you point me to a reference where I could acquaint myself with that?

Now I realize that the MIDI file is giving Encore valuable information that a real-time stream does not contain, I guess my experiment wasn't doing quite what I'd intended. I think the more telling experiment will be to have Encore capture this material from a real-time stream, and see what it makes of that!
polarbreeze
 
Posts: 3489
Joined: Fri Sep 14, 2007 6:56 pm

Re: Real-Time MIDI Note Durations

Postby Doug Kerr » Fri Oct 16, 2009 10:55 pm

polarbreeze wrote:
Doug Kerr wrote:What seems to have happened here is this...
Hey, nice work, Doug. Fast too! I have to take some time to digest all that. Meanwhile I'm missing a piece of knowledge about MIDI files. I'm not familiar with the concept of "track" in a MIDI file. All my MIDI education has been in the context of a real-time MIDI data stream and (as far as I know anyhow), there is no concept of "track" there - it has meaning only in the file

Quite so.

Can you point me to a reference where I could acquaint myself with that?

I'll do it right here.

Tracks in MIDI files

In a MIDI file, the various events can be placed in separate "compartments" called "tracks". This has no direct relationship to a MIDI message stream. For example, there is no indication in a MIDI message as to the "track" in which the source event was held in source file. Tracks are creatures of MIDI files only, not of MIDI streams.

Tracks exist primarily for "administrative" convenience in the manipulation of the data. For example, the sequencist may want to use a separate track for each "instrument" in a composition. This allows the note events for that instrument to be isolated for display or attention. They can easily be shown on separate staves in a notation view in the editor.

There is not necessarily any relationship between the channels for events and the tracks in which they are held. Nevertheless, the sequencist may declare a default channel for each track. Then, as notes are added in that track, they will initially be tagged for that channel. But in the typical MIDI editor-sequencer, one can reset the channel for any individual event (usually in an "event list" view).

When the file is sequenced, the messages are sent out in the time sequence of the events, with the events in all tracks being considered a common source pool for that at sequencing time. Each message will carry the channel stored for it in its event in the file (which it may have gotten in several ways).

MIDI meta-events

In a typical MIDI file, the first track in fact contains no actual "events" (that is, no Note ON or of Note OFF events, no Volume events, and so forth. It contains only the meta-events in the file.

Meta-events do not correspond to (or spawn the emission of) MIDI messages. They instead give instructions to the sequencer or other recipient of the MIDI file. They indicate such things as:
• The initial tempo at which the file should be sequenced.
• The time signature that should be used in displaying the note events in the editor (especially in a "notation" view, but also in a piano roll view). (Note that the time tags for the individual events are not themselves based on measures.)
• The declaring the definition of a tick for the file (what fraction of a "quarter note" is it). Common values are 120, 240 (used in Encore in exported MIDI files), and 480. Encore will properly interpret incoming MIDI files with other tick factors. The actual factor is formally called "parts per quarter note" (PPQN).

There is no conceptual need for these meta-events to be sequestered in their own track, but it can prevent clutter in dealing with the data. Encore puts all the pertinent meta-events in Track 0, which has nothing else.

Back to tracks: If in fact the sequencist has chosen to consider a track to be the "container" for the stuff for one instrument when composing, then it is reasonable to presume an equivalence between tracks and staves when reading a MIDI file into a score-oriented system (such as Encore) - and Encore in fact proceeds on that basis.

Doug
Doug Kerr
 
Posts: 4399
Joined: Sat Sep 15, 2007 10:38 pm
Location: Alamogordo, New Mexico, USA

PreviousNext

Return to Product Manual Corrections

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron