func (f FractionMap) S() core.Sequence {
	frac := core.String(f.fraction)
	if len(frac) == 0 {
		notify.Warnf("invalid fraction type detected, %v", f.fraction)
		return core.EmptySequence
	}
	mapping, err := parseIndexFractions(frac)
	if err != nil {
		notify.Warnf("invalid fraction mapping detected, %v", err)
		return core.EmptySequence
	}
	if len(mapping) == 0 {
		return core.EmptySequence
	}
	source := f.target.S().Notes
	target := [][]core.Note{}
	for _, entry := range mapping {
		if entry.at <= 0 || entry.at > len(source) {
			continue
		}
		eachGroup := source[entry.at-1]  
		newGroup := []core.Note{}
		for _, eachNote := range eachGroup {
			newGroup = append(newGroup, eachNote.WithFraction(float32(1.0/float32(entry.inverseFraction)), entry.dotted))
		}
		target = append(target, newGroup)
	}
	return core.Sequence{Notes: target}
}
S is part of core.Sequenceable
package op
import (
	"fmt"
	"strconv"
	"strings"
	"github.com/emicklei/melrose/core"
	"github.com/emicklei/melrose/notify"
)
type FractionMap struct {
	fraction core.HasValue
	target   core.Sequenceable
}
func NewFractionMap(fraction core.HasValue, target core.Sequenceable) FractionMap {
	return FractionMap{fraction: fraction, target: target}
}