Navigation
API > API/Plugins > API/Plugins/HarmonixMidi > API/Plugins/HarmonixMidi/FBarMap
Description
Takes an tick relative to "bar 1 beat 1" and calculates a music timestamp. Uses the collection of time signatures, the setting of TicksPerQuarterNote, and the setting of StartBar to do its calculations. It will also optionally return the number of beats in the found bar, which is the numerator of the current time signature.
| Name | TickFromBarOneToMusicTimestamp |
| Type | function |
| Header File | /Engine/Plugins/Runtime/Harmonix/Source/HarmonixMidi/Public/HarmonixMidi/BarMap.h |
| Include Path | #include "HarmonixMidi/BarMap.h" |
| Source | /Engine/Plugins/Runtime/Harmonix/Source/HarmonixMidi/Private/HarmonixMidi/BarMap.cpp |
FMusicTimestamp TickFromBarOneToMusicTimestamp
(
float Tick,
int32 * OutBeatsPerBar
) const
The FMusicTimestamp where Bar 1 Beat 1 is the "beginning of the song" after count-in and pickup bars.
Parameters
| Name | Remarks |
|---|---|
| Tick | 0-based tick offset from Bar 1. So Tick 0 will always be Bar 1 Beat 1 regarless of the length of the count-in or pickup bars. |
| OutBeatPerBar | Is not nullptr it will be filled in with the number of total beats in the described bar. |