-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Introduces two function families for introducing chromaticism in melodies #1097
Conversation
I'm not sure of the Haskell idioms but maybe for This could be a good time to explore possibilities for working with patterns of functions in Tidal, then scaleMods (or whatever it becomes) could accept a pattern rather than a list of functions. |
We have quantise rather than US quantize spelling as well btw.. But there'd be no harm in making aliases to support both |
This looks really interesting to me, and an area I've struggled to work out how I'd imagine a fix - I'm very interested to explore. My thoughts on spelling are regarding |
I have modified the name of Regarding the other function, what do you think about |
Btw. for naming conventions and avalability of easy to reach features in SuperDirt, you could check this help: https://doc.sccode.org/Classes/Event.html#Useful%20keys%20for%20notes The SuperCollider event model allows for scales, tunings, stretched octaves, steps per octave, scale degree, modal transposition, gamut transposition, accidentals, chromatic transposition, detuning and harmonic. |
It would be good to get this merged soon due to #1112 I prefer Rather than |
I agree with the I had the project to rewrite I used |
@aherrou Ah if you have a chromaticise in mind then that makes sense to me. So if you can rename to scaleWith / scaleWithList then I think we can merge |
Sorry I noticed one more problem - you're using Then hopefully (the working) tests will pass and we can merge! |
Excellent thanks! |
Context
The contributions of this pull request are described in detail in an article submitted to ICLC 2025. The primary goal of this pull request is to make the related code available to reviewers in context, so that they can manipulate it and test it.
Content
This introduces two families of functions that aim at facilitating the use of chromaticism in melodies.
chromatiseBy
function, that introduces chromatic notes in between the anchor notes given in a pattern. The number of chromatic notes inserted (potentially 0, for no chromaticism, or a negative number, for a descending movement) is a patternable parameter.scaleMod
andscaleMods
functions.scaleMod
is a variant of thescale
function that takes a supplementary functional[a] -> [a]
parameter. This parameter is used to transform scales (represented as numbers lists), and allows to functionally transform the current scale.scaleMods
has a similar role but takes a list of functions rather than a single function.Other functions in this family include
getScaleMod
(used to buildscaleMod
the same waygetScale
is used to buildscale
), andraiseDegree
(s
) andlowerDegree
(s
) (meant to be passed as parameters toscaleMod
(s
), in order to raise/lower one or a range of degrees in a scale by a semitone).Merging
Besides the usual code reviews and implementation considerations, I am not entirely convinced by my naming choices and I think they should be discussed before merging.
scaleMod
is short for "scale modification", but themod
suffix sounds a little bit too much like "modulo" to my ears (especially given that thewhenmod
function exists). Any suggestions for a more Haskell-idiomatic suffix are very welcome.chromatiseBy
is fine enough in my opinion, but there might be some debate between a British vs an American-style spelling.