overtone

2019-01-10T12:09:40.020800Z

I wonder if I can overload the defloop function so that it works with both cases ...

2019-01-10T15:46:18.021Z

Hey it worked 🙂 Merge to master coming soon...

2019-01-10T16:29:48.023Z

I'm defining drum loops like this (thanks @ericcervin for the suggestion):

;; Lists of name, num-beats, instrument and amplitudes, 0=mute
(defloop hats   8 hat   [0    0.5  0    0.5  0    0.5   0    0.5])
(defloop kicks  8 kick  [0.7  0    0.2  0    0.7  0.6   0.2  0  ])
But any ideas on how I could support fractional beats? The classic example would be a kick and hat alternating, with the kick on each beat and the hat on the off-beats.

2019-01-10T16:30:34.023400Z

Code here: https://github.com/ericclack/overtone-loops

2019-01-11T12:28:40.023900Z

I was thinking about something like this: (defloop hats (4 2) hat [0 0.5 0 0.5 0 0.5 0 0.5]) where (4 2) means 4 beats in a bar and the data is in half beats.

2019-01-11T12:31:04.024100Z

Or (defloop hats (4 1/2) hat [0 0.5 0 0.5 0 0.5 0 0.5])

2019-01-11T12:31:15.024300Z

Or (defloop hats 4 hat [(0 0.5) (0 0.5) (0.05) (0 0.5)]) where each tuple represents fractions of each beat. So you could also have (defloop kicks 4 kick [1 1 1 1]) for basic on-beat kick.

2019-01-11T21:29:35.024600Z

I think I'd use something like (defloop hats 0.5 hat [0 0.5 0 0.5 0 0.5 0 0.5])

2019-01-12T16:32:59.025Z

That's the clearest format I think. I need to include the 4 too as that's the number of beats in each bar.

2019-01-13T19:25:29.025200Z

Here's where I am at the moment, I decided to try both syntaxes 🙂 https://groups.google.com/d/msg/overtone/1nJi8UIduJk/_7e07QywDwAJ

2019-01-13T21:55:35.025400Z

Hmm....Thinking about how this is laid out on my drum machine, a copy of a TR909. I guess including the 4 is useful to specify what is the "scale" on my machine. Set that to 3 if I want to work with triplets.

2019-01-18T16:51:53.036500Z

super delayed response, but you might get some mileage from some of my repos and posts: https://github.com/gilesbowkett/basic-beat https://github.com/gilesbowkett/arx https://truthindustri.es

2019-01-18T21:08:47.037400Z

Hmm...just saw something I didn't see the last time I was in your github. Stared for later.

2019-01-21T18:05:08.040300Z

Thanks @gilesb I'll check those repos out.