mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-23 07:24:47 -04:00
refactor(asm&go4k): Remove double SU_SEND macros, voice(0) corresponding to local send and voice(n) corresponding to global.
This commit is contained in:
@ -156,10 +156,6 @@ func ParseAsm(reader io.Reader) (*Song, error) {
|
||||
case "SAMPLE":
|
||||
parameters["type"] = Sample
|
||||
}
|
||||
} else if unittype == "send" {
|
||||
if _, ok := parameters["voice"]; !ok {
|
||||
parameters["voice"] = -1
|
||||
}
|
||||
}
|
||||
unit := Unit{Type: unittype, Stereo: stereo, Parameters: parameters}
|
||||
instr.Units = append(instr.Units, unit)
|
||||
|
@ -170,8 +170,8 @@ func Synth(patch go4k.Patch) (*C.Synth, error) {
|
||||
values = append(values, byte(flags))
|
||||
} else if unit.Type == "send" {
|
||||
address := unit.Parameters["unit"]*16 + 24 + unit.Parameters["port"]
|
||||
if unit.Parameters["voice"] != -1 {
|
||||
address += 0x4000 + 16 + unit.Parameters["voice"]*1024 // global send, address is computed relative to synthworkspace
|
||||
if unit.Parameters["voice"] > 0 {
|
||||
address += 0x4000 + 16 + (unit.Parameters["voice"]-1)*1024 // global send, address is computed relative to synthworkspace
|
||||
}
|
||||
if unit.Parameters["sendpop"] == 1 {
|
||||
address += 0x8000
|
||||
|
@ -195,7 +195,7 @@ var UnitTypes = []UnitType{
|
||||
SupportsStereo: true,
|
||||
Parameters: []UnitParameter{
|
||||
{Name: "amount", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true},
|
||||
{Name: "voice", MinValue: -1, MaxValue: 31, CanSet: true, CanModulate: false},
|
||||
{Name: "voice", MinValue: 0, MaxValue: 32, CanSet: true, CanModulate: false},
|
||||
{Name: "unit", MinValue: 0, MaxValue: 63, CanSet: true, CanModulate: false},
|
||||
{Name: "port", MinValue: 0, MaxValue: 7, CanSet: true, CanModulate: false},
|
||||
{Name: "sendpop", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false},
|
||||
|
Reference in New Issue
Block a user