Skip to content

get_MaximumVolume

James Brundage edited this page Oct 23, 2026 · 1 revision

get_MaximumVolume

Gets Maximum Volume

Gets the Maximum Volume from a wave.

Notes

This is the delta between the maximum and minimum sample

View Source
<#
.SYNOPSIS
    Gets Maximum Volume
.DESCRIPTION
    Gets the Maximum Volume from a wave.
.NOTES
    This is the delta between the maximum and minimum sample
#>
param()
# Get our samples as a `[double[]]`
[double[]]$samples = $this.Samples

# If we did not have any samples,
# the maximum volume is obviously zero.
if (-not $samples) { return 0 }

# Otherwise, find the delta between max and min
return [Linq.Enumerable]::Max($samples) - [Linq.Enumerable]::Min($samples)    

Clone this wiki locally