mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -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".
28 lines
827 B
NASM
28 lines
827 B
NASM
%define BPM 100
|
|
%define SINGLE_FILE
|
|
%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
|
|
SU_END_PATTERNS
|
|
|
|
SU_BEGIN_TRACKS
|
|
TRACK VOICES(1),0
|
|
SU_END_TRACKS
|
|
|
|
SU_BEGIN_PATCH
|
|
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument0
|
|
SU_LOAD_VAL MONO,VALUE(32) ; should receive -0.5
|
|
SU_SEND MONO,AMOUNT(96),PORT(5,load_val,value) ; should send -0.25
|
|
SU_SEND MONO,AMOUNT(96),PORT(6,load_val,value) + SEND_POP ; should send -0.25
|
|
SU_LOAD_VAL MONO,VALUE(128) ; should receive 1
|
|
SU_SEND MONO,AMOUNT(96),PORT(6,load_val,value) + SEND_POP ; should send 0.5
|
|
SU_LOAD_VAL MONO,VALUE(64) ; should receive -0.5
|
|
SU_LOAD_VAL MONO,VALUE(64) ; should receive 0.5
|
|
SU_OUT STEREO,GAIN(128)
|
|
SU_END_INSTRUMENT
|
|
SU_END_PATCH
|
|
|
|
%include "../src/sointu.asm" |