mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-27 19:00:25 -04:00
fix(tracker): recording creates empty track when no notes triggered
This commit is contained in:
parent
e488cd391b
commit
c55b27b23b
@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
([#65][i65])
|
([#65][i65])
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- When recording notes from VSTI, no track was created for instruments that had
|
||||||
|
no notes triggered, resulting in misalignment of the tracks from instruments.
|
||||||
- 32-bit su_load_gmdls clobbered ebx, even though __stdcall demands it to be not
|
- 32-bit su_load_gmdls clobbered ebx, even though __stdcall demands it to be not
|
||||||
touched ([#130][i130])
|
touched ([#130][i130])
|
||||||
- Spaces are allowed in instrument names ([#120][i120])
|
- Spaces are allowed in instrument names ([#120][i120])
|
||||||
|
@ -77,6 +77,12 @@ func (recording *Recording) Score(patch sointu.Patch, rowsPerBeat, rowsPerPatter
|
|||||||
tracks[i][oldestIndex] = append(tracks[i][oldestIndex], n)
|
tracks[i][oldestIndex] = append(tracks[i][oldestIndex], n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if there was tracks that had no notes, create empty tracks for them
|
||||||
|
for i := range channelNotes {
|
||||||
|
if l := len(tracks[i]); l == 0 && l < patch[i].NumVoices {
|
||||||
|
tracks[i] = append(tracks[i], []recordingNote{})
|
||||||
|
}
|
||||||
|
}
|
||||||
songLengthPatterns := (frameToRow(recording.BPM, rowsPerBeat, recording.TotalFrames) + rowsPerPattern - 1) / rowsPerPattern
|
songLengthPatterns := (frameToRow(recording.BPM, rowsPerBeat, recording.TotalFrames) + rowsPerPattern - 1) / rowsPerPattern
|
||||||
songLengthRows := songLengthPatterns * rowsPerPattern
|
songLengthRows := songLengthPatterns * rowsPerPattern
|
||||||
songTracks := make([]sointu.Track, 0)
|
songTracks := make([]sointu.Track, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user