-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from kanduvisla/develop
v0.3
- Loading branch information
Showing
4 changed files
with
164 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- Determine if there is a fill | ||
-- Returns true if the note is to be kept, false if the note is to be cleared | ||
is_fill = function(currPattern, nextPattern, patternPlayCount, patternSetCount, amountString, userInitiatedFill) | ||
-- Remove the not playing ones: | ||
if nextPattern ~= currPattern or userInitiatedFill == true then | ||
-- Transition to another pattern | ||
-- Check if we're in the last run of the set: | ||
if (patternPlayCount + 1) % patternSetCount == 0 then | ||
-- We're in a transition, filter out "00" | ||
if amountString == "00" then | ||
return false | ||
end | ||
else | ||
-- We're not yet in the last part of the set, filter out "01" | ||
if amountString == "01" then | ||
return false | ||
end | ||
end | ||
else | ||
-- No transition to another pattern, filter out "01" | ||
if amountString == "01" then | ||
return false | ||
end | ||
end | ||
|
||
return true | ||
end | ||
|
Oops, something went wrong.