> I see, so for a kind of just intonation you might have > > Scale base 2 (map (base*) [1%1, 9%8, 5%4, 4%3, 3%2, 5%3, 15%8]) > > Is this correct?
scaleTones conatins multipliers of base tone (Doubles), so correct thing is Scale base 2 $ map fromRational [1%1, 9%8, 5%4, 4%3, 3%2, 5%3, 15%8] > In my case, the scales I work with don't repeat at > the octave, but I suppose in this scheme I could simply put all steps > into scaleSteps and not use scaleOctave. But then if I would lose the > ability to transpose by octave. > I thought about it, for example how to express scale of pure wholesteps. And i think it have to be new type for 1d tones since truly there is no octave, nothings is repeated. But as you have mentioned you can put all tones in scaleSteps. And how to transpose? There are two types of transposition, for tones and for frequencies. I think first is transposition and second is modulation since whole scale can change. You can transpose in tones still there is a function transpose :: NaturalNumber n => Int -> Tone n -> Tone n And you can define transposeOctave :: Int -> Tone N7 -> Tone N7 transposeOctave n = transpose (7 * n) There is interesting relaxation i'm sill thinking about to the 'Scale' type that can allow more straightforward solution. But its rather strange. Does scale have to be restricted to be triggered only by tones with the same number of steps in scale? for example is it possible to plug (Tone N7) into (Scale N88)? this function can be defined since 2d tone can be converted to Int. And then you can transpose as if it's Tone N7 and get desired frequencies during interpretation step. So being halfway between degree 1 and > 5 is not the same as halfway between 2 and 4... which is accurate if > you think about it, even in a tempered scale. You couldn't say that > halfway between 'G' and 'B' is 'A', just as no one would claim that > halfway through modulating from G to B must be A... it's simply > halfway between G and B! > > I have another unsolved problem which is that the scales I use involve > absolute offsets, and I'm not sure if it's enough to have a family of > scales at absolute offsets, or if I'll wind up wanting a fourth > element in the pitch signal: (from, degree, distance, hz_offset). > It stems from the same thing as transposition there is bend for tones and bend for frequencies (absolute offset). I don't know which is better local or absolute bend. In my library bend specifies local bend. 0 is this tone and 1 is next one. In between there is linear interpolation between neighbour tones. I think in practice singer or violinist jumps from one just scale to another, in points of modulation, so useful solution will model this process. I don't know how to do it for i've just started. For now i want to allow sudden scale changes.
_______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
