simfile.timing.displaybpm
Function & cla
Module Contents
Classes
A single BPM value. |
|
A range of BPM values. |
|
Used by StepMania to obfuscate the displayed BPM with random numbers. |
Functions
|
Get the display BPM from a simfile and optionally an SSC chart. |
Attributes
Type union of |
- class simfile.timing.displaybpm.StaticDisplayBPM
Bases:
NamedTupleA single BPM value.
- property min: decimal.Decimal
Returns the single BPM value.
- property max: decimal.Decimal
Returns the single BPM value.
- property range: None
- value: decimal.Decimal
The single BPM value. This property is None in the other DisplayBPM classes.
- class simfile.timing.displaybpm.RangeDisplayBPM
Bases:
NamedTupleA range of BPM values.
- property value: None
- property range: Tuple[decimal.Decimal, decimal.Decimal]
(min, max) tuple. This property is None in the other DisplayBPM classes.
- min: decimal.Decimal
- max: decimal.Decimal
- class simfile.timing.displaybpm.RandomDisplayBPM
Bases:
NamedTupleUsed by StepMania to obfuscate the displayed BPM with random numbers.
- property value: None
- property min: None
- property max: None
- property range: None
- simfile.timing.displaybpm.DisplayBPM
Type union of
StaticDisplayBPM,RangeDisplayBPM, andRandomDisplayBPM.
- simfile.timing.displaybpm.displaybpm(simfile: simfile.types.Simfile, ssc_chart: simfile.ssc.SSCChart = SSCChart(), ignore_specified: bool | None = False) DisplayBPM
Get the display BPM from a simfile and optionally an SSC chart.
If a DISPLAYBPM property is present (and ignore_specified isn’t set to True), its value is used as follows:
One number maps to
StaticDisplayBPMTwo “:”-separated numbers maps to
RangeDisplayBPMA literal “*” maps to
RandomDisplayBPM
Otherwise, the BPMS property will be used. A single BPM maps to
StaticDisplayBPM; if there are multiple, the minimum and maximum will be identified and passed toRangeDisplayBPM.If both an
SSCSimfile(version 0.7 or higher) and anSSCChartare provided, and if the chart contains any timing fields, the chart will be used as the source of timing.