The MIDI Forum

  1. Mikołaj
  2. MIDI Software
  3. Saturday, 02 June 2018
  4.  Subscribe via email
Hi,
I am relatively new in MIDI and got a task to prepare midi playback in one plugin. Can someone explain me what is the difference between Midi message and Midi event?I am using JUCE and there is the class midimessagesequence which contains both.
Comment
There are no comments made yet.
John Garside Accepted Answer Pending Moderation
0
Votes
Undo
My understanding of the two is as follows:

A MIDI message is, for example, a Note On or Note Off, Control Change, Program Change, Mod Wheel, etc. set of Bytes.

The MIDI event is when one of these is combined with the immediately preceding delta time that, in a MIDI file, signals when the message is to be sent.

AFAIK.
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. MIDI Software
  3. # 1
Mikołaj Accepted Answer Pending Moderation
0
Votes
Undo
Hi John,
Thank you for your answer. So i understand that if i need to check the time when the specific Midi event/message took place it is better to use the MIDI Event object because it has an information about beat/tick. Am i right?
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. MIDI Software
  3. # 2
John Garside Accepted Answer Pending Moderation
0
Votes
Undo
If you need to check the time, then the delta time preceding the event I would have thought is essential.
But ...
The Delta time has no information about beat or tick, just the number of ticks since the last event in that MIDI track chunk.

In the Header Chunk there will be a definition of the number of ticks per quarter note (see page 3 of the SMF standard).

You need to download the Complete MIDI Specification and read the section about how data is stored in an SMF.
Check the format of the number of ticks per MIDI quarter note included in the Header chunk "MThd" in <division>.
E.g. <Header Chunk> = <chunk type> <length> <format> <ntrks> <division>
There are some useful examples included there in the standard.
It's not quite as straightforward as reading beats and ticks, that has to be calculated.
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. MIDI Software
  3. # 3
Geoff Accepted Answer Pending Moderation
0
Votes
Undo
Looking at one of my books - 'Midi Sequencing in C' - this suggests that the concept of a Midi Event is more appropriate to RECORDING incoming midi data, where you get the timing data and the midi data coming in, and then need to keep this data together while it's manipulated and saved.

Maybe this concept is not so relevant to playing midi data from a midi file, as the structure of the overall file takes precedence anyway?

But then, more complex playback systems might change this?

Geoff
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. MIDI Software
  3. # 4
John Garside Accepted Answer Pending Moderation
0
Votes
Undo
Geoff,

It certainly would be important to attach a delta time to an incoming MIDI message, but equally(?) a sequencer in playback mode must transmit the messages at the precise time.

Quotation talking about Tempo accuracy in the SMF "This amount of accuracy provided by this tempo resolution allows a four-minute piece at 120 beats per minute to be accurate within 500 usec at the end of the piece."

To the O.P.
On page 14 of the SMF sepec. is information on "calculating delta times".
Comment
There are no comments made yet.
  1. 3 weeks ago
  2. MIDI Software
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.