Song difficulty calculator - Something actually worth making

What would you like to see added or fixed in FOF?
Forum rules
This topic is 1 year and 2 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
Ia! Cthulhu ftaghn!
User avatar
SinisterMinisterX
Member
Posts: 22
Joined: October 10th, 2008
Location: Denver, CO, USA
Reputation: 0

Re: Re:

Postby SinisterMinisterX » Sun Nov 30, 2008 1:39 pm

ssjfulkon198 wrote:Being my lazy self, I haven't read the whole thread, just the first page. I think this would definitely be done best through the use of a seperate program.


With all due respect, you should have read the whole thread. Most of the first page is very old, and not relevant to the current discussion.
We are talking about a separate program - a Python script I have written.
I am doing some final testing of that script right now, and will release the source code shortly...
I'm posting this while waiting for a test run to complete.

ssjfulkon198 wrote:While the difficulty of a song is relative to the person playing it...


That's the exact problem I'm trying to get around. I seek an objective rating, determined solely from the notes in notes.mid, regardless of who is playing.

ssjfulkon198 wrote:Player who aren't as good would play songs with lower % of difficulty. Better players would play higher %'s respectively.


Then how would the less skilled players get better? You've got to play songs just above you skill level to improve (if improvement is one of your goals).

I appreciate your input, but I think you might be interested in reading the thread more thoroughly to see what's going on. :biggrin:

---- EDIT ----

Belisario93 wrote:Once I get my hands on this script I'm going to try out a lot of things.


Now's your chance...
Current source code released!
http://www.mediafire.com/?umnamttmmkm

WARNING:
This is a work in progress. Run my scripts at your own risk. I have made them as safe as possible, but I guarantee nothing and take no responsibility for any damages.

INSTRUCTIONS:
1. You will need a Windows XP machine. This script uses a 16-bit command line tool I found on the internet, which doesn't run on Vista (at least, not on my Vista machine).
2. On that machine, you will need Python 2.5 or later - earlier versions of Python will NOT work.
3. After DL'ing the rar, put the files in a new folder on your computer.
4. Open fofsongs.py in a text editor...
4a. On line 15, change mainpath to the folder where you put the files from the rar.
4b. On line 16, change songpath to your song folder.
4c. SAVE fofsongs.py

CRITICAL WARNING:
Future versions of my script will do heavy modifications to the files in the songpath folder (the one you entered in step 4a).
I have made a copy of my entire song collection, and I run this script on that copy.
To avoid needless risk, I strongly recommend you do the same (make a copy of your songs, and run the script on that copy.)

5. Open a command prompt, and navigate to the folder with the rar contents.
6. Run fofsongs.py from the command line.

Two things will happen...

1. In that folder with the python scripts, a text file will be created (fofsongs.txt) with the rating data.
Note that the script is designed to append to this file if it already exists.
So during testing or development, you'll likely want to delete this file before each run, or else you may get multiple entries for the same song.
While the text file is human-readable, it's in a format that I intend to parse with another script later.
Look at the function writedata() in fofsongs.py to see how that format works.

2. The reason for running from a command line:
Songs which didn't get rated successfully will print to the command line when the script is finished.
(A more elegant solution is planned for future updates, but this is a start.)

As I get more of my Python source cleaned up and ready for human consumption, I'll post updates.
When I next post an update to the source, I'll probably start a new thread for this topic (so I can keep an updated link to the current source on the first post.)

Some quick notes for Python developers:
The main script is fofsongs.py.
This imports fofparse.py - the script with functions to parse various midi formats.
Once fofparse.py has parsed the midi and returned the data to fofsongs.py, execution goes to fofrate.py which calculates the rating.
fofparse and fofrate are designed so you can add functions, and have them called from fofsongs with just a bit of modification to fofsongs.
Naturally, I suggest you read all the source and understand it before any modifications.
And to see the text versions of the midi files (the data handled by fofparse), run the command line tool on a notes.mid file outside of the python script.
You'll need to see that to write new functions for fofparse.

Hack away, friends! :biggrin:
My song thread
Newest song: Prince, "Purple Rain"
The General
User avatar
Belisario93
Member
Posts: 255
Joined: November 13th, 2008
Location: Raleigh, NC
Reputation: 0

Re: Re:

Postby Belisario93 » Sun Nov 30, 2008 3:20 pm

SinisterMinisterX wrote:
Belisario93 wrote:Once I get my hands on this script I'm going to try out a lot of things.


Now's your chance...


obviously not...

INSTRUCTIONS:
1. You will need a Windows XP machine. This script uses a 16-bit command line tool I found on the internet, which doesn't run on Vista (at least, not on my Vista machine).


curse windows for not being fully backwards compatible! Oh well, guess that's another thing to motivate me to back-up my files and install XP. That or I could possibly ask my step-dad if I can use his computer.
Born a leader.
Ia! Cthulhu ftaghn!
User avatar
SinisterMinisterX
Member
Posts: 22
Joined: October 10th, 2008
Location: Denver, CO, USA
Reputation: 0

Re: Song difficulty calculator - Something actually worth making

Postby SinisterMinisterX » Sun Nov 30, 2008 4:44 pm

Yes, I agree it's freaking disgrace that MS didn't let Vista run 16-bit programs. I have quite a few good ones that force me to use my XP box just as much.

I searched the web up and down for something that would work under Vista and couldn't find it.
This is, in fact, the only working program I found for this purpose.

If you want to try searching, what we'd need is something that can convert midi files into human-readable text files.
If you can find such a thing, I'll eagerly rewrite the script to parse those text files.

There is a file called MidiToText in the FoF source, but my download only had the .pyo version.
If you have the original .py version of that, it might help us.
My song thread
Newest song: Prince, "Purple Rain"
User avatar
enderandrew
Member
Posts: 35
Joined: February 20th, 2009
Reputation: 0

Re: Song difficulty calculator - Something actually worth making

Postby enderandrew » Tue Feb 24, 2009 11:14 am

As far as backwards compatibility goes, I believe Vista 32-bit should run this, as it should still have the service to run 16-bit code. 64 bit versions of Windows (Windows x64, Vista x64, and Windows 7 x64) don't have the ability to run 16-bit code at all.

Unfortunately, all I run is 64-bit OSes since I have 8 gigs of RAM. However, it should be possible to just recompile the script. I look forward to taking a look at this when I've got time to mess with it. I am considering a big project and it would help me tier the songs appropriately.
Nihilism makes me smile.
eavaria
Member
Posts: 4
Joined: February 1st, 2009
Reputation: 0

Re: Song difficulty calculator - Something actually worth making

Postby eavaria » Sat Feb 28, 2009 6:23 pm

I had this in mind too. I guess you should analyze the song per parts, so you have more numbers to avoid songs like free bird having low ratings. One is the difficulty divided by the number of notes, so it gives a kind of "diff per note" rating... and the other one is the max difficulty in a section. Maybe of 20-30 notes. There you have the difficulty of the classic solo or the intense ending... after that, you should do some kind of box plot to remove the hardest and easiest part of the song to get a real number for the song. Maybe you should even completely remove the easiests parts... every song, no matter how hard it is have some real easy parts that shouldn't be considered...

I'd say, count the number of notes

Get the value for each note

remove the notes that have value less than <threshold> up to 40% of all the notes

remove notes harder than <other threshold> up to 5% of the total notes and mark the song as "have a very hard part"

Then take the average difficulty of the remaining notes as the difficulty of the song.

Is someone keep working on it, please let me know. I haven't coded in python for years but gonna give it a try when i can have some spare time.
Cheers.
3 FINGERS PWN YOU
User avatar
a1ltobeg0dly
Member
Posts: 259
Joined: February 4th, 2009
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth making

Postby a1ltobeg0dly » Tue Mar 03, 2009 5:05 pm

yeah i would enjoy having this very helpful, two thumbs up.
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth making

Postby lordhardware » Sat Mar 07, 2009 10:07 pm

great work... as soon as all the kinks are worked out we will soon have a universal difficulty calculator...


if possible instead of a persentage, i think it should be a 1-1000 difficulty rating... that way you have room for harder songs.
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth making

Postby lordhardware » Tue Oct 13, 2009 1:19 pm

old thread is old but it was a great idea?
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
Jpop fanatic
raynebc
Moderator
Posts: 5552
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 47

Re: Song difficulty calculator - Something actually worth making

Postby raynebc » Tue Oct 13, 2009 4:00 pm

If we could determine a reliable scoring system, such as the criteria used by Harmonix, I'd be willing to put the logic together. Perhaps then it could be implemented in EOF? Now that RBN is beginning, would somebody be willing to ask about the difficulty grading on Harmonix's forum? I don't recall them mentioning it in their charting documents, so maybe it's something Magma determines automatically?
Mr. Fansonfire
User avatar
lordhardware
Member
Posts: 1600
Joined: November 2nd, 2008
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth making

Postby lordhardware » Tue Oct 13, 2009 6:07 pm

raynebc wrote:If we could determine a reliable scoring system, such as the criteria used by Harmonix, I'd be willing to put the logic together. Perhaps then it could be implemented in EOF? Now that RBN is beginning, would somebody be willing to ask about the difficulty grading on Harmonix's forum? I don't recall them mentioning it in their charting documents, so maybe it's something Magma determines automatically?


thats an interesting point... we should also take into account variations in the difficulty ratings when you compare GH5 songs to RB songs. I know GH5 songs arnt automatically graded.
WIP:
"Check Your Hardware: Modern Hits" 11/20
"Check Your Hardware: Australian Anthems" 4/20
"Check Your Hardware: Alternative" 4/20
"Check Your Hardware: Classic Beats" 2/20
"Check Your Hardware: Electronic" 2/10
"Check Your Hardware: Rap" 1/10
'_>'
User avatar
SUSAltd
Member
Posts: 1582
Joined: February 25th, 2009
Location: USA
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth ma

Postby SUSAltd » Wed Jun 16, 2010 4:06 am

I'm sorry, but this thread needs a bump. I want to see how this difficulty calculator might turn out. :D

Spoiler:

ImageCharting Achievements:
1st place 2009 April Novice Guitar competition
3rd place 2009 May Expert Guitar competition
4th place 2009 June Expert Guitar competition
1st place 2010 February Guitar competition
1st place 2010 April Guitar Competition
2nd place 2010 May Guitar Competition
1st place 2010 June Guitar Competition
1st place 2010 August Guitar Competition
1st place 2010 December Guitar Competition

User avatar
Gmod4ever
Member
Posts: 179
Joined: October 5th, 2009
Reputation: 0

Re: Song difficulty calculator - Something actually worth ma

Postby Gmod4ever » Wed Jun 16, 2010 1:21 pm

Woah, this difficulty calculator is really cool.

I know I'm going to sound a bit presumptuous, but something that really irritates me is when people don't bother putting a difficulty on a song, or a difficulty that's obviously wrong (honestly, about a third of the songs on the full-album chart of In Flames' Come Clarity I can't even play because the tempo is so fast, and most of those songs are rated 1 star - whereas I can play six-star songs like Angevil's charting of Anata's "Any Kind of Magic or Miracle" and get 93.6% (just played it actually).

That being said, HOPOs need to count for a lot less than non-HOPO notes that are close together (as a result of a fast tempo). Case in point, those In Flames songs I'm referring to.

Here's hoping this calculator isn't dead. :woot:
Check out the Extreme Metal Community Hero Thread!
A convenient place to store all the non-technical death metal, black metal, thrash metal, and any fusions of those three - both what we fret, and what you fret!

Charted a song that you'd love to release, but are concerned it'd get drowned out in all the other releases? Submit it into Fuzkeren or myself for the EMCH thread and we'll guarantee at least a review, and will probably give your song a place on the thread (full credits to you, of course). Every submission helps!
Jpop fanatic
raynebc
Moderator
Posts: 5552
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 47

Re: Song difficulty calculator - Something actually worth ma

Postby raynebc » Wed Jun 16, 2010 1:45 pm

That's another problem. The difficulty of the song is going to depend largely on the user's settings for the game, such as the HOPO frequency. It would be more appropriate for only default options to be taken into account for scoring, and ultimately, it would be most appropriate for the game itself to apply the configured settings to determine the difficulty.
'_>'
User avatar
SUSAltd
Member
Posts: 1582
Joined: February 25th, 2009
Location: USA
Reputation: 0
Contact:

Re: Song difficulty calculator - Something actually worth ma

Postby SUSAltd » Wed Jun 16, 2010 2:18 pm

I tried running the fofsongs.py thing and it didn't work. It could be because I'm using Vista 32-bit, but enderandrew said it should work.

Code: Select all

Traceback (most recent call last):
  File "C:\fofdiff\fofsongs.py", line 96, in <module>
    shutil.copy(os.path.join(root, "notes.mid"), os.path.join(mainpath, "notes.m
id"))
  File "C:\Python26\lib\shutil.py", line 88, in copy
    copyfile(src, dst)
  File "C:\Python26\lib\shutil.py", line 53, in copyfile
    fdst = open(dst, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: 'C:\x0cofdiff\\notes.mid'

Spoiler:

ImageCharting Achievements:
1st place 2009 April Novice Guitar competition
3rd place 2009 May Expert Guitar competition
4th place 2009 June Expert Guitar competition
1st place 2010 February Guitar competition
1st place 2010 April Guitar Competition
2nd place 2010 May Guitar Competition
1st place 2010 June Guitar Competition
1st place 2010 August Guitar Competition
1st place 2010 December Guitar Competition

hannamarin
Member
Posts: 1
Joined: September 1st, 2016
Reputation: 0

Re: Song difficulty calculator - Something actually worth making

Postby hannamarin » Thu Sep 01, 2016 12:21 am

I like your point of view! the songs with deep meaning words are my passion! http://bigpaperwriter.com/blog/the-rime-of-the-ancient-mariner-essay has an interesting essay about the rime of the ancient meriner, check it now!

Return to “Thoughts ?”

Who is online

Users browsing this forum: No registered users and 1 guest