Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hey im trying to easily define recursive music structures and im a little stuck.
- given a beat number that increments every note, a root (say 50), and a pattern (say [0 -2 -4 -2]), and a list of layers (say (4,16))
- i wanna iterate over the pattern every 1 so it completes the cycle every 4: 0, -2, -4, -2, 0 etc...
- and also every four so it completes the cycle every 16: 0 0 0 0 -2 -2 -2 -2 etc..
- so to isolate the question I lets focus on 16: what mathmatically would represent getting 0 0 0 0 1 1 1 1 2 2 2 2 (the indexes) at certain beats.
- my best guess was floor((beat modulo 16)/4) but dosnt work obviously
Advertisement
Add Comment
Please, Sign In to add comment