Kulitta-2.2.1: Library for automated composition and musical learning

Safe HaskellNone
LanguageHaskell98

Kulitta.EuterpeaSpecial

Synopsis

Documentation

(<<<) :: Category cat => cat b c -> cat a b -> cat a c infixr 1 #

Right-to-left composition

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 (arr f) = arr (\ b -> fst (fix (\ (c,d) -> f (b,d))))
left tightening
loop (first h >>> f) = h >>> loop f
right tightening
loop (f >>> first h) = loop f >>> h
sliding
loop (f >>> arr (id *** k)) = loop (arr (id *** k) >>> f)
vanishing
loop (loop f) = loop (arr unassoc >>> f >>> arr assoc)
superposing
second (loop f) = loop (arr assoc >>> second f >>> arr unassoc)

where

assoc ((a,b),c) = (a,(b,c))
unassoc (a,(b,c)) = ((a,b),c)

Minimal complete definition

loop

Methods

loop :: a (b, d) (c, d) -> a b c #

Instances
MonadFix m => ArrowLoop (Kleisli m)

Beware that for many monads (those for which the >>= operation is strict) this instance will not satisfy the right-tightening law required by the ArrowLoop class.

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: Kleisli m (b, d) (c, d) -> Kleisli m b c #

ArrowLoop ((->) :: * -> * -> *)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: ((b, d) -> (c, d)) -> b -> c #

ArrowLoop a => ArrowLoop (ArrowP a p) 
Instance details

Defined in Control.Arrow.ArrowP

Methods

loop :: ArrowP a p (b, d) (c, d) -> ArrowP a p b c #

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
ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

return :: a0 -> ArrowMonad a a0 #

fail :: String -> ArrowMonad a a0 #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

class Arrow a => ArrowApply (a :: * -> * -> *) where #

Some arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws:

Such arrows are equivalent to monads (see ArrowMonad).

Minimal complete definition

app

Methods

app :: a (a b c, b) c #

Instances
Monad m => ArrowApply (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: Kleisli m (Kleisli m b c, b) c #

ArrowApply ((->) :: * -> * -> *)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: (b -> c, b) -> c #

class ArrowZero a => ArrowPlus (a :: * -> * -> *) where #

A monoid on arrows.

Minimal complete definition

(<+>)

Methods

(<+>) :: a b c -> a b c -> a b c infixr 5 #

An associative operation with identity zeroArrow.

Instances
MonadPlus m => ArrowPlus (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(<+>) :: Kleisli m b c -> Kleisli m b c -> Kleisli m b c #

class Arrow a => ArrowZero (a :: * -> * -> *) where #

Minimal complete definition

zeroArrow

Methods

zeroArrow :: a b c #

Instances
MonadPlus m => ArrowZero (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

zeroArrow :: Kleisli m b c #

class Category a => Arrow (a :: * -> * -> *) where #

The basic arrow class.

Instances should satisfy the following laws:

where

assoc ((a,b),c) = (a,(b,c))

The other combinators have sensible default definitions, which may be overridden for efficiency.

Minimal complete definition

arr, (first | (***))

Methods

arr :: (b -> c) -> a b c #

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.

Instances
Monad m => Arrow (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> Kleisli m b c #

first :: Kleisli m b c -> Kleisli m (b, d) (c, d) #

second :: Kleisli m b c -> Kleisli m (d, b) (d, c) #

(***) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (b, b') (c, c') #

(&&&) :: Kleisli m b c -> Kleisli m b c' -> Kleisli m b (c, c') #

Arrow ((->) :: * -> * -> *)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> b -> c #

first :: (b -> c) -> (b, d) -> (c, d) #

second :: (b -> c) -> (d, b) -> (d, c) #

(***) :: (b -> c) -> (b' -> c') -> (b, b') -> (c, c') #

(&&&) :: (b -> c) -> (b -> c') -> b -> (c, c') #

Arrow a => Arrow (ArrowP a p) 
Instance details

Defined in Control.Arrow.ArrowP

Methods

arr :: (b -> c) -> ArrowP a p b c #

first :: ArrowP a p b c -> ArrowP a p (b, d) (c, d) #

second :: ArrowP a p b c -> ArrowP a p (d, b) (d, c) #

(***) :: ArrowP a p b c -> ArrowP a p b' c' -> ArrowP a p (b, b') (c, c') #

(&&&) :: ArrowP a p b c -> ArrowP a p b c' -> ArrowP a p b (c, c') #

returnA :: Arrow a => a b b #

The identity arrow, which plays the role of return in arrow notation.

(^>>) :: Arrow a => (b -> c) -> a c d -> a b d infixr 1 #

Precomposition with a pure function.

(>>^) :: Arrow a => a b c -> (c -> d) -> a b d infixr 1 #

Postcomposition with a pure function.

(<<^) :: 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:

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

Instance details

Defined in Control.Arrow

Methods

left :: Kleisli m b c -> Kleisli m (Either b d) (Either c d) #

right :: Kleisli m b c -> Kleisli m (Either d b) (Either d c) #

(+++) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (Either b b') (Either c c') #

(|||) :: Kleisli m b d -> Kleisli m c d -> Kleisli m (Either b c) d #

ArrowChoice ((->) :: * -> * -> *)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

left :: (b -> c) -> Either b d -> Either c d #

right :: (b -> c) -> Either d b -> Either d c #

(+++) :: (b -> c) -> (b' -> c') -> Either b b' -> Either c c' #

(|||) :: (b -> d) -> (c -> d) -> Either b c -> d #

ArrowChoice a => ArrowChoice (ArrowP a p) 
Instance details

Defined in Control.Arrow.ArrowP

Methods

left :: ArrowP a p b c -> ArrowP a p (Either b d) (Either c d) #

right :: ArrowP a p b c -> ArrowP a p (Either d b) (Either d c) #

(+++) :: ArrowP a p b c -> ArrowP a p b' c' -> ArrowP a p (Either b b') (Either c c') #

(|||) :: ArrowP a p b d -> ArrowP a p c d -> ArrowP a p (Either b c) d #

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 >>= operation is strict) this instance will not satisfy the right-tightening law required by the ArrowLoop class.

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: Kleisli m (b, d) (c, d) -> Kleisli m b c #

Monad m => ArrowApply (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: Kleisli m (Kleisli m b c, b) c #

MonadPlus m => ArrowPlus (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(<+>) :: Kleisli m b c -> Kleisli m b c -> Kleisli m b c #

MonadPlus m => ArrowZero (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

zeroArrow :: Kleisli m b c #

Monad m => Arrow (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> Kleisli m b c #

first :: Kleisli m b c -> Kleisli m (b, d) (c, d) #

second :: Kleisli m b c -> Kleisli m (d, b) (d, c) #

(***) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (b, b') (c, c') #

(&&&) :: Kleisli m b c -> Kleisli m b c' -> Kleisli m b (c, c') #

Monad m => ArrowChoice (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

left :: Kleisli m b c -> Kleisli m (Either b d) (Either c d) #

right :: Kleisli m b c -> Kleisli m (Either d b) (Either d c) #

(+++) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (Either b b') (Either c c') #

(|||) :: Kleisli m b d -> Kleisli m c d -> Kleisli m (Either b c) d #

Monad m => Category (Kleisli m :: * -> * -> *)

Since: base-3.0

Instance details

Defined in Control.Arrow

Methods

id :: Kleisli m a a #

(.) :: Kleisli m b c -> Kleisli m a b -> Kleisli m a c #

(>>>) :: Category cat => cat a b -> cat b c -> cat a c infixr 1 #

Left-to-right composition

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 ()) #

tableBesselN :: TableSize -> 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 #

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 #

envLine :: Clock p => Double -> Double -> Double -> Signal p () Double #

data Table #

Instances
Show Table 
Instance details

Defined in Euterpea.IO.Audio.BasicSigFuns

Methods

showsPrec :: Int -> Table -> ShowS #

show :: Table -> String #

showList :: [Table] -> ShowS #

renderSF #

Arguments

:: (Clock p, ToMusic1 a, AudioSample b) 
=> Music a 
-> InstrMap (Signal p () b) 
-> (Double, Signal p () b)

Duration of the music in seconds, and a signal function that plays the music.

type Instr a = Dur -> AbsPitch -> Volume -> [Double] -> a #

type InstrMap a = [(InstrumentName, Instr a)] #

pchToHz :: Floating a => Pitch -> a #

Converting from a Pitch value to Hz:

apToHz :: Floating a => AbsPitch -> a #

Converting an AbsPitch to hertz (cycles per second):

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 #

outA :: Arrow a => a b b #

dynamicCP :: NumChannels -> PercChan -> ChannelMapFun #

linearCP :: NumChannels -> PercChan -> ChannelMapFun #

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 () #

writeMidi :: ToMusic1 a => FilePath -> Music a -> IO () #

toDelta :: (RealFrac a, Integral b) => a -> b #

type ProgNum = Int #

data MEvent #

Constructors

MEvent 
Instances
Eq MEvent 
Instance details

Defined in Euterpea.IO.MIDI.MEvent

Methods

(==) :: MEvent -> MEvent -> Bool #

(/=) :: MEvent -> MEvent -> Bool #

Ord MEvent 
Instance details

Defined in Euterpea.IO.MIDI.MEvent

Show MEvent 
Instance details

Defined in Euterpea.IO.MIDI.MEvent

type DurT = Rational #

data MContext #

Constructors

MContext 
Instances
Show MContext 
Instance details

Defined in Euterpea.IO.MIDI.MEvent

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 #

(/=:) :: Music a -> Music a -> Music a #

cutL :: LazyDur -> Music a -> Music a #

minL :: LazyDur -> Dur -> Dur #

remove :: Dur -> Music a -> Music a #

cut :: Dur -> Music a -> Music a #

retro :: Music a -> Music a #

invert1 :: Music (Pitch, a) -> Music (Pitch, a) #

invertAt1 :: Pitch -> Music (Pitch, a) -> Music (Pitch, a) #

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 #

dtn :: Dur #

dsn :: Dur #

den :: Dur #

dqn :: Dur #

dhn :: Dur #

dwn :: Dur #

sfn :: Dur #

bn :: Dur #

b :: Octave -> Dur -> Music Pitch #

a :: Octave -> Dur -> Music Pitch #

g :: Octave -> Dur -> Music Pitch #

f :: Octave -> Dur -> Music Pitch #

e :: Octave -> Dur -> Music Pitch #

d :: Octave -> Dur -> Music Pitch #

c :: Octave -> Dur -> Music Pitch #

keysig :: PitchClass -> Mode -> Music a -> Music a #

tempo :: Dur -> Music a -> Music a #

rest :: Dur -> Music a #

note :: Dur -> a -> Music a #

type Octave = Int #

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
Bounded PitchClass 
Instance details

Defined in Euterpea.Music

Enum PitchClass 
Instance details

Defined in Euterpea.Music

Eq PitchClass 
Instance details

Defined in Euterpea.Music

Ord PitchClass 
Instance details

Defined in Euterpea.Music

Read PitchClass 
Instance details

Defined in Euterpea.Music

Show PitchClass 
Instance details

Defined in Euterpea.Music

ToMusic1 Pitch 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music Pitch -> Music1 #

ToMusic1 Note1 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music Note1 -> Music1 #

ToMusic1 (Pitch, Volume) 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music (Pitch, Volume) -> Music1 #

data Primitive a #

Constructors

Note Dur a 
Rest Dur 
Instances
Functor Primitive 
Instance details

Defined in Euterpea.Music

Methods

fmap :: (a -> b) -> Primitive a -> Primitive b #

(<$) :: a -> Primitive b -> Primitive a #

Eq a => Eq (Primitive a) 
Instance details

Defined in Euterpea.Music

Methods

(==) :: Primitive a -> Primitive a -> Bool #

(/=) :: Primitive a -> Primitive a -> Bool #

Ord a => Ord (Primitive a) 
Instance details

Defined in Euterpea.Music

Show a => Show (Primitive a) 
Instance details

Defined in Euterpea.Music

data Music a #

Constructors

Prim (Primitive a) 
(Music a) :+: (Music a) infixr 5 
(Music a) :=: (Music a) infixr 5 
Modify Control (Music a) 
Instances
Functor Music 
Instance details

Defined in Euterpea.Music

Methods

fmap :: (a -> b) -> Music a -> Music b #

(<$) :: a -> Music b -> Music a #

Eq a => Eq (Music a) 
Instance details

Defined in Euterpea.Music

Methods

(==) :: Music a -> Music a -> Bool #

(/=) :: Music a -> Music a -> Bool #

Ord a => Ord (Music a) 
Instance details

Defined in Euterpea.Music

Methods

compare :: Music a -> Music a -> Ordering #

(<) :: Music a -> Music a -> Bool #

(<=) :: Music a -> Music a -> Bool #

(>) :: Music a -> Music a -> Bool #

(>=) :: Music a -> Music a -> Bool #

max :: Music a -> Music a -> Music a #

min :: Music a -> Music a -> Music a #

Show a => Show (Music a) 
Instance details

Defined in Euterpea.Music

Methods

showsPrec :: Int -> Music a -> ShowS #

show :: Music a -> String #

showList :: [Music a] -> ShowS #

data Control #

Instances
Eq Control 
Instance details

Defined in Euterpea.Music

Methods

(==) :: Control -> Control -> Bool #

(/=) :: Control -> Control -> Bool #

Ord Control 
Instance details

Defined in Euterpea.Music

Show Control 
Instance details

Defined in Euterpea.Music

pattern Aeolian :: Mode #

pattern CustomMode :: String -> Mode #

data InstrumentName #

Constructors

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 Dynamic #

Instances
Eq Dynamic 
Instance details

Defined in Euterpea.Music

Methods

(==) :: Dynamic -> Dynamic -> Bool #

(/=) :: Dynamic -> Dynamic -> Bool #

Ord Dynamic 
Instance details

Defined in Euterpea.Music

Show Dynamic 
Instance details

Defined in Euterpea.Music

data Tempo #

Instances
Eq Tempo 
Instance details

Defined in Euterpea.Music

Methods

(==) :: Tempo -> Tempo -> Bool #

(/=) :: Tempo -> Tempo -> Bool #

Ord Tempo 
Instance details

Defined in Euterpea.Music

Methods

compare :: Tempo -> Tempo -> Ordering #

(<) :: Tempo -> Tempo -> Bool #

(<=) :: Tempo -> Tempo -> Bool #

(>) :: Tempo -> Tempo -> Bool #

(>=) :: Tempo -> Tempo -> Bool #

max :: Tempo -> Tempo -> Tempo #

min :: Tempo -> Tempo -> Tempo #

Show Tempo 
Instance details

Defined in Euterpea.Music

Methods

showsPrec :: Int -> Tempo -> ShowS #

show :: Tempo -> String #

showList :: [Tempo] -> ShowS #

data NoteHead #

Instances
Eq NoteHead 
Instance details

Defined in Euterpea.Music

Ord NoteHead 
Instance details

Defined in Euterpea.Music

Show NoteHead 
Instance details

Defined in Euterpea.Music

type Volume = Int #

data NoteAttribute #

Instances
Eq NoteAttribute 
Instance details

Defined in Euterpea.Music

Show NoteAttribute 
Instance details

Defined in Euterpea.Music

ToMusic1 Note1 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music Note1 -> Music1 #

class ToMusic1 a where #

Minimal complete definition

toMusic1

Methods

toMusic1 :: Music a -> Music1 #

Instances
ToMusic1 AbsPitch 
Instance details

Defined in Euterpea.Music

ToMusic1 Pitch 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music Pitch -> Music1 #

ToMusic1 Note1 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music Note1 -> Music1 #

ToMusic1 (AbsPitch, Volume) 
Instance details

Defined in Euterpea.Music

ToMusic1 (Pitch, Volume) 
Instance details

Defined in Euterpea.Music

Methods

toMusic1 :: Music (Pitch, Volume) -> Music1 #

type LazyDur = [Dur] #

data PercussionSound #

defaultInput :: (InputDeviceID -> a -> IO b) -> a -> IO b #

defaultOutput :: (OutputDeviceID -> a -> IO b) -> a -> IO b #

data MidiMessage #

Constructors

ANote !Channel !Key !Velocity !Time 
Std Message 
Instances
Show MidiMessage 
Instance details

Defined in Euterpea.IO.MIDI.MidiIO

data InputDeviceID #

Instances
Eq InputDeviceID 
Instance details

Defined in Euterpea.IO.MIDI.MidiIO

Show InputDeviceID 
Instance details

Defined in Euterpea.IO.MIDI.MidiIO

NFData InputDeviceID 
Instance details

Defined in Euterpea.IO.MIDI.MidiIO

Methods

rnf :: InputDeviceID -> () #

maxSample :: (AudioSample a, Clock p) => Double -> Signal p () a -> Double #

Compute the maximum sample of an SF in the first dur seconds.

outFileNorm #

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.

outFile #

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)

class Clock p where #

Minimal complete definition

rate

Methods

rate :: p -> Double #

Instances
Clock AudRate 
Instance details

Defined in Euterpea.IO.Audio.Types

Methods

rate :: AudRate -> Double #

Clock CtrRate 
Instance details

Defined in Euterpea.IO.Audio.Types

Methods

rate :: CtrRate -> Double #

data AudRate #

Instances
Clock AudRate 
Instance details

Defined in Euterpea.IO.Audio.Types

Methods

rate :: AudRate -> Double #

data CtrRate #

Instances
Clock CtrRate 
Instance details

Defined in Euterpea.IO.Audio.Types

Methods

rate :: CtrRate -> Double #

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 #

Minimal complete definition

zero, mix, collapse, numChans

Methods

zero :: a #

mix :: a -> a -> a #

collapse :: a -> [Double] #

numChans :: a -> Int #

Instances
AudioSample Double 
Instance details

Defined in Euterpea.IO.Audio.Types

AudioSample (Double, Double) 
Instance details

Defined in Euterpea.IO.Audio.Types

type Mono p = Signal p () Double #

type Stereo p = Signal p () (Double, Double) #

data DeviceInfo #

Constructors

DeviceInfo 

Fields

Instances
Eq DeviceInfo 
Instance details

Defined in Sound.PortMidi.DeviceInfo

Show DeviceInfo 
Instance details

Defined in Sound.PortMidi.DeviceInfo