mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-03 09:08:18 -04:00
The stereo opcode variants have bit 1 of the command stream set. The polyphony is split into two parts: 1) polyphony, meaning that voices reuse the same opcodes; 2) multitrack voices, meaning that a track triggers more than voice. They both can be flexible defined in any combinations: for example voice 1 and 2 can be triggered by track 1 and use instrument 1, and voice 3 by track 2/instrument 2 and voice 4 by track 3/instrument 2. This is achieved through the use of bitmasks: in the aforementioned example, bit 1 of su_voicetrack_bitmask would be set, meaning "the voice after voice #1 will be triggered by the same track". On the other hand, bits 1 and 3 of su_polyphony_bitmask would be set to indicate that "the voices after #1 and #3 will reuse the same instruments".
29 lines
830 B
NASM
29 lines
830 B
NASM
%define BPM 100
|
|
%define USE_SECTIONS
|
|
|
|
%include "../src/sointu.inc"
|
|
|
|
SU_BEGIN_PATTERNS
|
|
PATTERN 64,HLD,HLD,HLD,HLD,HLD,HLD,HLD, 0, 0, 0,0,0,0,0,0,
|
|
PATTERN 0, 0, 0, 0, 0, 0, 0, 0,64,HLD,HLD,0,0,0,0,0,
|
|
SU_END_PATTERNS
|
|
|
|
SU_BEGIN_TRACKS
|
|
TRACK VOICES(1),0
|
|
TRACK VOICES(1),1
|
|
SU_END_TRACKS
|
|
|
|
SU_BEGIN_PATCH
|
|
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument0
|
|
SU_ENVELOPE MONO,ATTAC(64),DECAY(64),SUSTAIN(64),RELEASE(80),GAIN(128)
|
|
SU_ENVELOPE MONO,ATTAC(64),DECAY(64),SUSTAIN(64),RELEASE(80),GAIN(0)
|
|
SU_OUT STEREO,GAIN(128)
|
|
SU_END_INSTRUMENT
|
|
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument1
|
|
SU_ENVELOPE MONO,ATTAC(32),DECAY(32),SUSTAIN(64),RELEASE(80),GAIN(0)
|
|
SU_ENVELOPE MONO,ATTAC(32),DECAY(32),SUSTAIN(64),RELEASE(80),GAIN(128)
|
|
SU_OUT STEREO,GAIN(128)
|
|
SU_END_INSTRUMENT
|
|
SU_END_PATCH
|
|
|
|
%include "../src/sointu.asm" |