4 ms·
It can be tricky to deal with the intersection of music and programming. For example: > The chromatic scale is the easiest scale possible So far so good-- in
by jancsika 6y ago
It can be tricky to deal with the intersection of music and programming. For example:
> The chromatic scale is the easiest scale possible
So far so good-- in both programming and music we're just stepping through the smallest values (half step for music, the integer "1" in programming). So "easy" definitely applies to both domains.
> We can generate a chromatic scale for any given key very easily
For programming, sure-- you just find your offset and go to town.
For music, however, this is a wrong warp. The chromatic scale is a special case of a symmetric scale which cannot be transposed. There's literally only one such scale-- each transposition brings you back to the same exact set of pitch classes.
Figuring out what it means to have a chromatic scale "for a given key" is advanced music theory. In fact, I can only think of a few places where that makes sense:
* studying the complex harmony of late-19th century Romantic music
* studying the choice of accidentals in chromatic passages of Bach, Beethoven, etc. to infer the implied harmony
Those are important things, but they are definitely advanced concepts.
Long story short for programming, the author moves logically from an array to stepping through an array. But in terms of music, they start with the simplest possible scale and then jump to a third year undergrad theory concept.
- DavidPiper 6y ago> Figuring out what it means to have a chromatic scale "for a given key" is advanced music theory Interesting... Do you have any links for learning more about this - maybe some analyses? My take on chromatic scales (in the context of this post) is that the very existence of a(n equally tempered 12 tone) chromatic scale is the axiom the OP is using but not stated - hence a comment further up/down about P5s not necessarily being equivalent to d6 in other tunings. My take on chromatic scales (outside the context of this post) is that there is only one, like there are only two whole-tone scales, etc, and that it wouldn't necessarily make sense to say "the E chromatic scale" - instead you'd say "playing a chromatic scale over an E major harmony" (for example). However, if there are cases where it's useful to be more specific I'd be really keen to go deeper.
- jancsika 6y ago> My take on chromatic scales (in the context of this post) is that the very existence of a(n equally tempered 12 tone) chromatic scale is the axiom the OP is using but not stated - hence a comment further up/down about P5s not necessarily being equivalent to d6 in other tunings. Ooh, good catch-- I completely left out tuning systems! But again-- the point of "basic" music theory is to simplify the practice of discussing music. In that context, the fundamental purpose of the chromatic scale is to introduce the complete set of note names, as well as the range of the piano pitches. This gives the student a full set from which to derive all other concepts like scales, keys, triads, and all the other fundaments of the common practice period. So again, if you start with a chromatic scale and then start talking about the differences in half-step intervals along it-- boom. Huge conceptual warp. Honestly, I don't know much about the intersection between symmetric scales and alternate tuning systems. Personally, it seems like it would be an incredibly esoteric niche, although I can imagine some funny musical jokes with the idea. :)
- muelo 6y ago> The chromatic scale is a special case of a symmetric scale which cannot be transposed. I would not agree here. I think you can transpose a chromatic scale, but you end up with the same "set" of pitches. (So you _can_ transpose, but if you only consider the _set of pitches_ you end up with a invariant. But scales are not just a set of pitches, but also have a root note. You can establish the key of C and play a chromatic scale from c' up to c'' and there would be the feeling to accept C as the root of the scale. So the chromatic scale is kind of a _total_ (all 12 pitch names) and _trivial_ example, as you pointed out, very symmetric and usually not so interesting for analysis if you want to detect and describe structure. In general it depends on the music. If the music is based on diatonics, then a major scale or it's modes will be a fitting primitive for analysis, considering chromatic notes something like side notes. On the other hand 12-tone music uses a chromatic scale as a basis, negating the structure and hierarchy of diatonic scales. So I don't see a problem with transposing a chromatic scale, it's useful and necessary for mathematical sound systems (helpful for computation) to define operations, even if there is no direct gain (functionally speaking - identity / mempty etc.) : 1 + 0 = 1
- jancsika 6y ago> I would not agree here. Yeah, I was hasty. Of course you can transpose any segment of intervals, including a chromatic scale. The point is that a chromatic scale is a special case of a symmetric scale which includes all pitch sets (and therefore, all pitches). That's important, because to a beginner in tonal harmony the combination of "scale" and "key" is like a pedagogical sandbox. The intervallic profile of the scale serves to reinforce the very idea of music being in a key-- it extends to the system of harmony as triads are stacked thirds within that given intervallic profile. So everything has guard rails which serves to reinforce the relationships between tonic/dominant harmonies, cadential formulas, and so forth. Those guard rails are important since the modulo math of starting on different scale degrees to generate church modes can be conceptually confusing-- at least you've still got the lynch pin that the quality of the chords in a I-IV-V progression is unique to the major scale. It would be a twisted pedagogical move to pair the starting point of "chromatic scale" with "key" because suddenly there are nearly no guardrails. Sure, you've got the placement of the "starting note" at the beginning, and you could give that an agogic and dynamic accent when playing the scale to emphasis "tonic." But there are no other clues for the listener about harmonic or scale-degree hierarchy. You've literally removed everything else. It'd be like teaching beginners how to dribble a basketball, then moving directly to how to call a time-out before you fall out of bounds. I can imagine how strange that team would be. And I can imagine how weird the music would be from a python programmer who incrementally builds a sophisticated program for the purpose of deploy chromatic scales in various keys. In both cases I certainly want to experience the result, but in neither case would the participants be building on "the basics." Edit: clarification
- shwestrick 6y agoI don't think this is really anything to do with music vs programming. The author just used the wrong words... it's pretty clear they meant "generate a chromatic scale starting at any note" ;) Thanks for bringing up the connection with symmetric scales -- these are really interesting!
- paradygm 6y agoIf you want to go further down the rabbit hole of symmetrical scales, checkout Olivier Messiaen's modes of limited transposition https://en.wikipedia.org/wiki/Mode_of_limited_transposition https://en.wikipedia.org/wiki/Mode_of_limited_transposition. For a given set of pitches within an octave there are a limited number of times those pitches can be transposed before you wind up with the same set of pitches. And the modes in that scale must also be fewer in number than the number of pitches in the scale, meaning at least two modes of the scale must have the same interval spelling. The simplest example is the whole tone scale. Up a half step I get the same set of pitches, another half step and I get the same pitches I started with, so it is 'limited' to one transposition. And there is only one mode of the whole tone scale, since no matter where I start I always have the same set of intervals.
- piannucci 6y agoShtaaap, you’re headed for the Totient Function! Collision immanent, abort, abort!