Jump to content
IGNORED

How To: Intellivision Music Tracker


DZ-Jay

Recommended Posts

There have been many people asking how to create music on the Intellivision and each thread is addressed individually. There is some good information on the IntelliWiki, but the format of the tracker is not described in detail.

This thread endeavors to describe the tracker format in all its gory detail. The information in this article was originally provided to me by Arnauld Chevallier, author of the tracker library for the Intellivision. I have adapted and expanded it for publication.

I've attached to this article an archive containing the source code for the Intellivision Tracker library, along with the original demo song provided by Arnauld Chevallier. I've also included a simple song taken from the Christmas Carol game for further illustration.

Intellivision Tracker Lib.zip


Technical Overview
The Intellivision Master Component includes a General Instruments AY-3-8914 sound chip, commonly referred to as the Programmable Sound Generator, or PSG. The PSG contains three separate square-wave tone generators, each of which can be programmed individually to control its frequency and volume. The chip also includes a noise generator, which can be mixed with any of the three tone channels. All three channels, potentially modulated by the noise generator, are then mixed and fed to the TV for output.

The PSG also contains a hardware envelope generator to shape the output sound-wave. Any of the three channels can be processed through the envelope generator, but only one envelope is available to all channels at a given time. The inability to shape each tone individually reduces the versatility and usefulness of this feature, often forcing the programmer to generate and manage discrete envelopes in software.

Programming the PSG manually is certainly possible, but requires a significant volume of insight into the technical details of the chip, and the mathematics involved in calculating musical tones and note periods from raw frequency counter values. For this reason, it is common to use library modules that abstract these properties.


The Intellivision Music Tracker
Intellivision games designer and programmer Arnauld Chevallier, has implemented a tracker library to play specially-crafted music files on the Intellivision. He has been gracious enough to donate his code to the public domain so that all Intellivision programmers may benefit from it. Because it is freely available--and because it is so exceptionally useful and easy to integrate--it has become the de facto method to play music on Intellivision home-brew games.

Using the tracker in your own games is a matter of including the library, defining some needed variable labels, and adding a call to update the tracker state periodically from your game loop. You also need to create your own music files in the appropriate data format.


Tracker Data Format
The format used in Arnauld's tracker has a lot in common with the classic MOD format of old Amiga tracker modules: a song defines a series of patterns, which describe musical sections, and specifies in which order they are to be played.

More precisely, the data layout is closer to the later XM format introduced by Fast Tracker II, which added the notion of instruments. The most notable difference, of course, is that no digital samples are used at all. All instruments in the Intellivision tracker are software-generated tones.

Below is the general structure of the tracker data layout, which I'll describe in detail further on.

     Root
      |
      +-- Pitch Effect #1
    (...)
      +-- Pitch Effect #N
      |
      +-- Envelope #1
    (...)
      +-- Envelope #N
      |
      +-- Drum #1
    (...)
      +-- Drum #N
      |
      +-- Song #1
      |    |
      |    +-- Header
      |    +-- Pattern Sequence
      |    +-- Pattern #1
      |    |    |
      |    |    +-- Length of pattern
      |    |    +-- Sub-pattern for channel A
      |    |    +-- Sub-pattern for channel B
      |    |    +-- Sub-pattern for channel C
    (...)(...)
      |    +-- Pattern #N
      |    |
      |    +-- Instrument #1
      |    |    |
      |    |    +-- Pitch
      |    |    +-- Vibrato
      |    |    +-- Envelope
    (...)(...)
      |    +-- Instrument #N
      |    |
      |    +-- Sub-pattern #1
      |    |    |
      |    |    +-- Notes
    (...)(...)
      |    +-- Sub-pattern #N
      |
      +-- Song #N

Root
Objects defined in this section are common to all songs. This may include pitch effects, envelopes and even drum patterns for a rudimentary percussion track implementation.

Pitch Effects
Some rather simple pitch effects are supported by the tracker, such as tremolo or fast arpeggios. The format is as follows:


            DECLE       D[0], D[1], D[2], D[3]

Where D[x] values are expressed in half-tones and are added to the current standard pitch of the note, on every frame, with the following formula:

FinalPitch = StandardPitch + D[frame % 4]


A frame is every game cycle where the tracker state is updated. Presumably, this would be 60 times a second, on standard NTSC Intellivision consoles.

The result is that the tone is modulated, four frames at a time, by the number of half-tones defined for each frame, producing a tremolo effect. For example,

pitch01:    DECLE       0, 0, 0, 0    ; No modulation:   |_|_|_|_|
pitch02:    DECLE       0, 0, 12, 12  ; half-modulation: |_|_|-|-|
pitch03:    DECLE       0, 12, 0, 12  ; fast-modulation: |_|-|_|-|

The first pitch effect will play the note at its standard pitch without modulation. The second one will play the standard pitch for two frames, then increase the pitch by an octave (12 semi-tones) for another two frames, and repeat this throughout the length of the note. Finally, the third one will alternate the note between its standard pitch and one octave higher on every frame.

Envelopes
The tracker library does not use the hardware envelopes of the PSG. Instead, it relies on software envelopes defined in this section. The format of the envelope definition is as follows:

            DECLE       SPEED
            DECLE       WORD_00, ..., WORD_15

Where SPEED is in the range of [0..3] with 0 being the slowest and 3 the fastest. Each WORD_xx value is a hexadecimal value in the form $ABCD, where each nibble describes the volume level to be output. The tracker does not currently support loops within an envelope. Consequently, they are applied only once on each note.

Consider an envelope as a 64 x 16 matrix, where each point defines the volume to be applied to an instrument on a given frame. Below is an example of a rather exaggerated envelope, in order to illustrate its layout:

         ATTACK         DECAY                                SUSTAIN                                           RELEASE
       .--------|---------------------|-------------------------------------------------------|---------------------------------------|
    F -|. . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    E -|. . . . # # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    D -|. . . . # . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    C -|. . . . # . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    B -|. . . # . . . . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 V  A -|. . . # . . . . . . . . . # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 O  9 -|. . . # . . . . . . . . . . . # # # # # # # # # # # # # # # # # # # # # # # # # # # # # . . . . . . . . . . . . . . . . . . . .
 L  8 -|. . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . .
 U  7 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . .
 M  6 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . .
 E  5 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . .
    4 -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . .
    3 -|. # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # . . . . . . . . . . . . . . .
    2 -|. # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # . . . . . . . . . . . .
    1 -|# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # # # . . . . . . .
    0  `+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------
        | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
        1 3 7 B F E E D D C C B B A A 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 7 5 4 3 3 2 2 2 1 1 1 1 1 0 0 0 0 0 0 0

            ; Envelope definition
            DECLE   1
            DECLE   $137B, $FEED, $DCCB, $BAA9
            DECLE   $9999, $9999, $9999, $9999
            DECLE   $9999, $9999, $9999, $7543
            DECLE   $3222, $1111, $1000, $0000

The SPEED value influences how the tracker applies the envelope over time. For instance, a speed value of 0 will cycle through the matrix one point at a time. While a value of 1 will skip every other point, and so on. The envelope position for each frame is computed using the following formula:

envelope_x = (frame / 2speed)


Below is another, more common example. This one is for a simple envelope with a short attack, immediately followed by a linear decay in volume, all the way to zero.

       ATCK            DECAY
      .----|---------------------------|----------------------------------------------------------------------------------------------
   F -|. . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   E -|. # . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   D -|# . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   C -|. . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   B -|. . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V  A -|. . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
O  9 -|. . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
L  8 -|. . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
U  7 -|. . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
M  6 -|. . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E  5 -|. . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   4 -|. . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   3 -|. . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   2 -|. . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   1 -|. . . . . . . . . . . . . . . . # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
   0  `+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------
       | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
       D E F E D C B A 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

            ; Envelope definition
            DECLE    2
            DECLE    $DEFE, $DCBA, $9876, $5432
            DECLE    $1000, $0000, $0000, $0000
            DECLE    $0000, $0000, $0000, $0000
            DECLE    $0000, $0000, $0000, $0000

Drums
Drums are a special kind of instrument that are defined globally. A drum is a short and fixed sequence of tones with optional noise modulation. No pitch effects, vibrato, or envelopes are applied to drums. The drums section includes the patterns for each drum instrument, along with the instrument definitions themselves.

A drum instrument pattern is a series of eight instrument definitions that describe the sound of the drum over time. This allows the shaping of the drum sound with varying measures of tones and noise, resulting in a richer sound.

The library includes the macro Drum() that facilitates the definition of drum sounds. The macro is used as follows:


            Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #1
            Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #2
            ...
            Drum(TONE_PERIOD, NOISE_PERIOD, TONE, NOISE, VOLUME) ; #8

TONE_PERIOD: Corresponds to a 16-bit value describing the period of the tone to use.


NOISE_PERIOD: Corresponds to a 16-bit value describing the period of the noise to apply.


TONE: Declares whether to use the tone generator for this drum instrument:

1 = On

0 = Off


NOISE: Declares whether to use the noise generator for this drum instrument:

1 = On

0 = Off


VOLUME: Corresponds to a value in the range [0..15] describing the volume of this drum.


Below is an example of a simple hi-hat cymbal instrument definition:

@@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)

Song
A song is a collection of patterns describing the notes and instruments to be played. The song definition includes a header, the sequence of patterns to play, and the pattern definitions.

Header
The song header describes the overall definition of the song, and takes the following format:


            DECLE   SPEED, PATTERNS, INSTRUMENTS

SPEED: The playing speed, expressed in frames. It actually represents the number of frames that each row in a pattern will last.


PATTERNS: A pointer to the pattern definitions table.


INSTRUMENTS: A pointer to the instrument definitions table to be used.


Pattern Sequence
The pattern sequence describes the order in which the patterns will be played. The sequence is comprised of the definition index of each pattern in the sequence. The pattern sequence is the actual musical sequence of the song, so only those patterns included in it will be played.

The sequence may be terminated by a negative value identifying a looping point. The tracker will then backtrack that many patterns and repeat the sequence from that point. If the song is to terminate without looping, the magic constant $F000 may be use to tell the tracker to stop playing and clear its registers.

Below is an example of a pattern sequence:


            DECLE       0, 1, 0, 1, 2, 3, 2, 4, -4

The above will play the patterns listed in order, and loop indefinitely through the last four patterns. Replacing -4 with $F000 will instead cause the tracker to stop playing at the end of the song.

Patterns
A pattern is defined by its length, followed by pointers to sub-patterns for all three channels. The length of a pattern is expressed in rows, where a row represents a discrete musical event in time. (The speed of the song defined in the header corresponds to the number of frames between each pattern row.)

It is important to think of patterns not in terms of beats and measures like a musical score, but as rows of tracker events that alter the output of a particular channel over time.

The format of patterns is as follows:

            DECLE   length, sub_pattern_a, sub_pattern_b, sub_pattern_c

Where the length is the number of rows in the pattern, and sub_pattern_a, sub_pattern_b, and sub_pattern_c are pointers to sub-pattern definitions for channels A, B, and C, respectively.

NOTE: The tracker assumes that all patterns have the same length. You are advised to ensure this is the case, or else Bad Things may happen during execution.


Instruments
This section holds all song instrument definitions. Each instrument includes information about pitch effects, optional amplitude modulation (vibrato), and an envelope. The instrument definition takes on the following format:


            DECLE       PITCH, VIBRATO, ENVELOPE

PITCH: A pointer to a pitch effect object previously defined in the global header.


VIBRATO: The amount of vibrato effect to apply, in the range of [0..3]:

0 = no vibrato

1 = low

2 = medium

3 = high


ENVELOPE: A pointer to an envelope object previously defined in the global header.


Up to 15 different instruments can be defined.

Sub-Patterns
A sub-pattern indicates the actual notes to be played in a pattern, the instrument to be used for each note, and its volume. A note in this context describes a discrete tracker event which alters the output produced by a channel over a series of rows.

The tracker library includes the macro NOTE() to define notes. For standard instruments (i.e., not drums), the macro takes as argument a string in the form:

            NOTE("NnO IVL")

N = Musical note (from A to G)

n = # for sharp; - for regular

O = Octave (from 1 to 7)

I = Instrument (from 1 to F, with '0' meaning no change)

V = Volume (from 0 to F)

L = Length, in rows (from 0 to F)


The length is the number of rows to wait before the next event, and corresponds to the length of the note minus 1. For instance, a length of 7 corresponds to a note lasting for eight rows: the tracker will apply the note event on the current row, and wait for seven more until the next event.

For drum instruments, the "NnO" parameter is replaced by the "DRM" keyword:

            NOTE("DRM IVL")

I = Drum instrument (from 1 to F)

V = Volume (from 0 to F)

L = Length, in rows (from 0 to F)


The library also includes the macro NOTES(), which defines four notes at a time. Any unused arguments can be padded with empty strings. For example:

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

The "NnO" parameter may also be replaced by the "NUL" keyword, which means that no note change has occurred for this event. This makes it possible to define notes with a length greater than 15.


EDIT: Corrected typos and edited for clarity.

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

Wow! Very cool! Thanks a lot for this detailed article.

 

For what it's worth, I'm slowly working on a new version of my tracker which should include at least some of the following improvements, and maybe some other ones:

 

- Add support for ECS channels

 

- Store drums separately in a virtual channel. Mix them in either a predefined channel or a dynamically chosen one at run-time (channel with lowest volume and/or lowest-pitched note?) or a free ECS channel, if available.

- Allow for finer pitch effects (vibratos, arpeggios, ...) by storing pitch variations for each frame of the instrument definition (you can think of it as some kind of "pitch envelope")

 

- Add support for instrument loop.

 

- Add support for "inline" effects stored together with a note definition such as:

- portamento up

- portamento down

- portamento towards note

- tremolo

- change global speed

- ...

 

- Add support for the hardware envelope, which may produce some interesting effects.

 

Any other suggestions are welcome.

 

-- Arnauld

 

  • Like 4
Link to comment
Share on other sites

It's great to hear that you've been busy on Intellivision-related projects. I know how life has a tendency to get in the way of the "important things.

As to your features list, in-line effects and virtual drum tracks covers about 99% of my wish list. :)

 

Regards!

-dZ.

  • Like 1
Link to comment
Share on other sites

@DZ-Jay: Terrific summary, extremely helpful to the community -- and to me for whenever I step away from writing Intellivision music for a while and need to remember how it all works! :D I'll reread it a couple times to see if there's anything I've encountered that might be helpful to add.

 

@Arnauld: Great news, and I'm especially pleased to see you're adding support for ECS channels! I'd love to be able to include richer arrangements of my tunes as an "Easter egg" bonus for ECS users. :)

 

The other big thing I'd love to have is some sort of hardcoded delay effect by which a voice can be slaved to another voice, playing whatever the first voice plays but with a volume reduction of X and a delay in frames of Y. I don't know how other trackers handle that -- until I came to the Intellivision I was more of a hand-coder than a tracker user -- but so many chiptunes use that effect, I'd think there must be some computationally economical way of handling it.

Link to comment
Share on other sites

Here's the kind of delay effect I'm talking about. Note that with clever coding this effect could actually be executed in a single voice, but only because it's so staccato (the notes are so short). Either way, it's cumbersome to code as it now stands.

 

 

delay-effect.rom

delay-effect.asm

trkdemo.asm

Link to comment
Share on other sites

The other big thing I'd love to have is some sort of hardcoded delay effect by which a voice can be slaved to another voice, playing whatever the first voice plays but with a volume reduction of X and a delay in frames of Y. I don't know how other trackers handle that -- until I came to the Intellivision I was more of a hand-coder than a tracker user -- but so many chiptunes use that effect, I'd think there must be some computationally economical way of handling it.

 

Good point. I certainly should add at least a "Note Delay" effect (your "Y" variable). I believe this is the "EDx" command in extended MOD / XM commands. You'd still have to copy/paste your notes on another channel and apply other volume values. Using an editor with a graphical interface -- which is another thing I'm working on -- that would be very easy to do. I guess we could go indeed one step further and automatize this last step with a more powerful command, but that would not improve the quality of the song, just make the ROM a bit smaller. I have to think about it some more.

 

Nice little demo, BTW!

Link to comment
Share on other sites

^That makes sense, and would definitely be a big help. Right now I have to offset all the note values manually -- which takes a lot of time and makes it difficult to try different things out -- and I also have to create an extra pattern for the loop point, so that any notes that carry over don't suddenly vanish. A note delay would at least alleviate the extensive tweaking required.

 

And: thanks for the kind words! Perhaps you'll like this one too -- I implemented the technique of putting the delay in the same voice as the original signal, which then allows for two more layers of delay to be added in voice #2. :) This would be a great use of the extra ECS channels, BTW -- texturing an existing melody so that it's richer when played on an ECS-equipped system.

delay-effect2.rom

delay-effect2.asm

trkdemo.asm

Link to comment
Share on other sites

All nice and good information, but perhaps this could go on a separate thread? :)

 

I wanted to keep this thread clean for discussion on the usage of the Intellivision Tracker, so that it may serve as a resource for others.

 

-dZ.

Link to comment
Share on other sites

All nice and good information, but perhaps this could go on a separate thread? :)

 

I wanted to keep this thread clean for discussion on the usage of the Intellivision Tracker, so that it may serve as a resource for others.

 

I, er, thought that's what we were doing. :ponder: After all, that's why I posted the source for my demos. But if you'd rather we discussed feature expansions, advanced tracker techniques, etc. elsewhere, we can certainly do that.

Link to comment
Share on other sites

Arnauld, could you expand a bit on the drum instrument definition? I sort of glossed over its description in the article, mostly because I am not familiar with that feature. It's not surprising, for I didn't use any drum instruments at all in my game, and therefore I haven't had a chance to explore it thoroughly.

 

I did try to play a bit with drums while writing the article, but I couldn't really figure it out. It seems that eight rows are required, and that they are spread evenly across all frames for a row. I also noticed that the drums influence and mix with the regular notes playing.

 

However, as I tried experimenting, for instance, with the hi-hat sound from your demo song, it seemed very unpredictable: changing the definition in different ways would produce wildly different and unexpected results; which made it harder to discern it's use.

 

-dZ.

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

Unfortunately, as you have seen from the description of the Intellivision Music Tracker above, our tools remain very primitive. This means that, as it stands, anybody who wants to convert a MOD file to the tracker format, will have to roll their own solution. That said, once one person does it, everyone else can benefit. Such is life in the dawn (or the renaissance) of our home-brew scene.

 

-dZ.

  • Like 1
Link to comment
Share on other sites

Due to the limited pool of Inty programmers it can take some time for tools to be available that make other developers/artists/musicians lives easier. Most programmers (myself included) will just put together something "nasty" :lol: to solve a particular problem and not bother announcing it or releasing it because its nearly always closely coupled to the project they are working on.

  • Like 1
Link to comment
Share on other sites

  • 10 months later...

Hi all. Just bumping this thread in case someone has a tracker on-deck. :)

 

IntyBASIC v1.0 has an integrated music player and a reasonable language to introduce music (almost looking like a tracker), you can check the included sample 'music.bas'

 

http://atariage.com/forums/topic/232063-intybasic-compiler-v10-crunchy-tasty/

Link to comment
Share on other sites

 

IntyBASIC v1.0 has an integrated music player and a reasonable language to introduce music (almost looking like a tracker), you can check the included sample 'music.bas'

 

http://atariage.com/forums/topic/232063-intybasic-compiler-v10-crunchy-tasty/

 

Arnauld's tracker is different. It works on the same principle as the old school MIDI trackers/sequencers, where it captures channel events rather than just the notes. The events can be change in pitch, wave shape, volume, etc. This allows you to sort of "multiplex" notes and effects across multiple channels, creating interesting sounds and simulating polyphonic chords.

Link to comment
Share on other sites

 

The music capability in IntyBASIC is awesome sauce. I thought that the tracker from Arnauld made music like "conventional" MOD music makers on the Apple IIGS and Amiga and PC, and also allowed import of MOD music for export as Intellivision music. I have some older MOD musics in my archives I would love to migrate to Intellivision background music tracks... Now that I think about it maybe what I'm looking for these days is something that will convert MOD (or MIDI) sequences into IntyBASIC music anyway.

 

 

 

IntyBASIC v1.0 has an integrated music player and a reasonable language to introduce music (almost looking like a tracker), you can check the included sample 'music.bas'

 

http://atariage.com/forums/topic/232063-intybasic-compiler-v10-crunchy-tasty/

Link to comment
Share on other sites

 

Arnauld's tracker is different. It works on the same principle as the old school MIDI trackers/sequencers, where it captures channel events rather than just the notes. The events can be change in pitch, wave shape, volume, etc. This allows you to sort of "multiplex" notes and effects across multiple channels, creating interesting sounds and simulating polyphonic chords.

 

Yes, I've analyzed it before, the bits I like more are the envelope and pitch integration, because you can build instruments in the same melody, and also the style of patterns, because you can reuse a pattern and reduce memory size when parts of song are repeated.

 

Currently in IntyBASIC tracker you're limited to 4 instruments and if you want another instrument you should alter the source code in intybasic_epilogue.asm

 

Also the IntyBASIC tracker plays a continuous stream of notes, the advantage of this is that for newcomers it's easier to introduce music.

Link to comment
Share on other sites

The music capability in IntyBASIC is awesome sauce. I thought that the tracker from Arnauld made music like "conventional" MOD music makers on the Apple IIGS and Amiga and PC, and also allowed import of MOD music for export as Intellivision music.

 

Yes, that is true.

 

 

Yes, I've analyzed it before, the bits I like more are the envelope and pitch integration, because you can build instruments in the same melody, and also the style of patterns, because you can reuse a pattern and reduce memory size when parts of song are repeated.

 

Currently in IntyBASIC tracker you're limited to 4 instruments and if you want another instrument you should alter the source code in intybasic_epilogue.asm

 

Also the IntyBASIC tracker plays a continuous stream of notes, the advantage of this is that for newcomers it's easier to introduce music.

 

Don't get me wrong, I'm not knocking the IntyBASIC tracker, it is great for beginners. It's just that this thread is dedicated to the advanced music tracker created by Arnauld Chevallier, and I was pointing out that it is significantly different from the IntyBASIC tracker and therefore not really superseded by it.

 

I wouldn't consider the IntyBASIC tracker a replacement for it, unless you are writing an IntyBASIC program--but there are already threads for that. :)

 

-dZ.

Link to comment
Share on other sites

 

Yes, that is true.

 

 

Don't get me wrong, I'm not knocking the IntyBASIC tracker, it is great for beginners. It's just that this thread is dedicated to the advanced music tracker created by Arnauld Chevallier, and I was pointing out that it is significantly different from the IntyBASIC tracker and therefore not really superseded by it.

 

I wouldn't consider the IntyBASIC tracker a replacement for it, unless you are writing an IntyBASIC program--but there are already threads for that. :)

 

-dZ.

 

Don't worry. These are two different beasts. Fully understood :) :thumbsup:

Link to comment
Share on other sites

  • 1 year later...

Wow! Very cool! Thanks a lot for this detailed article.

 

For what it's worth, I'm slowly working on a new version of my tracker which should include at least some of the following improvements, and maybe some other ones:

 

- Add support for ECS channels

 

- Store drums separately in a virtual channel. Mix them in either a predefined channel or a dynamically chosen one at run-time (channel with lowest volume and/or lowest-pitched note?) or a free ECS channel, if available.

 

- Allow for finer pitch effects (vibratos, arpeggios, ...) by storing pitch variations for each frame of the instrument definition (you can think of it as some kind of "pitch envelope")

 

- Add support for instrument loop.

 

- Add support for "inline" effects stored together with a note definition such as:

- portamento up

- portamento down

- portamento towards note

- tremolo

- change global speed

- ...

 

- Add support for the hardware envelope, which may produce some interesting effects.

 

Any other suggestions are welcome.

 

-- Arnauld

 

 

Hi, Arnauld,

 

I'm sure you're very busy with life, work, and other projects (as we all are), but have you had a chance to work on the next generation Intellivision Tracker library you mentioned above? If you have something ready for use, even if incomplete or untested, I'd be happy to assist and test it out. :)

 

-dZ.

Link to comment
Share on other sites

  • 3 months later...

Dumb question that I may already know the answer to, but how is one supposed to denote rests, silence in music? Should that be NOTE("NUL 00L") where L is the duration of the rest? Basically setting the volume of the last played note to zero, or is there a better way that I'm overlooking? Some of the silence may come from envelope effects depending on which instrument is used, but where I come from, general rests are required to make music.

Link to comment
Share on other sites

Dumb question that I may already know the answer to, but how is one supposed to denote rests, silence in music? Should that be NOTE("NUL 00L") where L is the duration of the rest? Basically setting the volume of the last played note to zero, or is there a better way that I'm overlooking? Some of the silence may come from envelope effects depending on which instrument is used, but where I come from, general rests are required to make music.

 

Keep in mind that the tracker data describes not the tonal composition of the music, but the changes to a channel over time. That is, although you can think of a note playing for x amount of bars, what you are actually specifying is how many tracker ticks that channel will play a tone until the next change. Like you said, the envelope affects the performance (e.g., the "release" section triggers at "end" of the note specified).

 

"NUL" just means "no change in the channel." If the channel has reached volume zero at that point, it will be silent, if it hasn't it will continue playing whatever it was last set to.

 

Think of it then less like musical notes and rests, and more like MIDI events over a number of tracker ticks.

 

Does this make sense?

 

-dZ.

 

 

EDIT: It occurs to me that I didn't actually answer your question, at least not directly. Yes, to silence a track, you set the note to NUL and preferably its volume to 0.

 

Note that, each "NOTE" macro sets an event at a particular tracker "row." The event is either a change in instrument, tone, volume, or any combination therein. So using NOTE("NUL 00L") will ignore the tone, set the instrument to 0, lower volume to zero, and wait "L" rows until the next event.

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...