Skip to content

Commit

Permalink
fix: do not include delay times from disabled delay units
Browse files Browse the repository at this point in the history
Closes #139.
  • Loading branch information
vsariola committed Aug 14, 2024
1 parent 2667c3c commit 75bd9c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased
### Fixed
- Do not include delay times in the delay time table if the delay unit is
disabled ([#139][i139])

## v0.4.0
### Added
- User can drop preset instruments into `os.UserConfigDir()/sointu/presets/` and
Expand Down Expand Up @@ -167,3 +172,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
[i128]: https://github.com/vsariola/sointu/issues/128
[i129]: https://github.com/vsariola/sointu/issues/129
[i130]: https://github.com/vsariola/sointu/issues/130
[i139]: https://github.com/vsariola/sointu/issues/139
7 changes: 4 additions & 3 deletions vm/delaytable.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ func constructDelayTimeTable(patch sointu.Patch, bpm int) ([]int, [][]int) {
for i, instr := range patch {
ind[i] = make([]int, len(instr.Units))
for j, unit := range instr.Units {
// only include delay times for delays. Only delays
// should use delay times
if unit.Type == "delay" {
// only include delay times for delays. Only delays should use delay
// times. Only delay times for enabled delay units should be in the
// table.
if unit.Type == "delay" && !unit.Disabled {
ind[i][j] = len(subarrays)
converted := make([]int, len(unit.VarArgs))
copy(converted, unit.VarArgs)
Expand Down

0 comments on commit 75bd9c5

Please sign in to comment.