module Language.Instrument ( Amplitude , BaseAmplitude , Instrument (..) , InstrumentEvent (..) ) where import Language.Chords (Chord) import Language.Notes (Note) import Synthesizer.Modifiers.Envelopes (Envelope (Envelope)) import Synthesizer.Structure (Frequency) type StartTime = Double type Duration = Double type AmplitudeMult = Double data InstrumentEvent = NoteEvent StartTime Duration AmplitudeMult Note | ChordEvent StartTime Duration AmplitudeMult Chord deriving (Int -> InstrumentEvent -> ShowS [InstrumentEvent] -> ShowS InstrumentEvent -> String (Int -> InstrumentEvent -> ShowS) -> (InstrumentEvent -> String) -> ([InstrumentEvent] -> ShowS) -> Show InstrumentEvent forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [InstrumentEvent] -> ShowS $cshowList :: [InstrumentEvent] -> ShowS show :: InstrumentEvent -> String $cshow :: InstrumentEvent -> String showsPrec :: Int -> InstrumentEvent -> ShowS $cshowsPrec :: Int -> InstrumentEvent -> ShowS Show) type BaseFrequency = Frequency type Amplitude = Double type BaseAmplitude = Amplitude type NoteStrike = Envelope data Instrument = Instrument BaseFrequency BaseAmplitude NoteStrike [InstrumentEvent] deriving (Int -> Instrument -> ShowS [Instrument] -> ShowS Instrument -> String (Int -> Instrument -> ShowS) -> (Instrument -> String) -> ([Instrument] -> ShowS) -> Show Instrument forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [Instrument] -> ShowS $cshowList :: [Instrument] -> ShowS show :: Instrument -> String $cshow :: Instrument -> String showsPrec :: Int -> Instrument -> ShowS $cshowsPrec :: Int -> Instrument -> ShowS Show)