public Song readSong(string band, string file) { string path = "Songs/" + band + "/" + file + "/"; List <SongNote> notes = MidiParser.readMidi(basePath + path + "player.mid"); AudioClip songBackground = Resources.Load <AudioClip>(path + "backing"); AudioClip hitNoise = Resources.Load <AudioClip>(path + "instrument"); return(new Song(notes, songBackground, hitNoise)); }
public Song readSong(string file) { string path = "Songs/" + file + "/"; List <SongNote> notes = MidiParser.readMidi(basePath + path + "notes.mid"); Debug.Log(MidiParser.readMidi(basePath + path + "notes.mid")); AudioClip songBackground = Resources.Load <AudioClip>(path + "background"); AudioClip hitNoise = Resources.Load <AudioClip>(path + "instrument"); //Song test = Song(notes, songBackground, hitNoise); return(new Song(notes, songBackground, hitNoise, getDifficulty(notes))); }
void Start() { song = MidiParser.readMidi("Assets/Resources/Songs/HotCrossBunsLow.mid"); songBackground = Resources.Load <AudioClip>("Songs/Megalovania"); audio.clip = songBackground; audio.Play(); SongSetup songSetup = gameObject.GetComponent <SongSetup>(); lanes = songSetup.setupLanes(); songStartTime = Time.time; }