Skip to content

Commit

Permalink
feat: OBS.Beat.Timer ( Fixes #195 )
Browse files Browse the repository at this point in the history
Setting .BeatStart starts the timer.
  • Loading branch information
StartAutomating authored and StartAutomating committed Feb 14, 2024
1 parent 79153ac commit a76b993
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions obs-powershell.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ param(
# The Beat Start Time
[DateTime]$BeatStartTime
)
$this | Add-Member NoteProperty ".BeatStart" (
$BeatStartTime
) -Force
if ($this.'.BPM') {
$this | Add-Member NoteProperty ".BeatStart" (
$BeatStartTime
) -Force
$this.Timer.Start()
}


</SetScriptBlock>
</ScriptProperty>
Expand Down Expand Up @@ -154,7 +158,7 @@ $this.Timer = $duration

Since this starts at 1, this would be at its highest value during the top of the beat.
#&gt;
[Math]::Cos($this.BeatCount * [Math]::PI/2)
[Math]::Cos($this.BeatCount * ([Math]::PI/2))
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
Expand Down

0 comments on commit a76b993

Please sign in to comment.