| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Fadno.Notation
Synopsis
- data Quanta
- qToInt :: Quanta -> Int
- qFromInt :: Integral i => i -> Maybe Quanta
- data TimeSignature = TimeSignature {}
- tsUnit :: Lens' TimeSignature Quanta
- tsLength :: Lens' TimeSignature Int
- class HasTimeSignature a where
- timeSignature :: Lens' a (Maybe TimeSignature)
- (/:) :: Int -> Quanta -> TimeSignature
- data PPQ
- ppqDiv :: Integral a => PPQ -> a
- tsToRatio :: TimeSignature -> Rational
- tsFromRatio :: Rational -> Maybe TimeSignature
- tsFromRatio' :: TimeSignature -> Rational -> Maybe TimeSignature
- ratioPPQ :: forall a. Integral a => PPQ -> Iso' a Rational
- adaptHas :: Lens' a (Maybe a)
- adaptHasLens :: Lens' s a -> Lens' s (Maybe a)
- adaptHasNot :: Lens' s (Maybe a)
- data Tie
- class HasTie a where
- data Slur
- class HasSlur a where
- data Articulation
- = Staccato
- | Accent
- | Tenuto
- | DetachedLegato
- | Staccatissimo
- | Spiccato
- | Scoop
- | Plop
- | Doit
- | Falloff
- | BreathMark
- | Caesura
- | Stress
- | Unstress
- | SoftAccent
- | OtherArticulation String
- class HasArticulation a where
- articulation :: Lens' a (Maybe Articulation)
- newtype RehearsalMark = RehearsalMark {
- _rehearsalText :: String
- rehearsalText :: Iso' RehearsalMark String
- class HasRehearsalMark a where
- rehearsalMark :: Lens' a (Maybe RehearsalMark)
- newtype Direction = Direction {
- _directionText :: String
- directionText :: Iso' Direction String
- class HasDirection a where
- data Barline
- class HasBarline a where
- data Repeats
- class HasRepeats a where
- data Clef
- class HasClef a where
- data Beam
- class HasBeams a where
- class HasVoice a where
- voice :: Lens' a (Maybe String)
- newtype Part a = Part {
- _partIdx :: a
- partIdx :: forall a a. Iso (Part a) (Part a) a a
- class HasPart a b | a -> b where
- mshow :: Show a => Getter s (Maybe a) -> String -> s -> String
- mshows :: s -> String -> [s -> String] -> String
- type Note' p d = Noted (Note p d)
- data Noted n = Noted {
- _nNote :: n
- _nTie :: Maybe Tie
- _nSlur :: Maybe Slur
- _nArticulation :: Maybe Articulation
- _nBeams :: [Beam]
- _nVoice :: Maybe String
- nVoice :: forall n. Lens' (Noted n) (Maybe String)
- nTie :: forall n. Lens' (Noted n) (Maybe Tie)
- nSlur :: forall n. Lens' (Noted n) (Maybe Slur)
- nNote :: forall n n. Lens (Noted n) (Noted n) n n
- nBeams :: forall n. Lens' (Noted n) [Beam]
- nArticulation :: forall n. Lens' (Noted n) (Maybe Articulation)
- note' :: Note p d -> Note' p d
- noted :: n -> Noted n
- testNote :: Note' [Int] Int
- data Bar n = Bar {
- _bNotes :: Seq n
- _bRehearsalMark :: Maybe RehearsalMark
- _bDirection :: Maybe Direction
- _bBarline :: Maybe Barline
- _bRepeats :: Maybe Repeats
- _bTimeSignature :: Maybe TimeSignature
- _bClef :: Maybe Clef
- bTimeSignature :: forall n. Lens' (Bar n) (Maybe TimeSignature)
- bRepeats :: forall n. Lens' (Bar n) (Maybe Repeats)
- bRehearsalMark :: forall n. Lens' (Bar n) (Maybe RehearsalMark)
- bNotes :: forall n n. Lens (Bar n) (Bar n) (Seq n) (Seq n)
- bDirection :: forall n. Lens' (Bar n) (Maybe Direction)
- bClef :: forall n. Lens' (Bar n) (Maybe Clef)
- bBarline :: forall n. Lens' (Bar n) (Maybe Barline)
- bar :: [n] -> Bar n
- testBar :: Bar (Note [Int] Int)
Documentation
data TimeSignature Source #
Constructors
| TimeSignature | |
Instances
| Show TimeSignature Source # | |
Defined in Fadno.Notation Methods showsPrec :: Int -> TimeSignature -> ShowS show :: TimeSignature -> String showList :: [TimeSignature] -> ShowS | |
| Eq TimeSignature Source # | |
Defined in Fadno.Notation | |
| Ord TimeSignature Source # | |
Defined in Fadno.Notation Methods compare :: TimeSignature -> TimeSignature -> Ordering (<) :: TimeSignature -> TimeSignature -> Bool (<=) :: TimeSignature -> TimeSignature -> Bool (>) :: TimeSignature -> TimeSignature -> Bool (>=) :: TimeSignature -> TimeSignature -> Bool max :: TimeSignature -> TimeSignature -> TimeSignature min :: TimeSignature -> TimeSignature -> TimeSignature | |
tsUnit :: Lens' TimeSignature Quanta Source #
tsLength :: Lens' TimeSignature Int Source #
class HasTimeSignature a where Source #
Methods
timeSignature :: Lens' a (Maybe TimeSignature) Source #
Instances
| HasTimeSignature (Bar n) Source # | |
Defined in Fadno.Notation Methods timeSignature :: Lens' (Bar n) (Maybe TimeSignature) Source # | |
(/:) :: Int -> Quanta -> TimeSignature Source #
tsToRatio :: TimeSignature -> Rational Source #
tsFromRatio :: Rational -> Maybe TimeSignature Source #
tsFromRatio' :: TimeSignature -> Rational -> Maybe TimeSignature Source #
ratioPPQ :: forall a. Integral a => PPQ -> Iso' a Rational Source #
Duration iso, from Integral to Rational, given PPQ
adaptHasLens :: Lens' s a -> Lens' s (Maybe a) Source #
Adapt a non-Maybe lens to the HasXXX "Maybe Lens'"
adaptHasNot :: Lens' s (Maybe a) Source #
Adapt a type that does NOT support the HasXXX feature.
Tied notes.
Instances
Slurred notes.
data Articulation Source #
Note articulations.
Constructors
| Staccato | |
| Accent | |
| Tenuto | StrongAccent TODO implement after fixing fadno-xml #7 |
| DetachedLegato | |
| Staccatissimo | |
| Spiccato | |
| Scoop | |
| Plop | |
| Doit | |
| Falloff | |
| BreathMark | |
| Caesura | |
| Stress | |
| Unstress | |
| SoftAccent | |
| OtherArticulation String |
Instances
| Show Articulation Source # | |
Defined in Fadno.Notation Methods showsPrec :: Int -> Articulation -> ShowS show :: Articulation -> String showList :: [Articulation] -> ShowS | |
| HasArticulation Articulation Source # | |
Defined in Fadno.Notation Methods articulation :: Lens' Articulation (Maybe Articulation) Source # | |
| Eq Articulation Source # | |
Defined in Fadno.Notation | |
| Ord Articulation Source # | |
Defined in Fadno.Notation Methods compare :: Articulation -> Articulation -> Ordering (<) :: Articulation -> Articulation -> Bool (<=) :: Articulation -> Articulation -> Bool (>) :: Articulation -> Articulation -> Bool (>=) :: Articulation -> Articulation -> Bool max :: Articulation -> Articulation -> Articulation min :: Articulation -> Articulation -> Articulation | |
class HasArticulation a where Source #
Methods
articulation :: Lens' a (Maybe Articulation) Source #
Instances
| HasArticulation Articulation Source # | |
Defined in Fadno.Notation Methods articulation :: Lens' Articulation (Maybe Articulation) Source # | |
| HasArticulation (Noted n) Source # | |
Defined in Fadno.Notation Methods articulation :: Lens' (Noted n) (Maybe Articulation) Source # | |
newtype RehearsalMark Source #
Bar rehearsal mark.
Constructors
| RehearsalMark | |
Fields
| |
Instances
rehearsalText :: Iso' RehearsalMark String Source #
class HasRehearsalMark a where Source #
Methods
rehearsalMark :: Lens' a (Maybe RehearsalMark) Source #
Instances
| HasRehearsalMark RehearsalMark Source # | |
Defined in Fadno.Notation Methods rehearsalMark :: Lens' RehearsalMark (Maybe RehearsalMark) Source # | |
| HasRehearsalMark (Bar n) Source # | |
Defined in Fadno.Notation Methods rehearsalMark :: Lens' (Bar n) (Maybe RehearsalMark) Source # | |
Musical direction.
Constructors
| Direction | |
Fields
| |
Instances
| IsString Direction Source # | |
Defined in Fadno.Notation Methods fromString :: String -> Direction | |
| Monoid Direction Source # | |
| Semigroup Direction Source # | |
| Generic Direction Source # | |
| Show Direction Source # | |
| Default Direction Source # | |
Defined in Fadno.Notation | |
| HasDirection Direction Source # | |
| Eq Direction Source # | |
| Ord Direction Source # | |
Defined in Fadno.Notation | |
| type Rep Direction Source # | |
Defined in Fadno.Notation type Rep Direction = D1 ('MetaData "Direction" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'True) (C1 ('MetaCons "Direction" 'PrefixI 'True) (S1 ('MetaSel ('Just "_directionText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) | |
directionText :: Iso' Direction String Source #
class HasDirection a where Source #
Instances
Barline.
Instances
| Generic Barline Source # | |
| Show Barline Source # | |
| HasBarline Barline Source # | |
| Eq Barline Source # | |
| Ord Barline Source # | |
| type Rep Barline Source # | |
Defined in Fadno.Notation type Rep Barline = D1 ('MetaData "Barline" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'False) (C1 ('MetaCons "Double" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Final" 'PrefixI 'False) (U1 :: Type -> Type)) | |
class HasBarline a where Source #
Instances
| HasBarline Barline Source # | |
| HasBarline (Bar n) Source # | |
Instances
| Generic Repeats Source # | |
| Show Repeats Source # | |
| HasRepeats Repeats Source # | |
| Eq Repeats Source # | |
| Ord Repeats Source # | |
| type Rep Repeats Source # | |
Defined in Fadno.Notation type Rep Repeats = D1 ('MetaData "Repeats" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'False) (C1 ('MetaCons "RStart" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "REnd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RBoth" 'PrefixI 'False) (U1 :: Type -> Type))) | |
class HasRepeats a where Source #
Instances
| HasRepeats Repeats Source # | |
| HasRepeats (Bar n) Source # | |
Constructors
| TrebleClef | |
| BassClef | |
| AltoClef | |
| PercClef |
Instances
| Generic Clef Source # | |
| Show Clef Source # | |
| HasClef Clef Source # | |
| Eq Clef Source # | |
| Ord Clef Source # | |
| type Rep Clef Source # | |
Defined in Fadno.Notation type Rep Clef = D1 ('MetaData "Clef" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'False) ((C1 ('MetaCons "TrebleClef" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BassClef" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AltoClef" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PercClef" 'PrefixI 'False) (U1 :: Type -> Type))) | |
Adapts musicxml Beams where beams are labeled "1" for eighth beam etc, where instead it is a list implying the first element is eighth etc.
Constructors
| BeamBegin | |
| BeamContinue | |
| BeamEnd | |
| BeamForwardHook | |
| BeamBackwardHook |
Part identifier, prefers Num or IsString values.
Instances
| Foldable Part Source # | |
Defined in Fadno.Notation Methods fold :: Monoid m => Part m -> m foldMap :: Monoid m => (a -> m) -> Part a -> m foldMap' :: Monoid m => (a -> m) -> Part a -> m foldr :: (a -> b -> b) -> b -> Part a -> b foldr' :: (a -> b -> b) -> b -> Part a -> b foldl :: (b -> a -> b) -> b -> Part a -> b foldl' :: (b -> a -> b) -> b -> Part a -> b foldr1 :: (a -> a -> a) -> Part a -> a foldl1 :: (a -> a -> a) -> Part a -> a elem :: Eq a => a -> Part a -> Bool maximum :: Ord a => Part a -> a | |
| Traversable Part Source # | |
| Functor Part Source # | |
| IsString a => IsString (Part a) Source # | |
Defined in Fadno.Notation Methods fromString :: String -> Part a | |
| Bounded a => Bounded (Part a) Source # | |
Defined in Fadno.Notation | |
| Generic (Part a) Source # | |
| Num a => Num (Part a) Source # | |
| Real a => Real (Part a) Source # | |
Defined in Fadno.Notation Methods toRational :: Part a -> Rational | |
| Show a => Show (Part a) Source # | |
| Eq a => Eq (Part a) Source # | |
| Ord a => Ord (Part a) Source # | |
| type Rep (Part a) Source # | |
Defined in Fadno.Notation type Rep (Part a) = D1 ('MetaData "Part" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'True) (C1 ('MetaCons "Part" 'PrefixI 'True) (S1 ('MetaSel ('Just "_partIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) | |
mshow :: Show a => Getter s (Maybe a) -> String -> s -> String Source #
Lensy show of a Maybe field, given a Getter and its name.
Constructors
| Noted | |
Fields
| |
Instances
| Foldable Noted Source # | |
Defined in Fadno.Notation Methods fold :: Monoid m => Noted m -> m foldMap :: Monoid m => (a -> m) -> Noted a -> m foldMap' :: Monoid m => (a -> m) -> Noted a -> m foldr :: (a -> b -> b) -> b -> Noted a -> b foldr' :: (a -> b -> b) -> b -> Noted a -> b foldl :: (b -> a -> b) -> b -> Noted a -> b foldl' :: (b -> a -> b) -> b -> Noted a -> b foldr1 :: (a -> a -> a) -> Noted a -> a foldl1 :: (a -> a -> a) -> Noted a -> a elem :: Eq a => a -> Noted a -> Bool maximum :: Ord a => Noted a -> a | |
| Traversable Noted Source # | |
| Functor Noted Source # | |
| Generic (Noted n) Source # | |
| Show n => Show (Noted n) Source # | |
| HasArticulation (Noted n) Source # | |
Defined in Fadno.Notation Methods articulation :: Lens' (Noted n) (Maybe Articulation) Source # | |
| HasBeams (Noted n) Source # | |
| HasSlur (Noted n) Source # | |
| HasTie (Noted n) Source # | |
| HasVoice (Noted n) Source # | |
Defined in Fadno.Notation | |
| Eq n => Eq (Noted n) Source # | |
| HasNote (Note' p d) p d Source # | |
| type Rep (Noted n) Source # | |
Defined in Fadno.Notation type Rep (Noted n) = D1 ('MetaData "Noted" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'False) (C1 ('MetaCons "Noted" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_nNote") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n) :*: (S1 ('MetaSel ('Just "_nTie") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Tie)) :*: S1 ('MetaSel ('Just "_nSlur") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Slur)))) :*: (S1 ('MetaSel ('Just "_nArticulation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Articulation)) :*: (S1 ('MetaSel ('Just "_nBeams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Beam]) :*: S1 ('MetaSel ('Just "_nVoice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))))) | |
nArticulation :: forall n. Lens' (Noted n) (Maybe Articulation) Source #
Bar as list of notes, with notations.
Constructors
| Bar | |
Fields
| |
Instances
| Foldable Bar Source # | |
Defined in Fadno.Notation Methods fold :: Monoid m => Bar m -> m foldMap :: Monoid m => (a -> m) -> Bar a -> m foldMap' :: Monoid m => (a -> m) -> Bar a -> m foldr :: (a -> b -> b) -> b -> Bar a -> b foldr' :: (a -> b -> b) -> b -> Bar a -> b foldl :: (b -> a -> b) -> b -> Bar a -> b foldl' :: (b -> a -> b) -> b -> Bar a -> b foldr1 :: (a -> a -> a) -> Bar a -> a foldl1 :: (a -> a -> a) -> Bar a -> a elem :: Eq a => a -> Bar a -> Bool maximum :: Ord a => Bar a -> a | |
| Traversable Bar Source # | |
| Functor Bar Source # | |
| Monoid (Bar n) Source # | |
| Semigroup (Bar n) Source # | |
| Generic (Bar n) Source # | |
| Show n => Show (Bar n) Source # | |
| Default (Bar n) Source # | |
Defined in Fadno.Notation | |
| HasBarline (Bar n) Source # | |
| HasClef (Bar n) Source # | |
| HasDirection (Bar n) Source # | |
| HasRehearsalMark (Bar n) Source # | |
Defined in Fadno.Notation Methods rehearsalMark :: Lens' (Bar n) (Maybe RehearsalMark) Source # | |
| HasRepeats (Bar n) Source # | |
| HasTimeSignature (Bar n) Source # | |
Defined in Fadno.Notation Methods timeSignature :: Lens' (Bar n) (Maybe TimeSignature) Source # | |
| Eq n => Eq (Bar n) Source # | |
| Cons (Bar n) (Bar n) n n Source # | |
| Snoc (Bar n) (Bar n) n n Source # | |
| type Rep (Bar n) Source # | |
Defined in Fadno.Notation type Rep (Bar n) = D1 ('MetaData "Bar" "Fadno.Notation" "fadno-1.1.9.1-6k9IpCQmMqwBhBnZDrvdnw" 'False) (C1 ('MetaCons "Bar" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_bNotes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq n)) :*: (S1 ('MetaSel ('Just "_bRehearsalMark") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RehearsalMark)) :*: S1 ('MetaSel ('Just "_bDirection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Direction)))) :*: ((S1 ('MetaSel ('Just "_bBarline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Barline)) :*: S1 ('MetaSel ('Just "_bRepeats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Repeats))) :*: (S1 ('MetaSel ('Just "_bTimeSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TimeSignature)) :*: S1 ('MetaSel ('Just "_bClef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Clef)))))) | |
bTimeSignature :: forall n. Lens' (Bar n) (Maybe TimeSignature) Source #
bRehearsalMark :: forall n. Lens' (Bar n) (Maybe RehearsalMark) Source #
bDirection :: forall n. Lens' (Bar n) (Maybe Direction) Source #