21st stuff, don't remember much

This commit is contained in:
efim
2022-08-28 13:55:18 +00:00
parent da7eaa45b5
commit ba4ee2767d
2 changed files with 254 additions and 0 deletions

View File

@@ -120,3 +120,86 @@ whoh
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
* [2022-08-21 Sun]
** now, I got another response!
Yes unfortunately it's not always easy to directly translate synthdefs from SC into cl-collider. Some of the UGens are named differently (i.e. SinOsc in SC is sin-osc in cl-collider). The UGens are defined in cl-collider with defugen though, so you could do a grep or similar on the library to get a list of the defined ugens.
Regarding the "attributes" you mention, do you mean the arguments for each ugen? If so, are you using Emacs or another editor? I believe Emacs should show the function signature in the echo area at the bottom of the screen if you're in the right package (i.e. you need to have an in-package form in your file)
If you have a specific synthdef you're having trouble translating, feel free to link me to it and I'll see if I can translate it for you as an example
Oh I see you do have an in-package in the example you posted. It might not be showing the function signature since you're doing in-package cl-patterns but the cl-patterns package doesn't include the UGens. so you might have to make a new package that :uses cl-patterns and cl-collider, so it has all the ugens as well as all the patterns.
efim
Apart from guidance on how to better translate SC definition of sync into DEFSYNTH attributes to get other instruments
could you help me understand how to join patterns?
I created two
(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
)
(pb :what-basic-percussion
:instrument :kik
:note 0
:dur (pseq '(1) 1)
:play-quant 4)
and wanted to join them to play in parallel as a pattern
and I think I'm getting lost in understanding types, what is pattern, what isn't
because there's an example for PPAR:
(next-upto-n (ppar (list (pbind :dur (pn 1/2 4))
(pbind :dur (pn 2/3 4)))))
but doing
(next-upto-n (ppar (list :what-basic-percussion :what-predef-chord)))
doesn't yield sound events
so maybe I can't reference patterns by name they get in PB ?
would I need to use PBIND to define both of previous patterns,
set them to some variables,
and then they could be used as subpatterns?
For now I already got tired with how much there is to learn,
I've set up "live recording" from (next-upto-n (ppar (list :what-basic-percussion :what-predef-chord)))
and celebrate initial success, theres 9 second pause in the beginning, but that's my first composition with so much to learn
next-upto-n won't play any sounds on its own, it's just used to get the resulting event objects from the patterns. You'd still need to call play on whatever pattern you define. So something like this could work:
1
2
3
4
(pdef :foo (ppar (list (pdef :what-predef-chord)
(pdef :what-basic-percussion))))
(play (pdef :foo))
Oh, I see what you meant. Yeah, it looks like ppar doesn't accept just the pattern names, so you would have to do this instead:
1
(next-upto-n (ppar (list (pdef :what-basic-percussion) (pdef :what-predef-chord))))
It probably should accept the pattern names directly though, so I will see about fixing that soon.
When you define a pattern like (pb :foo ...) it's basically the same as doing (pdef :foo (pbind ...)). So if you define a pattern with pb you can refer back to it with pdef later on.
Today
modula
efim
foo.aiff (4.74 MB)
very nice! definite good first steps, glad to hear you're making progress :)
it does take some learning but hopefully it will make more sense as you gain familiarity with it
I'm trying to make cl-patterns as intuitive as possible, but there are definitely some rough edges i don't notice until they're pointed out.
Oh, also, if you want to record a pattern, you might be interested in the render function. Basically you can do something like (render (pdef :your-pattern) "/path/to/output.wav" :dur 4) and it will save 4 beats of :your-pattern to /path/to/output.wav.
I'm not sure if that's what you were using for that recording, but it may be more convenient if you were using something else.
** ok, so let's search github for synthdef ?
** now I want to do what?
1. try out parallel
2. try to get precussion
3. also let's try to get defpackage and stuff
** so, let's copy yesterdays instruments and patterns and try to join them in parallel