home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 1 / CDPD_Vol1.bin / protracker / tempocalc.txt < prev   
Text File  |  1992-06-24  |  1KB  |  26 lines

  1. Protracker CIA (Complex Interface Adapter) Timer Tempo Calculations:
  2. --------------------------------------------------------------------
  3. Fcolor                        = 4.43361825 MHz (PAL color carrier frequency)
  4. CPU Clock   = Fcolor * 1.6    = 7.0937892  MHz
  5. CIA Clock   = Cpu Clock / 10  = 709.37892  kHz
  6. 50 Hz Timer = CIA Clock / 50  = 14187.5784
  7. Tempo num.  = 50 Hz Timer*125 = 1773447
  8.  
  9. For NTSC: CPU Clock = 7.1590905 MHz --> Tempo num. = 1789773
  10.  
  11.  To calculate tempo we use the formula: TimerValue = 1773447 / Tempo
  12.  The timer is only a word, so the available tempo range is 28-255 (++).
  13.  Tempo 125 will give a normal 50 Hz timer (VBlank).
  14.  
  15.  A normal Protracker VBlank song tempo can be calculated as follows:
  16.  We want to know the tempo in BPM (Beats Per Minute), or rather quarter-
  17.  notes per minute. Four notes makes up a quarternote.
  18.  First find interrupts per minute: 60 seconds * 50 per second = 3000
  19.  Divide by interrupts per quarter note = 4 notes * speed
  20.  This gives: Tempo = 3000/(4*speed)
  21.  simplified: Tempo = 750/speed
  22.  For a normal song in speed 6 this formula gives: 750/6 = 125 BPM
  23.  
  24.  Lars "ZAP" Hamre/Amiga Freelancers 1990
  25.  
  26.