Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
serial.go892 B
package op import ( "bytes" "fmt" "io" "github.com/emicklei/melrose/core" ) type Serial struct { Target []core.Sequenceable } func (a Serial) S() core.Sequence { n := []core.Note{} for _, each := range a.Target { each.S().NotesDo(func(each core.Note) { n = append(n, each) }) } return core.BuildSequence(n) } // Storex is part of Storable func (a Serial) Storex() string { var b bytes.Buffer fmt.Fprintf(&b, "ungroup(") for i, each := range a.Target { s, ok := each.(core.Storable) if !ok { return "" } fmt.Fprintf(&b, "%s", s.Storex()) if i < len(a.Target)-1 { io.WriteString(&b, ",") } } fmt.Fprintf(&b, ")") return b.String() } // Replaced is part of Replaceable func (a Serial) Replaced(from, to core.Sequenceable) core.Sequenceable { if core.IsIdenticalTo(a, from) { return to } return Serial{Target: replacedAll(a.Target, from, to)} }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emicklei/melrose'

If you have feedback or need assistance with the MCP directory API, please join our Discord server