track

package
v1.6.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultVeloctiyScale = [5]uint8{1, 127, 4, 15, 63}

Functions

This section is empty.

Types

type Track

type Track struct {
	Name           string
	FileGroup      string
	Import         string
	MIDIChannel    int8
	MIDIProgram    int8
	MIDIBank       int8
	MIDIVolume     int8
	MIDITranspose  int8   // only transposes Notes not MIDINotes
	Delay          [2]int // fraction of 4/4
	PitchbendRange uint8
	// velocity-scale property to refine velocity conversion (min, max, randomize-factor, step-width)
	VelocityScale [5]uint8 // 0: min 1: max 2: randomize-factor 3: step-width, 4: center
	/*
		ambitus from: to:
	*/
	Ambitus            [2]string // notes
	AmbitusCutOverFlow bool
	EndPos             uint
	SkipInScore        bool
	Position           int
	SoloGroup          int // x < 0 =  never export; x = 0 = no solo group (will only be exported without solo); x > 0 = number of the solo group (only relevant in solo mode)
}

func New

func New(name string) *Track

func (*Track) SetAmbitus added in v1.0.2

func (t *Track) SetAmbitus(ambString string) error

func (*Track) SetBank

func (t *Track) SetBank(data string) error

setTrackBank sets the MIDI bank for a track

func (*Track) SetChannel

func (t *Track) SetChannel(data string) error

setTrackChannel sets the MIDI channel of a track

func (*Track) SetDelay

func (t *Track) SetDelay(data string) error

setDelay sets the delay for a track

func (*Track) SetFileGroup

func (t *Track) SetFileGroup(data string) error

func (*Track) SetImport

func (t *Track) SetImport(importFrom string) error

func (*Track) SetPitchbendrange

func (t *Track) SetPitchbendrange(data string) error

func (*Track) SetPosition added in v1.2.21

func (t *Track) SetPosition(data string) error

SetPosition sets position in the midi file

func (*Track) SetProgram

func (t *Track) SetProgram(data string) error

setTrackProgram sets the MIDI program value of a track

func (*Track) SetSoloGroup added in v1.2.2

func (t *Track) SetSoloGroup(data string) error

SetSoloGroup sets the sologroup of a track

func (*Track) SetTranspose

func (t *Track) SetTranspose(data string) error

setTrackTranspose sets the MIDITranspose for a track

func (*Track) SetVelScale

func (t *Track) SetVelScale(velScale string) error

func (*Track) SetVolume

func (t *Track) SetVolume(data string) error

setTrackVolume sets the MIDI volume of a track

type Tracks added in v1.2.21

type Tracks []*Track

func (Tracks) Len added in v1.2.21

func (t Tracks) Len() int

func (Tracks) Less added in v1.2.21

func (t Tracks) Less(a, b int) bool

func (Tracks) Swap added in v1.2.21

func (t Tracks) Swap(a, b int)

Jump to

Keyboard shortcuts

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