You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
James Brundage edited this page Oct 23, 2026
·
1 revision
get_Peak
Gets Wave Peaks
Gets the points in the wave that are peaks.
Outputs
Outputs a [Numerics.Vector2] where the X is the sample number and the Y is the sample.
View Source
<#.SYNOPSIS Gets Wave Peaks.DESCRIPTION Gets the points in the wave that are peaks..OUTPUTS Outputs a `[Numerics.Vector2]` where the X is the sample number and the Y is the sample. #>param()
[double[]]$samples=$this.Samplesfor ($sampleNumber=1 ; $sampleNumber-lt ($samples.Length-1); $sampleNumber++) {
# If the sampleif (
# is greater than the preceeding sample and$samples[$sampleNumber] -gt$samples[$sampleNumber-1] -and# the next sample,$samples[$sampleNumber] -gt$samples[$sampleNumber+1]
) {
# it is a peak.# Output that peak as a vector of our start time and sample
[Numerics.Vector2]::new(
$sampleNumber,$samples[$sampleNumber]
)
}
}