YAVSRG / Prelude

The rhythm game framework that powers Interlude
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Pattern generator #1

Open percyqaz opened 4 years ago

percyqaz commented 4 years ago

part of the editor

i need to design a way of expressing patterns that is both simple and easy to learn but also capable of having fine control over what patterns are generated

it would be sensible to have some presets in the editor so people can pick it up easily without reading a guide

basic syntax:

the pattern generator takes a stream of characters (a bit like regex) and a snap distance and places notes on every row to form the specified pattern

[ ] groups characters inside it to apply to one snap, as each note is otherwise placed a snap later than the previous

_ can be used to indicate a blank row/skip a snap to allow gaps in patterns

digits (1234567890) indicate a note in that column (0 being column 10)

J indicates a note that forms a jackhammer (appears in a column where there is also a note in the previous row). It is picked randomly and if there are no notes in the chart a random column should be picked (and no error shown)

j indicates a note that forms a jackhammer like J, however the generator will attempt to alternate hands/evenly distribute jacks as much as possible to form minijacks instead of anchors

S indicates a stream - a random note that does not form a jackhammer - if this is not possible a random column will be selected (no error)

s indicates a stream however the generator will attempt to produce rolls by selecting notes in columns that minimise note density per column. Minimising fully will result in full rolls/split rolls etc so it should randomly choose between maybe the 2 best columns

examples: [12][34] - jumptrill 1234 - roll [ss]s - jumpstream (comfortable but can still contain trills) [12]3[14]2[34]3[14]2 - a kind of jumptrillable jumpstream [1357][sss] - brackets [ss]s[ss][ss][ss]s[ss]s - triple jumpstream [sss]S[ss]S - dense handstream [ss]j - that one galaxy collapse pattern we havent named yet [js] - jumpgluts [1234]j[ss]s - quadstream [1234][jjj] - dawts favourite patter

more design to improve the syntax soon

percyqaz commented 2 years ago

May be worth building the syntax for patterns around the pattern analysis feature which can pick up on subtleties of patterns like jacks forming a long anchor