func (s SequenceOnTrack) Storex() string {
	if st, ok := s.Target.(Storable); ok {
		return fmt.Sprintf("onbar(%v,%s)", s.Bar, st.Storex())
	}
	return ""
}
Storex implements Storable
package core
import (
	"bytes"
	"fmt"
	"time"
	"github.com/emicklei/melrose/notify"
)
type Track struct {
	Title   string
	Channel int
	Content map[int]Sequenceable  
}
func NewTrack(title string, channel int) *Track {
	return &Track{
		Title:   title,
		Channel: channel,
		Content: map[int]Sequenceable{},
	}
}
func (t *Track) Play(ctx Context, now time.Time) error {
	bpm := ctx.Control().BPM()
	biab := ctx.Control().BIAB()
	whole := WholeNoteDuration(bpm)
	for bars, each := range t.Content {
		cs := NewChannelSelector(each, On(t.Channel))
		offset := int64((bars-1)*biab) * whole.Nanoseconds() / 4
		when := now.Add(time.Duration(time.Duration(offset)))
		if IsDebug() {
			notify.Debugf("core.track title=%s channel=%d bar=%d, biab=%d, bpm=%.2f time=%s", t.Title, t.Channel, bars, biab, bpm, when.Format("04:05.000"))
		}
		ctx.Device().Play(NoCondition, cs, bpm, when)
	}
	return nil
}
func (t *Track) Inspect(i Inspection) {
	i.Properties["channel"] = t.Channel
	i.Properties["pieces"] = len(t.Content)
}
func (t *Track) Add(seq SequenceOnTrack) {
	b := Int(seq.Bar)
	t.Content[b] = seq.Target
}
func (t *Track) Storex() string {
	var buf bytes.Buffer
	fmt.Fprintf(&buf, "track('%s',%d", t.Title, t.Channel)
	for k, v := range t.Content {
		fmt.Fprint(&buf, ",")
		sont := NewSequenceOnTrack(On(k), v)  
		fmt.Fprint(&buf, sont.Storex())
	}
	fmt.Fprintf(&buf, ")")
	return buf.String()
}
type SequenceOnTrack struct {
	Bar    HasValue
	Target Sequenceable
}
func NewSequenceOnTrack(bar HasValue, seq Sequenceable) SequenceOnTrack {
	return SequenceOnTrack{Bar: bar, Target: seq}
}
func (s SequenceOnTrack) S() Sequence {
	return s.Target.S()
}