mirror of
https://github.com/vsariola/sointu.git
synced 2025-11-12 21:02:52 -05:00
feat(sointu, vm): implement pure-Go interpreter for bytecode
The old "native" compiler bridged version is now started with cmd/sointu-nativetrack, while the new pure-Go bytecode implemented bytecode interpreter is started with cmd/sointu-track Thus, you do not need any of the CMake / cgo stuff to run cmd/sointu-track
This commit is contained in:
12
patch.go
12
patch.go
@ -25,6 +25,18 @@ func (p Patch) NumVoices() int {
|
||||
return ret
|
||||
}
|
||||
|
||||
func (p Patch) NumDelayLines() int {
|
||||
total := 0
|
||||
for _, instr := range p {
|
||||
for _, unit := range instr.Units {
|
||||
if unit.Type == "delay" {
|
||||
total += len(unit.VarArgs)
|
||||
}
|
||||
}
|
||||
}
|
||||
return total
|
||||
}
|
||||
|
||||
func (p Patch) FirstVoiceForInstrument(instrIndex int) int {
|
||||
ret := 0
|
||||
for _, t := range p[:instrIndex] {
|
||||
|
||||
Reference in New Issue
Block a user