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

L-system like syntax and parameters for melody generation #9

Closed
amiika opened this issue Dec 16, 2018 · 1 comment
Closed

L-system like syntax and parameters for melody generation #9

amiika opened this issue Dec 16, 2018 · 1 comment

Comments

@amiika
Copy link
Owner

amiika commented Dec 16, 2018

Generative fractal melodies using regexp is super simple in ruby, for example:

t = {"0"=> "10010", "1"=>"1?" }
n = "0"
3.times { n = n.gsub(Regexp.union(t.keys),t) }
print n

Add parameter for number of "generations" and "axioms" that supports ziffers syntax.

@amiika
Copy link
Owner Author

amiika commented Jan 20, 2019

lsystem function Implemented in the new version. This ended up being bit more complex than single gsub. Implementation also supports context dependent matching and stochastic rules.

@amiika amiika closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant