Hibiki/panako/point.go

18 lines
424 B
Go
Raw Normal View History

2022-01-23 20:55:49 +00:00
package panako
type EventPoint struct {
// Time The time expressed using an analysis frame index.
Time uint32
2022-01-23 20:55:49 +00:00
// Frequency The frequency expressed using the bin number Instance.TransformBands in the constant Q transform (Cent).
Frequency uint32
2022-01-23 20:55:49 +00:00
// Magnitude The energy value of the element.
Magnitude float32
}
func (p *EventPoint) DeltaTime(point *EventPoint) int64 {
return int64(p.Time) - int64(point.Time)
}