mashapp

package
v0.0.0-...-0ccfc62 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SAMPLE_RATE       = s.CyclesPerSecond
	MIN_FREQ          = 55.0
	OCTAVES           = 7
	MAX_FREQ          = 55.0 * (1 << OCTAVES)
	BINS_PER_SEMITONE = 4
	BPO               = 12 * BINS_PER_SEMITONE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	ID      int    `json:"id"`
	InputID int    `json:"inputId"`
	Name    string `json:"name"`

	StartSample int `json:"startSample"`
	EndSample   int `json:"endSample"`

	// TODO - use?
	Selected bool `json:"selected"`
}

type BootstrapData

type BootstrapData struct {
	Files []string `json:"files"`
}

type CreateBlockRequest

type CreateBlockRequest struct {
	Block Block `json:"block"`
}

Create Block RPC

type CreateBlockResponse

type CreateBlockResponse struct {
	Block Block `json:"block"`
}

type EditRequest

type EditRequest struct {
	Meta InputMeta `json:"meta"`
}

Edit Input RPC

type EditResponse

type EditResponse struct {
	Input   InputMeta   `json:"meta"`
	Samples JsonSamples `json:"samples"`
}

type GoSamples

type GoSamples []float64

type InputMeta

type InputMeta struct {
	ID    int    `json:"id,string"`
	Path  string `json:"path"`
	Muted bool   `json:"muted"`

	// Init -> Final length in samples
	OriginalLength int `json:"originalLength,string"`
	FinalLength    int `json:"finalLength,string"`

	// Init -> Final pitch in semitones
	OriginalPitch int `json:"originalPitch,string"`
	FinalPitch    int `json:"finalPitch,string"`
}

type InputSound

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

HACK - remove, replace with structs from model.go

type JsonSamples

type JsonSamples string

type LoadRequest

type LoadRequest struct {
	Path string `json:"path"`
}

Load input RPC

type LoadResponse

type LoadResponse struct {
	Input   InputMeta   `json:"meta"`
	Samples JsonSamples `json:"samples"`
}

type MashAppServer

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

func NewServer

func NewServer(port int, rootPath string, filePath string) *MashAppServer

func (*MashAppServer) Serve

func (s *MashAppServer) Serve()

type Modification

type Modification struct {
	Type   int       `json:"type,string"`
	Params []float64 `json:"params"`
}

type OutputMeta

type OutputMeta struct {
	ID      int `json:"id,string"`
	BlockID int `json:"blockID,string"`

	Line  int  `json:"line,string"`
	Muted bool `json:"muted"`

	// NOTE: TimeShift if Duration() != Duration(Block)
	StartSample int `json:"startSample,string"`
	EndSample   int `json:"endSample,string"`

	// TODO - use?
	Selected bool `json:"selected"`

	Changes []Modification `json:"changes"`
}

type ServerState

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

func NewServerState

func NewServerState() *ServerState

type TemplateData

type TemplateData struct {
	// Files []string
	JsonConfig template.HTML
}

Jump to

Keyboard shortcuts

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