File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,10 +25,40 @@ public abstract class BaseChart<TNote>: IBaseChart where TNote: BaseNote
2525 /**
2626 * 所有拍号声明构成的列表。
2727 *
28- * 已知该内容,目前在游戏内暂无实质性的效果。maimai中无任何效果,chunnithm则会把这个作为显示小节和拍子参考线时候额依据 、但也仅影响显示效果,对游戏本身无影响。
28+ * 已知该内容,目前在游戏内暂无实质性的效果。maimai中无任何效果,chunithm则会把这个作为显示小节和拍子参考线时候额依据 、但也仅影响显示效果,对游戏本身无影响。
2929 */
3030 public List < MET > MetList = [ ] ;
3131
32+ /**
33+ * 所有变速声明构成的列表。
34+ *
35+ * maimai不会用到,ongeki和chunithm才会用到。
36+ */
37+ public List < ( Rational Time , Rational Duration , decimal Multiplier ) > SflList = [ ] ;
38+
39+ /**
40+ * 谱面开头的“哒哒哒哒”声音的个数。
41+ *
42+ * 具体而言,有两种指定方式:
43+ * 1. 直接设置本属性。则会利用游戏内部自带的CLK_DEF机制,会按每拍一次的频率生成指定个数的"哒"声。
44+ * 2. 设置ExplicitClocks属性。这个直接对应于谱面中的CLK语句,有几行就是几声。
45+ */
46+ public int ClockCount
47+ {
48+ get => ExplicitClocks ? . Count ?? field ;
49+ set
50+ {
51+ field = value ;
52+ ExplicitClocks = null ;
53+ }
54+ } = 4 ;
55+
56+ /**
57+ * 这是MA2/OGKR语句中,通过CLK指令所显式指定的哒哒哒哒的时刻。
58+ * 除去极个别官谱外,一般来说极少会用到。详见ClockCount属性上的注释。
59+ */
60+ public List < Rational > ? ExplicitClocks ;
61+
3262 /**
3363 * 根据BPMList中的声明,将小节时间转换为秒。
3464 */
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ public abstract class BaseNote
1212 /**
1313 * 音符的结束时刻。以小节为单位(分数时间)
1414 *
15- * 默认实现中实现为等于开始时刻(瞬间音符,没有持续时间)。有持续时间的音符应当重写此属性。
15+ * 默认实现中实现为等于开始时刻(瞬间音符,没有持续时间),且该属性只能get不能set 。有持续时间的音符应当重写此属性。
1616 */
17- public virtual Rational EndTime => Time ;
17+ public virtual Rational EndTime
18+ {
19+ get => Time ;
20+ set => throw new InvalidOperationException ( "Cannot directly manipulate Note's EndTime. You may want to manipulate the 'Duration' property on the note." ) ;
21+ }
1822
1923 /**
2024 * 如果有某个音符,包含另一个/一些音符作为子音符,这些子音符本身不会出现在Chart的Notes列表内:
Original file line number Diff line number Diff line change @@ -12,5 +12,4 @@ public class ChuChart : BaseChart<ChuNote>
1212 public string DisplayLevel { get ; set ; } = "" ; // 显示等级,字符串
1313 public decimal Level { get ; set ; } // 定数,小数
1414 public string MusicId { get ; set ; } = "0" ;
15- public List < ( Rational Time , Rational Duration , decimal Multiplier ) > SflList = [ ] ; // 所有变速声明构成的列表。
1615}
Original file line number Diff line number Diff line change 11using MuConvert . chart ;
2- using MuConvert . utils ;
3- using Rationals ;
42
53namespace MuConvert . mai ;
64
75public class MaiChart : BaseChart < Note >
86{
97 public string DefaultTouchSize = "M1" ;
108
11- public int ClockCount
12- {
13- get => ExplicitClocks ? . Count ?? field ;
14- set
15- {
16- field = value ;
17- ExplicitClocks = null ;
18- }
19- } = 4 ;
20-
219 /**
2210 * 获得谱面开始的时刻(即谱面中第一个音符的开始时刻)。
2311 *
@@ -33,14 +21,6 @@ public int ClockCount
3321 note is Slide { segments . Count : > 1 } ) ; // 星星段数大于1(fes星星)
3422
3523 public Statistics Statistics => new ( this ) ;
36-
37- /**
38- * 这是MA2语句中,通过CLK指令所显式指定的哒哒哒哒的时刻。
39- * 一般来说极少会用到,这里只是忠实地记录一下;一方面符合我们“0信息损失”的原则、忠实地记录铺面中的信息;
40- * 另一方面,可以用作ClockCount自动推导的来源之一。
41- * 普通用户理论上极少会用到这个东西。
42- */
43- public List < Rational > ? ExplicitClocks ;
4424
4525 protected override IEnumerable < Note > SortNotes ( )
4626 {
Original file line number Diff line number Diff line change 55
66namespace MuConvert . mai ;
77
8+ /**
9+ * maimai的Note基类
10+ */
811public abstract class Note : BaseNote
912{
1013 public readonly MaiChart Chart ;
You can’t perform that action at this time.
0 commit comments