Starting to flesh out types more
Getty Ritter
8 years ago
5 | 5 | import Data.Text (Text) |
6 | 6 | |
7 | 7 | data Instrument = Instrument |
8 | { instrSource :: Oscillator } | |
9 | deriving (Eq, Show) | |
8 | { _instrSource :: Oscillator | |
9 | } deriving (Eq, Show) | |
10 | 10 | |
11 | 11 | newtype InstrRef = InstrRef { fromInstrRef :: Int } |
12 | 12 | deriving (Eq, Show) |
17 | 17 | deriving (Eq, Show) |
18 | 18 | |
19 | 19 | data Note = Note |
20 | { noteCents :: Double | |
21 | , noteAppearance :: Text | |
20 | { _noteCents :: Double | |
21 | , _noteAppearance :: Text | |
22 | 22 | } deriving (Eq, Show) |
23 | 23 | |
24 | 24 | newtype NoteRef = NoteRef { fromNoteRef :: Int } |
25 | 25 | deriving (Eq, Show) |
26 | 26 | |
27 | 27 | data Scale = Scale |
28 | { scaleName :: Text | |
29 | , scaleTotalCents :: Double | |
30 |
|
|
28 | { _scaleName :: Text | |
29 | , _scaleTotalCents :: Double | |
30 | , _scaleNotes :: Seq Note | |
31 | 31 | } 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) |