ym

package module
v0.0.0-...-dd5fdfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YM1     = 0x594D3121
	YM2     = 0x594D3221 // ('Y' << 24) | ('M' << 16) | ('2' << 8) | ('!'),
	YM3     = 0x594D3321 //('Y' << 24) | ('M' << 16) | ('3' << 8) | ('b') ('Y' << 24) | ('M' << 16) | ('3' << 8) | ('!')
	YM4     = 0x594D3421 //('Y' << 24) | ('M' << 16) | ('4' << 8) | ('!')
	YM5     = 0x594D3521 //('Y' << 24) | ('M' << 16) | ('5' << 8) | ('!')
	YM6     = 0x594D3621 // ('Y' << 24) | ('M' << 16) | ('6' << 8) | ('!')
	YM_MIX1 = ('M' << 24) | ('I' << 16) | ('X' << 8) | ('1')
	YMT1    = ('Y' << 24) | ('M' << 16) | ('T' << 8) | ('1')
	YMT2    = ('Y' << 24) | ('M' << 16) | ('T' << 8) | ('2')
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Digidrum

type Digidrum struct {
	SampleSize uint32
	SampleData []byte
	RepLen     uint32
}

type MixBlock

type MixBlock struct {
	SampleStart  uint32
	SampleLength uint32
	NbRepeat     uint16
	ReplayFreq   uint16
}

type TimeKey

type TimeKey struct {
	Time    uint32
	NRepeat uint16
	NBlock  uint16
}

type Ym

type Ym struct {
	FileID           uint32
	CheckString      [8]byte
	NbVoice          int16
	TrackerFreqShift int
	NbFrames         uint32
	SongAttributes   uint32
	DigidrumNb       uint16
	YmMasterClock    uint32
	FrameHz          uint16
	LoopFrame        uint32
	Size             uint16
	Digidrums        []Digidrum
	NbMixBlock       uint32
	TimeInfo         []TimeKey
	NbTimeKey        int32
	MusicLenInMs     int32
	MixBlock         []MixBlock
	SongName         []byte
	AuthorName       []byte
	SongComment      []byte
	Data             [16][]byte
	EndID            uint32
}

func CopyYm

func CopyYm(ym *Ym) *Ym

func NewYm

func NewYm() *Ym

func (*Ym) ComputeTime

func (y *Ym) ComputeTime()

func (*Ym) Extract

func (y *Ym) Extract(startFrame, endFrame int) *Ym

nolint: funlen

func (*Ym) FormatType

func (y *Ym) FormatType() string

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL