-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specifying note attributes (instr/vol/pan/delay) in cycles #31
Comments
Sounds good! I imagine the Although the application of Targets in this manner might be somewhat backwards, for example in the case of
My only issue with the generalized usecase here is that you couldn't use a number at the end of the tag's name, otherwise the syntax would be ambiguous. Maybe there could be some optional character like |
I'd collect them in a vector and apply and merge them in the cycle event trait: the trait that consumes the cycle output. For volume I'd actually expect the result to multiply in this case:
For panning and delay, this is a bit tricky. Need to think about that.
If we are not mapping the attributes in the cycle, this should not really be an issue either? But yes, if it is, we indeed could introduce some new separator here. Actually would be nice to have some generic parameter attribute in note() to. Will need to think about that too... The Alternatively, Target could hold a list of strings and nothing else. No index, no string, just: pub struct Target {
attributes: Vec<Rc<str>>,
// or values: Vec<Rc<str>>,
} |
Interesting. I suppose that would be neat. But it would disallow or make some other uses tricky. For example if you want all your notes to be at a lower volume and add a few accents at max (a fairly common style of pattern): you'd need to be able to set any value not just normalized floats, then you'd have to think a bit more about how to get to the final value, as in
Maybe it could be something you could choose to do explicitly, or we could come up with some syntax to essentially write expression fragments that would get combined like this :d
But that's starting to look a bit too messy maybe and confusing with the other operators. It also makes sense to not do anything besides collect and ouput the strings inside the cycle. |
Hard to argue about that :) In doubt, the operation IMHO should be an assignment, so the last argument wins and overrides previous values. Can we agree on that? I think that's how an instrument/sample assignment as target should work too. |
That makes sense in terms of implementation and assigment in programming but in practice I think the opposite would be much more useful. Example: I want all events to play on bass so I type in I think the general goal about this notation is to write less and achieve more, "last wins" would lead to the opposite in this sense. I agree that it is counter-intuitive but I still think it aligns better with what you typically do in composition, that is to apply a general parameter for everything and pick a few outliers later. Also, if the general case wins over the more specific one, it allows for many possible patterns that are different in notation yet have exact same output, which is not nice imo. "More specific wins" also keeps (on average) the relevant parameters closer to the notes so overall readability would be better. I imagine a lot of scenarios would happen where a user would try to assign something to a note in a list only to realize that some outer parameter was overriding it all from farther away. |
Agreed. Maybe not the most obvious behaviour, but definitely more useful. |
Continuing the discussion from #13 (comment)
Will close that topic as I'm giving up on the mapping stuff for now.
@unlessgames said
@emuell said
Now, if we'd use the colon character as a separator and the #/v/p/d prefixes as an attribute selector, then you could actually do both with the same syntax:
attach a single property (target) to a note:
or create sub-cycles as target
For
1.
the only necessary change in the cycle is to attach multiple targets to a value instead of a single one, so things likecycle("c d:v0.2:p0.1 e")
do work.2.
likely is a bigger task?The properties could be resolved outside of the cycle, just like the instrument target is handled right now.
For regular notes outside of the cycle we could then also allow using the colon as separator for consistency. I would not enforce it, as it's a bit harder to read and not necessay there.
@unlessgames I could take care of 1. The nested target cycle thing should probably better implemented by you...
The text was updated successfully, but these errors were encountered: