diff --git a/vm/go_synth.go b/vm/go_synth.go index 7f9f79b..022ab88 100644 --- a/vm/go_synth.go +++ b/vm/go_synth.go @@ -93,7 +93,7 @@ success: f.Read(su_sample_table[:]) } -func Synth(patch sointu.Patch, bpm int) (sointu.Synth, error) { +func (s GoSynther) Synth(patch sointu.Patch, bpm int) (sointu.Synth, error) { bytecode, err := NewBytecode(patch, AllFeatures{}, bpm) if err != nil { return nil, fmt.Errorf("error compiling %v", err) @@ -103,11 +103,6 @@ func Synth(patch sointu.Patch, bpm int) (sointu.Synth, error) { return ret, nil } -func (s GoSynther) Synth(patch sointu.Patch, bpm int) (sointu.Synth, error) { - synth, err := Synth(patch, bpm) - return synth, err -} - func (s *GoSynth) Trigger(voiceIndex int, note byte) { s.state.voices[voiceIndex] = voice{} s.state.voices[voiceIndex].note = note diff --git a/vm/go_synth_test.go b/vm/go_synth_test.go index fb219f9..5d0ded8 100644 --- a/vm/go_synth_test.go +++ b/vm/go_synth_test.go @@ -78,7 +78,7 @@ func TestStackUnderflow(t *testing.T) { patch := sointu.Patch{sointu.Instrument{NumVoices: 1, Units: []sointu.Unit{ sointu.Unit{Type: "pop", Parameters: map[string]int{}}, }}} - synth, err := vm.Synth(patch, 120) + synth, err := vm.GoSynther{}.Synth(patch, 120) if err != nil { t.Fatalf("bridge compile error: %v", err) } @@ -94,7 +94,7 @@ func TestStackBalancing(t *testing.T) { sointu.Instrument{NumVoices: 1, Units: []sointu.Unit{ sointu.Unit{Type: "push", Parameters: map[string]int{}}, }}} - synth, err := vm.Synth(patch, 120) + synth, err := vm.GoSynther{}.Synth(patch, 120) if err != nil { t.Fatalf("bridge compile error: %v", err) }