Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Commented Unassigned: Time Signature Problems [16417]

$
0
0
Hi.
I'm creating MIDI files in my program and the time signature is just completely wrong. I do this:

Tracks.AddEvent(new TimeSignatureEvent((long)AbsoluteTime, TimeSigNum, TimeSigDen, 24, 8), 0);

where TimeSigNum would be 4 and TimeSigDen would also be 4.
As far as I know, the MIDI clock is 24 so that's how many ticks in a metronome tick there would be, and if my math is right, there are 8 32nd notes in a quarter note. Yes?

But if you open the file in Sonar or Acid, it shows up as 4/16

Setting it to 4/2 results in 4/4, and 4/8 shows up as 4/256

Why does it do whatever to the denominator?

Or am I doing something else wrong?

(My PPQN is 96, if that makes any difference.)(Attached is the MIDI file, if you want to look inside. It should be 4/4)

Comments: The denominator is a negative power of two: 2 represents a quarter-note, 3 represents an eighth-note, etc. So 4/2 is what you want.

Viewing all articles
Browse latest Browse all 738

Trending Articles