Skip to content

Commit

Permalink
Adding the anti-speed function
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubobubobubobubo committed Nov 6, 2022
1 parent 2a838ed commit d1752cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sardine/sequences/LexerParser/FuncLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def chordify(x: list) -> list:
"""Turn a list into a chord"""
return Chord(elements=x)

def anti_speed(x: list) -> list:
list_of_silences = [[None]*x for x in range(0, len(x))]
return list(zip(x, list_of_silences))

def invert(x: list, how_many: list = [0]) -> list:
"""Chord inversion"""
Expand Down
1 change: 1 addition & 0 deletions sardine/sequences/LexerParser/TreeCalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ def function_call(self, func_name, *args):
"bass": FuncLibrary.bassify,
"sopr": FuncLibrary.soprano,
"invert": FuncLibrary.invert,
"aspeed": FuncLibrary.anti_speed,
# Boolean mask operations
"euclid": FuncLibrary.euclidian_rhythm,
"mask": FuncLibrary.mask,
Expand Down

0 comments on commit d1752cf

Please sign in to comment.