[Stk] Info about SMF Files
Gary Scavone
gary at ccrma.Stanford.EDU
Mon Aug 23 07:05:14 PDT 2004
Hi Ravi,
I'm a little pressed at the moment to answer all your questions, but
I'm attaching a new STK class (MidiFileIn) which I wrote about a year
ago. It will be in the new release of STK, which I should have ready
within the next few weeks. This class provides various information
about SMFs and allows you to read events from an arbitrary track and
get a running event time (if a time track exists, the event times will
be "synced" to it).
--gary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MidiFileIn.h
URL: <https://cm-mail.stanford.edu/pipermail/stk/attachments/20040823/4fd01925/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MidiFileIn.cpp
URL: <https://cm-mail.stanford.edu/pipermail/stk/attachments/20040823/4fd01925/attachment.ksh>
-------------- next part --------------
On Sunday, August 22, 2004, at 11:12 AM, Ravi Kiran Chivukula wrote:
> Hi All,
> I don't know whether this list is the appropriate place for
> clarifying my doubts. Please bear with me if not.
> I am trying to develop a parser for SMF files for use in a MIDI
> software synthesizer. I have some doubts regarding the SMF file
> format.
>
> 1. As per my understanding if the 'division' word in the MThd chunk
> indicates 'ticks per quarter note' there will be a corresponding 'Set
> Tempo' meta event in the MTrk chunk. If the 'division' word contains
> SMPTE time code there will be a corresponding 'SMPTE Offset' meta
> event in the MTrk chunk. With the above information I have the
> complete timing information. If so what will be the use of MIDI
> quarter frame messages? Will these messages never occur in SMF files?
> If they occur how should a synthesizer handle them?
>
> 2. Similarly do system real time messages (midi timing clock, start,
> stop etc) ever occur in an SMF file? Since they are used for
> synchronising I feel they won't be useful for a synthesizer. How
> should they be treated if they do occur? I also read somewhere that
> song position pointer message will be redundant if we use MIDI time
> code. Is this true?
>
> 3. What is the importance of 'Time Signature' meta event? What is the
> importance of metronome click and what are these notated 32nd notes?
> Where do I use signatures like 4/4 time etc? I know the meaning of
> these signatures but not how to use them. Pardon me for this blatant
> ignorance!
>
> 4. Similarly what is the importance of 'Key Signature' meta event?
>
> 5. Can tempo be changed at any time in either format 0 or 1 files? In
> the specification it is said that for a format 1 file the tempo map
> must be stored in the first track. If so, how can we change the tempo
> at any later instant?
>
> 6. For a format 1 file should eack track be played on a separate MIDI
> channel? If so, what happens if the number of tracks exceeds 16? And
> also what exactly is the difference between format 0 and 1 files if
> the above statement is true? (The example given at the end of the
> specification uses the same musical piece to produce either format 0
> or 1 file but I didn't understand the difference as far as the output
> of the synthesis is concerned)
>
> 7. For note on/off events how do we know whether it is a whole note or
> a half note or a quarter note etc? Simply by checking the time during
> which they are on? Can a whole note exceed the time for the note as
> specified by the tempo?
>
> Sorry for the rather long mail. Thanks a lot in advance!!
>
> Regards
> Ravi Kiran
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
More information about the Stk
mailing list