diff --git a/sardine/sequences/LexerParser/FuncLibrary.py b/sardine/sequences/LexerParser/FuncLibrary.py index 7f3011fc..a47362af 100644 --- a/sardine/sequences/LexerParser/FuncLibrary.py +++ b/sardine/sequences/LexerParser/FuncLibrary.py @@ -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""" diff --git a/sardine/sequences/LexerParser/TreeCalc.py b/sardine/sequences/LexerParser/TreeCalc.py index 754c429b..6f409085 100644 --- a/sardine/sequences/LexerParser/TreeCalc.py +++ b/sardine/sequences/LexerParser/TreeCalc.py @@ -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,