Ilysa by Example: Sequence - Seq

package main
import (
    "github.com/shasderias/ilysa"
    "github.com/shasderias/ilysa/beatsaber"
    "github.com/shasderias/ilysa/context"
    "github.com/shasderias/ilysa/evt"
    "github.com/shasderias/ilysa/timer"
)
func main() {
    m, _ := beatsaber.NewMockMap(beatsaber.EnvironmentOrigins, 120, "[]")
    p := ilysa.New(m)

timer.Seq() specifies an arbitrary sequence of beats. timer.Seq() also takes a ghost beat (5) that does not form part of the sequence.

    p.Sequence(timer.Seq([]float64{0, 1.5, 2, 4}, 5), func(ctx context.Context) {

ctx.NewLaser() specifies a laser speed event.

        ctx.NewLaser(
            evt.WithDirectionalLaser(evt.LeftLaser),
            evt.WithIntValue(1),
        )
    })
    p.Dump()
}
$ go run sequence-seq.go
[
    {"_time":0,"_type":12,"_value":1},
    {"_time":1.5,"_type":12,"_value":1},
    {"_time":2,"_type":12,"_value":1},
    {"_time":4,"_type":12,"_value":1}
]

Next example: Sequence - Context.