nikaple吧 关注:165贴子:2,320
  • 4回复贴,共1

从中间开始播放音乐也能合拍??

只看楼主收藏回复

引擎限定:必须使用SuperSound
Create事件:
start_pos = 180; //开始的时间轴步数
bpm = 160.07;
timeline_speed = bpm/750;
timeline_running = 1;
timeline_index = tl_miku; //时间轴名称
timeline_position = start_pos;
if !global.audio_music_muted{
SS_StopSound(curMusic);
filePlaying = 3;
curMusic = global.BGM_BOSS;
audio_playmusic(curMusic);
}
//musicFunctions中代码,对应的musicFunctions脚本中应写入:
//case rBOSS: break; (直接break即可)
tl_length = 2582; //时间轴总长度,可通过draw事件获得(见下)
snd_length = SS_GetSoundLength(curMusic); //声音总长度
SS_SetSoundPosition(curMusic,start_pos/tl_length*snd_length); //跳转到音乐的指定位置
Draw事件:
draw_set_color(c_red);
draw_set_alpha(1);
//draw_text(64,64,string(round((timeline_position/4))*4); //解决时间轴步数跳太快看不清的问题
draw_text(64,64,string(round((timeline_position/1))*1)+"#"+string(SS_IsSoundPlaying(curMusic)));
//录视频观察下面一行“SS_IsSoundPlaying(curMusic)”变为0的时候,记录上面一行的当前时间轴位置,即可得到tl_length。


IP属地:广东1楼2014-06-01 11:39回复
    uesful


    IP属地:上海来自Android客户端2楼2014-06-02 00:34
    收起回复
      技术贴挖坟计划


      IP属地:广东3楼2017-09-02 12:26
      回复