Jump to content
IGNORED

Translate music to INTV


vprette

Recommended Posts

I need to translate the mod musci I made for Colossal to INTV code.

 

To integrate the music in the game I use the Chevallier tracker.

I know the tracker use a MOD approach and it defines 3 channels and patterns...

 

Now, I have the music in inpulse .it format as 3 channels.

 

I would like to learn how to translate the patterns in the tracker "demosong.asm" song distributed by Chevallier that you can see below

It seems I have to define instruments (drums?) and describe patterns...

does anyone has experience doing this?

 

 

;; ======================================================================== ;;

;; Global music definitions ;;

;; ======================================================================== ;;

MUSIC PROC

 

;; ------------------------------------------------------------------------ ;;

;; Pitch effects ;;

;; ------------------------------------------------------------------------ ;;

@@pitch01 DECLE 0, 0, 0, 0

@@pitch02 DECLE 0, 0, 12, 12

 

;; ------------------------------------------------------------------------ ;;

;; Envelopes ;;

;; ------------------------------------------------------------------------ ;;

@@env01 DECLE 2

DECLE $FEDC, $BA98, $7654, $3210

DECLE $0000, $0000, $0000, $0000

DECLE $0000, $0000, $0000, $0000

DECLE $0000, $0000, $0000, $0000

 

@@env02 DECLE 1

DECLE $FFFF, $EEEE, $DDDD, $CCCC

DECLE $BBBB, $AAAA, $9999, $8888

DECLE $7777, $6666, $5555, $4444

DECLE $3333, $2222, $1111, $0000

 

;; ------------------------------------------------------------------------ ;;

;; Drums ;;

;; ------------------------------------------------------------------------ ;;

@@drum1 DRUM($380, $10, 0, 1, $F)

DRUM($380, $10, 1, 0, $F)

DRUM($380, $10, 1, 0, $F)

DRUM($580, $1F, 1, 0, $E)

DRUM($580, $1F, 1, 1, $D)

DRUM($580, $1F, 1, 1, $C)

DRUM($580, $1F, 1, 0, $A)

DRUM($580, $1F, 1, 0, $ 8)

 

@@drum2 DRUM($280, $10, 0, 1, $F)

DRUM($280, $10, 1, 0, $F)

DRUM($280, $10, 1, 0, $F)

DRUM($480, $1F, 1, 0, $E)

DRUM($480, $1F, 1, 1, $D)

DRUM($480, $1F, 1, 1, $C)

DRUM($480, $1F, 1, 0, $A)

DRUM($480, $1F, 1, 0, $ 8)

 

@@hithat DRUM($380, $04, 0, 1, $D)

DRUM($380, $04, 0, 1, $6)

DRUM(0, 0, 0, 0, 0)

DRUM(0, 0, 0, 0, 0)

DRUM(0, 0, 0, 0, 0)

DRUM(0, 0, 0, 0, 0)

DRUM(0, 0, 0, 0, 0)

DRUM(0, 0, 0, 0, 0)

 

ENDP

 

;; ======================================================================== ;;

;; Song #00 ;;

;; ======================================================================== ;;

SONG00 PROC

 

;; ------------------------------------------------------------------------ ;;

;; Speed / Pointers ;;

;; ------------------------------------------------------------------------ ;;

DECLE 6, @@patterns, @@instr

 

;; ------------------------------------------------------------------------ ;;

;; Order of patterns ;;

;; ------------------------------------------------------------------------ ;;

DECLE 0, 1, 2, 3, 0, 1, 2, 4, (-8 AND $FFFF)

 

;; ------------------------------------------------------------------------ ;;

;; Details of patterns ;;

;; ------------------------------------------------------------------------ ;;

@@patterns DECLE 32, @@p000, @@p001, @@p002

DECLE 32, @@p000, @@p001, @@p003

DECLE 32, @@p000, @@p001, @@p004

DECLE 32, @@p000, @@p001, @@p005

DECLE 32, @@p000, @@p001, @@p006

 

;; ------------------------------------------------------------------------ ;;

;; Standard instruments (pitch effect, vibrato, envelope) ;;

;; ------------------------------------------------------------------------ ;;

@@instr DECLE MUSIC.pitch01, 1, MUSIC.env01

DECLE MUSIC.pitch01, 2, MUSIC.env02

DECLE MUSIC.pitch02, 2, MUSIC.env01

DECLE MUSIC.pitch01, 2, MUSIC.env01

 

;; ------------------------------------------------------------------------ ;;

;; Drums ;;

;; ------------------------------------------------------------------------ ;;

DECLE MUSIC.drum1

DECLE MUSIC.drum2

DECLE MUSIC.hithat

 

;; ------------------------------------------------------------------------ ;;

;; Patterns ;;

;; ------------------------------------------------------------------------ ;;

@@p000 NOTES("DRM 1F0", "A-2 1F0", "DRM 3F0", "A-2 1F0")

NOTES("DRM 2F0", "A-2 1F0", "DRM 3F0", "A-2 1F0")

NOTES("DRM 1F0", "A-2 1F0", "DRM 1F0", "A-2 1F0")

NOTES("DRM 2F0", "A-2 1F0", "DRM 3F0", "A-2 1F0")

NOTES("DRM 1F0", "E-2 1F0", "DRM 3F0", "E-2 1F0")

NOTES("DRM 2F0", "E-2 1F0", "DRM 3F0", "E-2 1F0")

NOTES("DRM 1F0", "E-3 1F0", "DRM 1F0", "E-3 1F0")

NOTES("DRM 2F0", "E-3 1F0", "DRM 2F0", "E-3 1F0")

 

@@p001 NOTES("A-3 2E3", "C-4 2E2", "E-4 2E0", "F-4 2E1")

NOTES("E-4 2E1", "C-4 2E3", "A-3 2E3", "C-4 2E2")

NOTES("E-4 2E0", "F-4 2E1", "A-4 2E1", "G-4 2E3")

 

@@p002 NOTES("A-5 3F7", "G-5 3F7", "E-5 3F7", "D-5 3F1")

NOTES("E-5 3F5", "", "", "")

 

@@p003 NOTES("A-5 3F7", "G-5 3F7", "E-5 3F7", "F-5 3F1")

NOTES("E-5 3F5", "", "", "")

 

@@p004 NOTES("A-5 4F3", "G-5 4F1", "A-5 4F1", "C-6 4F1")

NOTES("B-5 4F2", "A-5 4F0", "G-5 4F1", "E-5 4F3")

NOTES("D-5 4F1", "E-5 4F3", "A-5 4F1", "G-5 4F3")

 

@@p005 NOTES("A-5 4F3", "G-5 4F1", "A-5 4F1", "C-6 4F1")

NOTES("B-5 4F3", "C-6 4F0", "D-6 4F0", "E-6 4F1")

NOTES("C-6 4F1", "B-5 4F1", "G-5 4F1", "C-6 4F1")

NOTES("A-5 4F1", "F-5 4F1", "G-5 4F1", "")

 

@@p006 NOTES("A-5 4F3", "G-5 4F1", "A-5 4F1", "C-6 4F1")

NOTES("B-5 4F3", "C-6 4F0", "D-6 4F0", "E-6 4F0")

NOTES("F-6 4F0", "E-6 4F1", "E-6 4F0", "F-6 4F0")

NOTES("E-6 4F0", "D-6 4F0", "E-6 4F0", "D-6 4F0")

NOTES("C-6 4F0", "B-5 4F0", "C-6 4F0", "B-5 4F0")

NOTES("A-5 4F0", "G-5 4F0", "", "")

 

ENDP

 

;; ======================================================================== ;;

;; End of File: demosong.asm ;;

;; ======================================================================== ;;

Edited by vprette
Link to comment
Share on other sites

Valter,

 

Here is a link to a quick & dirty doc file that I wrote some times ago:

http://knox.ac.free.fr/files/tracker-doc.txt

 

The format has not been updated since that time, so it should be fairly up to date.

 

It's probably better to start with something very simple, just to see how it works.

 

Let me know if you have any question.

 

-- Arnauld

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Valter,

 

The instrument number corresponds to the tracker instrument defined in your song file. It's not a real instrument sound, as a sampled waveform voice; it's rather the envelope to be applied to the note in question.

 

On a real MOD file, it represents the waveform to be used, but this is the Intellivision. :)

 

dZ.

Link to comment
Share on other sites

Valter,

 

I need to prepare some more songs for Christmas Carol, so I'll try to write up a tutorial of what you need to do.

 

It took me a while to understand the format, but it is actually quite simple and straightforward.

 

Basically, you define your instruments (envelope and pitch effects), then you define patterns, which are a series of notes for a particular duration. Then you put the patterns together into sequences, and finally these sequences into a song.

 

So if you imagine a musical measure as a pattern, then a group of patterns as a melody or refrain, you can see how a song is a collection of these refrains.

 

dZ.

Link to comment
Share on other sites

Valter,

 

I need to prepare some more songs for Christmas Carol, so I'll try to write up a tutorial of what you need to do.

 

It took me a while to understand the format, but it is actually quite simple and straightforward.

 

Basically, you define your instruments (envelope and pitch effects), then you define patterns, which are a series of notes for a particular duration. Then you put the patterns together into sequences, and finally these sequences into a song.

 

So if you imagine a musical measure as a pattern, then a group of patterns as a melody or refrain, you can see how a song is a collection of these refrains.

 

dZ.

 

myu issue is definint instruments. the rest is not difficult :-)

Link to comment
Share on other sites

Valter,

 

I need to prepare some more songs for Christmas Carol, so I'll try to write up a tutorial of what you need to do.

 

It took me a while to understand the format, but it is actually quite simple and straightforward.

 

Basically, you define your instruments (envelope and pitch effects), then you define patterns, which are a series of notes for a particular duration. Then you put the patterns together into sequences, and finally these sequences into a song.

 

So if you imagine a musical measure as a pattern, then a group of patterns as a melody or refrain, you can see how a song is a collection of these refrains.

 

dZ.

 

myu issue is definint instruments. the rest is not difficult :-)

 

OK, then, here's an example from Christmas Carol Of The Bells (the theme of Christmas Carol):

 

1. First, define pitch effects (like arpeggio or vibrato). This song uses none.

 


; ------------------------------------------------------------------------- ;
;  Pitch effects                                                            ;
; ------------------------------------------------------------------------- ;
@@pitch01:  DECLE   0, 0, 0, 0

 

 

2. Define envelopes, which is the "shape" of a note, as it plays from start to finish. An envelope is described by four events:

  • Attack: The time it takes from no volume, to full volume.
  • Decay: The time it takes from full volume at its peak, to the sustained level of volume of the actual note.
  • Sustain: The volume level at which a note is sustained while it is playing.
  • Release: The time it takes the volume level to go back down to zero at the end of a note.

If you were to graph the envelope of say, a piano, it would look something like this:

 

      A    D       S          R
F - |-----|---|-----------|--------|
 - ......#.........................
 - .....#.#........................
 - ....#...#.......................
 - ...#.....##############.........
 - ..#....................#........
 - .#......................###.....
0 - #..........................####.

 

Note that it has a sharp attack when you hit the key, a short decay at which the volume stabilizes while you hold down the key, a medium level of sustain since the kinetic energy of the string was mostly spent during the hit, and a slightly long time after the key is released in which the volume tapers off.

 

A violin, by contrast, typically has a very long attack. A percussion instrument has almost no sustain since its volume immediately starts tapering off after the initial hit.

 

The Christmas Carol theme defines four envelopes:

 


; ------------------------------------------------------------------------- ;
;  Envelopes                                                                ;
; ------------------------------------------------------------------------- ;
@@env01:    DECLE   2   ; No sustain, normal release
           DECLE   $FEDC, $BA98, $7654, $3210
           DECLE   $0000, $0000, $0000, $0000
           DECLE   $0000, $0000, $0000, $0000
           DECLE   $0000, $0000, $0000, $0000

@@env02:    DECLE   3   ; Long sustain, short release
           DECLE   $FFEE, $EEDD, $CCCC, $CCBB
           DECLE   $AA99, $8765, $4321, $0000
           DECLE   $0000, $0000, $0000, $0000
           DECLE   $0000, $0000, $0000, $0000

@@env03:    DECLE   3   ; Long sustain and release
           DECLE   $FFEE, $EEDD, $CCCC, $CCCC
           DECLE   $BBBB, $AAAA, $9999, $8877
           DECLE   $6655, $4433, $2100, $0000
           DECLE   $0000, $0000, $0000, $0000

@@env04:    DECLE   2   ; No sustain, short release
           DECLE   $FEDC, $BA98, $7642, $0000
           DECLE   $0000, $0000, $0000, $0000
           DECLE   $0000, $0000, $0000, $0000
           DECLE   $0000, $0000, $0000, $0000

 

3. And finally, you define the instruments with the format:

 

           DECLE pitch, vibrato (1 or 0), envelope

 

This song defines four, one for each of the envelopes:

 


; ------------------------------------------------------------------------- ;
;  Instruments                                                              ;
; ------------------------------------------------------------------------- ;
@@instr:    DECLE       MUSIC.pitch01, 1, MUSIC.env01   ; #1
           DECLE       MUSIC.pitch01, 1, MUSIC.env02   ; #2
           DECLE       MUSIC.pitch01, 0, MUSIC.env03   ; #3
           DECLE       MUSIC.pitch01, 0, MUSIC.env04   ; #4

 

For information on the format of the various sections, visit Arnauld's help document.

 

I hope this helps.

 

-dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...