mirror of
https://github.com/vsariola/sointu.git
synced 2026-03-16 11:50:21 -04:00
refactor: put all info about different unit types into UnitTypes map
This commit is contained in:
parent
8ea9d3a191
commit
6a331f7a57
@ -262,7 +262,7 @@ func (b *bytecodeBuilder) operand(operands ...int) {
|
||||
// defOperands appends the operands to the stream for all parameters that can be
|
||||
// modulated and set
|
||||
func (b *bytecodeBuilder) defOperands(unit sointu.Unit) {
|
||||
for _, v := range sointu.UnitTypes[unit.Type] {
|
||||
for _, v := range sointu.UnitTypes[unit.Type].Params {
|
||||
if v.CanModulate && v.CanSet {
|
||||
b.Operands = append(b.Operands, byte(unit.Parameters[v.Name]))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user