filestore

package
v0.0.0-...-410e261 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadNoteArrangement

func LoadNoteArrangement(path string) (*synth.NoteArrangement, error)

Loading a synth.NoteArrangement form a file on disk.

Types

type ArrangementDestination

type ArrangementDestination interface {
	WriteNoteArrangement(io.Writer, []synth.RawDelayedNoteData) error
}

A destination for some set of []synth.RawDelayedNoteData.

type ArrangementFormat

type ArrangementFormat interface {
	ReadNoteArrangement(io.Reader) ([]synth.RawDelayedNoteData, error)
	WriteNoteArrangement(io.Writer, []synth.RawDelayedNoteData) error
}

Merging the functionality of ArrangementSource and ArrangementDestination into a single interface.

func DecideFormat

func DecideFormat(extension string) (ArrangementFormat, error)

Given a string representing a file extension, attempt to map it to an arrangement type.

type ArrangementSource

type ArrangementSource interface {
	ReadNoteArrangement(io.Reader) ([]synth.RawDelayedNoteData, error)
}

Some source for a set of RawDelayedNoteData that can be written out using an ArrangementDestination

type JSONArrangement

type JSONArrangement struct{}

Dealing with synth.RawDelayedNoteData from a JSON file.

func (JSONArrangement) ReadNoteArrangement

func (a JSONArrangement) ReadNoteArrangement(reader io.Reader) ([]synth.RawDelayedNoteData, error)

func (JSONArrangement) WriteNoteArrangement

func (a JSONArrangement) WriteNoteArrangement(writer io.Writer, notes []synth.RawDelayedNoteData) error

type MIDIArrangement

type MIDIArrangement struct{}

Dealing with synth.RawDelayedNoteData from a MIDI file.

func (MIDIArrangement) ReadNoteArrangement

func (a MIDIArrangement) ReadNoteArrangement(reader io.Reader) ([]synth.RawDelayedNoteData, error)

func (MIDIArrangement) WriteNoteArrangement

func (a MIDIArrangement) WriteNoteArrangement(writer io.Writer, notes []synth.RawDelayedNoteData) error

type TextArrangement

type TextArrangement struct{}

Dealing with snyth.RawDelayedNoteData from flat plaintext files in the legacy formerly-used legacy format.

func (TextArrangement) ReadNoteArrangement

func (a TextArrangement) ReadNoteArrangement(reader io.Reader) ([]synth.RawDelayedNoteData, error)

func (TextArrangement) WriteNoteArrangement

func (a TextArrangement) WriteNoteArrangement(writer io.Writer, notes []synth.RawDelayedNoteData) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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