fix(tracker): when creating a new track, a pattern full of noteoffs was created

Creating such patterns is unnecessary and was a relic of the past. We can leave the order completely uninitialized and let the user fill it as needed.

Related to #54.
This commit is contained in:
vsariola 2021-03-11 21:45:00 +02:00
parent f9225d70a9
commit adc12dde4f

View File

@ -192,7 +192,7 @@ func (m *Model) AddTrack(after bool) {
copy(newTracks[m.cursor.Track+1:], m.song.Score.Tracks[m.cursor.Track:])
newTracks[m.cursor.Track] = sointu.Track{
NumVoices: 1,
Patterns: [][]byte{make([]byte, m.song.Score.RowsPerPattern)},
Patterns: [][]byte{},
}
m.song.Score.Tracks = newTracks
m.clampPositions()