mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -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".
34 lines
1.0 KiB
NASM
34 lines
1.0 KiB
NASM
%define BPM 100
|
|
%define USE_SECTIONS
|
|
|
|
%include "../src/sointu.inc"
|
|
|
|
SU_BEGIN_PATTERNS
|
|
PATTERN 64, 0, 68, 0, 32, 0, 0, 0, 75, 0, 78, 0, 0, 0, 0, 0,
|
|
SU_END_PATTERNS
|
|
|
|
; %define SU_USE_UNDENORMALIZE ; // removing this skips denormalization code in the units
|
|
|
|
SU_BEGIN_TRACKS
|
|
TRACK VOICES(1),0
|
|
SU_END_TRACKS
|
|
|
|
SU_BEGIN_PATCH
|
|
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument0
|
|
SU_ENVELOPE MONO,ATTAC(0),DECAY(0),SUSTAIN(96),RELEASE(96),GAIN(128)
|
|
SU_ENVELOPE MONO,ATTAC(0),DECAY(48),SUSTAIN(0),RELEASE(0),GAIN(128)
|
|
SU_OSCILLAT MONO,TRANSPOSE(64),DETUNE(64),PHASE(0),COLOR(64),SHAPE(127),GAIN(64),FLAGS(SINE)
|
|
SU_MULP MONO
|
|
SU_FILTER MONO,FREQUENCY(32),RESONANCE(128),FLAGS(LOWPASS + BANDPASS + HIGHPASS)
|
|
SU_DELAY MONO,PREGAIN(128),DRY(128),FEEDBACK(128),DAMP(16),DELAY(0),COUNT(1)
|
|
SU_FILTER MONO,FREQUENCY(24),RESONANCE(128),FLAGS(LOWPASS + BANDPASS + HIGHPASS)
|
|
SU_MULP MONO
|
|
SU_PAN MONO,PANNING(64)
|
|
SU_OUT STEREO,GAIN(128)
|
|
SU_END_INSTRUMENT
|
|
SU_END_PATCH
|
|
|
|
SU_BEGIN_DELTIMES
|
|
SU_END_DELTIMES
|
|
|
|
%include "../src/sointu.asm" |