Expand description

This crate contains essential utilities to generate an OnShape yml level file.


use onshape_level_gen::util::*;
// this difficulty is a FFT result iterating factor.
let init_difficulty_limit = 1.2f32;
let input_ogg = "~/your_target_file.ogg";
let output_yml = "~/level.yml";
let (samples, output_params) = get_data_from_ogg(input_ogg).unwrap();
let notes = get_notes_from_samples(samples, init_difficulty_limit).unwrap();
let walls = get_walls_from_notes(&notes);
let yml_content = gen_yml(&output_params, walls);
std::fs::write(output_yml, yml_content).unwrap();


Contains general and utility functions.

Contains implementations for Wall module.


Parameters to adjust level difficulty.

The FFT result of a fixed segmenet of samples.

A collection of raw f32 data with sample rate from sound file.

Information about the original sound file.

Represents the time and the type of a wall.


4 Difficulties used in OnShape level script.

Represent the 5 dodge types in the OnShape game.

A most common type(left, center, right) in the OnShape game.

All 4 possible shapes in the OnShape game.