Data.hs 858 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module Hypsibius.Data where
  2. import Data.Sequence (Seq)
  3. import qualified Data.Sequence as S
  4. import Data.Text (Text)
  5. data Instrument = Instrument
  6. { _instrSource :: Oscillator
  7. } deriving (Eq, Show)
  8. newtype InstrRef = InstrRef { fromInstrRef :: Int }
  9. deriving (Eq, Show)
  10. data Oscillator
  11. = OscSine
  12. | OscSquare
  13. deriving (Eq, Show)
  14. data Note = Note
  15. { _noteCents :: Double
  16. , _noteAppearance :: Text
  17. } deriving (Eq, Show)
  18. newtype NoteRef = NoteRef { fromNoteRef :: Int }
  19. deriving (Eq, Show)
  20. data Scale = Scale
  21. { _scaleName :: Text
  22. , _scaleTotalCents :: Double
  23. , _scaleNotes :: Seq Note
  24. } deriving (Eq, Show)
  25. data Event = Event
  26. deriving (Eq, Show)
  27. data Track = Track
  28. {
  29. } deriving (Eq, Show)
  30. data Song = Song
  31. { _songScale :: Scale
  32. , _songTracks :: Seq Track
  33. } deriving (Eq, Show)