RhythmGame 1.4.3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
charts Namespace Reference

Classes and functions related to loading and calculating offsets in BMS charts. More...

Classes

struct  Artist
 
struct  ArtistTag
 
struct  BackBmp
 
struct  BackBmpTag
 
struct  Banner
 
struct  BannerTag
 
struct  Base
 
struct  BaseTag
 
struct  Bmp
 
struct  BmpTag
 
struct  BmsNotesData
 
struct  Bpm
 
struct  BpmTag
 
struct  Channel
 
struct  DefExRankTag
 
struct  Difficulty
 
struct  DifficultyTag
 
struct  ExBpm
 
struct  ExBpmTag
 
struct  FloatingPoint
 
struct  Genre
 
struct  GenreTag
 
struct  Identifier
 
struct  IdentifierChain
 
struct  IfBlock
 
struct  IfData
 
struct  IfList
 
struct  LnObj
 
struct  LnObjTag
 
struct  LnType
 
struct  LnTypeTag
 
struct  MainTags
 
struct  Measure
 
struct  MeasureBasedTag
 
struct  Meter
 
struct  MeterTag
 
struct  OrphanizedRandomCommonPart
 
struct  ParsedBmsChart
 Be-Music Source chart. More...
 
struct  PlayLevel
 
struct  PlayLevelTag
 
struct  RandomBlock
 
struct  RandomSink
 
struct  Rank
 
struct  RankTag
 
struct  ReportError
 
struct  Scroll
 
struct  ScrollTag
 
struct  Snap
 
struct  Speed
 
struct  SpeedTag
 
struct  StageFile
 
struct  StageFileTag
 
struct  Stop
 
struct  StopTag
 
struct  Subartist
 
struct  SubartistTag
 
struct  Subtitle
 
struct  SubtitleTag
 
struct  TagsSink
 
struct  TextTag
 
struct  Title
 
struct  TitleTag
 
struct  Total
 
struct  TotalTag
 
struct  Wav
 
struct  WavTag
 

Typedefs

using wav_t = std::pair< uint16_t, std::string >
 
using bmp_t = std::pair< uint16_t, std::string >
 
using lnobj_t = uint16_t
 
using pair_t = std::pair< uint16_t, double >
 
using stop_t = std::pair< uint16_t, double >
 
using meter_t = std::pair< int64_t, double >
 
using EncodedSound = std::shared_ptr< const QByteArray >
 
using EncodedSounds = std::unordered_map< uint64_t, EncodedSound >
 

Functions

template<std::integral T>
constexpr auto base62ToBase36 (T value) -> T
 
template<std::integral T>
constexpr auto base62ToBase16 (T value)
 
auto resolveIfs (ParsedBmsChart::RandomRange randomRange, std::vector< std::variant< IfData, ParsedBmsChart::Tags > > randomContents, const ParseState &parseState) -> ParsedBmsChart::Tags
 
auto getEncodingFromBom (std::string_view chart) -> const char *
 
auto readBmsChart (const std::string_view chart, const std::function< ParsedBmsChart::RandomRange(ParsedBmsChart::RandomRange)> &randomGenerator) -> ParsedBmsChart
 
auto loadArchivedSoundData (resource_managers::SongAssetStore *assetStore, const std::filesystem::path &chartDirectory, const std::unordered_map< uint64_t, std::filesystem::path > &paths, const std::atomic_bool *cancellation) -> EncodedSounds
 
auto soundPathKey (const std::filesystem::path &path) -> std::string
 
auto getActualPath (const std::unordered_map< std::string, std::filesystem::path > &lowerCaseFilesMap, const std::filesystem::path &filePath) -> std::optional< std::filesystem::path >
 
auto createLowerCaseFilesMap (std::filesystem::path dirToSearch) -> std::unordered_map< std::string, std::filesystem::path >
 
auto loadEncodedBuffers (sounds::AudioEngine *engine, const EncodedSounds &encodedSounds, const std::atomic_bool *cancellation) -> std::unordered_map< EncodedSound, std::shared_ptr< const sounds::SoundBuffer > >
 
auto createBmsonSounds (sounds::AudioEngine *engine, const std::unordered_map< uint64_t, std::shared_ptr< const sounds::SoundBuffer > > &channelBuffers, const std::vector< BmsNotesData::BmsonSliceInfo > &slices, const std::unordered_map< uint64_t, std::vector< uint64_t > > &fusions, const std::atomic_bool *cancellation) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >
 
auto loadBmsSounds (sounds::AudioEngine *engine, const std::unordered_map< uint64_t, std::filesystem::path > &wavs, const std::filesystem::path &path, const std::atomic_bool *cancellation) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >
 
auto loadBmsSounds (sounds::AudioEngine *engine, const EncodedSounds &wavs, const std::atomic_bool *cancellation) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >
 
auto loadBmsonSounds (sounds::AudioEngine *engine, const std::unordered_map< uint64_t, std::filesystem::path > &channelPaths, const std::vector< BmsNotesData::BmsonSliceInfo > &slices, const std::unordered_map< uint64_t, std::vector< uint64_t > > &fusions, const std::filesystem::path &basePath, const std::atomic_bool *cancellation=nullptr) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >
 Loads and slices sounds for a bmson chart.
 
auto loadBmsonSounds (sounds::AudioEngine *engine, const EncodedSounds &channels, const std::vector< BmsNotesData::BmsonSliceInfo > &slices, const std::unordered_map< uint64_t, std::vector< uint64_t > > &fusions, const std::atomic_bool *cancellation) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >
 

Detailed Description

Classes and functions related to loading and calculating offsets in BMS charts.

Typedef Documentation

◆ bmp_t

using charts::bmp_t = typedef std::pair<uint16_t, std::string>

◆ EncodedSound

using charts::EncodedSound = typedef std::shared_ptr<const QByteArray>

◆ EncodedSounds

using charts::EncodedSounds = typedef std::unordered_map<uint64_t, EncodedSound>

◆ lnobj_t

using charts::lnobj_t = typedef uint16_t

◆ meter_t

using charts::meter_t = typedef std::pair<int64_t, double>

◆ pair_t

using charts::pair_t = typedef std::pair<uint16_t, double>

◆ stop_t

using charts::stop_t = typedef std::pair<uint16_t, double>

◆ wav_t

using charts::wav_t = typedef std::pair<uint16_t, std::string>

Function Documentation

◆ base62ToBase16()

template<std::integral T>
constexpr auto charts::base62ToBase16 ( T  value)
constexpr

◆ base62ToBase36()

template<std::integral T>
constexpr auto charts::base62ToBase36 ( T  value) -> T
constexpr

◆ createBmsonSounds()

auto charts::createBmsonSounds ( sounds::AudioEngine *  engine,
const std::unordered_map< uint64_t, std::shared_ptr< const sounds::SoundBuffer > > &  channelBuffers,
const std::vector< BmsNotesData::BmsonSliceInfo > &  slices,
const std::unordered_map< uint64_t, std::vector< uint64_t > > &  fusions,
const std::atomic_bool *  cancellation 
) -> std::unordered_map<uint64_t, std::shared_ptr<sounds::Sound>>

◆ createLowerCaseFilesMap()

auto charts::createLowerCaseFilesMap ( std::filesystem::path  dirToSearch) -> std::unordered_map<std::string, std::filesystem::path>

◆ getActualPath()

auto charts::getActualPath ( const std::unordered_map< std::string, std::filesystem::path > &  lowerCaseFilesMap,
const std::filesystem::path &  filePath 
) -> std::optional<std::filesystem::path>

◆ getEncodingFromBom()

auto charts::getEncodingFromBom ( std::string_view  chart) -> const char*

◆ loadArchivedSoundData()

auto charts::loadArchivedSoundData ( resource_managers::SongAssetStore *  assetStore,
const std::filesystem::path &  chartDirectory,
const std::unordered_map< uint64_t, std::filesystem::path > &  paths,
const std::atomic_bool *  cancellation 
) -> EncodedSounds

◆ loadBmsonSounds() [1/2]

auto charts::loadBmsonSounds ( sounds::AudioEngine *  engine,
const EncodedSounds &  channels,
const std::vector< BmsNotesData::BmsonSliceInfo > &  slices,
const std::unordered_map< uint64_t, std::vector< uint64_t > > &  fusions,
const std::atomic_bool *  cancellation 
) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >

◆ loadBmsonSounds() [2/2]

auto charts::loadBmsonSounds ( sounds::AudioEngine *  engine,
const std::unordered_map< uint64_t, std::filesystem::path > &  channelPaths,
const std::vector< BmsNotesData::BmsonSliceInfo > &  slices,
const std::unordered_map< uint64_t, std::vector< uint64_t > > &  fusions,
const std::filesystem::path &  basePath,
const std::atomic_bool *  cancellation = nullptr 
) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >

Loads and slices sounds for a bmson chart.

Parameters
engineThe audio engine.
channelPathsMap from channel index to sound file path.
slicesSlice descriptors from BmsNotesData::bmsonSlices.
fusionsFusion map from BmsNotesData::bmsonFusions.
basePathThe directory containing the bmson file.
Returns
Map from sound ID to Sound (including MultiSounds for fusions).

◆ loadBmsSounds() [1/2]

auto charts::loadBmsSounds ( sounds::AudioEngine *  engine,
const EncodedSounds &  wavs,
const std::atomic_bool *  cancellation 
) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >

◆ loadBmsSounds() [2/2]

auto charts::loadBmsSounds ( sounds::AudioEngine *  engine,
const std::unordered_map< uint64_t, std::filesystem::path > &  wavs,
const std::filesystem::path &  path,
const std::atomic_bool *  cancellation 
) -> std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > >

◆ loadEncodedBuffers()

auto charts::loadEncodedBuffers ( sounds::AudioEngine *  engine,
const EncodedSounds &  encodedSounds,
const std::atomic_bool *  cancellation 
) -> std::unordered_map<EncodedSound, std::shared_ptr<const sounds::SoundBuffer>>

◆ readBmsChart()

auto charts::readBmsChart ( const std::string_view  chart,
const std::function< ParsedBmsChart::RandomRange(ParsedBmsChart::RandomRange)> &  randomGenerator 
) -> ParsedBmsChart

◆ resolveIfs()

auto charts::resolveIfs ( ParsedBmsChart::RandomRange  randomRange,
std::vector< std::variant< IfData, ParsedBmsChart::Tags > >  randomContents,
const ParseState &  parseState 
) -> ParsedBmsChart::Tags

◆ soundPathKey()

auto charts::soundPathKey ( const std::filesystem::path &  path) -> std::string