Re: Pattern duration and: monospace pianoroll?
[email protected] Thu, 22 Apr 2021 15:50:24 +0200
| Newsgroups | gmane.comp.audio.supercollider.user |
|---|---|
| Message-ID | <[email protected]> |
hi, no, there is no simple way to calculate the duration of a pattern. they don't keep a record and also don't know what's coming. with some trickery - and if your \dur is deterministic and finite - you can sort of figure it out in advance by making a copy of the \dur pattern and .asStream.all.sum. but i wouldn't recommend it. a more pattern oriented way is to limit the duration with Pfindur. for example, put two Pbind inside a Ppar. with Pfindur we can limit the second Pbind to the length of the first (here 1.5 beats which we somehow have calculated or know in advance). ( Ppar([ Pbind(\degree, 3, \dur, Pseq([0.25, 0.5], 2)), Pfindur(1.5, Pbind(\degree, 9, \dur, Pseq([1/3], 12))), ]).play; ) another variant is to limit the Ppar itself. that is, wrap the Ppar in a Pfindur. here the same example but with the first Pbind's \dur set to inf and the Pfindur moved up one level. ( Pfindur(1.5, Ppar([ Pbind(\degree, 3, \dur, Pseq([0.25, 0.5], inf)), Pbind(\degree, 9, \dur, Pseq([1/3], 12)), ])).play; ) so like this we can be careless and throw in any pattern and ignore if durations match. the Pfindur + Ppar combo will sync up when the given time has run out. as for your second question, i think it'd be amazing with a tracker style pattern editor of some sort. i spent some time thinking about that but never got around coding anything. if you want to define your patterns in a more musical way you could try the MusicalNotation quark... https://github.com/lvm/MusicalNotation another way to go is to group and name your patterns with the built-in Pdict or Psym. or, as many do, take the algorithmic approach and write some code that in turn create your patterns. Prout is good for that but can also be a simple Plazy or your own Pattern subclasses. for example see Pbjorklund (quark). _f > 22 apr. 2021 kl. 11:59 skrev [email protected]: > > Hi. > > Two questions: > > I have several patterns which are supposed to be euqal in duration which I > play with Ppar. However, one of them is apparently longer, which > creates a gap in the overall Pseq which combines them all. > Is there a simple way to ask a Pattern about its overall duration? > I'd rather not find the culprit by summing the durs manually :-) > > Still in pattern land, but quite unrelated: > I am looking for a way to make the creative process of editing a pttern > easier. Changing duration values manually to get a different rhythm is > quite tedious. What I'd like is a simple piano-roll alike > syntax which converts to an event pattern. I've seen a textual rhythm > thing in the livecoding lib, but I wasn't able to isolate that code out > of the whole thing. I am basically wondering if there is something like > this around in a Quark, something with as little as possible > dependencies. I am just asking round to avoid inventing the wheel. > If I have to, I will. Something like: > > Pfoo([a: [midinote: 37], b: [midinote: 39]], 4.0, > "a b ab " > ) > > would yield > > Pbind(\midinote, Pseq([37, 39, 37, 39], 1), > \dur, Pseq([2/2, 3/2, 1/2, 2/2], 1) > ) > > would already be helpful. I guess I will be pretty much on my own > trying to invent a real piano-roll editor with Emacs in text mode, > right? > Remembering modedit from good old dos days, I'd love to get back to that > experience of fiddling with ideas. > > Or, maybe I am missing a trick? How do people here come up with more > complex patterns? Importing from some sources is obvious, but writing > them down from scratch seems overly tedious to me and basically ruins my > creativity. > > > -- > CYa, > ⡍⠁⠗⠊⠕ > > _______________________________________________ > sc-users mailing list > > info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx > archive: http://www.listarc.bham.ac.uk/marchives/sc-users/ > search: http://www.listarc.bham.ac.uk/lists/sc-users/search/ #| fredrikolofsson.com musicalfieldsforever.com |#