cl-patterns-study/programming-music-journal.org

4.8 KiB

Programming Music Journal

[2022-08-19 Fri]

past friday I've done some basic setup (painfully) and had simplest examples running

setting up supercollider package - so this doesn't work for some reason

here simplest things seem to work

cl-collider-tutorial-getting-started

so, let's just go the site?

nope, continue with the file that had some promise the one about cl-collider turorial

also, let's make this a separate repo?

oh, no, the 'supercollider-example' which is about cl-patterns started to work?

how and why? maybe reinit of some shit, or what

so, new file to hopefully learn something about cl-patterns

what is it that I want o learn ideally?

setting up drum sequences?

doing chord things with synth?

what's this thing about "FAILURE IN SERVER /n_set Node 1539 not found "

?

this seems to be startup

(ql:quickload :cl-patterns/supercollider)
(cl-patterns:backend-start 'supercollider)

;; also launch QjackCTL and connect SuperCollider outputs 1 & 2 to headphones
;; to force restart, use killall scsynth



(in-package #:cl-patterns)

(start-clock-loop :tempo 136/60)

but what's most basic pattern that would play then?

ones in supercollider example seem to work

and example seem to require me to define synth, right? to set it into the :instrument key

wtf am I to do.

maybe let's try to do stuff inside of org file?

how do I clear things, it seems that cl-patterns seems to send things to server?

should I try a different backend?

so, when SC returned lots of errors on pb what helped - starting syn wave from "setting-up" file

;;; https://defaultxr.github.io/cl-collider-tutorial/03-make-a-sound.html (setf s (make-external-server "localhost" :port 4444)) (server-boot s) ; already in use

;;; https://defaultxr.github.io/cl-collider-tutorial/03-make-a-sound.html (proxy :foo (sin-osc.ar 440 0 0.2)) ; no error, but hear no sound ;; opened QjackCtl, connected Graph SuperCollider to Air by Aftershokz left (proxy :foo (sin-osc.ar 300 0 0.2)) (proxy :foo (saw.ar 300 0.2))

how do I make sounds better?

do I go to cl-collider package for explanation of synths and such?

to stopp things that run amok:

(cl-patterns:stop t)

ugh. why doesn't it produce sounds?

ok, what did I learn today?

  • some interaction with pseq having scales, root / ocave
  • intersecting with durations, also seq and not totally alighning
  • some combined sounds, which don't sound nice
  • maybe reliant startup procedure
  • and attempting to run chords hangs it all

[2022-08-20 Sat]

now I'd like to create an instrument for which chords would sound nice

and after than some kind of percussion things

cool! that was just my type :instument instead of :instrument

and article on cl-collider now helps with some cool synhts, like chord strum

(defsynth tone-pluck ((freq 440) (amp 0.2))
  (out.ar 0 (* (saw.ar (let ((detune (* freq 0.01)))
                         (list (- freq detune) (+ freq detune))))
               (env-gen.kr (perc 0.1 1.8)
                           :level-scale amp
                           :act :free))))

;; (synth 'tone-pluck)

(in-package #:cl-patterns)
(pb :what-predef-chord
  :instrument :tone-pluck
  :note (pseq (mapcar #'chord-notes (list (chord "Major Triad") (chord "Minor Triad") (chord "Minor 7th") (chord "Major 7th") (chord "Diminished Triad") (chord "Major Triad"))) 1)
  :octave 4
  :root 2
  :dur (pseq '(2 2 4))
  ;; :play-quant 4
  )


;; (play :what-predef-chord)
;; (stop :what-predef-chord)

yay.

now let's figure out percussions?

searching : "super collider percussion synth"

got all sorts of cool results:

main page of supercollider: https://supercollider.github.io/

now for the well deserved fucking rest

things I want to figure out in the future:

  1. joining patterns in parallel - percussion + rythm + solo
  2. having 3 beats in percussion but aligning to 4 beats
  3. getting cool instruments from existing repos for supercollider