temporal-music-notation-0.1.6: music notation

Temporal.Music.Notation.Note

Contents

Description

Module defines two musical structures Note and Drum and provides constructor-shortcuts for them. Value of type Note contains pitch and volume. Value of type Drum is just Volume

Synopsis

Types

data Note nVol nPch a Source

Value of type Note contains pitch, volume and some specific timbre information.

Constructors

Note 

Fields

noteVolume :: Volume nVol
 
notePitch :: Pitch nPch
 
noteParam :: Maybe a
 

Instances

(Eq nVol, Eq nPch, Eq a, Seg nVol, Seg nPch) => Eq (Note nVol nPch a) 
(Show nVol, Show nPch, Show a, Seg nVol, Seg nPch) => Show (Note nVol nPch a) 
(Seg nVol, Seg nPch) => ToneFunctor (Note nVol nPch a) 
(Seg nVol, Seg nPch) => PitchFunctor (Note nVol nPch a) 
(Seg nVol, Seg nPch) => LevelFunctor (Note nVol nPch a) 
(Seg nVol, Seg nPch) => VolumeFunctor (Note nVol nPch a) 

absNote :: (Seg nVol, Seg nPch) => Note nVol nPch a -> (Amplitude, Frequency)Source

calculates absVolume and absPitch on notes

data Drum n a Source

Value of type Drum is just Volume.

Constructors

Drum 

Fields

drumVolume :: Volume n
 
drumParam :: Maybe a
 

Instances

(Eq n, Eq a, Seg n) => Eq (Drum n a) 
(Show n, Show a, Seg n) => Show (Drum n a) 
Seg nVol => LevelFunctor (Drum nVol a) 
Seg nVol => VolumeFunctor (Drum nVol a) 

absDrum :: Seg nVol => Drum nVol a -> AmplitudeSource

synonym for absVolume

Shortcuts

Shortcuts for rests, notes and drums construction. Naming conventions : name has two parts, first describes duration of resulting score and second describes that result is rest, note or drum note.

For name xy

First part x can be [b | w | h | q | e | s | t | d[x] ]

b means brewis (duration is 2)

w means whole (duration is 1)

h means half (duration is 1/2)

q means quater (duration is 1/4)

e means eighth (duration is 1/8)

s means sixteenth (duration is 1/16)

t means thirty second (duration is 1/32)

d[x] means dotted [x] (stretch 1.5 $ x)

Second part y can be [nr | n | d]

nr means rest

n means result contains Note

d means result contains Drum

Rests

Notes

It is assumed here that for Note most important information is tone and shortcuts construct Note values from Tone 's, other values are set to default values. It means that scale is equaly tempered, bend is set to zero, volume level is set to mediumLevel, accent is set to zero and volume diapason is set to interval (1e-5, 1).

bn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

wn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

hn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

qn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

en :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

sn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

tn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dbn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dwn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dhn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dqn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

den :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dsn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

dtn :: (Vol nVol, Pch nPch) => Tone nPch -> Score (Note nVol nPch a)Source

Drums

It is assumed here that for Drum most important information is accent and shortcuts construct Drum from Accent 's, other parameters are set to default values. It means that volume level is mediumLevel and volume diapason is (1e-5, 1)

bd :: Vol nVol => Accent -> Score (Drum nVol a)Source

wd :: Vol nVol => Accent -> Score (Drum nVol a)Source

hd :: Vol nVol => Accent -> Score (Drum nVol a)Source

qd :: Vol nVol => Accent -> Score (Drum nVol a)Source

ed :: Vol nVol => Accent -> Score (Drum nVol a)Source

sd :: Vol nVol => Accent -> Score (Drum nVol a)Source

td :: Vol nVol => Accent -> Score (Drum nVol a)Source

dbd :: Vol nVol => Accent -> Score (Drum nVol a)Source

dwd :: Vol nVol => Accent -> Score (Drum nVol a)Source

dhd :: Vol nVol => Accent -> Score (Drum nVol a)Source

dqd :: Vol nVol => Accent -> Score (Drum nVol a)Source

ded :: Vol nVol => Accent -> Score (Drum nVol a)Source

dsd :: Vol nVol => Accent -> Score (Drum nVol a)Source

dtd :: Vol nVol => Accent -> Score (Drum nVol a)Source