gdritter repos hypsibius / cee681c
Starting to flesh out types more Getty Ritter 7 years ago
1 changed file(s) with 19 addition(s) and 7 deletion(s). Collapse all Expand all
55 import Data.Text (Text)
66
77 data Instrument = Instrument
8 { instrSource :: Oscillator }
9 deriving (Eq, Show)
8 { _instrSource :: Oscillator
9 } deriving (Eq, Show)
1010
1111 newtype InstrRef = InstrRef { fromInstrRef :: Int }
1212 deriving (Eq, Show)
1717 deriving (Eq, Show)
1818
1919 data Note = Note
20 { noteCents :: Double
21 , noteAppearance :: Text
20 { _noteCents :: Double
21 , _noteAppearance :: Text
2222 } deriving (Eq, Show)
2323
2424 newtype NoteRef = NoteRef { fromNoteRef :: Int }
2525 deriving (Eq, Show)
2626
2727 data Scale = Scale
28 { scaleName :: Text
29 , scaleTotalCents :: Double
30 , scaleNotes :: Seq Note
28 { _scaleName :: Text
29 , _scaleTotalCents :: Double
30 , _scaleNotes :: Seq Note
3131 } deriving (Eq, Show)
32
33 data Event = Event
34 deriving (Eq, Show)
35
36 data Track = Track
37 {
38 } deriving (Eq, Show)
39
40 data Song = Song
41 { _songScale :: Scale
42 , _songTracks :: Seq Track
43 } deriving (Eq, Show)