# 长按 ## 长按拍子功能介绍 在编辑器里面,长按拍子并不是一个单独的种类,而是归属在普通拍子里面的,想要创建一个长按拍子,只需要建立一个普通拍子之后设置“**按下时间**”这个选项。这时就能在工作区看到一个紫色的格子区域,代表在这个时间段内必须按住空格键。 ![](../images/holdbeat-lenght.png) 如果不对其添加任何其他设置,那么轨道会延续上一个“切换为修饰拍子设置”的模式,当然你可以在“设置X标记”这个项目里面选择跳过节拍的形式,默认有三种情况,比如选`—x—x—x`轨道就会自动变成 `—x—x—x————♥` 的模式,像`4-1`这关的矿工一样,也就是在1,3,5,7拍有按压的动画效果。 ```rdview 7 3 eb.AddClassicBeat 3 1[tick=3,hold=0.3,swing=0.5]; eb.SetRowXs 1 1[rowxs=---x--]; ``` 另外长按拍子在编辑器里面也可以分解为自由节拍,使用自由节拍时,需将脉冲出现与脉冲消失分别构成两个合法的普通拍,也即所有脉冲出现的相隔时长相同,且所有脉冲消失的相隔时长相同。 ```rdview 7 8 g 1 2 0 5 #f00{}; g 2 3 0 4 #d20{}; g 3 4 0 3 #b40{}; g 4 5 0 2 #960{}; g 5 2 0 5 #f00{}; g 5.5 3 0 4 #d20{}; g 6 4 0 3 #b40{}; g 6.5 5 0 2 #960{}; eb.AddFreeTimeBeat 1 1[offset=0 1,hold=4]; eb.PulseFreeTimeBeat 2 1[offset=0 2,hold=3.5,pulse=3]; eb.PulseFreeTimeBeat 3 1[offset=0 3,hold=3,pulse=5]; eb.PulseFreeTimeBeat 4 1[offset=0 4,hold=2.5,pulse=7]; eb.AddClassicBeat 1 6[tick=3,swing=0.5]; eb.AddClassicBeat 5 6[tick=1.5,swing=0.25]; ``` ## 演示关卡 这一期的界面部分没有太多内容,接下来我们欣赏演示关卡,里面会包含一些需要避免的错误示范。我也会在下面列举出来。
**1、**在长按拍松手的时刻可以有其他的按拍。这在曾经的编辑器版本里是不允许的,目前官方修正了这一机制。 ```rdview 9 4 eb.AddClassicBeat 1 1[tick=6,hold=1]; eb.AddClassicBeat 2 2[tick=6]; ``` **2、**当同时存在多个长按拍子时,这些长按拍的长按时间段必须完全一致。也就是说,长按时间段之间不能是包含、交叉或首尾相连的关系。 ```rdview 16 7 eb.AddClassicBeat 1 1[tick=3,hold=1,swing=0.5]; eb.AddClassicBeat 1 2[tick=3,hold=0.5,swing=0.5]; eb.AddClassicBeat 6 1[tick=3,hold=1,swing=0.5]; eb.AddClassicBeat 6.25 2[tick=3,hold=0.5,swing=0.5]; eb.AddClassicBeat 11 1[tick=3,hold=1,swing=0.5]; eb.AddClassicBeat 11.5 2[tick=3,hold=1,swing=0.5]; eb.AddClassicBeat 1.5 4[tick=1.5,hold=1,swing=0.25]; eb.AddClassicBeat 1 5[tick=3,hold=0.5,swing=0.5]; eb.AddClassicBeat 6 4[tick=3,hold=1,swing=0.5]; eb.AddClassicBeat 6.5 5[tick=3,hold=0.5,swing=0.5]; ``` **3、**凹兔的自动演示对于长按拍的处理十分诡异,可能会提前松掉长按拍子,但不必惊慌,这不是你的问题。 ![凹兔娘:怪我咯?](../images/otto-puzzled.png)