"'Eric Clack' via Overtone" <
over...@googlegroups.com> writes:
> Hi all,
> I'm trying to create a simple loop syntax for Overtone so that I don't need to use all of the `at` functions to schedule beats. But also to help me learn more about Clojure,
> Overtone and SupperCollider.
>
> You can see how far I've got here:
https://github.com/ericclack/overtone-loops
>
> Because I'm new to much of this I'd appreciate any feedback or suggestions.
>
> My current challenge is to think through how to do fractional beats, two alternative syntaxes are:
>
> ;; beats instr 1 2 3 4
> (defloop kicks (4 1/2) kick [0.7 0 0.2 0 0.7 0.6 0.2 0 ])
>
> Here (4 1/2) means 4 beats in a bar and amp vales are half beats.
>
> Alternatively:
>
> ;; 1 2 3 4
> (defloop kicks 4 kick [ 0.7 0.2 (0.7 0.6) 0.2 ])
>
> Here the (0.7 0.6) means play two kicks within beat 3 (as half beats).
>
> Does that make sense? Which would you prefer to use?
I think it will be interesting to see where your approach leads.
In my sequencer, each voice can have its own tempo.
The :il means interleave, or how many beats are intersperced between the
events. But the setting in my case is for all events in the
sub-sequence, not like you do it, so again, it will be nice to see how
your approach pans out!
For instance:
(seq/set-metro :bpm 200)
(seq/set-beat {
:B '[x - ]
:F '[x - - -]
:H '[c o c o]
:BL '[:g2 :g2 :d2 :g2 :a2 :g2 :d2 :b2 :a#2 :a#2 :a#2 :a#2 :a#2 :a#2 :a#2 :a#2]
{:voice :B :id 3} '[o - ]
{:voice :B :il 5 :id 0} '[c o ]
{:voice :B :il 3 :id 1} '[c o ]
})
These are the voices, but they arent important for this discussion.
(seq/set-drums {
:B (fn [x]
(cond
(= 'c x)(electro-kick)
(= 'o x) (dance-kick)
:else (do (electro-kick) (dance-kick)))
)
:H (fn [x] (cond
(= 'c x)(electro-hat)
(= 'o x)(open-hat :amp 1 :t 0.1 :low 10000 :hi 2000 )
:else (open-hat)))
:BL (fn [x] (tsts (* 1 (midi->hz(note x))) ))
:C (fn [x] (electro-clap))
:F (fn [x] (seq/play-once (choose [{:H '[c c c o]}
{:H '[c - c -]}
{:H '[c c c c]}
])))
--
Joakim Verona
joa...@verona.se