> 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.