Browse Source

Starting to flesh out types more

Getty Ritter 7 years ago
parent
commit
cee681c7d7
1 changed files with 19 additions and 7 deletions
  1. 19 7
      src/Hypsibius/Data.hs

+ 19 - 7
src/Hypsibius/Data.hs

@@ -5,8 +5,8 @@ import qualified Data.Sequence as S
 import           Data.Text (Text)
 
 data Instrument = Instrument
-  { instrSource :: Oscillator }
-  deriving (Eq, Show)
+  { _instrSource :: Oscillator
+  } deriving (Eq, Show)
 
 newtype InstrRef = InstrRef { fromInstrRef :: Int }
   deriving (Eq, Show)
@@ -17,15 +17,27 @@ data Oscillator
     deriving (Eq, Show)
 
 data Note = Note
-  { noteCents      :: Double
-  , noteAppearance :: Text
+  { _noteCents      :: Double
+  , _noteAppearance :: Text
   } deriving (Eq, Show)
 
 newtype NoteRef = NoteRef { fromNoteRef :: Int }
   deriving (Eq, Show)
 
 data Scale = Scale
-  { scaleName       :: Text
-  , scaleTotalCents :: Double
-  , scaleNotes      :: Seq Note
+  { _scaleName       :: Text
+  , _scaleTotalCents :: Double
+  , _scaleNotes      :: Seq Note
+  } deriving (Eq, Show)
+
+data Event = Event
+  deriving (Eq, Show)
+
+data Track = Track
+  {
+  } deriving (Eq, Show)
+
+data Song = Song
+  { _songScale  :: Scale
+  , _songTracks :: Seq Track
   } deriving (Eq, Show)