Safe Haskell | Safe-Inferred |
---|
The Note
type and support.
Synopsis
- data Note = Note {
- patch :: !PatchName
- instrument :: !ScoreT.Instrument
- trackId :: !(Maybe Id.TrackId)
- element :: !Element
- start :: !RealTime
- duration :: !RealTime
- controls :: !(Map Control.Control Signal.Signal)
- attributes :: !Attrs.Attributes
- stack :: Stack.Stack
- type Element = Text
- type PatchName = Text
- end :: Note -> RealTime
- note :: PatchName -> ScoreT.Instrument -> RealTime -> RealTime -> Note
- testNote :: RealTime -> RealTime -> Note
- initialPitch :: Note -> Maybe Pitch.NoteNumber
- controlAt :: RealTime -> Control.Control -> Note -> Maybe Y
- initial :: Control.Control -> Note -> Maybe Y
- initial0 :: Control.Control -> Note -> Y
- withControl :: Control.Control -> Signal.Signal -> Note -> Note
- withPitch :: Pitch.NoteNumber -> Note -> Note
- serialize :: FilePath -> [Note] -> IO Bool
- unserialize :: FilePath -> IO (Either Serialize.UnserializeError [Note])
- notesMagic :: Serialize.Magic [Note]
- newtype Hash = Hash ByteString.ByteString
- hash :: Note -> Hash
- hashBytes :: ByteString.ByteString -> Hash
- encodeHash :: Hash -> String
- fingerprint :: ByteString.ByteString -> ByteString.ByteString
- fingerprintBytes :: ByteString.ByteString -> String
Documentation
IR for im. These are the inputs for im synthesizers.
Note | |
|
Instances
Show Note Source # | |
Eq Note Source # | |
Pretty.Pretty Note Source # | |
Pretty.Pretty ImPerformance Source # | |
Defined in Ui.UiConfig pretty :: ImPerformance -> Text Source # format :: ImPerformance -> Doc Source # formatList :: [ImPerformance] -> Doc Source # | |
Serialize.Serialize Note Source # | |
note :: PatchName -> ScoreT.Instrument -> RealTime -> RealTime -> Note Source #
Make a Note for testing.
initialPitch :: Note -> Maybe Pitch.NoteNumber Source #
withControl :: Control.Control -> Signal.Signal -> Note -> Note Source #
serialize
unserialize :: FilePath -> IO (Either Serialize.UnserializeError [Note]) Source #
notesMagic :: Serialize.Magic [Note] Source #
hash
The Hash is the MD5 digest of the note.
I used to use CRC32, but got a collision right away: > 2861715819 & 157939100 = 1544801946 > 1257719070 & 3909935593 = 1544801946
encodeHash :: Hash -> String Source #
Encode to a short string which I can stick in a filename.