Ejemplo n.º 1
0
def memon_0_2_0_compatible_song(draw: DrawFunc) -> song.Song:
    """Memon v0.2.0 does not support preview_file"""
    random_song: song.Song = draw(
        jbst.song(
            diffs_strat=memon_diffs(),
            chart_strat=jbst.chart(timing_strat=st.none()),
            common_timing_strat=jbst.timing_info(with_bpm_changes=False),
        ))
    random_song.metadata.preview_file = None
    return random_song
Ejemplo n.º 2
0
def memo_compatible_song(draw: DrawFunc) -> song.Song:
    """Memo only supports one difficulty per file"""
    diff = draw(st.sampled_from(list(d.value for d in song.Difficulty)))
    chart = draw(
        jbst.chart(
            timing_strat=jbst.timing_info(with_bpm_changes=True),
            notes_strat=jbst.notes(),
        ))
    metadata: song.Metadata = draw(memo_compatible_metadata())
    return song.Song(
        metadata=metadata,
        charts={diff: chart},
    )
Ejemplo n.º 3
0
def eve_compatible_song(draw: DrawFunc) -> song.Song:
    """eve only keeps notes, timing info and difficulty,
    the precision you can get out of it is also severly limited"""
    diff = draw(st.sampled_from(list(song.Difficulty)))
    chart = draw(
        jbst.chart(
            timing_strat=jbst.timing_info(
                with_bpm_changes=True,
                bpm_strat=st.decimals(min_value=50, max_value=300, places=2),
                beat_zero_offset_strat=st.decimals(min_value=0,
                                                   max_value=20,
                                                   places=2),
                time_strat=jbst.beat_time(
                    min_section=1,
                    max_section=10,
                    denominator_strat=st.sampled_from([4, 3]),
                ),
            ),
            notes_strat=jbst.notes(
                note_strat=st.one_of(
                    jbst.tap_note(time_strat=simple_beat_strat),
                    jbst.long_note(
                        time_strat=simple_beat_strat,
                        duration_strat=jbst.beat_time(
                            min_numerator=1,
                            max_section=3,
                            denominator_strat=st.sampled_from([4, 3]),
                        ),
                    ),
                ),
                beat_time_strat=simple_beat_strat,
            ),
            level_strat=st.just(Decimal(0)),
        ))
    return song.Song(
        metadata=song.Metadata(),
        charts={diff: chart},
    )
Ejemplo n.º 4
0
def chart(draw: DrawFunc) -> song.Chart:
    c: song.Chart = draw(jbst.chart(level_strat=st.just(Decimal(0))))
    return c