rpp

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(element *Element, writer io.Writer) error

Write the parsed Element tree to a writer

Types

type Element

type Element struct {
	RootFileName string
	Tag          string
	Attrib       []string
	Children     []*Element
}

An element in the RPP file

func Load

func Load(filePath string) (*Element, error)

Load and parse an RPP file from a given path

func LoadFromReader

func LoadFromReader(r io.Reader) (*Element, error)

Parses an RPP file from a reader

func (Element) String

func (e Element) String() string

type FXChain

type FXChain struct {
	Instances []FXInstance
}

The FX chain itself

func (FXChain) String

func (t FXChain) String() string

Stringer implementation for FXChain

type FXInstance

type FXInstance struct {
	WndRect    [4]int
	Show       int
	LastSel    int
	Docked     int
	Bypass     [3]int
	PresetName string
	FxId       string
	Vst        string
}

An FX chain item

func (FXInstance) String

func (f FXInstance) String() string

Stringer implementation for FXChain

type Item

type Item struct {
	Position float64
	Length   float64
	Loop     int
	Name     string
	Source   Source
	Guid     string
	Playrate float64
}

A track item

func (Item) String

func (i Item) String() string

Stringer implementation for Item

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

Lexer to tokenize RPP content

func NewLexer

func NewLexer(input string) *Lexer

Create new lexer for the input

func (*Lexer) NextToken

func (l *Lexer) NextToken() Token

Returns the next token in the lexer

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Currently a lexer container

func NewParser

func NewParser(input string) *Parser

Initialize a parser

func (*Parser) Parse

func (p *Parser) Parse() (*Element, error)

Start parsing

type ProjectInfo

type ProjectInfo struct {
	ProjectName      string
	OriginalPlatform string
	Tempo            float64
	LoopEnabled      bool
	SampleRate       int
	Tracks           Tracks
	Items            []Item
	FXChains         []FXChain
}

General project information

func ParseProjectInfo

func ParseProjectInfo(element *Element) ProjectInfo

Get project information from the Element tree

func (ProjectInfo) AsTable

func (p ProjectInfo) AsTable() table.Table

Tabler implementation for ProjectInfo

func (ProjectInfo) String

func (p ProjectInfo) String() string

Stringer implementation for ProjectInfo

type Source

type Source struct {
	Type string
	File string
}

(FLAC, WAV, etc.)

func (Source) String

func (s Source) String() string

Stringer implementation for Source

type Token

type Token struct {
	Type  string
	Value string
}

Some lexeme

type Track

type Track struct {
	Number   int
	GUID     string
	FXChains []FXChain
}

Some track in the playlist

func (Track) String

func (t Track) String() string

Stringer implementation for Track

type Tracks

type Tracks struct {
	TrackList []Track
}

Bunch of tracks

func (Tracks) String

func (t Tracks) String() string

Stringer implementation for Tracks

Jump to

Keyboard shortcuts

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