mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-14 04:03:23 -05: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,73 +1,27 @@
|
||||
%define MAX_INSTRUMENTS 1
|
||||
%define BPM 100
|
||||
%define MAX_PATTERNS 1
|
||||
%define SINGLE_FILE
|
||||
%define USE_SECTIONS
|
||||
%define GO4K_USE_FLD
|
||||
|
||||
%include "../src/4klang.asm"
|
||||
; //-------------------------------------------------------------------------------
|
||||
; // Pattern Data
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc1)
|
||||
%include "../src/sointu.inc"
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_patterns)
|
||||
db 64, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
SU_BEGIN_PATTERNS
|
||||
PATTERN 64, HLD, HLD, HLD, HLD, HLD, HLD, HLD, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
SU_END_PATTERNS
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Pattern Index List
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc2)
|
||||
SU_BEGIN_TRACKS
|
||||
TRACK VOICES(1),0
|
||||
SU_END_TRACKS
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_pattern_lists)
|
||||
Instrument0List db 0,
|
||||
SU_BEGIN_PATCH
|
||||
SU_BEGIN_INSTRUMENT VOICES(1) ; Instrument0
|
||||
SU_LOAD_VAL MONO,VALUE(96)
|
||||
SU_LOAD_VAL MONO,VALUE(0)
|
||||
SU_MULP MONO
|
||||
SU_LOAD_VAL MONO,VALUE(96)
|
||||
SU_LOAD_VAL MONO,VALUE(128)
|
||||
SU_MULP MONO
|
||||
SU_OUT STEREO,GAIN(128)
|
||||
SU_END_INSTRUMENT
|
||||
SU_END_PATCH
|
||||
|
||||
; //----------------------------------------------------------------------------------------
|
||||
; // Instrument Commands
|
||||
; //----------------------------------------------------------------------------------------
|
||||
SECT_DATA(g4kmuc3)
|
||||
|
||||
EXPORT MANGLE_DATA(go4k_synth_instructions)
|
||||
GO4K_BEGIN_CMDDEF(Instrument0)
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FLD_ID
|
||||
db GO4K_FOP_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_FLD VALUE(96)
|
||||
GO4K_FLD VALUE(0)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
GO4K_FLD VALUE(96)
|
||||
GO4K_FLD VALUE(128)
|
||||
GO4K_FOP OP(FOP_MULP)
|
||||
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