feat: remove hold from song

assume songs code it as 1 always; implementations are free to change this during compilation, but this should be a compile time flag / optimization; not a concern of song.
This commit is contained in:
vsariola
2021-01-05 15:50:27 +02:00
parent 994c11e8db
commit 30379c981d
96 changed files with 14 additions and 138 deletions

View File

@ -104,7 +104,8 @@ func (com *Compiler) Song(song *sointu.Song) (map[string]string, error) {
SongMacros
*EncodedPatch
EncodedSong *EncodedSong
}{compilerMacros, featureSetMacros, x86Macros, songMacros, encodedPatch, encodedSong}
Hold int
}{compilerMacros, featureSetMacros, x86Macros, songMacros, encodedPatch, encodedSong, 1}
populatedTemplate, extension, err = com.compile(templateName, &data)
} else if com.Arch == "wasm" {
wasmMacros := *NewWasmMacros()
@ -115,7 +116,8 @@ func (com *Compiler) Song(song *sointu.Song) (map[string]string, error) {
SongMacros
*EncodedPatch
EncodedSong *EncodedSong
}{compilerMacros, featureSetMacros, wasmMacros, songMacros, encodedPatch, encodedSong}
Hold int
}{compilerMacros, featureSetMacros, wasmMacros, songMacros, encodedPatch, encodedSong, 1}
populatedTemplate, extension, err = com.compile(templateName, &data)
}
if err != nil {

View File

@ -10,7 +10,6 @@ import (
func TestPatternReusing(t *testing.T) {
song := sointu.Song{
Hold: 1,
Tracks: []sointu.Track{{
Patterns: [][]byte{{64, 1, 1, 1, 0, 0, 0, 0}, {72, 0, 0, 0, 0, 0, 0, 0}},
Sequence: []byte{0, 1},
@ -34,7 +33,6 @@ func TestPatternReusing(t *testing.T) {
func TestUnnecessaryHolds(t *testing.T) {
song := sointu.Song{
Hold: 1,
Tracks: []sointu.Track{{
Patterns: [][]byte{{64, 1, 1, 1, 0, 1, 0, 0}, {72, 0, 1, 0, 1, 0, 0, 0}},
Sequence: []byte{0, 1},
@ -58,7 +56,6 @@ func TestUnnecessaryHolds(t *testing.T) {
func TestDontCares(t *testing.T) {
song := sointu.Song{
Hold: 1,
Tracks: []sointu.Track{{
Patterns: [][]byte{{64, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}},
Sequence: []byte{0, 1},