Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging dev branch with new features #225

Merged
merged 22 commits into from
Jun 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b169547
Fixing a few inconsistencies with SPL
Bubobubobubobubo Jun 8, 2023
3956c7d
Limiting octave up and octave down operators
Bubobubobubobubo Jun 8, 2023
f144396
Adding internal variables to the Sardine Pattern Language
Bubobubobubobubo Jun 8, 2023
3fde803
Inverting . and _
Bubobubobubobubo Jun 8, 2023
647001e
Moving content in the documentation
Bubobubobubobubo Jun 8, 2023
c73dbcb
Global Scale + Scale Function
Bubobubobubobubo Jun 9, 2023
db72276
Without bugfixes
Bubobubobubobubo Jun 9, 2023
415ad2c
Scale patterning ?
Bubobubobubobubo Jun 9, 2023
f4dff06
Adding real euclidian rhythms
Bubobubobubobubo Jun 9, 2023
f4d9b88
Fixing composition bug with ultri, ulsaw and ulrect
Bubobubobubobubo Jun 10, 2023
03dfc4b
Adding a binary shift rhythm generator
Bubobubobubobubo Jun 11, 2023
baf3f9e
fix bug with unit conversion on the br algorithm
Bubobubobubobubo Jun 11, 2023
041851f
Adding the variant bl function
Bubobubobubobubo Jun 11, 2023
58fd86f
Remove "Editor" option in Sardine Config (unused)
Bubobubobubobubo Jun 11, 2023
d0d9984
Add some conditionals for color display and more
Bubobubobubobubo Jun 11, 2023
d8be7db
Refactor documentation
Bubobubobubobubo Jun 11, 2023
0fb459c
Reworking Function Library Section
Bubobubobubobubo Jun 11, 2023
3d84e07
Fixing some forgotten things with Math Functions
Bubobubobubobubo Jun 11, 2023
321d33e
The gigantic cleanup continues
Bubobubobubobubo Jun 11, 2023
88a9e81
Documentation falling from the sky
Bubobubobubobubo Jun 11, 2023
1405a13
Trying to do something with combinatorics functions
Bubobubobubobubo Jun 11, 2023
49742e1
fix rogue space
Bubobubobubobubo Jun 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Scale patterning ?
  • Loading branch information
Bubobubobubobubo committed Jun 9, 2023
commit 415ad2c5806f134a20ab907eca82d1e84053bcde
40 changes: 6 additions & 34 deletions sardine_core/sequences/sardine_parser/funclib.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,36 +295,6 @@ def set_amphibian_variable(self, *args):
setattr(self.amphibian, str(args[0][0]), args[1])
return [getattr(self.amphibian, str(args[1][0]))]

# These are just not great!

# def get_amphibian_iterator(self, *args, **kwargs):
# """
# Return the value of an amphibian iterator while also incrementing it
# as the result of accessing it.
# """
# reset = kwargs.get("reset", 0)

# if reset == 0:
# letter = str(args[0][0])
# self.amphibian.reset(letter)
# return [getattr(self.amphibian, letter)]
# else:
# letter = str(args[0][0])
# return [getattr(self.amphibian, letter)]

# def set_amphibian_iterator(self, *args, **kwargs):
# """
# Set an amphibian iterator to a new value.
# """
# step = kwargs.get("step", 0)

# letter, number = str(args[0][0]), int(args[1][0])
# if step != 0:
# setattr(self.amphibian, letter, [number, step])
# else:
# setattr(self.amphibian, letter, number)
# return [getattr(self.amphibian, letter)]

def drunk(self, *args, **kwargs):
"""
Drunk walk: 50% chance +1, 50% chance -1.
Expand Down Expand Up @@ -1059,7 +1029,9 @@ def set_scale(self, *args, **kwargs):
Set the current global scale. If the name is
unknown, will continue on the current scale.
"""
print(self.global_scale)
new_scale = str(args[0][0])
if new_scale in self.qualifiers.keys():
self.global_scale = new_scale
args = list(chain(*args))
def internal_scale_changer(scale_name):
new_scale = str(scale_name)
if new_scale in self.qualifiers.keys():
self.global_scale = new_scale
return map_unary_function(internal_scale_changer, args)