Bsaber AI
Origin
So I know the community has made a lot of songs that go here, but I couldn't find NF and the only one on it was so hard. I was like maybe more people would play it if they could just put in any song and it would generate the songs. Also there was missing on Easy and some were only expert and by my opinion, not expert at all. I believe VR has capability as it is escaping reality, but we can only do that if there is a lot or appeals to more categories.
Overview
The objective is to have a model that takes the input of a audio file and output a full map.
Step 1 - Downloading Data
We need to first grab all the data from the api
import requests
import json
before = "2024-01-28T00%3A00%3A01%2B00%3A00"
continuing = True
while continuing:
url = "https://api.beatsaver.com/maps/latest?automapper=false&before=" + before + "&pageSize=100"
headers = {
'Accept': 'application/json',
'Accept-Charset': 'utf-8'
}
response = requests.get(url, headers)
obj = response.content
obj1 = json.loads(obj)
maps = obj1['docs']
for i in range(0, len(maps)):
curMap = maps[i]
map_id = curMap['id']
metadata = curMap['metadata'] # Derminating
stats = curMap['stats'] # Determine based on that
uploadTime = curMap['uploaded'] # Used for next Setting it
versions = curMap['versions'] # Data needed to keep
if stats['upvotes'] > 10 and metadata['duration'] > 80:
print(map_id, stats['upvotes'], stats['downvotes'], metadata['duration'])
# Extract relevant fields
map_data = {
"id": curMap["id"],
"metadata": curMap["metadata"],
"stats": curMap["stats"],
"uploaded": curMap["uploaded"],
"versions": curMap["versions"]
}
# Write the extracted data to a JSON file
output_file_name = map_id + ".json"
with open(output_file_name, 'w') as json_file:
json.dump(map_data, json_file, indent=4)
print("Data written to", output_file_name)
# con += 1
continuing = len(maps) > 2
before = uploadTime
print("Finished on " , before)So once this downloads all the json files it came up to around 50k json files. I then had to narrow it down and download what is necessary inforamtion. I choose parameters that left it to be around 10k for my dataset.
Step 2 - Cleaning Data
I then created a short script to remove files that weren't going to be useful.
Notable Links
Created by nick sypteras in October 2017 was an OSU generator which is close to beatsaber in a way. It has clicking in a 2d field based on music so that could really help along the process.
Another OSU mapper that is on github written by kotritrona using tensorflow and deep learning hasn't been updated for 2 years so I assume it is the final product on version 7.0 Another one is the actual project after dance dance revolution game called Dance Dance Convolution. The idea has been proven to work and it has the same principle as 2 entities only issue is deciding in a 9 grid instead of 4 expanding the amount of combinations and patterns exponentially.
Useful website for verification of this wiki webpage that is highly liked in the community.
Two music analysis websites, beat tracking and 2016 writting for music analysis.
Last updated
Was this helpful?