From 6de36d6d77f733f6e830d01f8fb4f400c833707b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Feb 2024 06:04:12 +0000 Subject: [PATCH 1/3] feat: OBS.Beat.BeatCount ( Fixes #190 ) --- obs-powershell.types.ps1xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/obs-powershell.types.ps1xml b/obs-powershell.types.ps1xml index f2d4419b0..949270147 100644 --- a/obs-powershell.types.ps1xml +++ b/obs-powershell.types.ps1xml @@ -4,6 +4,24 @@ OBS.Beat + + BeatCount + + <# +.SYNOPSIS + Gets the Beat Count +.DESCRIPTION + Gets the number of beats since the beat started. +.EXAMPLE + $obs.Beat.BeatCount +#> +if ($this.'.BPM' -and $this.'.BeatStart') { + ([DateTime]::Now - $this.'.BeatStart').TotalMilliseconds / + ((60 * 1000) / $this.'.BPM') +} + + + BeatStart From 5da3127662c8be4d72346e2c76958e21baf333b1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Feb 2024 06:05:22 +0000 Subject: [PATCH 2/3] feat: OBS.Beat.BeatCount ( Fixes #190 ) --- docs/OBS/Beat/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/OBS/Beat/README.md b/docs/OBS/Beat/README.md index 93906a6b7..dff2a4d61 100644 --- a/docs/OBS/Beat/README.md +++ b/docs/OBS/Beat/README.md @@ -4,6 +4,7 @@ ### Script Methods +* [get_BeatCount](get_BeatCount.md) * [get_BeatStart](get_BeatStart.md) * [set_BeatStart](set_BeatStart.md) * [get_BPM](get_BPM.md) From bd9f8d2233b362c49f9036e2efbe11e30024c7f8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 14 Feb 2024 06:05:22 +0000 Subject: [PATCH 3/3] feat: OBS.Beat.BeatCount ( Fixes #190 ) --- docs/OBS/Beat/get_BeatCount.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/OBS/Beat/get_BeatCount.md diff --git a/docs/OBS/Beat/get_BeatCount.md b/docs/OBS/Beat/get_BeatCount.md new file mode 100644 index 000000000..074580f38 --- /dev/null +++ b/docs/OBS/Beat/get_BeatCount.md @@ -0,0 +1,22 @@ +OBS.Beat.get_BeatCount() +------------------------ + +### Synopsis +Gets the Beat Count + +--- + +### Description + +Gets the number of beats since the beat started. + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +$obs.Beat.BeatCount +``` + +---