home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PCGPEV10.ZIP / MODFORM.TXT < prev    next >
Text File  |  1994-05-10  |  17KB  |  524 lines

  1.  
  2. Protracker 1.1B Song/Module Format:
  3.  
  4. Offset  Bytes  Description
  5.    0     20    Songname. Remember to put trailing null bytes at the end...
  6.  
  7. Information for sample 1-31:
  8.  
  9. Offset  Bytes  Description
  10.   20     22    Samplename for sample 1. Pad with null bytes.
  11.   42      2    Samplelength for sample 1. Stored as number of words.
  12.                Multiply by two to get real sample length in bytes.
  13.   44      1    Lower four bits are the finetune value, stored as a signed
  14.                four bit number. The upper four bits are not used, and
  15.                should be set to zero.
  16.                Value:  Finetune:
  17.                  0        0
  18.                  1       +1
  19.                  2       +2
  20.                  3       +3
  21.                  4       +4
  22.                  5       +5
  23.                  6       +6
  24.                  7       +7
  25.                  8       -8
  26.                  9       -7
  27.                  A       -6
  28.                  B       -5
  29.                  C       -4
  30.                  D       -3
  31.                  E       -2
  32.                  F       -1
  33.  
  34.   45      1    Volume for sample 1. Range is $00-$40, or 0-64 decimal.
  35.   46      2    Repeat point for sample 1. Stored as number of words offset
  36.                from start of sample. Multiply by two to get offset in bytes.
  37.   48      2    Repeat Length for sample 1. Stored as number of words in
  38.                loop. Multiply by two to get replen in bytes.
  39.  
  40. Information for the next 30 samples starts here. It's just like the info for
  41. sample 1.
  42.  
  43. Offset  Bytes  Description
  44.   50     30    Sample 2...
  45.   80     30    Sample 3...
  46.    .
  47.    .
  48.    .
  49.  890     30    Sample 30...
  50.  920     30    Sample 31...
  51.  
  52. Offset  Bytes  Description
  53.  950      1    Songlength. Range is 1-128.
  54.  951      1    Well... this little byte here is set to 127, so that old
  55.                trackers will search through all patterns when loading.
  56.                Noisetracker uses this byte for restart, but we don't.
  57.  952    128    Song positions 0-127. Each hold a number from 0-63 that
  58.                tells the tracker what pattern to play at that position.
  59. 1080      4    The four letters "M.K." - This is something Mahoney & Kaktus
  60.                inserted when they increased the number of samples from
  61.                15 to 31. If it's not there, the module/song uses 15 samples
  62.                or the text has been removed to make the module harder to
  63.                rip. Startrekker puts "FLT4" or "FLT8" there instead.
  64.  
  65. Offset  Bytes  Description
  66. 1084    1024   Data for pattern 00.
  67.    .
  68.    .
  69.    .
  70. xxxx  Number of patterns stored is equal to the highest patternnumber
  71.       in the song position table (at offset 952-1079).
  72.  
  73. Each note is stored as 4 bytes, and all four notes at each position in
  74. the pattern are stored after each other.
  75.  
  76. 00 -  chan1  chan2  chan3  chan4
  77. 01 -  chan1  chan2  chan3  chan4
  78. 02 -  chan1  chan2  chan3  chan4
  79. etc.
  80.  
  81. Info for each note:
  82.  
  83.  _____byte 1_____   byte2_    _____byte 3_____   byte4_
  84. /                 /        /                 /
  85. 0000          0000-00000000  0000          0000-00000000
  86.  
  87. Upper four    12 bits for    Lower four    Effect command.
  88. bits of sam-  note period.   bits of sam-
  89. ple number.                  ple number.
  90.  
  91. Periodtable for Tuning 0, Normal
  92.   C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
  93.   C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
  94.   C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
  95.  
  96. To determine what note to show, scan through the table until you find
  97. the same period as the one stored in byte 1-2. Use the index to look
  98. up in a notenames table.
  99.  
  100. This is the data stored in a normal song. A packed song starts with the
  101. four letters "PACK", but i don't know how the song is packed: You can
  102. get the source code for the cruncher/decruncher from us if you need it,
  103. but I don't understand it; I've just ripped it from another tracker...
  104.  
  105. In a module, all the samples are stored right after the patterndata.
  106. To determine where a sample starts and stops, you use the sampleinfo
  107. structures in the beginning of the file (from offset 20). Take a look
  108. at the mt_init routine in the playroutine, and you'll see just how it
  109. is done.
  110.  
  111. Lars "ZAP" Hamre/Amiga Freelancers
  112.  
  113. --------------------------
  114.  
  115. Found that document...
  116.  
  117. Mark J Cox ------------------------------------------- m.j.h.cox@bradford.ac.uk
  118. University of Bradford ---------------------------- bc732@cleveland.freenet.edu
  119. Mark
  120.  
  121.              EFFECT COMMANDS
  122.              ---------------
  123.  Effect commands on protracker should
  124.  be compatible with all other trackers.
  125.  0 - None/Arpeggio     8 - * NOT USED *
  126.  1 - Portamento Up     9 - SampleOffset
  127.  2 - Portamento Down   A - VolumeSlide
  128.  3 - TonePortamento    B - PositionJump
  129.  4 - Vibrato           C - Set Volume
  130.  5 - ToneP + VolSlide  D - PatternBreak
  131.  6 - Vibra + VolSlide  E - Misc. Cmds
  132.  7 - Tremolo           F - Set Speed
  133.  
  134.  
  135.               E - COMMANDS
  136.               ------------
  137.  The E command has been altered to
  138.  contain more commands than one.
  139.  E0- Filter On/Off     E8- * NOT USED *
  140.  E1- Fineslide Up      E9- Retrig Note
  141.  E2- Fineslide Down    EA- FineVol Up
  142.  E3- Glissando Control EB- FineVol Down
  143.  E4- Vibrato Control   EC- NoteCut
  144.  E5- Set Finetune      ED- NoteDelay
  145.  E6- Patternloop       EE- PatternDelay
  146.  E7- Tremolo Control   EF- Invert Loop
  147.  
  148.  
  149.   Cmd 0. Arpeggio [Range:$0-$F/$0-$F]
  150.   -----------------------------------
  151.  Usage: $0 + 1st halfnote add
  152.            + 2nd halfnote add
  153.  Arpeggio is used to simulate chords.
  154.  This is done by rapidly changing the
  155.  pitch between 3(or 2) different notes.
  156.  It sounds very noisy and grainy on
  157.  most samples, but ok on monotone ones.
  158.  Example: C-300047  C-major chord:
  159.           (C+E+G  or C+4+7 halfnotes)
  160.           C-300037  C-minor chord:
  161.           (C+D#+G or C+3+7 halfnotes)
  162.  
  163.  
  164.   Cmd 1. Portamento up [Speed:$00-$FF]
  165.   ------------------------------------
  166.  Usage: $1 + portamento speed
  167.  Portamento up will simply slide the
  168.  sample pitch up. You can NOT slide
  169.  higher than B-3! (Period 113)
  170.  Example: C-300103  1 is the command,
  171.             3 is the portamentospeed.
  172.  NOTE: The portamento will be called as
  173.  many times as the speed of the song.
  174.  This means that you'll sometimes have
  175.  trouble sliding accuratly. If you
  176.  change the speed without changing the
  177.  sliderates, it will sound bad...
  178.  
  179.  
  180.   Cmd 2. Portamento down [Speed:$00-FF]
  181.   -------------------------------------
  182.  Usage: $2 + portamento speed
  183.  Just like command 1, except that this
  184.  one slides the pitch down instead.
  185.  (Adds to the period).
  186.  You can NOT slide lower than C-1!
  187.  (Period 856)
  188.  Example: C-300203  2 is the command,
  189.             3 is the portamentospeed.
  190.  
  191.  
  192.  Cmd 3. Tone-portamento [Speed:$00-$FF]
  193.  --------------------------------------
  194.  Usage: Dest-note + $3 + slidespeed
  195.  This command will automatically slide
  196.  from the old note to the new.
  197.  You don't have to worry about which
  198.  direction to slide, you need only set
  199.  the slide speed. To keep on sliding,
  200.  just select the command $3 + 00.
  201.  Example: A-200000  First play a note.
  202.           C-300305  C-3 is the note to
  203.                slide to, 3 the command,
  204.                and 5 the speed.
  205.  
  206.  
  207.  Cmd 4. Vibrato [Rate:$0-$F,Dpth:$0-$F]
  208.  --------------------------------------
  209.  Usage: $4 + vibratorate + vibratodepth
  210.  Example: C-300481  4 is the command,
  211.        8 is the speed of the vibrato,
  212.    and 1 is the depth of the vibrato.
  213.  To keep on vibrating, just select
  214.  the command $4 + 00. To change the
  215.  vibrato, you can alter the rate,
  216.  depth or both. Use command E4- to
  217.  change the vibrato-waveform.
  218.  
  219.  
  220.  Cmd 5. ToneP + Volsl [Spd:$0-$F/$0-$F]
  221.  --------------------------------------
  222.  Usage: $5 + upspeed + downspeed
  223.  This command will continue the current
  224.  toneportamento and slide the volume
  225.  at the same time. Stolen from NT2.0.
  226.  Example: C-300503  3 is the speed to
  227.                 turn the volume down.
  228.           C-300540  4 is the speed to
  229.                          slide it up.
  230.  
  231.  
  232.  Cmd 6. Vibra + Volsl [Spd:$0-$F/$0-$F]
  233.  --------------------------------------
  234.  Usage: $6 + upspeed + downspeed
  235.  This command will continue the current
  236.  vibrato and slide the volume at the
  237.  same time. Stolen from NT2.0.
  238.  Example: C-300605  5 is the speed to
  239.                 turn the volume down.
  240.           C-300640  4 is the speed to
  241.                          slide it up.
  242.  
  243.  
  244.  Cmd 7. Tremolo [Rate:$0-$F,Dpth:$0-$F]
  245.  --------------------------------------
  246.  Usage: $7 + tremolorate + tremolodepth
  247.  Tremolo vibrates the volume.
  248.  Example: C-300794  7 is the command,
  249.        9 is the speed of the tremolo,
  250.    and 4 is the depth of the tremolo.
  251.  To keep on tremoling, just select
  252.  the command $7 + 00. To change the
  253.  tremolo, you can alter the rate,
  254.  depth or both. Use command E7- to
  255.  change the tremolo-waveform.
  256.  
  257.  
  258.  Cmd 9. Set SampleOffset [Offs:$00-$FF]
  259.  --------------------------------------
  260.  Usage: $9 + Sampleoffset
  261.  This command will play from a chosen
  262.  position in the sample, and not from
  263.  the beginning. The two numbers equal
  264.  the two first numbers in the length
  265.  of the sample. Handy for speech-
  266.  samples.
  267.  Example: C-300923  Play sample from
  268.                     offset $2300.
  269.  
  270.  
  271.  Cmd A. Volumeslide [Speed:$0-$F/$0-$F]
  272.  --------------------------------------
  273.  Usage: $A + upspeed + downspeed
  274.  Example: C-300A05  5 is the speed to
  275.                 turn the volume down.
  276.           C-300A40  4 is the speed to
  277.                          slide it up.
  278.  NOTE: The slide will be called as
  279.  many times as the speed of the song.
  280.  The slower the song, the more the
  281.  volume will be changed on each note.
  282.  
  283.  
  284.    Cmd B. Position-jump [Pos:$00-$7F]
  285.    ----------------------------------
  286.  Usage: $B + position to continue at
  287.  Example: C-300B01  B is the command,
  288.                  1 is the position to
  289.                  restart the song at.
  290.  This command will also perform a
  291.  pattern-break (see 2 pages below).
  292.  You can use this command instead of
  293.  restart as on noisetracker, but you 
  294.  must enter the position in hex!
  295.  
  296.  
  297.    Cmd C. Set volume [Volume:$00-$40]
  298.    ----------------------------------
  299.  Usage: $C + new volume
  300.  Well, this old familiar command will
  301.  set the current volume to your own
  302.  selected. The highest volume is $40.
  303.  All volumes are represented in hex.
  304.  (Programmers do it in hex, you know!)
  305.  Example: C-300C10  C is the command,
  306.        10 is the volume (16 decimal).
  307.  
  308.  
  309.       Cmd D. Pattern-break
  310.       [Pattern-pos:00-63, decimal]
  311.       ----------------------------
  312.  Usage: $D + pattern-position
  313.  This command just jumps to the next
  314.  song-position, and continues play
  315.  from the patternposition you specify.
  316.  Example: C-300D00  Jump to the next
  317.      song-position and continue play
  318.             from patternposition 00.
  319.       Or: C-300D32  Jump to the next
  320.      song-position and continue play
  321.     from patternposition 32 instead.
  322.  
  323.  
  324.     Cmd E0. Set filter [Range:$0-$1]
  325.     --------------------------------
  326.  Usage: $E0 + filter-status
  327.  This command jerks around with the
  328.  sound-filter on some A500 + A2000.
  329.  All other Amiga-users should keep out
  330.  of playing around with it.
  331.  Example: C-300E01  disconnects filter
  332.                  (turns power LED off)
  333.           C-300E00  connects filter
  334.                   (turns power LED on)
  335.  
  336.  
  337.    Cmd E1. Fineslide up [Range:$0-$F]
  338.    ----------------------------------
  339.  Usage: $E1 + value
  340.  This command works just like the
  341.  normal portamento up, except that
  342.  it only slides up once. It does not
  343.  continue sliding during the length of
  344.  the note.
  345.  Example: C-300E11  Slide up 1 at the
  346.                beginning of the note.
  347.  (Great for creating chorus effects)
  348.  
  349.  
  350.   Cmd E2. Fineslide down [Range:$0-$F]
  351.   ------------------------------------
  352.  Usage: $E2 + value
  353.  This command works just like the
  354.  normal portamento down, except that
  355.  it only slides down once. It does not
  356.  continue sliding during the length of
  357.  the note.
  358.  Example: C-300E26  Slide up 6 at the
  359.                beginning of the note.
  360.  
  361.  
  362.   Cmd E3. Glissando Ctrl [Range:$0-$1]
  363.   ------------------------------------
  364.  Usage: $E3 + Glissando-Status
  365.  Glissando must be used with the tone-
  366.  portamento command. When glissando is
  367.  activated, toneportamento will slide
  368.  a halfnote at a time, instead of a
  369.  straight slide.
  370.  Example: C-300E31  Turn Glissando on.
  371.           C-300E30  Turn Glissando off.
  372.  
  373.  
  374.       Cmd E4. Set vibrato waveform
  375.       [Range:$0-$3]
  376.       ----------------------------
  377.  Usage: $E4 + vibrato-waveform
  378.  Example: C-300E40  Set sine(default)
  379.                E44  Don't retrig WF
  380.           C-300E41  Set Ramp Down
  381.                E45  Don't retrig WF
  382.           C-300E42  Set Squarewave
  383.                E46  Don't retrig WF
  384.           C-300E43  Set Random
  385.                E47  Don't retrig WF
  386.  
  387.  
  388.    Cmd E5. Set finetune [Range:$0-$F]
  389.    ----------------------------------
  390.  Usage: $E5 + finetune-value
  391.  Example: C-300E51  Set finetune to 1.
  392.  Use these tables to figure out the
  393.  finetune-value.
  394.  Finetune: +7 +6 +5 +4 +3 +2 +1  0
  395.     Value:  7  6  5  4  3  2  1  0
  396.  Finetune: -1 -2 -3 -4 -5 -6 -7 -8
  397.     Value:  F  E  D  C  B  A  9  8
  398.  
  399.  
  400.    Cmd E6. PatternLoop [Loops:$0-$F]
  401.    ----------------------------------
  402.  Usage: $E6 + number of loops
  403.  This command will loop a part of a
  404.  pattern.
  405.  Example: C-300E60  Set loopstart.
  406.           C-300E63  Jump to loop 3
  407.            times before playing on.
  408.  
  409.  
  410.       Cmd E7. Set tremolo waveform
  411.       [Range:$0-$3]
  412.       ----------------------------
  413.  Usage: $E7 + tremolo-waveform
  414.  Example: C-300E70  Set sine(default)
  415.                E74  Don't retrig WF
  416.           C-300E71  Set Ramp Down
  417.                E75  Don't retrig WF
  418.           C-300E72  Set Squarewave
  419.                E76  Don't retrig WF
  420.           C-300E73  Set Random
  421.                E77  Don't retrig WF
  422.  
  423.  
  424.     Cmd E9. Retrig note [Value:$0-$F]
  425.     ---------------------------------
  426.  Usage: $E9 + Tick to Retrig note at.
  427.  This command will retrig the same note
  428.  before playing the next. Where to
  429.  retrig depends on the speed of the
  430.  song. If you retrig with 1 in speed 6
  431.  that note will be trigged 6 times in
  432.  one note slot. Retrig on hi-hats!
  433.  Example: C-300F06  Set speed to 6.
  434.           C-300E93  Retrig at tick 3
  435.                     out of 6.
  436.  
  437.  
  438.    Cmd EA. FineVolsl up [Range:$0-$F]
  439.    ----------------------------------
  440.  Usage: $EA + value
  441.  This command works just like the
  442.  normal volumeslide up, except that
  443.  it only slides up once. It does not
  444.  continue sliding during the length of
  445.  the note.
  446.  Example: C-300EA3  Slide volume up 1
  447.         at the beginning of the note.
  448.  
  449.  
  450.   Cmd EB. FineVolsl down [Range:$0-$F]
  451.   ------------------------------------
  452.  Usage: $EB + value
  453.  This command works just like the
  454.  normal volumeslide down, except that
  455.  it only slides down once. It does not
  456.  continue sliding during the length of
  457.  the note.
  458.  Example: C-300EB6  Slide volume down
  459.        6 at the beginning of the note.
  460.  
  461.  
  462.      Cmd EC. Cut note [Value:$0-$F]
  463.      ------------------------------
  464.  Usage: $EC + Tick to Cut note at.
  465.  This command will cut the note
  466.  at the selected tick, creating
  467.  extremely short notes.
  468.  Example: C-300F06  Set speed to 6.
  469.           C-300EC3  Cut at tick 3 out
  470.                     of 6.
  471.  Note that the note is not really cut,
  472.  the volume is just turned down.
  473.  
  474.  
  475.      Cmd ED. NoteDelay [Value:$0-$F]
  476.      -------------------------------
  477.  Usage: $ED + ticks to delay note.
  478.  This command will delay the note
  479.  to the selected tick.
  480.  Example: C-300F06  Set speed to 6.
  481.           C-300ED3  Play note at tick
  482.                     3 out of 6.
  483.  
  484.  
  485.    Cmd EE. PatternDelay [Notes:$0-$F]
  486.    ----------------------------------
  487.  Usage: $EE + notes to delay pattern.
  488.  This command will delay the pattern
  489.  the selected numbers of notes.
  490.  Example: C-300EE8  Delay pattern 8
  491.            notes before playing on.
  492.  All other effects are still active
  493.  when the pattern is being delayed.
  494.  
  495.  
  496.     Cmd EF. Invert Loop [Speed:$0-$F]
  497.     ---------------------------------
  498.  Usage: $EF + Invertspeed
  499.  This command will need a short loop
  500.  ($10,20,40,80 etc. bytes) to work.
  501.  It will invert the loop byte by byte.
  502.  Sounds better than funkrepeat...
  503.  Example: C-300EF8 Set invspeed to 8.
  504.  To turn off the inverting, set 
  505.  invspeed to 0, or press ctrl + Z.
  506.  
  507.  
  508.     Cmd F. Set speed [Speed:$00-$FF]
  509.     --------------------------------
  510.  Usage: $F + speed
  511.  This command will set the speed of the
  512.  song.  
  513.  
  514.  
  515. ┌─────────────────────────────────────────────────────────────┬──────────────
  516. │ Annotation by Mark Feldman (u914097@student.canberra.edu.au │
  517. └─────────────────────────────────────────────────────────────┘
  518.  
  519. The 6 and 8 channel mod files differ from the normal mods in two ways:
  520.  
  521. 1) The signature string "M.K." at offset 1080 is either "6CHN" or "8CHN".
  522. 2) The pattern data table starting at offset 1084 stores 6 or 8 notes for
  523.    each pattern position position.
  524.