diff calc adjustments + stolen assets from fps plus
This commit is contained in:
1 parent
eb33e85b65
commit
3e9d05d82f
8 files changed
+107
-101
No files matched your search
@@ -0,0 +1 @@
|
||||
{"song": {"song": "Test", "notes": [{"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[668.578947368421, 3, 947.3684210526317], [1615.9473684210527, 1, 631.578947368421], [2247.5263157894738, 0, 315.7894736842104]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[2563.315789473684, 3, 631.5789473684213], [3194.8947368421054, 2, 631.5789473684208], [3826.4736842105262, 1, 631.5789473684213], [4773.8421052631575, 1, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[5089.631578947368, 2, 0], [5563.315789473684, 1, 0], [5879.105263157895, 3, 0], [6037.0, 1, 0], [6194.894736842105, 0, 0], [6352.789473684211, 2, 315.78947368420995], [6668.578947368421, 1, 315.78947368421086], [6984.368421052632, 0, 0], [7142.263157894737, 1, 0], [7300.1578947368425, 2, 0], [7458.0526315789475, 0, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[7615.9473684210525, 1, 1578.9473684210525], [7615.9473684210525, 3, 947.3684210526326], [8721.21052631579, 3, 0], [8879.105263157895, 0, 0], [9194.894736842105, 2, 0], [9352.78947368421, 1, 0], [9352.78947368421, 3, 0], [9510.684210526315, 0, 0], [9510.684210526315, 2, 0], [9668.578947368422, 0, 0], [9668.578947368422, 2, 0], [9826.473684210527, 1, 0], [9826.473684210527, 3, 0], [9984.368421052632, 0, 0], [9984.368421052632, 2, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[10142.263157894737, 3, 0], [10458.052631578947, 3, 0], [10773.842105263158, 3, 0], [11089.631578947368, 1, 0], [11247.526315789473, 2, 0], [11405.421052631578, 0, 0], [11721.21052631579, 0, 0], [12037.0, 0, 0], [12194.894736842105, 2, 0], [12352.78947368421, 1, 0], [12510.684210526315, 2, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[12668.578947368422, 3, 0], [12984.368421052632, 1, 0], [13300.157894736842, 2, 315.78947368421177], [13615.947368421053, 0, 0], [13773.842105263158, 1, 0], [13931.736842105263, 3, 1263.1578947368416], [14563.315789473685, 0, 0], [14721.21052631579, 1, 0], [14879.105263157895, 2, 0], [15037.0, 1, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[15194.894736842105, 0, 0], [15352.78947368421, 2, 0], [15510.684210526315, 0, 631.5789473684217], [16142.263157894737, 2, 0], [16300.157894736842, 1, 0], [16458.052631578947, 0, 0], [16773.842105263157, 0, 0], [17089.63157894737, 0, 0], [17405.42105263158, 1, 315.78947368420995]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[17721.21052631579, 0, 1263.1578947368398], [17721.21052631579, 3, 1263.1578947368398], [18984.36842105263, 1, 0], [18984.36842105263, 2, 0], [19300.157894736843, 1, 0], [19300.157894736843, 2, 0], [19615.947368421053, 1, 0], [19615.947368421053, 2, 0], [19826.473684210527, 1, 0], [19826.473684210527, 2, 0], [20037.0, 1, 0], [20037.0, 2, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[20247.526315789473, 3, 631.5789473684199], [20879.105263157893, 1, 0], [21194.894736842107, 1, 0], [21510.684210526317, 1, 0], [21826.473684210527, 1, 0], [22142.263157894737, 1, 0], [22300.157894736843, 2, 0], [22458.052631578947, 0, 0], [22615.947368421053, 2, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[22773.842105263157, 3, 0], [22931.736842105263, 1, 0], [23089.63157894737, 2, 0], [23405.42105263158, 1, 0], [23721.21052631579, 1, 0], [24037.0, 1, 0], [24352.78947368421, 2, 0], [24510.684210526317, 3, 0], [24668.57894736842, 1, 0], [24826.473684210527, 2, 0], [24984.36842105263, 1, 0], [25142.263157894737, 0, 473.68421052631675]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[25773.842105263157, 2, 0], [25931.736842105263, 3, 0], [26089.63157894737, 1, 0], [26247.526315789473, 2, 0], [26563.315789473683, 1, 0], [26879.105263157893, 0, 0], [27194.894736842107, 0, 0], [27352.78947368421, 1, 0], [27510.684210526317, 2, 0], [27668.57894736842, 3, 0]]}, {"lengthInSteps": 16, "bpm": 95.0, "changeBPM": false, "mustHitSection": true, "typeOfSection": 0, "sectionNotes": [[27826.473684210527, 2, 0], [28142.263157894737, 2, 0], [28458.052631578947, 3, 1894.7368421052633], [28615.947368421053, 2, 0], [28773.842105263157, 1, 0], [28931.736842105263, 0, 0], [29089.63157894737, 2, 0], [29247.526315789473, 1, 0], [29405.42105263158, 0, 0], [29563.315789473683, 1, 0], [29879.105263157893, 2, 0], [30037.0, 1, 0], [30194.894736842107, 0, 0]]}, {"lengthInSteps": 16, "bpm":Line truncated
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 692 KiB |
@@ -1,92 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="NOTE_assets.png">
|
||||
<!-- Created with Adobe Animate version 21.0.0.35450 -->
|
||||
<!-- Created with Adobe Animate version 21.0.7.42652 -->
|
||||
<!-- http://www.adobe.com/products/animate.html -->
|
||||
<SubTexture name="arrow static instance 10000" x="488" y="238" width="155" height="158"/>
|
||||
<SubTexture name="arrow static instance 20000" x="647" y="238" width="157" height="155"/>
|
||||
<SubTexture name="arrow static instance 30000" x="808" y="238" width="155" height="157"/>
|
||||
<SubTexture name="arrow static instance 40000" x="323" y="240" width="157" height="154"/>
|
||||
<SubTexture name="blue hold end instance 10000" x="1062" y="452" width="51" height="64"/>
|
||||
<SubTexture name="blue hold piece instance 10000" x="1282" y="457" width="51" height="44"/>
|
||||
<SubTexture name="blue instance 10000" x="0" y="240" width="158" height="154"/>
|
||||
<SubTexture name="down confirm instance 10000" x="0" y="0" width="240" height="236"/>
|
||||
<SubTexture name="down confirm instance 10001" x="244" y="0" width="240" height="236"/>
|
||||
<SubTexture name="down confirm instance 10002" x="1206" y="235" width="221" height="218" frameX="-6" frameY="-12" frameWidth="240" frameHeight="236"/>
|
||||
<SubTexture name="down confirm instance 10003" x="1206" y="235" width="221" height="218" frameX="-6" frameY="-12" frameWidth="240" frameHeight="236"/>
|
||||
<SubTexture name="down press instance 10000" x="805" y="399" width="143" height="139" frameX="-4" frameY="-3" frameWidth="150" frameHeight="146"/>
|
||||
<SubTexture name="down press instance 10001" x="805" y="399" width="143" height="139" frameX="-4" frameY="-3" frameWidth="150" frameHeight="146"/>
|
||||
<SubTexture name="down press instance 10002" x="1898" y="0" width="150" height="146"/>
|
||||
<SubTexture name="down press instance 10003" x="1898" y="0" width="150" height="146"/>
|
||||
<SubTexture name="green hold end instance 10000" x="1007" y="452" width="51" height="64"/>
|
||||
<SubTexture name="green hold piece instance 10000" x="1227" y="457" width="51" height="44"/>
|
||||
<SubTexture name="green instance 10000" x="162" y="240" width="157" height="154"/>
|
||||
<SubTexture name="left confirm instance 10000" x="972" y="0" width="230" height="232"/>
|
||||
<SubTexture name="left confirm instance 10001" x="1438" y="233" width="220" height="222" frameX="-5" frameY="-5" frameWidth="230" frameHeight="232"/>
|
||||
<SubTexture name="left confirm instance 10002" x="1438" y="0" width="227" height="229" frameX="-2" frameY="-1" frameWidth="230" frameHeight="232"/>
|
||||
<SubTexture name="left confirm instance 10003" x="1438" y="0" width="227" height="229" frameX="-2" frameY="-1" frameWidth="230" frameHeight="232"/>
|
||||
<SubTexture name="left press instance 10000" x="1898" y="449" width="139" height="142" frameX="-4" frameY="-3" frameWidth="146" frameHeight="149"/>
|
||||
<SubTexture name="left press instance 10001" x="1898" y="449" width="139" height="142" frameX="-4" frameY="-3" frameWidth="146" frameHeight="149"/>
|
||||
<SubTexture name="left press instance 10002" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10003" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10004" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10005" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10006" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10007" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10008" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10009" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10010" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10011" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10012" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10013" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10014" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10015" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10016" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10017" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10018" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="left press instance 10019" x="1898" y="150" width="146" height="149"/>
|
||||
<SubTexture name="pruple end hold instance 10000" x="1117" y="452" width="51" height="64"/>
|
||||
<SubTexture name="purple hold piece instance 10000" x="1337" y="457" width="51" height="44"/>
|
||||
<SubTexture name="purple instance 10000" x="0" y="398" width="154" height="157"/>
|
||||
<SubTexture name="red hold end instance 10000" x="952" y="452" width="51" height="64"/>
|
||||
<SubTexture name="red hold piece instance 10000" x="1172" y="457" width="51" height="44"/>
|
||||
<SubTexture name="red instance 10000" x="647" y="397" width="154" height="157"/>
|
||||
<SubTexture name="right confirm instance 10000" x="1669" y="0" width="225" height="228" frameX="-1" frameY="-2" frameWidth="228" frameHeight="231"/>
|
||||
<SubTexture name="right confirm instance 10001" x="1669" y="232" width="225" height="228" frameX="-1" frameY="-2" frameWidth="228" frameHeight="231"/>
|
||||
<SubTexture name="right confirm instance 10002" x="1206" y="0" width="228" height="231"/>
|
||||
<SubTexture name="right confirm instance 10003" x="1206" y="0" width="228" height="231"/>
|
||||
<SubTexture name="right press instance 10000" x="469" y="400" width="139" height="142" frameX="-3" frameY="-7" frameWidth="149" frameHeight="152"/>
|
||||
<SubTexture name="right press instance 10001" x="469" y="400" width="139" height="142" frameX="-3" frameY="-7" frameWidth="149" frameHeight="152"/>
|
||||
<SubTexture name="right press instance 10002" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10003" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10004" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10005" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10006" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10007" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10008" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10009" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10010" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10011" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10012" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10013" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10014" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10015" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10016" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10017" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10018" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10019" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10020" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10021" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10022" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10023" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10024" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10025" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="right press instance 10026" x="316" y="398" width="149" height="152"/>
|
||||
<SubTexture name="up confirm instance 10000" x="488" y="0" width="238" height="234"/>
|
||||
<SubTexture name="up confirm instance 10001" x="730" y="0" width="238" height="234"/>
|
||||
<SubTexture name="up confirm instance 10002" x="972" y="236" width="216" height="212" frameX="-11" frameY="-11" frameWidth="238" frameHeight="234"/>
|
||||
<SubTexture name="up confirm instance 10003" x="972" y="236" width="216" height="212" frameX="-11" frameY="-11" frameWidth="238" frameHeight="234"/>
|
||||
<SubTexture name="up press instance 10000" x="1898" y="303" width="144" height="142" frameX="-6" frameY="-4" frameWidth="154" frameHeight="151"/>
|
||||
<SubTexture name="up press instance 10001" x="1898" y="303" width="144" height="142" frameX="-6" frameY="-4" frameWidth="154" frameHeight="151"/>
|
||||
<SubTexture name="up press instance 10002" x="158" y="398" width="154" height="151"/>
|
||||
<SubTexture name="up press instance 10003" x="158" y="398" width="154" height="151"/>
|
||||
</TextureAtlas>
|
||||
<SubTexture name="Blue Active0000" x="5" y="5" width="157" height="154"/>
|
||||
<SubTexture name="Green Active0000" x="172" y="5" width="157" height="154"/>
|
||||
<SubTexture name="Purple Active0000" x="339" y="5" width="154" height="157"/>
|
||||
<SubTexture name="Red Active0000" x="503" y="5" width="154" height="157"/>
|
||||
<SubTexture name="arrowDOWN0000" x="1809" y="5" width="157" height="154"/>
|
||||
<SubTexture name="arrowLEFT0000" x="5" y="172" width="155" height="156"/>
|
||||
<SubTexture name="arrowRIGHT0000" x="170" y="172" width="154" height="157"/>
|
||||
<SubTexture name="arrowUP0000" x="334" y="172" width="157" height="154"/>
|
||||
<SubTexture name="blue0000" x="667" y="5" width="157" height="154"/>
|
||||
<SubTexture name="blue hold end0000" x="834" y="5" width="50" height="64"/>
|
||||
<SubTexture name="blue hold piece0000" x="894" y="5" width="50" height="44"/>
|
||||
<SubTexture name="down confirm0000" x="501" y="172" width="244" height="240"/>
|
||||
<SubTexture name="down confirm0001" x="755" y="172" width="244" height="240"/>
|
||||
<SubTexture name="down confirm0002" x="1009" y="172" width="214" height="210" frameX="-15" frameY="-15" frameWidth="244" frameHeight="240"/>
|
||||
<SubTexture name="down press0000" x="1233" y="172" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
|
||||
<SubTexture name="down press0001" x="1233" y="172" width="142" height="140" frameX="-4" frameY="-2" frameWidth="149" frameHeight="146"/>
|
||||
<SubTexture name="down press0002" x="1385" y="172" width="149" height="146"/>
|
||||
<SubTexture name="green0000" x="954" y="5" width="157" height="154"/>
|
||||
<SubTexture name="green hold end0000" x="1121" y="5" width="50" height="64"/>
|
||||
<SubTexture name="green hold piece0000" x="1181" y="5" width="50" height="44"/>
|
||||
<SubTexture name="left confirm0000" x="1544" y="172" width="231" height="235"/>
|
||||
<SubTexture name="left confirm0001" x="1785" y="172" width="231" height="235"/>
|
||||
<SubTexture name="left confirm0002" x="5" y="422" width="210" height="214" frameX="-11" frameY="-12" frameWidth="231" frameHeight="235"/>
|
||||
<SubTexture name="left press0000" x="225" y="422" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
|
||||
<SubTexture name="left press0001" x="225" y="422" width="140" height="142" frameX="-3" frameY="-3" frameWidth="146" frameHeight="149"/>
|
||||
<SubTexture name="left press0002" x="375" y="422" width="146" height="149"/>
|
||||
<SubTexture name="pruple end hold0000" x="1241" y="5" width="50" height="64"/>
|
||||
<SubTexture name="purple0000" x="1301" y="5" width="154" height="157"/>
|
||||
<SubTexture name="purple hold piece0000" x="1465" y="5" width="50" height="44"/>
|
||||
<SubTexture name="red0000" x="1525" y="5" width="154" height="157"/>
|
||||
<SubTexture name="red hold end0000" x="1689" y="5" width="50" height="64"/>
|
||||
<SubTexture name="red hold piece0000" x="1749" y="5" width="50" height="44"/>
|
||||
<SubTexture name="right confirm0000" x="531" y="422" width="237" height="241"/>
|
||||
<SubTexture name="right confirm0001" x="778" y="422" width="237" height="241"/>
|
||||
<SubTexture name="right confirm0002" x="1025" y="422" width="210" height="214" frameX="-13" frameY="-14" frameWidth="237" frameHeight="241"/>
|
||||
<SubTexture name="right press0000" x="1245" y="422" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
|
||||
<SubTexture name="right press0001" x="1245" y="422" width="138" height="141" frameX="-3" frameY="-7" frameWidth="148" frameHeight="151"/>
|
||||
<SubTexture name="right press0002" x="1393" y="422" width="148" height="151"/>
|
||||
<SubTexture name="up confirm0000" x="1551" y="422" width="238" height="234"/>
|
||||
<SubTexture name="up confirm0001" x="1799" y="422" width="238" height="234"/>
|
||||
<SubTexture name="up confirm0002" x="5" y="673" width="212" height="209" frameX="-13" frameY="-12" frameWidth="238" frameHeight="234"/>
|
||||
<SubTexture name="up press0000" x="227" y="673" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
|
||||
<SubTexture name="up press0001" x="227" y="673" width="144" height="141" frameX="-5" frameY="-4" frameWidth="153" frameHeight="150"/>
|
||||
<SubTexture name="up press0002" x="381" y="673" width="153" height="150"/>
|
||||
</TextureAtlas>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+60
-12
@@ -32,51 +32,99 @@ class DiffCalc
|
||||
gottaHitNote = !i.mustHitSection;
|
||||
|
||||
if (gottaHitNote)
|
||||
cleanedNotes.push(new SmallNote(ii[0],ii[1]));
|
||||
cleanedNotes.push(new SmallNote(ii[0],Math.floor(Math.abs(ii[1]))));
|
||||
}
|
||||
}
|
||||
|
||||
var handOne:Array<SmallNote> = [];
|
||||
var handTwo:Array<SmallNote> = [];
|
||||
|
||||
cleanedNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
|
||||
|
||||
var firstNoteTime = cleanedNotes[0].strumTime;
|
||||
|
||||
// normalize the notes
|
||||
|
||||
for(i in cleanedNotes)
|
||||
{
|
||||
i.strumTime = (i.strumTime - firstNoteTime) * 2;
|
||||
}
|
||||
|
||||
for (i in cleanedNotes)
|
||||
{
|
||||
switch(i.noteData)
|
||||
{
|
||||
case 0:
|
||||
handOne.push(i);
|
||||
case 1:
|
||||
handTwo.push(i);
|
||||
case 2:
|
||||
handTwo.push(i);
|
||||
case 3:
|
||||
handOne.push(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// length in segments of the song
|
||||
var length = ((cleanedNotes[cleanedNotes.length - 1].strumTime / 1000) / 0.5);
|
||||
|
||||
// hackey way of creating a array with a length
|
||||
var segments:Array<Int> = new_Array(1,Std.int(length));
|
||||
|
||||
var segmentsOne:Array<Int> = new_Array(1,Std.int(length));
|
||||
var segmentsTwo:Array<Int> = new_Array(1,Std.int(length));
|
||||
|
||||
// algo loop
|
||||
for(i in cleanedNotes)
|
||||
for(i in handOne)
|
||||
{
|
||||
var index = Std.int(((i.strumTime / 1000)));
|
||||
if (index + 1 > segments.length)
|
||||
if (index + 1 > segmentsOne.length)
|
||||
continue;
|
||||
segments[index] = segments[index] + 1;
|
||||
segmentsOne[index] = segmentsOne[index] + 1;
|
||||
}
|
||||
|
||||
for(i in handTwo)
|
||||
{
|
||||
var index = Std.int(((i.strumTime / 1000)));
|
||||
if (index + 1 > segmentsTwo.length)
|
||||
continue;
|
||||
segmentsTwo[index] = segmentsTwo[index] + 1;
|
||||
}
|
||||
|
||||
// get the average of all of the segments
|
||||
var sum:Float = 0;
|
||||
var sumOne:Float = 0;
|
||||
var sumTwo:Float = 0;
|
||||
|
||||
var newLength = segments.length;
|
||||
|
||||
for (i in segments)
|
||||
var lone = segmentsOne.length;
|
||||
var ltwo = segmentsOne.length;
|
||||
|
||||
for (i in segmentsOne)
|
||||
{
|
||||
if (i == 0) // remove empty/breaks
|
||||
{
|
||||
newLength--;
|
||||
lone--;
|
||||
continue;
|
||||
}
|
||||
//trace(i);
|
||||
sum += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
|
||||
sumOne += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
|
||||
}
|
||||
return HelperFunctions.truncateFloat(sum / newLength,2);
|
||||
|
||||
for (i in segmentsTwo)
|
||||
{
|
||||
if (i == 0) // remove empty/breaks
|
||||
{
|
||||
ltwo--;
|
||||
continue;
|
||||
}
|
||||
//trace(i);
|
||||
sumTwo += i / .5; // half it because otherwise instead of nps its just fucking notes per half second which is dumb and stupid
|
||||
}
|
||||
|
||||
|
||||
var handOneAvg = sumOne / lone;
|
||||
var handTwoAvg = sumTwo / ltwo;
|
||||
|
||||
return HelperFunctions.truncateFloat(handOneAvg > handTwoAvg ? handOneAvg : handTwoAvg,2);
|
||||
}
|
||||
|
||||
static public function new_Array<T>( ArrayType:T, Length:Int ):Array<T> {
|
||||
|
||||
Reference in new issue
Block a user