| Safe Haskell | Safe-Inferred | 
|---|
Util.Affine
Contents
Description
Affine and instances.
 module Util.Affine (Affine(..), (.-^)) where
Synopsis
- class Num (Diff p) => Affine p where
- (.-^) :: Affine p => p -> Diff p -> p
- newtype Chromatic = Chromatic Int
- newtype ChromaticSteps = ChromaticSteps Int
- newtype Diatonic = Diatonic Int
- newtype DiatonicSteps = DiatonicSteps Int
- newtype FChromatic = FChromatic Double
- newtype FChromaticSteps = FChromaticSteps Double
- newtype FDiatonic = FDiatonic Double
- newtype FDiatonicSteps = FDiatonicSteps Double
Documentation
class Num (Diff p) => Affine p where Source #
Simplified version of AffineSpace from the vector-space package.
Num gives access to negate and (+) and (*). It's probably technically too much because it also has fromInteger, but I don't think I need the whole AdditiveGroup etc. alternative numeric hierarchy.
Instances
| Affine Chromatic Source # | |
| Affine Diatonic Source # | |
| Affine FChromatic Source # | |
| Defined in Util.Affine Associated Types type Diff FChromatic Source # Methods (.-.) :: FChromatic -> FChromatic -> Diff FChromatic Source # (.+^) :: FChromatic -> Diff FChromatic -> FChromatic Source # | |
| Affine FDiatonic Source # | |
| Affine UTCTime Source # | |
base types
pitch
Absolute chromatic steps.
Instances
| Show Chromatic Source # | |
| Eq Chromatic Source # | |
| Ord Chromatic Source # | |
| Affine Chromatic Source # | |
| type Diff Chromatic Source # | |
| Defined in Util.Affine | |
newtype ChromaticSteps Source #
Relative chromatic steps, modulo pc_per_octave.
Constructors
| ChromaticSteps Int | 
Instances
newtype DiatonicSteps Source #
Constructors
| DiatonicSteps Int | 
Instances
newtype FChromatic Source #
Constructors
| FChromatic Double | 
Instances
| Show FChromatic Source # | |
| Defined in Util.Affine Methods showsPrec :: Int -> FChromatic -> ShowS # show :: FChromatic -> String # showList :: [FChromatic] -> ShowS # | |
| Eq FChromatic Source # | |
| Defined in Util.Affine | |
| Ord FChromatic Source # | |
| Defined in Util.Affine Methods compare :: FChromatic -> FChromatic -> Ordering # (<) :: FChromatic -> FChromatic -> Bool # (<=) :: FChromatic -> FChromatic -> Bool # (>) :: FChromatic -> FChromatic -> Bool # (>=) :: FChromatic -> FChromatic -> Bool # max :: FChromatic -> FChromatic -> FChromatic # min :: FChromatic -> FChromatic -> FChromatic # | |
| Affine FChromatic Source # | |
| Defined in Util.Affine Associated Types type Diff FChromatic Source # Methods (.-.) :: FChromatic -> FChromatic -> Diff FChromatic Source # (.+^) :: FChromatic -> Diff FChromatic -> FChromatic Source # | |
| type Diff FChromatic Source # | |
| Defined in Util.Affine | |
newtype FChromaticSteps Source #
Constructors
| FChromaticSteps Double | 
Instances
Instances
| Show FDiatonic Source # | |
| Eq FDiatonic Source # | |
| Ord FDiatonic Source # | |
| Affine FDiatonic Source # | |
| type Diff FDiatonic Source # | |
| Defined in Util.Affine | |
newtype FDiatonicSteps Source #
Constructors
| FDiatonicSteps Double |