From a5bade4fbb5f5110bf8af4d436b67a2a0f84efa7 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Sun, 7 Dec 2025 14:52:20 -0500 Subject: [PATCH] pitch class - pitch class added to physical strips prelim pester tests for potato pass manual test for potato passes - recallpreset() --- CHANGELOG.md | 8 ++++++++ README.md | 15 +++++++++++++++ lib/strip.ps1 | 17 +++++++++++++++++ tests/higher.Tests.ps1 | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e74b5..b13bd15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,14 @@ Recorder.FileType changed from method to write-only property - StripAudibility class with Strip.Audibility.Knob - Strip.Denoiser.Threshold - Strip.VAIO +- Strip.Pitch, StripPitch class + - on + - drywet + - pitchvalue + - loformant + - medformant + - hiformant + - recallpreset($presetIndex) ### Changed diff --git a/README.md b/README.md index b83d477..00d6e14 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,21 @@ for example: $vmr.strip[3].denoiser.knob = 5 ``` +#### pitch + +The following strip.pitch commands are available: + +- on: bool +- drywet: float, from -100.00 to 100.00 +- pitchvalue: float, from -12.00 to 12.00 +- loformant: float, from -12.00 to 12.00 +- medformant: float, from -12.00 to 12.00 +- hiformant: float, from -12.00 to 12.00 + +The following strip.pitch methods are available: + +- RecallPreset($presetIndex) : int, from 0 to 7 + #### audibility The following strip.audibility commands are available: diff --git a/lib/strip.ps1 b/lib/strip.ps1 index ddbcf8e..cdd2136 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -78,6 +78,7 @@ class PhysicalStrip : Strip { [Object]$eq [Object]$device [Object]$audibility + [Object]$pitch PhysicalStrip ([int]$index, [Object]$remote) : base ($index, $remote) { AddFloatMembers -PARAMS @('color_x', 'color_y', 'fx_x', 'fx_y') @@ -88,6 +89,7 @@ class PhysicalStrip : Strip { $this.comp = [StripComp]::new($index, $remote) $this.gate = [StripGate]::new($index, $remote) $this.denoiser = [StripDenoiser]::new($index, $remote) + $this.pitch = [StripPitch]::new($index, $remote) $this.audibility = [StripAudibility]::new($index, $remote) $this.eq = [StripEq]::new($index, $remote) $this.device = [StripDevice]::new($index, $remote) @@ -155,6 +157,21 @@ class StripDenoiser : IRemote { ) } +class StripPitch : IRemote { + StripPitch ([int]$index, [Object]$remote) : base ($index, $remote) { + AddBoolMembers -PARAMS @('on') + AddFloatMembers -PARAMS @('drywet', 'pitchvalue', 'loformant', 'medformant', 'hiformant') + } + + [string] identifier () { + return 'Strip[' + $this.index + '].Pitch' + } + + [void] RecallPreset ([int]$presetIndex) { + $this.Setter('RecallPreset', $presetIndex) + } +} + class StripAudibility : IRemote { StripAudibility ([int]$index, [Object]$remote) : base ($index, $remote) { } diff --git a/tests/higher.Tests.ps1 b/tests/higher.Tests.ps1 index d381d30..3ec131c 100644 --- a/tests/higher.Tests.ps1 +++ b/tests/higher.Tests.ps1 @@ -39,6 +39,13 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' { $vmr.strip[$index].vaio = $value $vmr.strip[$index].vaio | Should -Be $expected } + + Context 'Pitch' -Skip:$ifNotPotato { + It "Should set Strip[$index].Pitch.On" { + $vmr.strip[$index].pitch.on = $value + $vmr.strip[$index].pitch.on | Should -Be $expected + } + } Context 'Eq' -Skip:$ifNotPotato -ForEach @( @{ Eq = $vmr.strip[$index].eq } @@ -332,6 +339,33 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' { } } + Context 'Pitch' -Skip:$ifNotPotato { + It "Should set Strip[$index].Pitch.drywet" { + $vmr.strip[$index].pitch.drywet = $slide + $vmr.strip[$index].pitch.drywet | Should -Be $slide + } + + It "Should set Strip[$index].Pitch.pitchvalue" { + $vmr.strip[$index].pitch.pitchvalue = $slide + $vmr.strip[$index].pitch.pitchvalue | Should -Be $slide + } + + It "Should set Strip[$index].Pitch.loformant" { + $vmr.strip[$index].pitch.loformant = $slide + $vmr.strip[$index].pitch.loformant | Should -Be $slide + } + + It "Should set Strip[$index].Pitch.medformant" { + $vmr.strip[$index].pitch.medformant = $slide + $vmr.strip[$index].pitch.medformant | Should -Be $slide + } + + It "Should set Strip[$index].Pitch.hiformant" { + $vmr.strip[$index].pitch.hiformant = $slide + $vmr.strip[$index].pitch.hiformant | Should -Be $slide + } + } + Context 'Audibility' -Skip:$ifNotBasic { It "Should set Strip[$index].Audibility" { $vmr.strip[$index].audibility.knob = $knob