hemkay-core-0.1.0: A device independent module music mixer

Sound.Hemkay.Music

Contents

Description

This module contains the song structure definitions.

Synopsis

Overall song structure

data Song Source

Constructors

Song 

Fields

title :: String

Song title.

instruments :: [Instrument]

Instruments.

patterns :: [Pattern]

Patterns in the order of playback.

Instances

numChannels :: Song -> IntSource

The number of channels in a song.

Pattern structure

type Pattern = [[Note]]Source

data Note Source

Constructors

Note 

Fields

period :: Int

Period of the note (0 for none); the corresponding frequency is 3546894.6/period.

instrument :: Maybe Instrument

The instrument of the note, if any.

effect :: [Effect]

Special effects, at most two per note.

Instances

data PortaParam Source

Constructors

LastUp 
LastDown 
Porta Int 

Instances

data Waveform Source

The possible waveforms of the vibrato and tremolo effects.

Instances

waveForms :: [(Waveform, [Float])]Source

Waveforms needed for vibrato and tremolo effects. The lists are infinite.

Instruments

data Instrument Source

Constructors

Instrument 

Fields

ident :: Int

Instrument number, needed for equality check.

name :: String

Instrument name.

wave :: WaveData

List of samples; infinite for looped instruments.

volume :: Float

Default volume (0..1).

fineTune :: Float

Fine tune (-log_12 2..log_12 2).

emptyInstrument :: InstrumentSource

A silent instrument that's not equal to any other in a loaded song.