Documentation ¶
Index ¶
- Constants
- Variables
- type ChannelData
- type ChannelDataFlags
- func (cdf ChannelDataFlags) HasCommand() bool
- func (cdf ChannelDataFlags) HasInstrument() bool
- func (cdf ChannelDataFlags) HasNote() bool
- func (cdf ChannelDataFlags) HasVolPan() bool
- func (cdf ChannelDataFlags) IsUseLastCommand() bool
- func (cdf ChannelDataFlags) IsUseLastInstrument() bool
- func (cdf ChannelDataFlags) IsUseLastNote() bool
- func (cdf ChannelDataFlags) IsUseLastVolPan() bool
- type ConvertFlags
- type DuplicateCheckAction
- type DuplicateCheckType
- type DuplicateNoteCheck
- type Envelope
- type EnvelopeFlags
- type File
- type FineVolume
- type FullSample
- type IMPIInstrument
- type IMPIInstrumentOld
- type IMPIIntf
- type IMPIOldFlags
- type IMPMFlags
- func (f IMPMFlags) IsEFGLinking() bool
- func (f IMPMFlags) IsLinearSlides() bool
- func (f IMPMFlags) IsMidiPitchController() bool
- func (f IMPMFlags) IsOldEffects() bool
- func (f IMPMFlags) IsReqEmbedMidi() bool
- func (f IMPMFlags) IsStereo() bool
- func (f IMPMFlags) IsUseInstruments() bool
- func (f IMPMFlags) IsVol0Optimizations() bool
- type IMPMSpecialFlags
- type ModuleHeader
- type NewNoteAction
- type NodePoint16
- type NodePoint24
- type Note
- type NoteSample
- type PackedPattern
- type PanSeparation
- type PanValue
- type ParaPointer
- type ParaPointer16
- type ParaPointer24
- type ParaPointer32
- type Percentage8
- type Sample
- type SampleFlags
- func (sf SampleFlags) DoesSampleExist() bool
- func (sf SampleFlags) Is16Bit() bool
- func (sf SampleFlags) IsCompressed() bool
- func (sf SampleFlags) IsLoopEnabled() bool
- func (sf SampleFlags) IsLoopPingPong() bool
- func (sf SampleFlags) IsStereo() bool
- func (sf SampleFlags) IsSustainLoopEnabled() bool
- func (sf SampleFlags) IsSustainLoopPingPong() bool
- type SamplePanValue
- type Volume
Constants ¶
const ( // IMPMFlagStereo :: On = Stereo, Off = Mono (panning enablement flag) IMPMFlagStereo = IMPMFlags(1 << 0) // IMPMFlagVol0Optimizations :: If on, no mixing occurs if the volume at mixing time is 0 (redundant v1.04+) IMPMFlagVol0Optimizations = IMPMFlags(1 << 1) // IMPMFlagUseInstruments :: On = Use instruments, Off = Use samples IMPMFlagUseInstruments = IMPMFlags(1 << 2) // IMPMFlagLinearSlides :: On = Linear slides, Off = Amiga slides IMPMFlagLinearSlides = IMPMFlags(1 << 3) // IMPMFlagOldEffects :: On = Old Effects, Off = IT Effects IMPMFlagOldEffects = IMPMFlags(1 << 4) // IMPMFlagEFGLinking :: On = Link Effect G's memory with Effect E/F IMPMFlagEFGLinking = IMPMFlags(1 << 5) // IMPMFlagMidiPitchController :: Use MIDI pitch controller, Pitch depth given by PitchWheelDepth IMPMFlagMidiPitchController = IMPMFlags(1 << 6) // IMPMFlagReqEmbedMidi :: Request embedded MIDI configuration IMPMFlagReqEmbedMidi = IMPMFlags(1 << 7) )
const ( // IMPMSpecialFlagMessageAttached :: On = song message attached IMPMSpecialFlagMessageAttached = IMPMSpecialFlags(1 << 0) // IMPMSpecialFlagHistoryIncluded :: On = history data included (maybe) IMPMSpecialFlagHistoryIncluded = IMPMSpecialFlags(1 << 1) // IMPMSpecialFlagHighlightDataIncluded :: On = highlight data included IMPMSpecialFlagHighlightDataIncluded = IMPMSpecialFlags(1 << 2) // IMPMSpecialFlagEmbedMidi :: MIDI configuration embedded IMPMSpecialFlagEmbedMidi = IMPMSpecialFlags(1 << 3) // IMPMSpecialFlagReservedBit4 :: Reserved IMPMSpecialFlagReservedBit4 = IMPMSpecialFlags(1 << 4) // IMPMSpecialFlagReservedBit5 :: Reserved IMPMSpecialFlagReservedBit5 = IMPMSpecialFlags(1 << 5) // IMPMSpecialFlagReservedBit6 :: Reserved IMPMSpecialFlagReservedBit6 = IMPMSpecialFlags(1 << 6) // IMPMSpecialFlagReservedBit7 :: Reserved IMPMSpecialFlagReservedBit7 = IMPMSpecialFlags(1 << 7) // IMPMSpecialFlagReservedBit8 :: Reserved IMPMSpecialFlagReservedBit8 = IMPMSpecialFlags(1 << 8) // IMPMSpecialFlagReservedBit9 :: Reserved IMPMSpecialFlagReservedBit9 = IMPMSpecialFlags(1 << 9) // IMPMSpecialFlagReservedBit10 :: Reserved IMPMSpecialFlagReservedBit10 = IMPMSpecialFlags(1 << 10) // IMPMSpecialFlagReservedBit11 :: Reserved IMPMSpecialFlagReservedBit11 = IMPMSpecialFlags(1 << 11) // IMPMSpecialFlagReservedBit12 :: Reserved IMPMSpecialFlagReservedBit12 = IMPMSpecialFlags(1 << 12) // IMPMSpecialFlagReservedBit13 :: Reserved IMPMSpecialFlagReservedBit13 = IMPMSpecialFlags(1 << 13) // IMPMSpecialFlagReservedBit14 :: Reserved IMPMSpecialFlagReservedBit14 = IMPMSpecialFlags(1 << 14) // IMPMSpecialFlagReservedBit15 :: Reserved IMPMSpecialFlagReservedBit15 = IMPMSpecialFlags(1 << 15) )
const ( // SampleFlagSampleExists :: On = sample associated with header SampleFlagSampleExists = SampleFlags(1 << 0) // SampleFlag16Bit :: On = 16 bit, Off = 8 bit SampleFlag16Bit = SampleFlags(1 << 1) // SampleFlagStereo :: On = stereo, Off = mono SampleFlagStereo = SampleFlags(1 << 2) // SampleFlagCompressed :: On = compressed samples SampleFlagCompressed = SampleFlags(1 << 3) // SampleFlagUseLoop :: On = Use loop SampleFlagUseLoop = SampleFlags(1 << 4) // SampleFlagUseSustainLoop :: On = Use sustain loop SampleFlagUseSustainLoop = SampleFlags(1 << 5) // SampleFlagPingPongLoop :: On = Ping Pong loop, Off = Forwards loop SampleFlagPingPongLoop = SampleFlags(1 << 6) // SampleFlagPingPongSustainLoop :: On = Ping Pong Sustain loop, Off = Forwards Sustain loop SampleFlagPingPongSustainLoop = SampleFlags(1 << 7) )
const ( // ConvertFlagSignedSamples :: On = Samples are signed. Off = Samples are unsigned ConvertFlagSignedSamples = ConvertFlags(1 << 0) // ConvertFlagBigEndian :: On = 16 bit big endian, Off = 16 bit little endian ConvertFlagBigEndian = ConvertFlags(1 << 1) // ConvertFlagSampleDelta :: On = stored as delta values, Off = stored as PCM values ConvertFlagSampleDelta = ConvertFlags(1 << 2) // ConvertFlagByteDelta :: On = stored as byte delta values ConvertFlagByteDelta = ConvertFlags(1 << 3) // ConvertFlagTXWave12Bit :: On = stored as TX-Wave 12-bit values ConvertFlagTXWave12Bit = ConvertFlags(1 << 4) // ConvertFlagChannelSelectionPrompt :: On = Left/Right/All Stereo prompt ConvertFlagChannelSelectionPrompt = ConvertFlags(1 << 5) // ConvertFlagReserved6 :: Reserved ConvertFlagReserved6 = ConvertFlags(1 << 6) // ConvertFlagReserved7 :: Reserved ConvertFlagReserved7 = ConvertFlags(1 << 7) )
const ( // IMPIOldFlagUseVolumeEnvelope :: On = Use volume envelope IMPIOldFlagUseVolumeEnvelope = IMPIOldFlags(1 << 0) // IMPIOldFlagUseVolumeLoop :: On = Use volume loop IMPIOldFlagUseVolumeLoop = IMPIOldFlags(1 << 1) // IMPIOldFlagUseSustainVolumeLoop :: On = Use sustain volume loop IMPIOldFlagUseSustainVolumeLoop = IMPIOldFlags(1 << 2) )
const ( // EnvelopeFlagEnvelopeOn :: On = Use envelope EnvelopeFlagEnvelopeOn = EnvelopeFlags(1 << 0) // EnvelopeFlagLoopOn :: On = Use loop EnvelopeFlagLoopOn = EnvelopeFlags(1 << 1) // EnvelopeFlagSustainLoopOn :: On = Use sustain loop EnvelopeFlagSustainLoopOn = EnvelopeFlags(1 << 2) )
const ( // ChannelDataFlagNote :: On = Note is available ChannelDataFlagNote = ChannelDataFlags(1 << 0) // ChannelDataFlagInstrument :: On = Instrument is available ChannelDataFlagInstrument = ChannelDataFlags(1 << 1) // ChannelDataFlagVolPan :: On = VolPan is available ChannelDataFlagVolPan = ChannelDataFlags(1 << 2) // ChannelDataFlagCommand :: On = Command/CommandData is available ChannelDataFlagCommand = ChannelDataFlags(1 << 3) // ChannelDataFlagUseLastNote :: On = Use the previous Note value in the channel ChannelDataFlagUseLastNote = ChannelDataFlags(1 << 4) // ChannelDataFlagUseLastInstrument :: On = Use the previous Instrument value in the channel ChannelDataFlagUseLastInstrument = ChannelDataFlags(1 << 5) // ChannelDataFlagUseLastVolPan :: On = Use the previous VolPan value in the channel ChannelDataFlagUseLastVolPan = ChannelDataFlags(1 << 6) // ChannelDataFlagUseLastCommand :: On = Use the previous Command/CommandData value in the channel ChannelDataFlagUseLastCommand = ChannelDataFlags(1 << 7) )
const ( // DefaultVolume is the default volume for many things in IT files DefaultVolume = Volume(64) // DefaultFineVolume is the default volume for fine volumes in IT files DefaultFineVolume = Volume(128) )
const ( // NewNoteActionCut means to cut the previous playback when a new note occurs NewNoteActionCut = NewNoteAction(0) // NewNoteActionContinue means to continue the previous playback when a new note occurs NewNoteActionContinue = NewNoteAction(1) // NewNoteActionOff means to note-off the previous playback when a new note occurs NewNoteActionOff = NewNoteAction(2) // NewNoteActionFade means to fade the previous playback when a new note occurs NewNoteActionFade = NewNoteAction(3) )
const ( // DuplicateCheckTypeOff is for when the duplicate check type is disabled DuplicateCheckTypeOff = DuplicateCheckType(0) // DuplicateCheckTypeNote is for when the duplicate check type is set to note mode DuplicateCheckTypeNote = DuplicateCheckType(1) // DuplicateCheckTypeSample is for when the duplicate check type is set to sample mode DuplicateCheckTypeSample = DuplicateCheckType(2) // DuplicateCheckTypeInstrument is for when the duplicate check type is set to instrument mode DuplicateCheckTypeInstrument = DuplicateCheckType(3) )
const ( // DuplicateCheckActionCut cuts the playback when a duplicate is detected DuplicateCheckActionCut = DuplicateCheckAction(0) // DuplicateCheckActionOff performs a note-off on the playback when a duplicate is detected DuplicateCheckActionOff = DuplicateCheckAction(1) // DuplicateCheckActionFade performs a fade-out on the playback when a duplicate is detected DuplicateCheckActionFade = DuplicateCheckAction(2) )
const ( // DuplicateNoteCheckOff disables the duplicate note checking DuplicateNoteCheckOff = DuplicateNoteCheck(0) // DuplicateNoteCheckOn activates the duplicate note checking DuplicateNoteCheckOn = DuplicateNoteCheck(1) )
Variables ¶
var ( // ErrInvalidFileFormat is for when an invalid file format is encountered ErrInvalidFileFormat = errors.New("invalid file format") )
var ( // ErrInvalidInstrumentFormat is an error for when an invalid instrument format is encountered ErrInvalidInstrumentFormat = errors.New("invalid instrument format") )
Functions ¶
This section is empty.
Types ¶
type ChannelData ¶
type ChannelData struct { ChannelNumber int8 Flags ChannelDataFlags Note Note Instrument uint8 VolPan uint8 Command uint8 CommandData uint8 }
ChannelData is the partially decoded channel data from the packed pattern
type ChannelDataFlags ¶
type ChannelDataFlags uint8
ChannelDataFlags is a set of flags specifying what data is available in the packed pattern and/or in this channel data
func (ChannelDataFlags) HasCommand ¶
func (cdf ChannelDataFlags) HasCommand() bool
HasCommand returns true if there is a Command value present
func (ChannelDataFlags) HasInstrument ¶
func (cdf ChannelDataFlags) HasInstrument() bool
HasInstrument returns true if there is a Instrument value present
func (ChannelDataFlags) HasNote ¶
func (cdf ChannelDataFlags) HasNote() bool
HasNote returns true if there is a Note value present
func (ChannelDataFlags) HasVolPan ¶
func (cdf ChannelDataFlags) HasVolPan() bool
HasVolPan returns true if there is a VolPan value present
func (ChannelDataFlags) IsUseLastCommand ¶
func (cdf ChannelDataFlags) IsUseLastCommand() bool
IsUseLastCommand returns true if the previous Command/CommandData value should be used
func (ChannelDataFlags) IsUseLastInstrument ¶
func (cdf ChannelDataFlags) IsUseLastInstrument() bool
IsUseLastInstrument returns true if the previous Instrument value should be used
func (ChannelDataFlags) IsUseLastNote ¶
func (cdf ChannelDataFlags) IsUseLastNote() bool
IsUseLastNote returns true if the previous Note value should be used
func (ChannelDataFlags) IsUseLastVolPan ¶
func (cdf ChannelDataFlags) IsUseLastVolPan() bool
IsUseLastVolPan returns true if the previous VolPan value should be used
type ConvertFlags ¶
type ConvertFlags uint8
ConvertFlags defines the flags associated to the IT format sample data conversion settings
func (ConvertFlags) IsBigEndian ¶
func (sf ConvertFlags) IsBigEndian() bool
IsBigEndian returns true if the sample is 16-bit big endian
func (ConvertFlags) IsByteDelta ¶
func (sf ConvertFlags) IsByteDelta() bool
IsByteDelta returns true if the sample data is stored in byte delta format
func (ConvertFlags) IsChannelSelectPrompt ¶
func (sf ConvertFlags) IsChannelSelectPrompt() bool
IsChannelSelectPrompt returns true if the channel selection prompt is enabled
func (ConvertFlags) IsSampleDelta ¶
func (sf ConvertFlags) IsSampleDelta() bool
IsSampleDelta returns true if the sample is stored in sample delta format
func (ConvertFlags) IsSignedSamples ¶
func (sf ConvertFlags) IsSignedSamples() bool
IsSignedSamples returns true if the sample data is in signed values
func (ConvertFlags) IsTXWave12Bit ¶
func (sf ConvertFlags) IsTXWave12Bit() bool
IsTXWave12Bit returns true if the sample loop is stored in TX-Wave 12-bit format
type DuplicateCheckAction ¶
type DuplicateCheckAction uint8
DuplicateCheckAction is the action to perform when a duplicate is detected
type DuplicateCheckType ¶
type DuplicateCheckType uint8
DuplicateCheckType is the duplicate check type
type DuplicateNoteCheck ¶
type DuplicateNoteCheck uint8
DuplicateNoteCheck activates or deactivates the duplicate note checking
type Envelope ¶
type Envelope struct { Flags EnvelopeFlags Count uint8 LoopBegin uint8 LoopEnd uint8 SustainLoopBegin uint8 SustainLoopEnd uint8 NodePoints [25]NodePoint24 Reserved51 uint8 }
Envelope is an envelope structure
type EnvelopeFlags ¶
type EnvelopeFlags uint8
EnvelopeFlags is the flagset for new instrument envelopes
type File ¶
type File struct { Head ModuleHeader OrderList []uint8 InstrumentPointers []ParaPointer32 SamplePointers []ParaPointer32 PatternPointers []ParaPointer32 Instruments []IMPIIntf Samples []FullSample Patterns []PackedPattern Blocks []block.Block }
File is an IT internal file representation
type FineVolume ¶
type FineVolume uint8
FineVolume defines a volume value with double precision
func (FineVolume) Value ¶
func (p FineVolume) Value() float32
Value returns the value of the fine volume as a floating point value between 0 and 1, inclusively
type FullSample ¶
FullSample is a full sample, header + data
type IMPIInstrument ¶
type IMPIInstrument struct { IMPI [4]byte Filename [12]byte Nul10 uint8 NewNoteAction NewNoteAction DuplicateCheckType DuplicateCheckType DuplicateCheckAction DuplicateCheckAction Fadeout uint16 PitchPanSeparation int8 PitchPanCenter uint8 GlobalVolume FineVolume DefaultPan PanValue RandomVolumeVariation Percentage8 RandomPanVariation Percentage8 TrackerVersion uint16 SampleCount uint8 Reserved1F uint8 Name [26]byte InitialFilterCutoff uint8 InitialFilterResonance uint8 MidiChannel uint8 MidiProgram uint8 MidiBank uint16 NoteSampleKeyboard [120]NoteSample VolumeEnvelope Envelope PanningEnvelope Envelope PitchEnvelope Envelope }
IMPIInstrument is the format of the IMPI Instrument for tracker compatibility versions >= 0x0200
func (*IMPIInstrument) GetFilename ¶
func (i *IMPIInstrument) GetFilename() string
GetFilename returns a string representation of the data stored in the Filename field
func (*IMPIInstrument) GetName ¶
func (i *IMPIInstrument) GetName() string
GetName returns a string representation of the data stored in the Name field
type IMPIInstrumentOld ¶
type IMPIInstrumentOld struct { IMPI [4]byte Filename [12]byte Nul10 uint8 Flags IMPIOldFlags VolumeLoopStart uint8 VolumeLoopEnd uint8 SustainLoopStart uint8 SustainLoopEnd uint8 Fadeout uint16 NewNoteAction NewNoteAction DuplicateNoteCheck DuplicateNoteCheck TrackerVersion uint16 SampleCount uint8 Reserved1F uint8 Name [26]byte Reserved3A [6]uint8 NoteSampleKeyboard [120]NoteSample VolumeEnvelope [200]uint8 NodePoints [25]NodePoint16 }
IMPIInstrumentOld is the format of the IMPI Instrument for tracker compatibility versions < 0x0200
func (*IMPIInstrumentOld) GetFilename ¶
func (i *IMPIInstrumentOld) GetFilename() string
GetFilename returns a string representation of the data stored in the Filename field
func (*IMPIInstrumentOld) GetName ¶
func (i *IMPIInstrumentOld) GetName() string
GetName returns a string representation of the data stored in the Name field
type IMPIOldFlags ¶
type IMPIOldFlags uint8
IMPIOldFlags is the flagset for IMPIInstrumentOld instruments
type IMPMFlags ¶
type IMPMFlags uint16
IMPMFlags is a set of flags describing various features in the IT file
func (IMPMFlags) IsEFGLinking ¶
IsEFGLinking returns true if effect E/F/G linking is enabled
func (IMPMFlags) IsLinearSlides ¶
IsLinearSlides returns true if linear slides is enabled
func (IMPMFlags) IsMidiPitchController ¶
IsMidiPitchController returns true if midi pitch controller is enabled
func (IMPMFlags) IsOldEffects ¶
IsOldEffects returns true if old-style effects are enabled
func (IMPMFlags) IsReqEmbedMidi ¶
IsReqEmbedMidi returns true if request embedded midi configuration is enabled
func (IMPMFlags) IsUseInstruments ¶
IsUseInstruments returns true if use-instruments (instead of samples) is enabled
func (IMPMFlags) IsVol0Optimizations ¶
IsVol0Optimizations returns true if vol-0 optimization is enabled
type IMPMSpecialFlags ¶
type IMPMSpecialFlags uint16
IMPMSpecialFlags is a set of flags describing various special features in the IT file
func (IMPMSpecialFlags) IsEmbedMidi ¶
func (sf IMPMSpecialFlags) IsEmbedMidi() bool
IsEmbedMidi returns true if embedded midi configuration is enabled
func (IMPMSpecialFlags) IsHighlightDataIncluded ¶
func (sf IMPMSpecialFlags) IsHighlightDataIncluded() bool
IsHighlightDataIncluded returns true if there is a highlight data attached to the file
func (IMPMSpecialFlags) IsHistoryIncluded ¶
func (sf IMPMSpecialFlags) IsHistoryIncluded() bool
IsHistoryIncluded returns true if there is a history block following the pattern parapointres in the file
func (IMPMSpecialFlags) IsMessageAttached ¶
func (sf IMPMSpecialFlags) IsMessageAttached() bool
IsMessageAttached returns true if there is a special message attached to the file
type ModuleHeader ¶
type ModuleHeader struct { IMPM [4]byte Name [26]byte PHighlight uint16 OrderCount uint16 InstrumentCount uint16 SampleCount uint16 PatternCount uint16 TrackerVersion uint16 TrackerCompatVersion uint16 Flags IMPMFlags SpecialFlags IMPMSpecialFlags GlobalVolume FineVolume MixingVolume FineVolume InitialSpeed uint8 InitialTempo uint8 PanningSeparation PanSeparation PitchWheelDepth uint8 MessageLength uint16 MessageOffset ParaPointer32 Reserved3C [4]uint8 ChannelPan [64]PanValue ChannelVol [64]Volume }
ModuleHeader is the initial header definition of an IT file
func ReadModuleHeader ¶
func ReadModuleHeader(r io.Reader) (*ModuleHeader, error)
ReadModuleHeader reads a ModuleHeader from the input stream
func (*ModuleHeader) GetName ¶
func (mh *ModuleHeader) GetName() string
GetName returns a string representation of the data stored in the Name field
type NodePoint16 ¶
NodePoint16 is a node point in the old instrument format
type NodePoint24 ¶
NodePoint24 is a node point in the new instrument format
type Note ¶
type Note uint8
Note is a note field value
func (Note) IsNoteFade ¶
IsNoteFade returns true if the note is a note-fade command
type NoteSample ¶
NoteSample is a note-sample keyboard mapping entry
type PackedPattern ¶
PackedPattern is a packed pattern from the IT format
func (*PackedPattern) ReadChannelData ¶
func (p *PackedPattern) ReadChannelData(pos int, rowMem []ChannelData) (int, *ChannelData, error)
ReadChannelData decodes a packed pattern from the position indicated (`pos`) and returns an integer equal to the number of bytes used to decode the channel data, a ChannelData structure, and a possible error value. If there is no error and the row is completed, the ChannelData structure returned will be nil.
type PanSeparation ¶
type PanSeparation uint8
PanSeparation is the panning separation value
func (PanSeparation) Value ¶
func (p PanSeparation) Value() float32
Value returns the value of the panning separation as a floating point value between 0 and 1, inclusively
type PanValue ¶
type PanValue uint8
PanValue describes a panning value in the IT format
func (PanValue) IsDisabled ¶
IsDisabled returns true if the channel this panning value is attached to is muted Effects in muted channels are still processed
func (PanValue) IsSurround ¶
IsSurround returns true if the panning is in surround-sound mode
type ParaPointer ¶
type ParaPointer interface {
Offset() int
}
ParaPointer is a pointer offset within the IT file format
type ParaPointer16 ¶
type ParaPointer16 uint16
ParaPointer16 is a 16-bit pointer offset within the IT file format
type ParaPointer24 ¶
type ParaPointer24 struct { Hi uint8 Lo ParaPointer16 }
ParaPointer24 is a 24-bit pointer offset within the IT file format
type ParaPointer32 ¶
type ParaPointer32 uint32
ParaPointer32 is a 32-bit pointer offset within the IT file format
type Percentage8 ¶
type Percentage8 uint8
Percentage8 is a percentage stored as a uint8
func (Percentage8) Value ¶
func (p Percentage8) Value() float32
Value returns the value of the percentage
type Sample ¶
type Sample struct { IMPS [4]byte Filename [12]byte Reserved10 [1]byte GlobalVolume Volume Flags SampleFlags Volume Volume Name [26]byte ConvertFlags ConvertFlags DefaultPan SamplePanValue Length uint32 LoopBegin uint32 LoopEnd uint32 C5Speed uint32 SustainLoopBegin uint32 SustainLoopEnd uint32 SamplePointer ParaPointer32 VibratoSpeed uint8 VibratoDepth uint8 VibratoSweep uint8 VibratoType uint8 }
Sample is a sample from the IT format
func (*Sample) GetFilename ¶
GetFilename returns a string representation of the data stored in the Filename field
type SampleFlags ¶
type SampleFlags uint8
SampleFlags defines the flags associated to the IT format sample header
func (SampleFlags) DoesSampleExist ¶
func (sf SampleFlags) DoesSampleExist() bool
DoesSampleExist returns true if the sample header has a sample associated with it.
func (SampleFlags) Is16Bit ¶
func (sf SampleFlags) Is16Bit() bool
Is16Bit returns true if the sample is 16-bit
func (SampleFlags) IsCompressed ¶
func (sf SampleFlags) IsCompressed() bool
IsCompressed returns true if the sample data is compressed
func (SampleFlags) IsLoopEnabled ¶
func (sf SampleFlags) IsLoopEnabled() bool
IsLoopEnabled returns true if the sample loop is enabled
func (SampleFlags) IsLoopPingPong ¶
func (sf SampleFlags) IsLoopPingPong() bool
IsLoopPingPong returns true if the sample loop mode is ping-pong
func (SampleFlags) IsStereo ¶
func (sf SampleFlags) IsStereo() bool
IsStereo returns true if the sample is stereo
func (SampleFlags) IsSustainLoopEnabled ¶
func (sf SampleFlags) IsSustainLoopEnabled() bool
IsSustainLoopEnabled returns true if the sample sustain loop is enabled
func (SampleFlags) IsSustainLoopPingPong ¶
func (sf SampleFlags) IsSustainLoopPingPong() bool
IsSustainLoopPingPong returns true if the sample sustain loop mode is ping-pong
type SamplePanValue ¶
type SamplePanValue uint8
SamplePanValue describes a panning value in the IT format's sample header
func (SamplePanValue) IsDisabled ¶
func (p SamplePanValue) IsDisabled() bool
IsDisabled returns true if the channel this panning value is attached to is muted Effects in muted channels are still processed
func (SamplePanValue) IsSurround ¶
func (p SamplePanValue) IsSurround() bool
IsSurround returns true if the panning is in surround-sound mode
func (SamplePanValue) Value ¶
func (p SamplePanValue) Value() float32
Value returns the value of the panning as a floating point value between 0 and 1, inclusively 0 = absolute left, 0.5 = center, 1 = absolute right