mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
Rewrote most of the synth to better support stereo signals and polyphony. VSTi removed as there is no plan to update the VSTi to support the new features.
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".
This commit is contained in:
@ -1,66 +1,23 @@
|
||||
%define MAX_INSTRUMENTS 1
|
||||
%define BPM 100
|
||||
%define MAX_PATTERNS 1
|
||||
%define SINGLE_FILE
|
||||
%define USE_SECTIONS
|
||||
%define GO4K_USE_PAN
|
||||
|
||||
%include "../src/4klang.asm"
|
||||
%include "../src/sointu.inc"
|
||||
|
||||
; //-------------------------------------------------------------------------------
|
||||
; // Pattern Data
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc1)
|
||||
SU_BEGIN_PATTERNS
|
||||
PATTERN 64, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
SU_END_PATTERNS
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_patterns)
|
||||
db 64, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
SU_BEGIN_TRACKS
|
||||
TRACK VOICES(1),0
|
||||
SU_END_TRACKS
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Pattern Index List
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc2)
|
||||
SU_BEGIN_PATCH
|
||||
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument0
|
||||
SU_ENVELOPE MONO,ATTAC(64),DECAY(64),SUSTAIN(64),RELEASE(80),GAIN(128)
|
||||
SU_PAN MONO,PANNING(40)
|
||||
SU_OUT STEREO,GAIN(128)
|
||||
SU_END_INSTRUMENT
|
||||
SU_END_PATCH
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_pattern_lists)
|
||||
Instrument0List db 0,
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Instrument Commands
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc3)
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_synth_instructions)
|
||||
GO4K_BEGIN_CMDDEF(Instrument0)
|
||||
db GO4K_ENV_ID
|
||||
db GO4K_PAN_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
;// global commands
|
||||
GO4K_BEGIN_CMDDEF(Global)
|
||||
db GO4K_ACC_ID
|
||||
db GO4K_OUT_ID
|
||||
GO4K_END_CMDDEF
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Intrument Data
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc4)
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_synth_parameter_values)
|
||||
GO4K_BEGIN_PARAMDEF(Instrument0)
|
||||
GO4K_ENV ATTAC(64),DECAY(64),SUSTAIN(64),RELEASE(80),GAIN(128)
|
||||
GO4K_PAN PANNING(40)
|
||||
GO4K_OUT GAIN(128), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
;// global parameters
|
||||
GO4K_BEGIN_PARAMDEF(Global)
|
||||
GO4K_ACC ACCTYPE(OUTPUT)
|
||||
GO4K_OUT GAIN(128), AUXSEND(0)
|
||||
GO4K_END_PARAMDEF
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Export MAX_SAMPLES for test_renderer
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4krender)
|
||||
|
||||
EXPORT MANGLE_DATA(test_max_samples)
|
||||
dd MAX_SAMPLES
|
||||
%include "../src/sointu.asm"
|
Reference in New Issue
Block a user