mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
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:
@ -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 {
|
||||
|
@ -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},
|
||||
|
Reference in New Issue
Block a user