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
James Brundage committed Feb 14, 2024
1 parent 7b0c852 commit 79153ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Types/OBS.Beat/get_Cosine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
Since this starts at 1, this would be at its highest value during the top of the beat.
#>
[Math]::Cos($this.BeatCount * [Math]::PI/2)
[Math]::Cos($this.BeatCount * ([Math]::PI/2))
10 changes: 7 additions & 3 deletions Types/OBS.Beat/set_BeatStart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ 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()
}

0 comments on commit 79153ac

Please sign in to comment.