Skip to content

Commit

Permalink
feat: OBS.Beat.Duration ( Fixes #189 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Feb 14, 2024
2 parents 6d09cb7 + bd9f8d2 commit 4d81ed7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/OBS/Beat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions docs/OBS/Beat/get_BeatCount.md
Original file line number Diff line number Diff line change
@@ -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
```

---
18 changes: 18 additions & 0 deletions obs-powershell.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
<Type>
<Name>OBS.Beat</Name>
<Members>
<ScriptProperty>
<Name>BeatCount</Name>
<GetScriptBlock>
&lt;#
.SYNOPSIS
Gets the Beat Count
.DESCRIPTION
Gets the number of beats since the beat started.
.EXAMPLE
$obs.Beat.BeatCount
#&gt;
if ($this.'.BPM' -and $this.'.BeatStart') {
([DateTime]::Now - $this.'.BeatStart').TotalMilliseconds /
((60 * 1000) / $this.'.BPM')
}

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>BeatStart</Name>
<GetScriptBlock>
Expand Down

0 comments on commit 4d81ed7

Please sign in to comment.