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