def test_osu2(self): mFrom = OsuMap.readFile(OSU_TRIBAL_TRIAL_MX) mTo = OsuMap.readFile(OSU_TRIBAL_TRIAL_EXH) mOut = hitSoundCopy(mFrom=mFrom, mTo=mTo) # mOut.writeFile("out.osu") mOut = hitSoundCopy(mFrom=mOut, mTo=mFrom)
def test_osu3(self): # Complex BPM osu = OsuMap.readFile(OSU_GRAVITY) sm = OsuToSM.convert(osu) sm.offset -= 15 + 41 sm.music = "Gravity.mp3"
def testSv(self): # Complex BPM Points osu = OsuMap.readFile(OSU_CARAVAN) seq = SvSequence() seq.readSvFromMap(osu) for sv, sv0 in zip(seq.writeAsSv(OsuSv, volume=0)[:50], osu.svs): assert isinstance(sv, OsuSv) self.assertAlmostEqual(sv0.multiplier, sv.multiplier) self.assertEqual(0, sv.volume)
def testTrueSv(self): # Complex BPM Points osu = OsuMap.readFile(OSU_CARAVAN) seq = SvSequence() seq.readTrueSvFromMap(osu, 140) # Just need to check the first 50, others should be ok. for sv in seq.writeAsSv(OsuSv, volume=0)[:50]: assert isinstance(sv, OsuSv) self.assertAlmostEqual(1, sv.multiplier, delta=0.01) self.assertEqual(0, sv.volume)
def test_osu(self): osu = OsuMap.readFile(OSU_BOOGIE) ptn = Pattern.fromPkg([osu.notes.hits(), osu.notes.holds()]) grp = ptn.group(hwindow=None, vwindow=50, avoidJack=True) keys = osu.notes.maxColumn() + 1 pf = PlayField(m=osu, durationPerPx=5) \ + PFDrawLines.fromCombo(keys=keys, **PFDrawLines.Colors.RED, combo=PtnCombo(grp).templateChordStream(primary=3, secondary=2, keys=keys, andLower=True)) \ + PFDrawLines.fromCombo(keys=keys, **PFDrawLines.Colors.BLUE, combo=PtnCombo(grp).templateChordStream(primary=2, secondary=1, keys=keys, andLower=True)) \ + PFDrawLines.fromCombo(keys=keys, **PFDrawLines.Colors.PURPLE, combo=PtnCombo(grp).templateJacks(minimumLength=2, keys=keys)) # pf.exportFold(maxHeight=1750, stageLineWidth=0).save("osu.png") pass
from reamber.osu.OsuMap import OsuMap import matplotlib.pyplot as plt from reamber.algorithms.analysis.generic.rollingDensity import rollingDensity m = OsuMap() m.readFile("generic/PLANETSHAPER.osu") rollingDensity(m.notes.hits().offsets(), rollingWindowS=2).plot() plt.show()
def test_osu(self): m = OsuMap.readFile(OSU_CARAVAN) m.bpms.snapOffsets(nths=4, lastOffset=10000)
def test_osu3(self): # Complex BPM osu = OsuMap.readFile(OSU_GRAVITY) qua = OsuToQua.convert(osu) qua.music = "Gravity.mp3"
def test_osu2(self): # Stops osu = OsuMap.readFile(OSU_ESCAPES) qua = OsuToQua.convert(osu)
def test_osu1(self): # Complex BPM Points osu = OsuMap.readFile(OSU_CARAVAN) qua = OsuToQua.convert(osu)
from reamber.algorithms.plot.nps import npsPlot from reamber.osu.OsuMap import OsuMap import matplotlib.pyplot as plt m = OsuMap() m.readFile("note/PLANETSHAPER.osu") npsPlot(m, binSize=500) plt.show()
def testByKey(self): plt.clf() m = OsuMap.readFile(OSU_PLANET_SHAPER) npsPlotByKey(m.notes)
from reamber.algorithms.plot.nps import npsPlot from reamber.osu.OsuMap import OsuMap import matplotlib.pyplot as plt m = OsuMap.readFile("plot/PLANETSHAPER.osu") npsPlot(m, binSize=500) plt.show()
def test(self): # Complex BPM Points osu = OsuMap.readFile(OSU_ZENITHALIZE_19) bms = OsuToBMS.convert(osu, moveRightBy=1) bms.writeFile('out.bme', BMSChannel.BME)
from aleph.f598 import f598 from aleph.f608 import f608 from aleph.f834 import f834 from aleph.f919 import f919 from aleph.f950 import f950 from reamber.osu.OsuBpm import OsuBpm from reamber.osu.OsuMap import OsuMap logging.basicConfig(filename="event.log", filemode="w+", level=logging.DEBUG) # Path is redacted path = "LeaF - Aleph-0 (extended ver.) (Evening) [Easy 1].osu" np.random.seed(2) osu = OsuMap.readFile(path) osu.bpms.clear() # Comment out anything here to remove that section f002(osu) f017(osu) f018(osu) f019(osu) f024(osu) f028(osu) f039(osu) f053(osu) f072(osu) f083(osu)
def test_osu(self): m = OsuMap.readFile(OSU_ICFITU) m.describe()
def test_osu(self): m = OsuMap.readFile(OSU_PLANET_SHAPER) offset = m.notes.offsets(flatten=True)[:10] m.rate(2.0, inplace=True) for i, j in zip(offset, m.notes.offsets(flatten=True)[:10]): self.assertAlmostEqual(i / 2, j)