forum

osu! Taiko Random Map + Pattern Generator v.2

posted
Total Posts
16
Topic Starter
DarkStoorM
Project has been canceled, sorry.
THIS GENERATOR HAS BEEN UPDATED TO THE NEWEST VERSION. CHECK MY USERPAGE FOR MORE DETAILS

Hello again!

Are you a Taiko player? Good.
I decided to leave this small "tool" here. If you are too lazy to map, if you want to play something different, something harder, stupid, etc. bla blah

Last time I uploaded a C# app, but it was taking too much time to make a map. I ported it to PHP with a modified interface but that was a bad idea.
Psst, _Gezo_, I know you can make a use of this, somehow.

Download

OK, so, the download:
>> Clicky
[9th of Dec 2016] - THIS SOURCE IS OUTDATED AND UGLY
I'm not sure if I will update the source, sorry.

IMPORTANT

It's PHP, so you know what to do. Upload to your server, use localhost, whatever you like (you can abuse your friends to do it for you).
Hey, Howl made it already :D -> http://otrp.zxq.co/

I won't use it as a service (I wanted to, but my server does not have that much space) - and an obvious reason, the security. Do not use it as a service unless you do some sort of a file scanning. It's more like for a personal use. But if you want to use it as a public service, why not :p

Old information

The script works by generating a random note at given time (the script handles it by itself), every 1/4 tick. Every pattern is separated by another 1/4 tick, which gives 1/2 pause between each pattern.

The script generates 8 difficulties:
  1. E-TaikoGen - basically a singletap - a random note every 1/1
  2. N-TaikoGen - generates patterns from one note, and three notes.
  3. H-TaikoGen - generates 1, 3, 5 notes patterns
  4. H-ATaikoGen - "advanced", generates 1, 3, 5 notes patterns + doubles followed by another doublet, because a single one was destroying the rhythm (odd patterns perfectly match the rhythm, so '2 + _pattern spacing_ + 2' actually makes 5 notes - theoretically - so it does not destroy the rhythm, so this was needed for these patterns)
  5. I-TaikoGen - generates 1, 3, 5, 7 notes patterns
  6. I-ATaikoGen - generates 1, 3, 5, 7 notes patterns AND "4 + 2" or "2 + 4" patterns, as explained above
  7. W-TaikoGen - generates 1, 3, 5, 7, 9 notes patterns
  8. ENDLESS - generates a "neverending" pattern. Just a random note each 1/4 tick, with no pause.

Known Issues

  1. Beatmap SHOULD NOT have any BPM changes - it immediately ends up with a note displacement.


    all the Timing Points that are NOT changing the BPM can be freely removed. It won't affect the patterns, except the first one, but that's obvious.
  2. The script removes all the files from storyboard, and leaves only the needed files - the reason of it was, that I didn't need any of the storyboard files, as I am playing with maximum dim, custom skin. I'm sorry.
  3. The script MAPS ALL THE BREAKS - it generates patterns without any pause, so some maps may feel awkward to play.
  4. It may throw an error on non-ASCII characters or may not complete the generation - I totally forgot about this issue, I did not check it. I just did not have such beatmaps. If you really need to generate a beatmap from some weird named beatmaps, you will probably have to change the name. Sorry, I have no idea how to deal with that. There is the source code, go check the line 160 in stuff.php
  5. Pay attention to the BPM value. Be sure to check the BPM in the editor - the game shows you a round value, don't forget about that. Use the editor, this will be the first thing you need to check anyway.
    - awesome (USE DOTS IN THE GENERATOR FORM, NOT COMMAS).
  6. This script does not handle the URL upload - sorry, I used a simple form. Feel free to edit it as much as you want.
  7. The source code DOES NOT contain any comments and is a huge mess - might be an issue if you would like to work with the code. I'm extremely sorry for that, I removed all the comments while porting to PHP, but I will try to explain how the generator works, sorry. I should not upload such thing, but, meh :'P
  8. File UPLOADING - it may not be an issue, but you have to wait for an upload to see any errors, correct them, and upload again. I would suggest using localhost for that. If you can, please write a C# application (well, any other language will do). It would be better for all of us.

How to use

First thing you need to know is, that the script selects the first file from the alphabetical order, so if you are planning on using a beatmap that has few difficulties, check the screenshot below:

This is your file to edit.
Now go to the editor, and check the BPM:

http://puu.sh/jwMn6.png
OK, the BPM is 165, a fine, round value, leave it as it is. (a note here, if the beatmap has 120BPM, you can generate a 240BPM song. Just change it to 240, and pick the SV in the website form like 1.6 or something, as you like.

Next thing, the timing points:

OK, cool, no additional REDs. You can add your KIAI, change volume, sv changes as you prefer. Only the red ones screw the whole process, I don't know how to deal with that.

Custom starting-ending points - the script starts generating patterns from the first note in the file, and ends on the last note - I think this is a self explanatory.

Export your beatmap - be sure you were editing a proper difficulty.

Upload time!
SPOILER
ROFL, Polish version
DAMN IT, I forgot about the "remember the form values", eh...

You might get some errors here, this is normal. The E_ALL error_reporting was set on purpose. First thing will be the permission denied (possible error) if you are using it on a localhost. I could not test it on other machines/environments, so sorry if it will not work at all, sorry again. If you are a dev, you will handle it, I'm sure.

The script generated a download link, this might be a fail, because of the file names, explained in the Issues. You can always access the files directly from the "server" in the "mk" folder.

BE SURE to have the mk folder. You can add the folder checking if you want, I can't do it right now, I have to sleep =[
That's all, your beatmap is generated, have fun.

There is a HUGE downside of course, you have to "upload" the file, so I would suggest using a "light" mp3s if you are planning on using it on a server.

The Script

You don't really need to know how it works, you don't have to set up the code to make it work. Just copy-paste (I hope so), but some explanation would be awesome, right?

First thing is the upload, there is nothing to explain, simple file upload, except the output:
echo "<div class='alert alert-success' role='success'>Beatmap has been created. <a href='mk/[TMG] ".rawurlencode($beatmap)."'>Click here to download your generated beatmap</a>";
I added the rawurlencode(), because I couldn't download a beatmap with an apostrophe in it. It may cause some errors, but you can experiment with that.

The whole process is:
  1. UnZip
  2. Process the Difficulties
  3. Remove the storyboard
  4. Zip back
  5. Show the output
Processing the Difficulty
What processing does, is importing the source of the beatmap, swapping all the necessary metadata, clearing the BeatmapID and SET, and setting it to Taiko, obviously.

Pattern generation starts from finding the starting point and ending point - that is, first note, and the last note. This is our timeline for the generator.
The next thing is defining the 1/1, 1/2 and1/4s depending on the BPM
$Tick1o4 = (60 / ($BPM * 4)) * 1000;
^ for example, this creates a 1/4 gap between the next note.
Oh well, 1/1 and 1/2 are unused, I have no idea why I left them in there...

Next, defining an array with patterns depending on the difficulty.

Then goes the main loop, it generated a random number of patterns, depending on the currently processed difficulty.
At first, if the processed difficulty is set to ENDLESS, it just adds a (DON/KAT) note -> next 1/4 tick, repeat,
else it generates random patterns based on the random number (1, 3, 5, 7, 9 | 2, 4). The 2-note and 4-note patterns were explained in somewhere above.

4-note patterns were divided into two different cases, 4+2 and 2+4, randomly. While adding this pattern, the script is inserting an another 1/4 pause between 4 _ 2 or 2 _ 4 from obvious reasons.

The last step is adding the calculated 1/4 pause, and that's all you need to know. If you are brave enough, you can dig through this messy hell hole.

Summary

I hope I did not forgot about anything, and everything is clear. Please kill me if it's not working. I can check the forum for messages/posts like once a day, sorry.

Proof Beatmaps

Denkare - Gemini
KELUN - CHU-BURA
In Flames - Black & White (Holy shit, look at H-TaikoGen difficulty at the point: (02:31:537) quite awesome seed... OK, maybe it's just cool for me)

And sorry if I rushed this too much, but I'm sleepy, and I would probably be too lazy to post it again.

If it's not working, please leave all the posts in here, I will try to look at it tomorrow. I'm afraid it won't even work for you, then I will request a thread close, because I don't have that much time for working on this project. It works perfectly fine on Localhost and on my website for me, and I hope it will also work for you.

Here goes nothing. *clicks Post button*

P.S. I was using this "tool" for training purposes a long time ago, and for a long time. It was awesome. It took one minute to generate a map. LMAO
Yuzeyun
Psst, _Gezo_, I know you can make a use of this, somehow.
Last time I uploaded a C# app,
do you still have sources of the C#version
Topic Starter
DarkStoorM

_Gezo_ wrote:

do you still have sources of the C#version
Sorry, I don't have it. I only have a working exe file, which is outdated.
The only puush link to the source is dead. :cry:

It was 2 years ago, no idea what happened to the source. Maybe someone still has it from the previous thread.
Howl
hey.

http://otrp.zxq.co/

(uses a cronjob, so it deletes every 5 minutes files in the folder that have been there for longer than 10 minutes. should be ok for most use cases, though).
Yuzeyun

DarkStoorM wrote:

_Gezo_ wrote:

do you still have sources of the C#version
Sorry, I don't have it. I only have a working exe file, which is outdated.
The only puush link to the source is dead. :cry:

It was 2 years ago, no idea what happened to the source. Maybe someone still has it from the previous thread.
I'll probably work from the PHP sources instead. I think you can play with other stuff as well: If you're computing the timeline placement (in ms) while generating, I think you can totally support multi BPM maps. You can also make a thing like "bpm x2" "bpm /2" "Triplets" (12th notes) and so on. I can probably make it from the same base.
Topic Starter
DarkStoorM

Howl wrote:

hey.

http://otrp.zxq.co/

(uses a cronjob, so it deletes every 5 minutes files in the folder that have been there for longer than 10 minutes. should be ok for most use cases, though).
Oh, cool! I didn't make the loading bar, though, so the user gets no information about the current upload state.
But it's nice you made it working :D

_Gezo_ wrote:

I'll probably work from the PHP sources instead. I think you can play with other stuff as well: If you're computing the timeline placement (in ms) while generating, I think you can totally support multi BPM maps. You can also make a thing like "bpm x2" "bpm /2" "Triplets" (12th notes) and so on. I can probably make it from the same base.
All notes are placed in the timeline, based on the calculated time from BPM. By default, single notes are placed on every 1/4, but there is a 1/4 pause between the patterns.

Basically, after each pattern, the script adds the calculated 1/4 (for example, 93,75ms for 160BPM map), for the next note, so if the script is in the loop (generating longer patterns) it inserts another note - else it adds another 1/4 time gap, which ends up with inserting an empty 1/2 (187,5ms) between the patterns or single notes.

This is the process of inserting patterns based on calculated miliseconds.

I have no idea how to handle multi BPM support, because I can't read the timing points from the file (I don't know how to read them), so that's why I was avoiding the multi BPM maps.

About double/half BPM, you mean like in the middle of a map? If no, you can change the BPM in the editor from 120 to 240 for example, and export it, and put 240 in the website form. That's how I made slow beatmaps with fast patterns.
I forgot to link double-BPM beatmap to show how it works, so there it is:
Carlito - Who's That Boy

There is also a possibility of changing between 1/4 -> 1/6 for example, but I also have no idea how to handle it. My messy code makes this kinda impossible to edit, even for me. lmao, sorry.

I feel like I had no idea what I was writing about, and like the answer was not even related to your post xD.
OzzyOzrock
20-step process to make my own Firce Force huh? Hahaha
Topic Starter
DarkStoorM
1-minute Firce Force mapping, yo

I made 350 maps in one day.
Speed mapping xD

BTW, no idea why, but the best seeds are for 180-190 BPM maps. Sometimes DnB or Drumsteps are awesome.
Secretpipe
soooo machine are mapping now?

where is fun :(
Surono
a macin
OzzyOzrock

Secretpipe wrote:

soooo machine are mapping now?

where is fun :(
with the right song and the right amount of tries... this program could theoretically make a perfect and rankable map lmao
Yuzeyun

DarkStoorM wrote:

I have no idea how to handle multi BPM support, because I can't read the timing points from the file (I don't know how to read them), so that's why I was avoiding the multi BPM maps.
I think you can read the .osu file directly (this is what I do on my own project) and read every timing point from it. Timing points have the same structure, should they be green or red. Green use negative values, so you can skip them. Red are positive values, and are calculated this way: 60000/BPM (as the value is expressed in ms between two beats).
Secretpipe

OzzyOzrock wrote:

Secretpipe wrote:

soooo machine are mapping now?

where is fun :(
with the right song and the right amount of tries... this program could theoretically make a perfect and rankable map lmao


Secretpipe wrote:

where is fun :(
Topic Starter
DarkStoorM

_Gezo_ wrote:

DarkStoorM wrote:

I have no idea how to handle multi BPM support, because I can't read the timing points from the file (I don't know how to read them), so that's why I was avoiding the multi BPM maps.
I think you can read the .osu file directly (this is what I do on my own project) and read every timing point from it. Timing points have the same structure, should they be green or red. Green use negative values, so you can skip them. Red are positive values, and are calculated this way: 60000/BPM (as the value is expressed in ms between two beats).
Well, it's reading the .osu file directly, I just didn't understand how these Reds work:
A 232.090BPM beatmap:
27.6179478969673,258.520401568357,4,1,0,20,1,0
So basically
60000/258,520401568357 = 232,0900000000001 | 232.090

I tried to test it:
//current timing point
$val = "27.6179478969673,258.520401568357,4,1,0,20,1,0";

function calcBPM($val){
$num = (60000/$val);
//return ~.000
return number_format($num, 3, '.', '');
}

$value = explode(",", $val);

echo $current_bpm = calcBPM($value[1]);
output: 232.090
lmao. now I get it.

Theoretically, I could read the timing points, where the second value is positive, loop through them and store calculated BPMs in an array, so that would eliminate manual BPM inserting, nice. Thanks Gezo, now I get it :D

The script needs some rework. I think I will play for a bit with it. My game can wait :P

____
There is something I forgot to mention, a minor issue. If you try to generate stuff from an another beatmap that has break periods, they will stay in their place, so you will get the break while playing. It's annoying sometimes.
That's because I forgot to clear the [Event] tag
[Events]
//Background and Video events
0,0,"812723.jpg",0,0
//Break Periods
2,3026,160318
There is also a background, so I could also try copying the background image.

Let's give it a try :D
But later, after I get back from work.

[edit]
It will take some time. I still have to take care of some important stuff.
yuki_momoiro722
YES!!

FUDGELY YES!!!

I CAN MAP LL SONGS FROM NOW!!

but it says invalid file. it didn't work. :(
Topic Starter
DarkStoorM
You didn't have to necro this thread :P
I got your private message, sent you the details.

Please close this thread. I had to cancel this project because of other, more important stuff. Sorry and thanks for all the interest.
Please sign in to reply.

New reply