| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Kulitta.EuterpeaSpecial
Synopsis
- (<<<) :: Category cat => cat b c -> cat a b -> cat a c
- class Arrow a => ArrowLoop (a :: * -> * -> *) where
- newtype ArrowMonad (a :: * -> * -> *) b = ArrowMonad (a () b)
- class Arrow a => ArrowApply (a :: * -> * -> *) where
- class ArrowZero a => ArrowPlus (a :: * -> * -> *) where
- class Arrow a => ArrowZero (a :: * -> * -> *) where
- class Category a => Arrow (a :: * -> * -> *) where
- returnA :: Arrow a => a b b
- (^>>) :: Arrow a => (b -> c) -> a c d -> a b d
- (>>^) :: Arrow a => a b c -> (c -> d) -> a b d
- (<<^) :: Arrow a => a c d -> (b -> c) -> a b d
- (^<<) :: Arrow a => (c -> d) -> a b c -> a b d
- leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d)
- class Arrow a => ArrowChoice (a :: * -> * -> *) where
- newtype Kleisli (m :: * -> *) a b = Kleisli {
- runKleisli :: a -> m b
- (>>>) :: Category cat => cat a b -> cat b c -> cat a c
- writeWavNorm :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap (Signal p () a1) -> Music a2 -> IO ()
- writeWav :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap (Signal p () a1) -> Music a2 -> IO ()
- countTime :: Clock p => Int -> Signal p () (SEvent ()) -> Signal p () (SEvent ())
- seconds :: Clock p => Signal p () (SEvent ())
- milliseconds :: Clock p => Signal p () (SEvent ())
- samples :: Clock p => Signal p () (SEvent ())
- tableBessel :: Int -> Double -> Table
- tableBesselN :: TableSize -> Double -> Table
- tableSines :: Int -> [Double] -> Table
- tableSinesN :: TableSize -> [PartialStrength] -> Table
- tableSines3 :: Int -> [(PartialNum, PartialStrength, PhaseOffset)] -> Table
- tableSines3N :: TableSize -> [(PartialNum, PartialStrength, PhaseOffset)] -> Table
- tableLinear :: Int -> StartPt -> [(SegLength, EndPt)] -> Table
- tableLinearN :: TableSize -> StartPt -> [(SegLength, EndPt)] -> Table
- tableExpon :: Int -> StartPt -> [(SegLength, EndPt)] -> Table
- tableExponN :: TableSize -> StartPt -> [(SegLength, EndPt)] -> Table
- envCSEnvlpx :: Clock p => Double -> Double -> Double -> Table -> Double -> Double -> Signal p () Double
- envASR :: Clock p => Double -> Double -> Double -> Signal p () Double
- envExponSeg :: Clock p => [Double] -> [Double] -> Signal p () Double
- envLineSeg :: Clock p => [Double] -> [Double] -> Signal p () Double
- envExpon :: Clock p => Double -> Double -> Double -> Signal p () Double
- envLine :: Clock p => Double -> Double -> Double -> Signal p () Double
- filterHighPass :: Clock p => Signal p (Double, Double) Double
- filterLowPass :: Clock p => Signal p (Double, Double) Double
- filterComb :: Clock p => Double -> Signal p (Double, Double) Double
- filterBandStopBW :: Clock p => Signal p (Double, Double, Double) Double
- filterBandPassBW :: Clock p => Signal p (Double, Double, Double) Double
- filterHighPassBW :: Clock p => Signal p (Double, Double) Double
- filterLowPassBW :: Clock p => Signal p (Double, Double) Double
- filterBandStop :: Clock p => Int -> Signal p (Double, Double, Double) Double
- filterBandPass :: Clock p => Int -> Signal p (Double, Double, Double) Double
- balance :: Clock p => Int -> Signal p (Double, Double) Double
- noiseBLH :: Clock p => Int -> Signal p Double Double
- noiseBLI :: Clock p => Int -> Signal p Double Double
- noiseWhite :: Int -> Signal p () Double
- delayLine1 :: Clock p => Double -> Signal p (Double, Double) Double
- delayLine :: Clock p => Double -> Signal p Double Double
- delayLineT :: Clock p => Int -> Table -> Signal p Double Double
- pluck :: Clock p => Table -> Double -> PluckDecayMethod -> Signal p Double Double
- oscPartials :: Clock p => Table -> Double -> Signal p (Double, Int) Double
- oscDurI :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p () Double
- oscDur :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p () Double
- oscFixed :: (Clock p, ArrowCircuit a) => Double -> ArrowP a p () Double
- oscI :: (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
- osc :: (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
- data Table
- data PluckDecayMethod
- renderSF :: (Clock p, ToMusic1 a, AudioSample b) => Music a -> InstrMap (Signal p () b) -> (Double, Signal p () b)
- type Instr a = Dur -> AbsPitch -> Volume -> [Double] -> a
- type InstrMap a = [(InstrumentName, Instr a)]
- pchToHz :: Floating a => Pitch -> a
- apToHz :: Floating a => AbsPitch -> a
- upsample :: (ArrowChoice a, ArrowCircuit a, Clock p1, Clock p2, AudioSample c) => ArrowP a p1 b c -> ArrowP a p2 b c
- countUp :: ArrowCircuit a => a () Int
- countDown :: ArrowCircuit a => Int -> a () Int
- integral :: (ArrowCircuit a, Clock p) => ArrowP a p Double Double
- outA :: Arrow a => a b b
- fromMidi :: Midi -> Music1
- predefinedCP :: ChannelMap -> ChannelMapFun
- dynamicCP :: NumChannels -> PercChan -> ChannelMapFun
- linearCP :: NumChannels -> PercChan -> ChannelMapFun
- musicToMsgs' :: ToMusic1 a => PlayParams -> Music a -> [(Time, MidiMessage)]
- playM' :: Maybe OutputDeviceID -> Midi -> IO ()
- devices :: IO ()
- playC :: (ToMusic1 a, NFData a) => PlayParams -> Music a -> IO ()
- playDevS :: (ToMusic1 a, NFData a) => Int -> Music a -> IO ()
- playDev :: (ToMusic1 a, NFData a) => Int -> Music a -> IO ()
- playS :: (ToMusic1 a, NFData a) => Music a -> IO ()
- play :: (ToMusic1 a, NFData a) => Music a -> IO ()
- defParams :: PlayParams
- data PlayParams = PlayParams {
- strict :: Bool
- chanPolicy :: ChannelMapFun
- devID :: Maybe OutputDeviceID
- closeDelay :: Time
- perfAlg :: Music1 -> [MEvent]
- type ChannelMap = [(InstrumentName, Channel)]
- type ChannelMapFun = InstrumentName -> ChannelMap -> (Channel, ChannelMap)
- writeMidi :: ToMusic1 a => FilePath -> Music a -> IO ()
- defUpm :: UserPatchMap
- insertMEvent :: MidiEvent -> [MidiEvent] -> [MidiEvent]
- toDelta :: (RealFrac a, Integral b) => a -> b
- mkMEvents :: Channel -> MEvent -> (MidiEvent, MidiEvent)
- mevsToMessages :: UserPatchMap -> (InstrumentName, [MEvent]) -> [MidiEvent]
- defST :: Tempo
- splitByInst :: [MEvent] -> [(InstrumentName, [MEvent])]
- lookupB :: UserPatchMap -> InstrumentName -> Bool
- allValid :: UserPatchMap -> [InstrumentName] -> Bool
- division :: Int
- toMidiUPM :: UserPatchMap -> [MEvent] -> Midi
- toMidi :: [MEvent] -> Midi
- upmLookup :: UserPatchMap -> InstrumentName -> (Channel, ProgNum)
- makeGMMap :: [InstrumentName] -> UserPatchMap
- type ProgNum = Int
- type UserPatchMap = [(InstrumentName, Channel)]
- type MidiEvent = (Ticks, Message)
- toGM :: InstrumentName -> Int
- fromGM :: Int -> InstrumentName
- phraseToMEvents :: MContext -> [PhraseAttribute] -> Music1 -> (Performance, DurT)
- noteToMEvent :: MContext -> Dur -> (Pitch, [NoteAttribute]) -> MEvent
- musicToMEvents :: MContext -> Music1 -> (Performance, DurT)
- applyControls :: Music1 -> Music1
- perform1Dur :: Music1 -> (Performance, DurT)
- perform1 :: Music1 -> Performance
- perform :: ToMusic1 a => Music a -> Performance
- merge :: Performance -> Performance -> Performance
- data MEvent = MEvent {}
- type Performance = [MEvent]
- type PTime = Rational
- type DurT = Rational
- data MContext = MContext {}
- removeInstruments :: Music a -> Music a
- changeInstrument :: InstrumentName -> Music a -> Music a
- scaleDurations :: Rational -> Music a -> Music a
- shiftPitches1 :: AbsPitch -> Music (Pitch, b) -> Music (Pitch, b)
- shiftPitches :: AbsPitch -> Music Pitch -> Music Pitch
- mFold :: (Primitive a -> b) -> (b -> b -> b) -> (b -> b -> b) -> (Control -> b -> b) -> Music a -> b
- mMap :: (a -> b) -> Music a -> Music b
- pMap :: (a -> b) -> Primitive a -> Primitive b
- perc :: PercussionSound -> Dur -> Music Pitch
- (/=:) :: Music a -> Music a -> Music a
- cutL :: LazyDur -> Music a -> Music a
- minL :: LazyDur -> Dur -> Dur
- mergeLD :: LazyDur -> LazyDur -> LazyDur
- durL :: Music a -> LazyDur
- removeZeros :: Music a -> Music a
- remove :: Dur -> Music a -> Music a
- cut :: Dur -> Music a -> Music a
- invertRetro :: Music Pitch -> Music Pitch
- retroInvert :: Music Pitch -> Music Pitch
- retro :: Music a -> Music a
- invert1 :: Music (Pitch, a) -> Music (Pitch, a)
- invert :: Music Pitch -> Music Pitch
- invertAt1 :: Pitch -> Music (Pitch, a) -> Music (Pitch, a)
- invertAt :: Pitch -> Music Pitch -> Music Pitch
- lineToList :: Music a -> [Music a]
- forever :: Music a -> Music a
- times :: Int -> Music a -> Music a
- offset :: Dur -> Music a -> Music a
- chord1 :: [Music a] -> Music a
- line1 :: [Music a] -> Music a
- chord :: [Music a] -> Music a
- line :: [Music a] -> Music a
- trans :: Int -> Pitch -> Pitch
- pitch :: AbsPitch -> Pitch
- pcToInt :: PitchClass -> Int
- absPitch :: Pitch -> AbsPitch
- ddenr :: Music Pitch
- dden :: Dur
- ddqnr :: Music Pitch
- ddqn :: Dur
- ddhnr :: Music Pitch
- ddhn :: Dur
- dtnr :: Music Pitch
- dtn :: Dur
- dsnr :: Music Pitch
- dsn :: Dur
- denr :: Music Pitch
- den :: Dur
- dqnr :: Music Pitch
- dqn :: Dur
- dhnr :: Music Pitch
- dhn :: Dur
- dwnr :: Music Pitch
- dwn :: Dur
- sfnr :: Music Pitch
- sfn :: Dur
- tnr :: Music Pitch
- snr :: Music Pitch
- enr :: Music Pitch
- qnr :: Music Pitch
- hnr :: Music Pitch
- wnr :: Music Pitch
- bnr :: Music Pitch
- bn :: Dur
- bss :: Octave -> Dur -> Music Pitch
- bs :: Octave -> Dur -> Music Pitch
- b :: Octave -> Dur -> Music Pitch
- bf :: Octave -> Dur -> Music Pitch
- bff :: Octave -> Dur -> Music Pitch
- ass :: Octave -> Dur -> Music Pitch
- as :: Octave -> Dur -> Music Pitch
- a :: Octave -> Dur -> Music Pitch
- af :: Octave -> Dur -> Music Pitch
- aff :: Octave -> Dur -> Music Pitch
- gss :: Octave -> Dur -> Music Pitch
- gs :: Octave -> Dur -> Music Pitch
- g :: Octave -> Dur -> Music Pitch
- gf :: Octave -> Dur -> Music Pitch
- gff :: Octave -> Dur -> Music Pitch
- fss :: Octave -> Dur -> Music Pitch
- fs :: Octave -> Dur -> Music Pitch
- f :: Octave -> Dur -> Music Pitch
- ff :: Octave -> Dur -> Music Pitch
- fff :: Octave -> Dur -> Music Pitch
- ess :: Octave -> Dur -> Music Pitch
- es :: Octave -> Dur -> Music Pitch
- e :: Octave -> Dur -> Music Pitch
- ef :: Octave -> Dur -> Music Pitch
- eff :: Octave -> Dur -> Music Pitch
- dss :: Octave -> Dur -> Music Pitch
- ds :: Octave -> Dur -> Music Pitch
- d :: Octave -> Dur -> Music Pitch
- df :: Octave -> Dur -> Music Pitch
- dff :: Octave -> Dur -> Music Pitch
- css :: Octave -> Dur -> Music Pitch
- cs :: Octave -> Dur -> Music Pitch
- c :: Octave -> Dur -> Music Pitch
- cf :: Octave -> Dur -> Music Pitch
- cff :: Octave -> Dur -> Music Pitch
- keysig :: PitchClass -> Mode -> Music a -> Music a
- phrase :: [PhraseAttribute] -> Music a -> Music a
- instrument :: InstrumentName -> Music a -> Music a
- transpose :: AbsPitch -> Music a -> Music a
- tempo :: Dur -> Music a -> Music a
- rest :: Dur -> Music a
- note :: Dur -> a -> Music a
- addVolume :: Volume -> Music Pitch -> Music (Pitch, Volume)
- type Octave = Int
- type Pitch = (PitchClass, Octave)
- data PitchClass
- data Primitive a
- data Music a
- data Control
- pattern Aeolian :: Mode
- pattern CustomMode :: String -> Mode
- data InstrumentName
- = AcousticGrandPiano
- | BrightAcousticPiano
- | ElectricGrandPiano
- | HonkyTonkPiano
- | RhodesPiano
- | ChorusedPiano
- | Harpsichord
- | Clavinet
- | Celesta
- | Glockenspiel
- | MusicBox
- | Vibraphone
- | Marimba
- | Xylophone
- | TubularBells
- | Dulcimer
- | HammondOrgan
- | PercussiveOrgan
- | RockOrgan
- | ChurchOrgan
- | ReedOrgan
- | Accordion
- | Harmonica
- | TangoAccordion
- | AcousticGuitarNylon
- | AcousticGuitarSteel
- | ElectricGuitarJazz
- | ElectricGuitarClean
- | ElectricGuitarMuted
- | OverdrivenGuitar
- | DistortionGuitar
- | GuitarHarmonics
- | AcousticBass
- | ElectricBassFingered
- | ElectricBassPicked
- | FretlessBass
- | SlapBass1
- | SlapBass2
- | SynthBass1
- | SynthBass2
- | Violin
- | Viola
- | Cello
- | Contrabass
- | TremoloStrings
- | PizzicatoStrings
- | OrchestralHarp
- | Timpani
- | StringEnsemble1
- | StringEnsemble2
- | SynthStrings1
- | SynthStrings2
- | ChoirAahs
- | VoiceOohs
- | SynthVoice
- | OrchestraHit
- | Trumpet
- | Trombone
- | Tuba
- | MutedTrumpet
- | FrenchHorn
- | BrassSection
- | SynthBrass1
- | SynthBrass2
- | SopranoSax
- | AltoSax
- | TenorSax
- | BaritoneSax
- | Oboe
- | Bassoon
- | EnglishHorn
- | Clarinet
- | Piccolo
- | Flute
- | Recorder
- | PanFlute
- | BlownBottle
- | Shakuhachi
- | Whistle
- | Ocarina
- | Lead1Square
- | Lead2Sawtooth
- | Lead3Calliope
- | Lead4Chiff
- | Lead5Charang
- | Lead6Voice
- | Lead7Fifths
- | Lead8BassLead
- | Pad1NewAge
- | Pad2Warm
- | Pad3Polysynth
- | Pad4Choir
- | Pad5Bowed
- | Pad6Metallic
- | Pad7Halo
- | Pad8Sweep
- | FX1Train
- | FX2Soundtrack
- | FX3Crystal
- | FX4Atmosphere
- | FX5Brightness
- | FX6Goblins
- | FX7Echoes
- | FX8SciFi
- | Sitar
- | Banjo
- | Shamisen
- | Koto
- | Kalimba
- | Bagpipe
- | Fiddle
- | Shanai
- | TinkleBell
- | Agogo
- | SteelDrums
- | Woodblock
- | TaikoDrum
- | MelodicDrum
- | SynthDrum
- | ReverseCymbal
- | GuitarFretNoise
- | BreathNoise
- | Seashore
- | BirdTweet
- | TelephoneRing
- | Helicopter
- | Applause
- | Gunshot
- | Percussion
- | CustomInstrument String
- data PhraseAttribute
- data Dynamic
- data StdLoudness
- data Tempo
- data Articulation
- data Ornament
- data NoteHead
- type Volume = Int
- data NoteAttribute
- type Note1 = (Pitch, [NoteAttribute])
- type Music1 = Music Note1
- class ToMusic1 a where
- type LazyDur = [Dur]
- data PercussionSound
- = AcousticBassDrum
- | BassDrum1
- | SideStick
- | AcousticSnare
- | HandClap
- | ElectricSnare
- | LowFloorTom
- | ClosedHiHat
- | HighFloorTom
- | PedalHiHat
- | LowTom
- | OpenHiHat
- | LowMidTom
- | HiMidTom
- | CrashCymbal1
- | HighTom
- | RideCymbal1
- | ChineseCymbal
- | RideBell
- | Tambourine
- | SplashCymbal
- | Cowbell
- | CrashCymbal2
- | Vibraslap
- | RideCymbal2
- | HiBongo
- | LowBongo
- | MuteHiConga
- | OpenHiConga
- | LowConga
- | HighTimbale
- | LowTimbale
- | HighAgogo
- | LowAgogo
- | Cabasa
- | Maracas
- | ShortWhistle
- | LongWhistle
- | ShortGuiro
- | LongGuiro
- | Claves
- | HiWoodBlock
- | LowWoodBlock
- | MuteCuica
- | OpenCuica
- | MuteTriangle
- | OpenTriangle
- playMidi :: OutputDeviceID -> Midi -> IO ()
- defaultInput :: (InputDeviceID -> a -> IO b) -> a -> IO b
- defaultOutput :: (OutputDeviceID -> a -> IO b) -> a -> IO b
- data MidiMessage
- data InputDeviceID
- data OutputDeviceID
- exportMidiFile :: FilePath -> Midi -> IO ()
- maxSample :: (AudioSample a, Clock p) => Double -> Signal p () a -> Double
- outFileNorm :: (AudioSample a, Clock p) => String -> Double -> Signal p () a -> IO ()
- outFile :: (AudioSample a, Clock p) => String -> Double -> Signal p () a -> IO ()
- class Clock p where
- data AudRate
- data CtrRate
- type AudSF a b = SigFun AudRate a b
- type CtrSF a b = SigFun CtrRate a b
- type Signal clk a b = ArrowP SF clk a b
- type SigFun clk a b = ArrowP SF clk a b
- class AudioSample a where
- type Mono p = Signal p () Double
- type Stereo p = Signal p () (Double, Double)
- data DeviceInfo = DeviceInfo {}
- data Message
- = NoteOff !Channel !Key !Velocity
- | NoteOn !Channel !Key !Velocity
- | KeyPressure !Channel !Key !Pressure
- | ControlChange {
- channel :: !Channel
- controllerNumber :: !Int
- controllerValue :: !Int
- | ProgramChange { }
- | ChannelPressure { }
- | PitchWheel {
- channel :: !Channel
- pitchWheel :: !PitchWheel
- | SequenceNumber !Int
- | Text !String
- | Copyright !String
- | TrackName !String
- | InstrumentName !String
- | Lyrics !String
- | Marker !String
- | CuePoint !String
- | ChannelPrefix !Channel
- | ProgramName !String
- | DeviceName !String
- | TrackEnd
- | TempoChange !Tempo
- | SMPTEOffset !Int !Int !Int !Int !Int
- | TimeSignature !Int !Int !Int !Int
- | KeySignature !Int !Int
- | Reserved !Int !ByteString
- | Sysex !Int !ByteString
- importFile :: FilePath -> IO (Either String Midi)
- exportFile :: FilePath -> Midi -> IO ()
Documentation
class Arrow a => ArrowLoop (a :: * -> * -> *) where #
The loop operator expresses computations in which an output value
is fed back as input, although the computation occurs only once.
It underlies the rec value recursion construct in arrow notation.
loop should satisfy the following laws:
- extension
loop(arrf) =arr(\ b ->fst(fix(\ (c,d) -> f (b,d))))- left tightening
loop(firsth >>> f) = h >>>loopf- right tightening
loop(f >>>firsth) =loopf >>> h- sliding
loop(f >>>arr(id*** k)) =loop(arr(id*** k) >>> f)- vanishing
loop(loopf) =loop(arrunassoc >>> f >>>arrassoc)- superposing
second(loopf) =loop(arrassoc >>>secondf >>>arrunassoc)
where
assoc ((a,b),c) = (a,(b,c)) unassoc (a,(b,c)) = ((a,b),c)
Minimal complete definition
Instances
| MonadFix m => ArrowLoop (Kleisli m) | Beware that for many monads (those for which the Since: base-2.1 |
Defined in Control.Arrow | |
| ArrowLoop ((->) :: * -> * -> *) | Since: base-2.1 |
Defined in Control.Arrow | |
| ArrowLoop a => ArrowLoop (ArrowP a p) | |
Defined in Control.Arrow.ArrowP | |
newtype ArrowMonad (a :: * -> * -> *) b #
The ArrowApply class is equivalent to Monad: any monad gives rise
to a Kleisli arrow, and any instance of ArrowApply defines a monad.
Constructors
| ArrowMonad (a () b) |
Instances
class Arrow a => ArrowApply (a :: * -> * -> *) where #
Some arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws:
first(arr(\x ->arr(\y -> (x,y)))) >>>app=idfirst(arr(g >>>)) >>>app=secondg >>>appfirst(arr(>>> h)) >>>app=app>>> h
Such arrows are equivalent to monads (see ArrowMonad).
Minimal complete definition
Instances
| Monad m => ArrowApply (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| ArrowApply ((->) :: * -> * -> *) | Since: base-2.1 |
Defined in Control.Arrow | |
class ArrowZero a => ArrowPlus (a :: * -> * -> *) where #
A monoid on arrows.
Minimal complete definition
class Category a => Arrow (a :: * -> * -> *) where #
The basic arrow class.
Instances should satisfy the following laws:
arrid =idarr(f >>> g) =arrf >>>arrgfirst(arrf) =arr(firstf)first(f >>> g) =firstf >>>firstgfirstf >>>arrfst=arrfst>>> ffirstf >>>arr(id*** g) =arr(id*** g) >>>firstffirst(firstf) >>>arrassoc=arrassoc>>>firstf
where
assoc ((a,b),c) = (a,(b,c))
The other combinators have sensible default definitions, which may be overridden for efficiency.
Methods
Lift a function to an arrow.
first :: a b c -> a (b, d) (c, d) #
Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.
second :: a b c -> a (d, b) (d, c) #
A mirror image of first.
The default definition may be overridden with a more efficient version if desired.
(***) :: a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #
Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.
The default definition may be overridden with a more efficient version if desired.
(&&&) :: a b c -> a b c' -> a b (c, c') infixr 3 #
Fanout: send the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired.
(<<^) :: Arrow a => a c d -> (b -> c) -> a b d infixr 1 #
Precomposition with a pure function (right-to-left variant).
(^<<) :: Arrow a => (c -> d) -> a b c -> a b d infixr 1 #
Postcomposition with a pure function (right-to-left variant).
leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d) #
Any instance of ArrowApply can be made into an instance of
ArrowChoice by defining left = leftApp.
class Arrow a => ArrowChoice (a :: * -> * -> *) where #
Choice, for arrows that support it. This class underlies the
if and case constructs in arrow notation.
Instances should satisfy the following laws:
left(arrf) =arr(leftf)left(f >>> g) =leftf >>>leftgf >>>
arrLeft=arrLeft>>>leftfleftf >>>arr(id+++ g) =arr(id+++ g) >>>leftfleft(leftf) >>>arrassocsum=arrassocsum>>>leftf
where
assocsum (Left (Left x)) = Left x assocsum (Left (Right y)) = Right (Left y) assocsum (Right z) = Right (Right z)
The other combinators have sensible default definitions, which may be overridden for efficiency.
Methods
left :: a b c -> a (Either b d) (Either c d) #
Feed marked inputs through the argument arrow, passing the rest through unchanged to the output.
right :: a b c -> a (Either d b) (Either d c) #
A mirror image of left.
The default definition may be overridden with a more efficient version if desired.
(+++) :: a b c -> a b' c' -> a (Either b b') (Either c c') infixr 2 #
Split the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.
The default definition may be overridden with a more efficient version if desired.
(|||) :: a b d -> a c d -> a (Either b c) d infixr 2 #
Fanin: Split the input between the two argument arrows and merge their outputs.
The default definition may be overridden with a more efficient version if desired.
Instances
| Monad m => ArrowChoice (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| ArrowChoice ((->) :: * -> * -> *) | Since: base-2.1 |
| ArrowChoice a => ArrowChoice (ArrowP a p) | |
Defined in Control.Arrow.ArrowP | |
newtype Kleisli (m :: * -> *) a b #
Kleisli arrows of a monad.
Constructors
| Kleisli | |
Fields
| |
Instances
| MonadFix m => ArrowLoop (Kleisli m) | Beware that for many monads (those for which the Since: base-2.1 |
Defined in Control.Arrow | |
| Monad m => ArrowApply (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| MonadPlus m => ArrowPlus (Kleisli m) | Since: base-2.1 |
| MonadPlus m => ArrowZero (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| Monad m => Arrow (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| Monad m => ArrowChoice (Kleisli m) | Since: base-2.1 |
Defined in Control.Arrow | |
| Monad m => Category (Kleisli m :: * -> * -> *) | Since: base-3.0 |
writeWavNorm :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap (Signal p () a1) -> Music a2 -> IO () #
writeWav :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap (Signal p () a1) -> Music a2 -> IO () #
milliseconds :: Clock p => Signal p () (SEvent ()) #
tableBessel :: Int -> Double -> Table #
tableBesselN :: TableSize -> Double -> Table #
tableSines :: Int -> [Double] -> Table #
tableSinesN :: TableSize -> [PartialStrength] -> Table #
tableSines3 :: Int -> [(PartialNum, PartialStrength, PhaseOffset)] -> Table #
tableSines3N :: TableSize -> [(PartialNum, PartialStrength, PhaseOffset)] -> Table #
tableLinear :: Int -> StartPt -> [(SegLength, EndPt)] -> Table #
tableLinearN :: TableSize -> StartPt -> [(SegLength, EndPt)] -> Table #
tableExpon :: Int -> StartPt -> [(SegLength, EndPt)] -> Table #
tableExponN :: TableSize -> StartPt -> [(SegLength, EndPt)] -> Table #
envCSEnvlpx :: Clock p => Double -> Double -> Double -> Table -> Double -> Double -> Signal p () Double #
noiseWhite :: Int -> Signal p () Double #
oscDurI :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p () Double #
oscDur :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p () Double #
data PluckDecayMethod #
type InstrMap a = [(InstrumentName, Instr a)] #
upsample :: (ArrowChoice a, ArrowCircuit a, Clock p1, Clock p2, AudioSample c) => ArrowP a p1 b c -> ArrowP a p2 b c #
countUp :: ArrowCircuit a => a () Int #
countDown :: ArrowCircuit a => Int -> a () Int #
predefinedCP :: ChannelMap -> ChannelMapFun #
dynamicCP :: NumChannels -> PercChan -> ChannelMapFun #
linearCP :: NumChannels -> PercChan -> ChannelMapFun #
musicToMsgs' :: ToMusic1 a => PlayParams -> Music a -> [(Time, MidiMessage)] #
defParams :: PlayParams #
data PlayParams #
Constructors
| PlayParams | |
Fields
| |
type ChannelMap = [(InstrumentName, Channel)] #
type ChannelMapFun = InstrumentName -> ChannelMap -> (Channel, ChannelMap) #
defUpm :: UserPatchMap #
insertMEvent :: MidiEvent -> [MidiEvent] -> [MidiEvent] #
mevsToMessages :: UserPatchMap -> (InstrumentName, [MEvent]) -> [MidiEvent] #
splitByInst :: [MEvent] -> [(InstrumentName, [MEvent])] #
lookupB :: UserPatchMap -> InstrumentName -> Bool #
allValid :: UserPatchMap -> [InstrumentName] -> Bool #
toMidiUPM :: UserPatchMap -> [MEvent] -> Midi #
upmLookup :: UserPatchMap -> InstrumentName -> (Channel, ProgNum) #
makeGMMap :: [InstrumentName] -> UserPatchMap #
type UserPatchMap = [(InstrumentName, Channel)] #
toGM :: InstrumentName -> Int #
fromGM :: Int -> InstrumentName #
phraseToMEvents :: MContext -> [PhraseAttribute] -> Music1 -> (Performance, DurT) #
noteToMEvent :: MContext -> Dur -> (Pitch, [NoteAttribute]) -> MEvent #
musicToMEvents :: MContext -> Music1 -> (Performance, DurT) #
applyControls :: Music1 -> Music1 #
perform1Dur :: Music1 -> (Performance, DurT) #
perform1 :: Music1 -> Performance #
perform :: ToMusic1 a => Music a -> Performance #
merge :: Performance -> Performance -> Performance #
type Performance = [MEvent] #
removeInstruments :: Music a -> Music a #
changeInstrument :: InstrumentName -> Music a -> Music a #
scaleDurations :: Rational -> Music a -> Music a #
mFold :: (Primitive a -> b) -> (b -> b -> b) -> (b -> b -> b) -> (Control -> b -> b) -> Music a -> b #
removeZeros :: Music a -> Music a #
lineToList :: Music a -> [Music a] #
pcToInt :: PitchClass -> Int #
phrase :: [PhraseAttribute] -> Music a -> Music a #
instrument :: InstrumentName -> Music a -> Music a #
type Pitch = (PitchClass, Octave) #
data PitchClass #
Constructors
| Cff | |
| Cf | |
| Dff | |
| Cs | |
| Df | |
| Css | |
| Eff | |
| Ds | |
| Ef | |
| Fff | |
| Dss | |
| E | |
| Ff | |
| Es | |
| F | |
| Gff | |
| Ess | |
| Fs | |
| Gf | |
| Fss | |
| G | |
| Aff | |
| Gs | |
| Af | |
| Gss | |
| A | |
| Bff | |
| As | |
| Bf | |
| Ass | |
| B | |
| Bs | |
| Bss |
Instances
Instances
| Functor Primitive | |
| Eq a => Eq (Primitive a) | |
| Ord a => Ord (Primitive a) | |
Defined in Euterpea.Music | |
| Show a => Show (Primitive a) | |
Constructors
| Prim (Primitive a) | |
| (Music a) :+: (Music a) infixr 5 | |
| (Music a) :=: (Music a) infixr 5 | |
| Modify Control (Music a) |
Constructors
| Tempo Rational | |
| Transpose AbsPitch | |
| Instrument InstrumentName | |
| KeySig PitchClass Mode | |
| Custom String |
pattern CustomMode :: String -> Mode #
data InstrumentName #
Constructors
Instances
| Eq InstrumentName | |
Defined in Euterpea.Music Methods (==) :: InstrumentName -> InstrumentName -> Bool # (/=) :: InstrumentName -> InstrumentName -> Bool # | |
| Ord InstrumentName | |
Defined in Euterpea.Music Methods compare :: InstrumentName -> InstrumentName -> Ordering # (<) :: InstrumentName -> InstrumentName -> Bool # (<=) :: InstrumentName -> InstrumentName -> Bool # (>) :: InstrumentName -> InstrumentName -> Bool # (>=) :: InstrumentName -> InstrumentName -> Bool # max :: InstrumentName -> InstrumentName -> InstrumentName # min :: InstrumentName -> InstrumentName -> InstrumentName # | |
| Show InstrumentName | |
Defined in Euterpea.Music Methods showsPrec :: Int -> InstrumentName -> ShowS # show :: InstrumentName -> String # showList :: [InstrumentName] -> ShowS # | |
data PhraseAttribute #
Instances
| Eq PhraseAttribute | |
Defined in Euterpea.Music Methods (==) :: PhraseAttribute -> PhraseAttribute -> Bool # (/=) :: PhraseAttribute -> PhraseAttribute -> Bool # | |
| Ord PhraseAttribute | |
Defined in Euterpea.Music Methods compare :: PhraseAttribute -> PhraseAttribute -> Ordering # (<) :: PhraseAttribute -> PhraseAttribute -> Bool # (<=) :: PhraseAttribute -> PhraseAttribute -> Bool # (>) :: PhraseAttribute -> PhraseAttribute -> Bool # (>=) :: PhraseAttribute -> PhraseAttribute -> Bool # max :: PhraseAttribute -> PhraseAttribute -> PhraseAttribute # min :: PhraseAttribute -> PhraseAttribute -> PhraseAttribute # | |
| Show PhraseAttribute | |
Defined in Euterpea.Music Methods showsPrec :: Int -> PhraseAttribute -> ShowS # show :: PhraseAttribute -> String # showList :: [PhraseAttribute] -> ShowS # | |
Constructors
| Accent Rational | |
| Crescendo Rational | |
| Diminuendo Rational | |
| StdLoudness StdLoudness | |
| Loudness Rational |
data StdLoudness #
Instances
Constructors
| Ritardando Rational | |
| Accelerando Rational |
data Articulation #
Constructors
| Staccato Rational | |
| Legato Rational | |
| Slurred Rational | |
| Tenuto | |
| Marcato | |
| Pedal | |
| Fermata | |
| FermataDown | |
| Breath | |
| DownBow | |
| UpBow | |
| Harmonic | |
| Pizzicato | |
| LeftPizz | |
| BartokPizz | |
| Swell | |
| Wedge | |
| Thumb | |
| Stopped |
Instances
| Eq Articulation | |
Defined in Euterpea.Music | |
| Ord Articulation | |
Defined in Euterpea.Music Methods compare :: Articulation -> Articulation -> Ordering # (<) :: Articulation -> Articulation -> Bool # (<=) :: Articulation -> Articulation -> Bool # (>) :: Articulation -> Articulation -> Bool # (>=) :: Articulation -> Articulation -> Bool # max :: Articulation -> Articulation -> Articulation # min :: Articulation -> Articulation -> Articulation # | |
| Show Articulation | |
Defined in Euterpea.Music Methods showsPrec :: Int -> Articulation -> ShowS # show :: Articulation -> String # showList :: [Articulation] -> ShowS # | |
Constructors
| Trill | |
| Mordent | |
| InvMordent | |
| DoubleMordent | |
| Turn | |
| TrilledTurn | |
| ShortTrill | |
| Arpeggio | |
| ArpeggioUp | |
| ArpeggioDown | |
| Instruction String | |
| Head NoteHead | |
| DiatonicTrans Int |
Constructors
| DiamondHead | |
| SquareHead | |
| XHead | |
| TriangleHead | |
| TremoloHead | |
| SlashHead | |
| ArtHarmonic | |
| NoHead |
data NoteAttribute #
Instances
| Eq NoteAttribute | |
Defined in Euterpea.Music Methods (==) :: NoteAttribute -> NoteAttribute -> Bool # (/=) :: NoteAttribute -> NoteAttribute -> Bool # | |
| Show NoteAttribute | |
Defined in Euterpea.Music Methods showsPrec :: Int -> NoteAttribute -> ShowS # show :: NoteAttribute -> String # showList :: [NoteAttribute] -> ShowS # | |
| ToMusic1 Note1 | |
type Note1 = (Pitch, [NoteAttribute]) #
Minimal complete definition
data PercussionSound #
Constructors
Instances
playMidi :: OutputDeviceID -> Midi -> IO () #
defaultInput :: (InputDeviceID -> a -> IO b) -> a -> IO b #
defaultOutput :: (OutputDeviceID -> a -> IO b) -> a -> IO b #
data MidiMessage #
Instances
| Show MidiMessage | |
Defined in Euterpea.IO.MIDI.MidiIO Methods showsPrec :: Int -> MidiMessage -> ShowS # show :: MidiMessage -> String # showList :: [MidiMessage] -> ShowS # | |
data InputDeviceID #
Instances
| Eq InputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods (==) :: InputDeviceID -> InputDeviceID -> Bool # (/=) :: InputDeviceID -> InputDeviceID -> Bool # | |
| Show InputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods showsPrec :: Int -> InputDeviceID -> ShowS # show :: InputDeviceID -> String # showList :: [InputDeviceID] -> ShowS # | |
| NFData InputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods rnf :: InputDeviceID -> () # | |
data OutputDeviceID #
Instances
| Eq OutputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods (==) :: OutputDeviceID -> OutputDeviceID -> Bool # (/=) :: OutputDeviceID -> OutputDeviceID -> Bool # | |
| Show OutputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods showsPrec :: Int -> OutputDeviceID -> ShowS # show :: OutputDeviceID -> String # showList :: [OutputDeviceID] -> ShowS # | |
| NFData OutputDeviceID | |
Defined in Euterpea.IO.MIDI.MidiIO Methods rnf :: OutputDeviceID -> () # | |
exportMidiFile :: FilePath -> Midi -> IO () #
maxSample :: (AudioSample a, Clock p) => Double -> Signal p () a -> Double #
Compute the maximum sample of an SF in the first dur seconds.
Arguments
| :: (AudioSample a, Clock p) | |
| => String | Filename to write to. |
| -> Double | Duration of the wav in seconds. |
| -> Signal p () a | Signal representing the sound. |
| -> IO () |
Like outFile, but normalizes the output if the amplitude of the signal goes above 1. If the maximum sample is less than or equal to 1, the output is not normalized. Currently this requires storing the entire output stream in memory before writing to the file.
Arguments
| :: (AudioSample a, Clock p) | |
| => String | Filename to write to. |
| -> Double | Duration of the wav in seconds. |
| -> Signal p () a | Signal representing the sound. |
| -> IO () |
Writes sound to a wave file (.wav)
Minimal complete definition
class AudioSample a where #
Instances
| AudioSample Double | |
| AudioSample (Double, Double) | |
data DeviceInfo #
Constructors
| DeviceInfo | |
Instances
| Eq DeviceInfo | |
Defined in Sound.PortMidi.DeviceInfo | |
| Show DeviceInfo | |
Defined in Sound.PortMidi.DeviceInfo Methods showsPrec :: Int -> DeviceInfo -> ShowS # show :: DeviceInfo -> String # showList :: [DeviceInfo] -> ShowS # | |
Constructors
| NoteOff !Channel !Key !Velocity | |
| NoteOn !Channel !Key !Velocity | |
| KeyPressure !Channel !Key !Pressure | |
| ControlChange | |
Fields
| |
| ProgramChange | |
| ChannelPressure | |
| PitchWheel | |
Fields
| |
| SequenceNumber !Int | |
| Text !String | |
| Copyright !String | |
| TrackName !String | |
| InstrumentName !String | |
| Lyrics !String | |
| Marker !String | |
| CuePoint !String | |
| ChannelPrefix !Channel | |
| ProgramName !String | |
| DeviceName !String | |
| TrackEnd | |
| TempoChange !Tempo | |
| SMPTEOffset !Int !Int !Int !Int !Int | |
| TimeSignature !Int !Int !Int !Int | |
| KeySignature !Int !Int | |
| Reserved !Int !ByteString | |
| Sysex !Int !ByteString | |
exportFile :: FilePath -> Midi -> IO () #