Am 30.12.2018 um 11:58 schrieb tedthetrumpet@xxxxxxxxx:
Not at all wrong, and: programming is mainly about saving typing ! Am 30.12.2018 um 12:31 schrieb info@xxxxxxxxxxxxxxxx:
One thing to take care of is the naming convention: as e.g. 'rand' is already taken for arrays you wouldn't want to override the core method. So it would look more natural to me to name the methods 'pseq', 'prand' etc. Also +1 for the default repeats = inf in such case. My PLx list patterns all default to repeats = inf. miSCellaneous_lib contains several shortcuts for patterns, e.g. EventShortcuts which lets you customize abbreviations for keys, by default e.g. 'n' means 'note', 'd' means 'dur' etc. EventShortcuts.on // PLbindef is also a wrapper for shorter replacement syntax PLbindef(\x, \n, Pwhite(0, 10), \d, 0.2).play ~x.n = PLseq((0..5)) ~x.n = PLrand((0..5)) // with pattern methods defined you could write ~x.n = (5..0).pseq ~x.n = (5..0).prand BTW, already there are already some more core Patterns, where methods exist, resp. the methods are more commonly used than the syntax with Pattern objects, e.g. Pcollect Regards Daniel ---------------------------------------------------- http://daniel-mayer.at/software_en.htm ---------------------------------------------------- |