From f495b0575ab710afd776e3b74b1a9da25e9b2c75 Mon Sep 17 00:00:00 2001 From: Veikko Sariola Date: Mon, 26 Oct 2020 12:49:27 +0200 Subject: [PATCH] Fix bug in song.go: the note was pulled from the song data incorrectly. --- song/song.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/song/song.go b/song/song.go index a44d335..1932ec3 100644 --- a/song/song.go +++ b/song/song.go @@ -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? }