Skip to contentSkip to conversation

Easy question: ppq and tempo

DISCUSSION Gerald Grabner 4 participants 4 messages May 24, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I'm just starting to write my first alsa-lib midi applications. I'm wondering what the acronym ppq stands for and what it means (especially in relation to tempo). Unfortunately, I didn't find any docu on the topic of tempo.

Thanks for your help,
Gerald

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#1 lore raw
Quoted 6 lines · Gerald Grabner

Hi,

I'm just starting to write my first alsa-lib midi applications. I'm wondering what the acronym ppq stands for and what it means (especially in relation to tempo). Unfortunately, I didn't find any docu on the topic of tempo.

from <sound/asequencer.h>:

/* queue tempo */
struct sndrv_seq_queue_tempo {
int queue; /* sequencer queue */
unsigned int tempo; /* current tempo, us/tick */
int ppq; /* time resolution, ticks/quarter */
unsigned int skew_value; /* queue skew */
unsigned int skew_base; /* queue skew base */
char reserved[24]; /* for the future */
};

the value is usually synonymous to the 'division' of a standard midi file.

tim

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#2 lore raw
Quoted 6 lines
Quoted 4 lines

I'm just starting to write my first alsa-lib midi applications. I'm wondering what the acronym ppq stands for and what it means (especially in relation to tempo). Unfortunately, I didn't find any docu on the topic of tempo.

int ppq; /* time resolution, ticks/quarter */

[ ... ]

Quoted 2 lines

the value is usually synonymous to the 'division' of a standard midi file.

"ppq" stands for "parts per quarter". as the header file suggests without much explanation, its length of a quarter note expressed in clock ticks. if the meter is 4/4 and the tempo is 120bpm, then a quarter note lasts 0.5 seconds. if the clock used for timing ticks 100 times per second, there are 50 clock ticks per quarter note, so ppq=50.

--p

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

#3 lore raw
Quoted 1 line · Paul Davis

"ppq" stands for "parts per quarter".

Rather boringly I was under the impression it was "pulses per quarter note" and that's why you sometimes see it as PPQN as well as PPQ.

Sorry.

R

Signature · 7 lines
http://www.all-day-breakfast.com/rosegarden
http://www.bownie.com

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm