Fix bug in song.go: the note was pulled from the song data incorrectly.

This commit is contained in:
Veikko Sariola 2020-10-26 12:49:27 +02:00
parent debeaa181c
commit f495b0575a

View File

@ -108,7 +108,8 @@ func (s *Song) Render() ([]float32, error) {
patternRow := row % s.PatternRows()
pattern := row / s.PatternRows()
for t := range s.Tracks {
note := s.Patterns[pattern][patternRow]
patternIndex := s.Tracks[t].Sequence[pattern]
note := s.Patterns[patternIndex][patternRow]
if note == 1 { // anything but hold causes an action.
continue // TODO: can hold be actually something else than 1?
}