A Rust library for analyzing osu! beatmaps, and determines what class it is (stream, jump, tech, etc).
Add this to your Cargo.toml:
[dependencies]
osu-map-analyzer = "0.2.9"or simply run cargo add osu-map-analyzer for the latest version
Here's a basic example of how to use the library:
use std::path::Path;
use osu_map_analyzer::{analyze, rosu_map};
fn main() {
let path = Path::new("path/to/your/beatmap.osu");
let map = rosu_map::from_path::<rosu_map::Beatmap>(path).unwrap();
let mut stream_analyzer = analyze::Stream::new(map.clone());
let stream_analysis = stream_analyzer.analyze();
println!("Stream analysis: {:#?}", stream_analysis);
let mut jump_analyzer = analyze::Jump::new(map);
let jump_analysis = jump_analyzer.analyze();
println!("Jump analysis: {:#?}", jump_analysis);
}overall_confidence: How confident the library is that it's a stream mapshort_streams: Number of short streams (6-9 notes)medium_streams: Number of medium streams (10-19 notes)long_streams: Number of long streams (20+ notes)max_stream_length: Length of the longest streamstream_density: Density of streams in the mapbpm_consistency: Consistency of the BPM in streams (this doesn't really mean much)
overall_confidence: How confident the library is that it's a jump maptotal_jump_count: Total number of jumpsmax_jump_length: Length of the longest jump sequencelong_jumps: Number of long jumps (12+ notes)medium_jumps: Number of medium jumps (7-11 notes)short_jumps: Number of short jumps (4-6 notes)jump_density: Density of jumps in the mapbpm_consistency: Consistency of the BPM in jumps (this doesn't really mean much)
This project is licensed under the Apache License, Version 2.0 - see LICENSE for details.
This library uses rosu-map for parsing osu! beatmaps.