Hi,
Im having a bit of trouble decoding SMPTE meta events and would
really appreciate some help.
OK. The meta event is 5 bytes long, consisting of hr,min,sec,frame and
frac frame. In another sequencer I create a SMPTE meta event with:
Format 25 FPS, hour = 1, min = 2, sec = 3 and frame and frac frame set
to 0.
In my app I get hour = 33 and the rest the same (ie 33,2,3,0,0 for the
5 bytes). So how do I decode these values to get the correct hour (and
format - which looks like its encoded in the data somehow)?
Any help would be much appreciated.
Peter
|
|
0
|
|
|
|
Reply
|
Peter
|
12/2/2003 2:26:59 AM |
|
Peter Zegelin wrote:
>Hi,
> Im having a bit of trouble decoding SMPTE meta events and would
>really appreciate some help.
>
>OK. The meta event is 5 bytes long, consisting of hr,min,sec,frame and
>frac frame. In another sequencer I create a SMPTE meta event with:
>
>Format 25 FPS, hour = 1, min = 2, sec = 3 and frame and frac frame set
>to 0.
>
>In my app I get hour = 33 and the rest the same (ie 33,2,3,0,0 for the
>5 bytes). So how do I decode these values to get the correct hour (and
>format - which looks like its encoded in the data somehow)?
>
>Any help would be much appreciated.
It would seem that the hours character might be encoded in a fashion
similar to the MIDI quarter frame message format. In this format the
hours high nibble character also includes the SMPTE format. The
characters bits are encoded as follows:
0nnn 0 yy d
where nnn is 7, d is hours bit 4, and yy is the SMPTE format encoded
as follows:
0 = 24 fps
1 = 25 fps
2 = 30 fps (Drop-Frame)
3 = 30 fps
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mkesti@gv.net | - The Who, Bargain
|
|
0
|
|
|
|
Reply
|
Michael
|
12/2/2003 3:22:40 PM
|
|
In article <3FCCAE40.C2C927A7@gv.net>,
"Michael R. Kesti" <mkesti@gv.net> wrote:
> Peter Zegelin wrote:
>
> >Hi,
> > Im having a bit of trouble decoding SMPTE meta events and would
> >really appreciate some help.
> >
> >OK. The meta event is 5 bytes long, consisting of hr,min,sec,frame and
> >frac frame. In another sequencer I create a SMPTE meta event with:
> >
> >Format 25 FPS, hour = 1, min = 2, sec = 3 and frame and frac frame set
> >to 0.
> >
> >In my app I get hour = 33 and the rest the same (ie 33,2,3,0,0 for the
> >5 bytes). So how do I decode these values to get the correct hour (and
> >format - which looks like its encoded in the data somehow)?
> >
> >Any help would be much appreciated.
>
> It would seem that the hours character might be encoded in a fashion
> similar to the MIDI quarter frame message format. In this format the
> hours high nibble character also includes the SMPTE format. The
> characters bits are encoded as follows:
>
> 0nnn 0 yy d
>
> where nnn is 7, d is hours bit 4, and yy is the SMPTE format encoded
> as follows:
>
> 0 = 24 fps
> 1 = 25 fps
> 2 = 30 fps (Drop-Frame)
> 3 = 30 fps
Thanks Michael!
It turns out its a bit different but you put me on the right track!
From a bit of experimentation I get bits 1 & 2 specify format as you
show but the hours are specified in bits 3 to 7. eg
Format hrs Binary
24 8 0 00 01000
25 16 0 01 10000
30(df) 7 0 10 00111
30 17 0 11 10001
Thanks again,
Peter
|
|
0
|
|
|
|
Reply
|
Peter
|
12/3/2003 2:44:50 AM
|
|
Peter Zegelin wrote:
>Thanks Michael!
>
> It turns out its a bit different but you put me on the right track!
Yes, from your description I didn't think your meta event format would
be exactly as the MIDI Quarter Frame's but it seemed like a good shot.
>From a bit of experimentation I get bits 1 & 2 specify format as you
>show but the hours are specified in bits 3 to 7. eg
>
>Format hrs Binary
>24 8 0 00 01000
>25 16 0 01 10000
>30(df) 7 0 10 00111
>30 17 0 11 10001
That's a bit unusual, or at least I probably wouldn't format it that
way, but I'm sure it works just fine.
BTW, meta events are specific to the application using them, but you
didn't say what software you're using and I'm curious. What is it?
>Thanks again,
Hey, no extra charge, man!
>Peter
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mkesti@gv.net | - The Who, Bargain
|
|
0
|
|
|
|
Reply
|
Michael
|
12/3/2003 8:45:21 PM
|
|
In article <3FCE4B61.A94FF9AA@gv.net>,
"Michael R. Kesti" <mkesti@gv.net> wrote:
> Peter Zegelin wrote:
>
> >Thanks Michael!
> >
> > It turns out its a bit different but you put me on the right track!
>
> Yes, from your description I didn't think your meta event format would
> be exactly as the MIDI Quarter Frame's but it seemed like a good shot.
>
> >From a bit of experimentation I get bits 1 & 2 specify format as you
> >show but the hours are specified in bits 3 to 7. eg
> >
> >Format hrs Binary
> >24 8 0 00 01000
> >25 16 0 01 10000
> >30(df) 7 0 10 00111
> >30 17 0 11 10001
>
> That's a bit unusual, or at least I probably wouldn't format it that
> way, but I'm sure it works just fine.
Er, yes. Its probably around the wrong way. Probably a big/little
endian thing (Im using OS X) and the fact that I read the byte into an
integer and converted it to a hex string to actually look at the bits.
But yes it does work fine.
>
> BTW, meta events are specific to the application using them, but you
> didn't say what software you're using and I'm curious. What is it?
>
I'm developing YAMS (Yet Another Midi Sequencer) - for MacOS X. It
will be playback only for the first version or two with editing features
coming later. Its got a few interesting features that I hope will make
it stand out a bit. I really just needed to show the data for the SMPTE
meta event (&h54) correctly - Ive got no idea how its actually used!
> >Thanks again,
>
> Hey, no extra charge, man!
>
> >Peter
cheers!
Peter
|
|
0
|
|
|
|
Reply
|
Peter
|
12/3/2003 11:06:25 PM
|
|
|
4 Replies
148 Views
(page loaded in 0.09 seconds)
Similiar Articles:7/25/2012 9:42:59 PM
|