Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Synth.Shared.Note

Description

The Note type and support.

Synopsis

Documentation

data Note Source #

High level representation of one note. This will be converted into one or more Samples.

Constructors

Note 

Fields

Instances

Instances details
Show Note # 
Instance details

Defined in Synth.Shared.Note

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Pretty.Pretty Note # 
Instance details

Defined in Synth.Shared.Note

Serialize.Serialize Note # 
Instance details

Defined in Synth.Shared.Note

type PatchName = Text Source #

Unique identifier for a patch.

type InstrumentName = Text Source #

This is a specific instantiation of a PatchName. This is the same as Instrument.

note :: PatchName -> InstrumentName -> RealTime -> RealTime -> Note Source #

Make a Note for testing.

serialize

hash

newtype Hash Source #

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

Instances

Instances details
Eq Hash # 
Instance details

Defined in Synth.Shared.Note

Methods

(==) :: Hash -> Hash -> Bool #

(/=) :: Hash -> Hash -> Bool #

Ord Hash # 
Instance details

Defined in Synth.Shared.Note

Methods

compare :: Hash -> Hash -> Ordering #

(<) :: Hash -> Hash -> Bool #

(<=) :: Hash -> Hash -> Bool #

(>) :: Hash -> Hash -> Bool #

(>=) :: Hash -> Hash -> Bool #

max :: Hash -> Hash -> Hash #

min :: Hash -> Hash -> Hash #

Show Hash # 
Instance details

Defined in Synth.Shared.Note

Methods

showsPrec :: Int -> Hash -> ShowS #

show :: Hash -> String #

showList :: [Hash] -> ShowS #

Semigroup Hash # 
Instance details

Defined in Synth.Shared.Note

Methods

(<>) :: Hash -> Hash -> Hash #

sconcat :: NonEmpty Hash -> Hash #

stimes :: Integral b => b -> Hash -> Hash #

Monoid Hash # 
Instance details

Defined in Synth.Shared.Note

Methods

mempty :: Hash #

mappend :: Hash -> Hash -> Hash #

mconcat :: [Hash] -> Hash #

Pretty.Pretty Hash # 
Instance details

Defined in Synth.Shared.Note

Serialize.Serialize Hash # 
Instance details

Defined in Synth.Shared.Note

encodeHash :: Hash -> String Source #

Encode to a short string which I can stick in a filename.