mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
reorganize things into different packages
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package tracker
|
||||
|
||||
import "github.com/vsariola/sointu/compiler"
|
||||
import "github.com/vsariola/sointu/vm"
|
||||
|
||||
type GmDlsEntry struct {
|
||||
Start int
|
||||
@ -10,11 +10,11 @@ type GmDlsEntry struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
var GmDlsEntryMap = make(map[compiler.SampleOffset]int)
|
||||
var GmDlsEntryMap = make(map[vm.SampleOffset]int)
|
||||
|
||||
func init() {
|
||||
for i, e := range GmDlsEntries {
|
||||
key := compiler.SampleOffset{Start: uint32(e.Start), LoopStart: uint16(e.LoopStart), LoopLength: uint16(e.LoopLength)}
|
||||
key := vm.SampleOffset{Start: uint32(e.Start), LoopStart: uint16(e.LoopStart), LoopLength: uint16(e.LoopLength)}
|
||||
GmDlsEntryMap[key] = i
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/vsariola/sointu"
|
||||
"github.com/vsariola/sointu/compiler"
|
||||
"github.com/vsariola/sointu/vm"
|
||||
)
|
||||
|
||||
// Model implements the mutable state for the tracker program GUI.
|
||||
@ -812,7 +812,7 @@ func (m *Model) Param(index int) (Parameter, error) {
|
||||
return Parameter{Type: typ, Min: min, Max: max, Name: name, Hint: text, Value: val}, nil
|
||||
}
|
||||
if unit.Type == "oscillator" && index == 0 {
|
||||
key := compiler.SampleOffset{Start: uint32(unit.Parameters["samplestart"]), LoopStart: uint16(unit.Parameters["loopstart"]), LoopLength: uint16(unit.Parameters["looplength"])}
|
||||
key := vm.SampleOffset{Start: uint32(unit.Parameters["samplestart"]), LoopStart: uint16(unit.Parameters["loopstart"]), LoopLength: uint16(unit.Parameters["looplength"])}
|
||||
val := 0
|
||||
hint := "0 / custom"
|
||||
if v, ok := GmDlsEntryMap[key]; ok {
|
||||
|
Reference in New Issue
Block a user