fbpx
Skip to main content

MIDI Forum

MIDI message and MI...
 
Notifications
Clear all

MIDI message and MIDI event difference

6 Posts
3 Users
0 Reactions
7,898 Views
Mikołaj
Posts: 2
New Member
Topic starter
 

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.

 
Posted : 02/06/2018 2:11 am
JohnG
Posts: 226
 

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.

 
Posted : 02/06/2018 3:04 am
Mikołaj
Posts: 2
New Member
Topic starter
 

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?

 
Posted : 02/06/2018 3:49 am
JohnG
Posts: 226
 

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 .
E.g.

=
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.

 
Posted : 02/06/2018 4:59 am
Geoff
Posts: 1043
Noble Member
 

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

 
Posted : 02/06/2018 8:52 am
JohnG
Posts: 226
 

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".

 
Posted : 03/06/2018 1:11 am
Share: