Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Audio/Song1.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion Audio/Song1.ogg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://iq0xxe5cggs8"
uid="uid://be5ial13ynf3o"
path="res://.godot/imported/Song1.ogg-1d785b9ae3fbaa8393048e39af66ed86.oggvorbisstr"

[deps]
Expand Down
Binary file modified Audio/Song2.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion Audio/Song2.ogg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ckis6k6vuums"
uid="uid://dxp7blovqh1ba"
path="res://.godot/imported/Song2.ogg-b95c04f3512de6fa42e0f9c35aba831f.oggvorbisstr"

[deps]
Expand Down
Binary file modified Audio/Song3.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion Audio/Song3.ogg.import
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ceyw5mjkem2pi"
uid="uid://d4nmixdl8xoic"
path="res://.godot/imported/Song3.ogg-d4e6a5f1a550561df18989fb495ba591.oggvorbisstr"

[deps]
Expand Down
Binary file modified Audio/midi/Song2.mid
Binary file not shown.
20 changes: 0 additions & 20 deletions Classes/MidiMaestro/MidiMaestro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public partial class MidiMaestro : Resource

//private MidiFile strippedSong;

private SongData songData;

//The path relative to the Audio folder. Will change later
public MidiMaestro(string filePath)
{
Expand Down Expand Up @@ -60,19 +58,6 @@ public MidiMaestro(string filePath)
break;
}
}

//Populate the song data
songData = new SongData
{
//TODO: Allow for changes in this data
Bpm = 120,
//Fudge the numbers a bit if we have a really short song
SongLength =
_midiFile.GetDuration<MetricTimeSpan>().Seconds < 20
? 20
: _midiFile.GetDuration<MetricTimeSpan>().Seconds,
NumLoops = 1,
};
}

public midiNoteInfo[] GetNotes(ArrowType arrowType)
Expand All @@ -86,11 +71,6 @@ public midiNoteInfo[] GetNotes(ArrowType arrowType)
_ => throw new ArgumentOutOfRangeException(nameof(arrowType), arrowType, null),
};
}

public SongData GetSongData()
{
return songData;
}
}

//A facade to wrap the midi notes. This is a simple class that wraps a Note object from the DryWetMidi library.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Current team members include:
#### Attributions:
Music:
- Title Screen: [Crystal Cave - Cynicmusic](https://opengameart.org/content/crystal-cave-song18)
- Battle Song 1: [gameMusic - Magntron](https://freesound.org/people/Magntron/sounds/335571/)
- Boss Song 1: [gameMusic - Magntron](https://freesound.org/people/Magntron/sounds/335571/)
- Battle Song 1: [Piano loops 181 - josefpres](https://freesound.org/people/josefpres/sounds/789998/)
- Battle Song 2: [Dark loops 220 - josefpres](https://freesound.org/people/josefpres/sounds/620230/)

Images:
- Input Buttons: [inputKeys - Nicolae (Xelu) Berbece](https://thoseawesomeguys.com/prompts/)
Expand Down
6 changes: 4 additions & 2 deletions scenes/ChartViewport/scripts/ChartManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public partial class ChartManager : SubViewportContainer
//Might move this to be song specific? For now, should never go below ~2000, else visual break because there isn't enough room to loop.
private double ChartLength = 5000;
private double _loopLen; //secs
public double TrueBeatsPerLoop;
public int BeatsPerLoop;

public void OnNotePressed(ArrowType type)
Expand All @@ -44,7 +45,8 @@ public void PrepChart(SongData songData)
{
_loopLen = songData.SongLength / songData.NumLoops;
TimeKeeper.LoopLength = (float)_loopLen;
BeatsPerLoop = (int)(_loopLen / (60f / songData.Bpm));
TrueBeatsPerLoop = (_loopLen / (60f / songData.Bpm));
BeatsPerLoop = (int)TrueBeatsPerLoop;
ChartLength = (float)_loopLen * (float)Math.Floor(ChartLength / _loopLen);
TimeKeeper.ChartLength = (float)ChartLength;
TimeKeeper.Bpm = songData.Bpm;
Expand Down Expand Up @@ -112,7 +114,7 @@ private NoteArrow CreateNote(ArrowType arrow, Note note, int beat = 0)
newArrow.OutlineSprite.Modulate = IH.Arrows[(int)arrow].Color;

_arrowGroup.AddChild(newArrow);
newArrow.Bounds = (float)((double)beat / BeatsPerLoop * (ChartLength / 2));
newArrow.Bounds = (float)(beat / TrueBeatsPerLoop * (ChartLength / 2));
newArrow.Position += Vector2.Right * newArrow.Bounds * 10; //temporary fix for notes spawning and instantly calling loop from originating at 0,0
return newArrow;
}
Expand Down
2 changes: 1 addition & 1 deletion scenes/ChestScene/ChestScene.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=9 format=3 uid="uid://c4vmb783d3v03"]

[ext_resource type="Script" path="res://scenes/ChestScene/ChestScene.cs" id="1_ardd2"]
[ext_resource type="AudioStream" uid="uid://iq0xxe5cggs8" path="res://Audio/Song1.ogg" id="2_x78jo"]
[ext_resource type="AudioStream" uid="uid://be5ial13ynf3o" path="res://Audio/Song1.ogg" id="2_x78jo"]
[ext_resource type="Script" path="res://scenes/UI/scripts/MenuModule.cs" id="3_5uvci"]
[ext_resource type="Shader" path="res://scenes/ChartViewport/StarryNight.gdshader" id="5_whthd"]
[ext_resource type="Texture2D" uid="uid://qhwve7fik4do" path="res://scenes/BattleDirector/assets/bgupdate.png" id="6_37nar"]
Expand Down