-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
tonal: 2 small fixes #1092
base: main
Are you sure you want to change the base?
tonal: 2 small fixes #1092
Conversation
- fix scale() to allow scale names without tonic and then default it to C
Also I'm wondering should these 2 fail? it('scale is passed down to firstOf', () => {
expect(
n(0, 2)
.scale('C:minor')
.firstOf(3, x => x.note(2, 0))
.firstCycleValues.map((h) => h.note),
).toEqual(['Eb3', 'C3']);
});
// AssertionError: expected [ 2, +0 ] to deeply equal [ 'Eb3', 'C3' ]
it('scale works with add inside firstOf', () => {
expect(
n(0, 2)
.scale('C:minor')
.firstOf(3, x => x.add(2))
.firstCycleValues.map((h) => h.note),
).toEqual(['Eb3', 'G3']);
});
// AssertionError: expected [ 'C3', 'Eb3' ] to deeply equal [ 'Eb3', 'G3' ] |
Looks good! |
agreed!
I think iirc there was a discussion in discord about how to handle |
does that imply that |
I'd say yes, but i haven't done much with tidal's
I don't think so, you'd have to take |
I guess this is where the idea comes from: tidal skips the "degree" part which is good, because it makes the formula much simpler: The pros:
when using synths or 1 sample sounds, sometimes, I think of |
I guess the way to emulate that would be to do: n("0 1 2 3 4").scale("chromatic") I still find it a bit weird that |
@kasparsj should we then only add the defaulting to C in this PR? I'd prefer if note could be used for scale quantization later.. |
Hi Felix! |
I still think The problem you've tried to solve, this one: n(0, 1, 2) // <- assuming this is the sample number
.note(3, 4, 0) // <- assuming this is the scale index
.scale('C major') .. can be solved already like this: n(3, 4, 0)
.scale('C major')
.set.out(n(0, 1, 2)) // <-- set.out takes structure from here additionally, n(3, 4, 0)
.scale('C major')
.s("sawtooth") // <- n in first line won't interfere |
I still think it would be useful if there was another control that is specifically for setting a scale step, something like: n(0, 1, 2) // <- assuming this is the sample number
.degree(3, 4, 0) // <- assuming this is the scale index
.scale('C major') I just think it should not be n(3, 4, 0) // <- assuming this is the scale index
.scale('C major')
.n(0, 1, 2) // <- assuming this is the sample number |
|
scale()
to allow bothn()
andnote()
at the same timescale()
to allow scale names without tonic and then default it to C