Hi Hans,
thanks for the reply. I found the module you were referring to just
before your mail, but the example was unvaluable. So, if you want I
could offer more extensive impressions on why the library is a bit
hard to learn. I think the main points are two:
1) Proliferation of similar types. When a beginner tries to write an
interval, there are:
* class IsInterval a -- in Music.Pitch.Literal.Interval.
This pattern of design is ingenious indeed, but the first time I saw
the library I began to think that whatever contains the important
informations of an Interval, is an interval. So, isInterval Int
because the Int stores the number of semitones, but some instance,
like IsInterval a => IsInterval [a], are curious at least. Is there a
use case for those?
* IntervalL -- in Music.Pitch.Literal.Interval
Ok, this should be *the interval*. It stores the number of octaves,
the diatonic and the chromatic step.
* Interval -- in Music.Pitch.Common.Interval
This one stores only the diatonic and chromatic steps, delegating the
octave difference to auxiliary functions. What relation does it have
with IntervalL. Why is this information duplicate? What are the
conversion functions between the two representations?
* type Interval a = Diff (Pitch a) -- In Music.Score.Pitch (a module I
didn't expect)
This is actually the representation which let you say `d .-. c`. When
I tried with the others, I obviously got type errors. This leads to
the second point:
2) Type errors and ambiguous type errors due to the great polymorphism
embedded in the types.
Polymorphism is a feature (look at the lens library) but it quickly
becames unusable without documentation.
I hope to contribute to these issues now that I have some free time.
It would be very helpful if you'd comment the overall structure of the
suite, which are in your opinion the most important types, and what
are they useful for.
Regarding the counterpoint, Voice (Maybe Pitch) seems perfect, but I
have this issue: let's say I'd like to keep a sort of coordinate
system, to be able to say to the user: you made some parallel fifths
between this point and this other one, and eventually marking the
errors on the music. Do you have any suggestion?
Thanks again, and best regards
Carlo Nucera
> --
> You received this message because you are subscribed to the Google Groups
> "music-suite-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
music-suite-dis...@googlegroups.com.
> To post to this group, send email to
music-sui...@googlegroups.com.
> To view this discussion on the web, visit
>
https://groups.google.com/d/msgid/music-suite-discuss/4DAC724A-DF34-4651-AE80-24F36263846A%40hanshoglund.se.
> For more options, visit
https://groups.google.com/d/optout.