-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: OBS.Beat.Duration ( Fixes #189 )
- Loading branch information
James Brundage
committed
Feb 14, 2024
1 parent
ed4830f
commit 6d09cb7
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<# | ||
.SYNOPSIS | ||
Gets the Duration | ||
.DESCRIPTION | ||
Gets the Duration of a Beat | ||
.OUTPUTS | ||
[TimeSpan] | ||
#> | ||
if ($this.'.BPM') { | ||
[Timespan]::FromMilliseconds((60 * 1000) / $this.'.BPM') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<# | ||
.SYNOPSIS | ||
Gets the Duration | ||
.DESCRIPTION | ||
Gets the Duration of a Beat | ||
.OUTPUTSobs | ||
[TimeSpan] | ||
#> | ||
param( | ||
# The new duration. | ||
# This will also set the BPM | ||
[timespan] | ||
$Duration | ||
) | ||
|
||
$this | Add-Member NoteProperty ".BPM" ( | ||
(60 * 1000) / $Duration.TotalMilliseconds | ||
) -Force -PassThru | ||
|