This module contains the song structure definitions.
- data Song = Song {
- title :: String
- instruments :: [Instrument]
- patterns :: [Pattern]
- numChannels :: Song -> Int
- type Pattern = [[Note]]
- data Note = Note {
- period :: Int
- instrument :: Maybe Instrument
- effect :: [Effect]
- periodName :: Int -> [Char]
- data Effect
- = Arpeggio Float Float
- | Portamento PortaParam
- | TonePortamento (Maybe Int)
- | Vibrato (Maybe Int) (Maybe Int)
- | Tremolo (Maybe Int) (Maybe Int)
- | FinePanning Float
- | SampleOffset Int
- | VolumeSlide (Maybe Float)
- | OrderJump Int
- | SetVolume Float
- | PatternBreak Int
- | FinePortamento PortaParam
- | SetVibratoWaveform Waveform
- | FineTuneControl Float
- | PatternLoop (Maybe Int)
- | SetTremoloWaveform Waveform
- | RetrigNote Int
- | FineVolumeSlide (Maybe Float)
- | NoteCut Int
- | NoteDelay Int
- | PatternDelay Int
- | SetTempo Int
- | SetBPM Int
- data PortaParam
- data Waveform
- = SineWave
- | SawtoothWave
- | SquareWave
- waveForms :: [(Waveform, [Float])]
- data Instrument = Instrument {}
- emptyInstrument :: Instrument
- type WaveData = [Float]
Overall song structure
Song | |
|
numChannels :: Song -> IntSource
The number of channels in a song.
Pattern structure
Note | |
|
periodName :: Int -> [Char]Source
The possible waveforms of the vibrato and tremolo effects.
waveForms :: [(Waveform, [Float])]Source
Waveforms needed for vibrato and tremolo effects. The lists are infinite.
Instruments
emptyInstrument :: InstrumentSource
A silent instrument that's not equal to any other in a loaded song.