『漫游』酷论坛>『字幕制作交流区』>[转贴]卡拉时间精确控 ..

qiyuwanjia@2007-01-02 17:29

引用
最初由 MeteorRain 发布
横向放大,然后播放……配合你可爱的鼠标和不停地暂停和播放,然后你就会发现一切是如此轻松……

手都是放在空格和F2上的囧
引用

ngng@2007-01-04 16:27

真可行嗎..?
引用

feelingmtg@2007-01-13 00:19

其实
偶是标准的频谱派
别打偶

偶尝试做了些Kara
用Audition

大约一句10分钟
速度我认为还可以接受

最近一直在尝试
普通的时间轴的频谱表做法
现在速度稳定在1分钟2句
大多能在3小时内做完

个人感觉是
频谱表做完后
作个简单的查错
就可以达到不错的效果


我总结频谱表做时间轴的一个比较致命的问题
也就是影响此方法效率的因素
是:
把时间复制粘贴的时间
不少与总时间的1/3
正在找人帮忙写程序
作个可以想POPSUB那样的按钮那样的小东西
不知能不能顺利
PS:那人说要让我用20分钟的非线编+一个PS作业+一个100帧的Flash交换
苦啊!
引用

qiyuwanjia@2007-01-13 06:44

已经说过了某MR有某东西
引用

MeteorRain@2007-01-13 16:35

想要的话,我可以贡献一些核心代码。
引用

feelingmtg@2007-01-13 18:22

引用
最初由 MeteorRain 发布
想要的话,我可以贡献一些核心代码。


啥东西的核心代码?
是偶说的可以代替Ctrl C+V的东东么?
还是成型的工具?
引用

云羽@2007-01-14 10:36

用按键精灵咯
引用

雷鸣@2007-01-14 21:34

试试看这段代码
拿去编译,自动获取剪贴板里面的时间信息并粘贴到窗口中的程序
我这里现在发文件不够方便,自己拿去编译
PureBasic 4.00源代码:
复制代码
  1. Enumeration
  2. #Win
  3. #file
  4. #file2
  5. #menu
  6. #msave
  7. #mopen
  8. #mexport
  9. #mimport
  10. #mrun
  11. #mtop
  12. #list
  13. EndEnumeration
  14. Procedure gettime(aa.l)
  15. While 1=1
  16. If GetMenuItemState(#menu,#mrun)=1
  17. ct.s=GetClipboardText()
  18. If Not(ct.s="") And GetMenuItemState(#menu,#mrun)=1
  19. SetClipboardText("")
  20. ln=GetGadgetState(#list)
  21. ctp.s="0:"+Trim(Mid(ct.s,1,Len(ct.s)-1))
  22. If Not (ln=-1)
  23. SetGadgetItemText(#list,ln,ctp.s,0)
  24. EndIf
  25. If Not (GetGadgetState(#list)=CountGadgetItems(#list)-1)
  26. SetGadgetState(#list,ln+1)
  27. EndIf
  28. EndIf
  29. EndIf
  30. Delay(10)
  31. Wend
  32. EndProcedure
  33. OpenWindow(#win,0,0,530,150,"Audition Sub")
  34. CreateMenu(#menu,WindowID(#win))
  35. MenuTitle("Main")
  36. MenuItem(#mopen,"Open Project")
  37. MenuItem(#msave,"Save Project")
  38. MenuItem(#mimport,"Import Text")
  39. MenuItem(#mexport,"Save as SSA...")
  40. MenuItem(#mrun,"Get")
  41. MenuItem(#mtop,"On top")
  42. SetMenuItemState(#menu,#mtop,1)
  43. StickyWindow(#win,1)
  44. CreateGadgetList(WindowID(#win))
  45. ListIconGadget(#list,0,0,530,130,"Start",100)
  46. AddGadgetColumn(#list,1,"Text",425)
  47. CreateThread(@gettime(),1)
  48. Repeat
  49. wid=WaitWindowEvent()
  50. If wid=#PB_Event_Menu
  51. Select EventMenu()
  52. Case #mopen
  53. fn.s=OpenFileRequester("Open","","*.csp|*.csp",0)
  54. If Not (fn.s="")
  55. OpenFile(#file,fn.s)
  56. While Not Eof(#file)
  57. AddGadgetItem(#list,-1,ReadString(#file)+Chr(10)+ReadString(#file))
  58. Wend
  59. CloseFile(#file)
  60. EndIf
  61. Case #msave
  62. fn.s=SaveFileRequester("Save","","*.csp|*.csp",0)
  63. If Not(fn.s="")
  64. CreateFile(#file,fn.s)
  65. For i=0 To CountGadgetItems(#list)-1
  66. WriteStringN(#file,GetGadgetItemText(#list,i,0)+Chr(10)+GetGadgetItemText(#list,i,1))
  67. Next
  68. CloseFile(#file)
  69. EndIf
  70. Case #mtop
  71. SetMenuItemState(#menu,#mtop,1-GetMenuItemState(#menu,#mtop))
  72. If GetMenuItemState(#menu,#mtop)=1
  73. StickyWindow(#win,1)
  74. Else
  75. StickyWindow(#win,0)
  76. EndIf
  77. Case #mrun
  78. SetMenuItemState(#menu,#mrun,1-GetMenuItemState(#menu,#mrun))
  79. Case #mimport
  80. fn.s=OpenFileRequester("Open","","*.txt|*.txt",0)
  81. If Not (fn.s="")
  82. OpenFile(#file,fn.s)
  83. ClearGadgetItemList(#list)
  84. While Not (Eof(#file))
  85. AddGadgetItem(#list,-1,Chr(10)+ReadString(#file))
  86. Wend
  87. SetGadgetState(#list,0)
  88. CloseFile(#file)
  89. EndIf
  90. Case #mexport
  91. fn.s=OpenFileRequester("Save As","","*.SSA|*.SSA",0)
  92. If Not(fn.s="")
  93. CreateFile(#file,fn.s)
  94. OpenFile(#file2,"head.txt")
  95. While Not (Eof(#file2))
  96. WriteStringN(#file,ReadString(#file2))
  97. Wend
  98. CloseFile(#file2)
  99. starttime.s=GetGadgetItemText(#list,i,0)
  100. text.s=GetGadgetItemText(#list,i,1)
  101. For i=1 To CountGadgetItems(#list)-1
  102. starttime2.s=GetGadgetItemText(#list,i,0)
  103. text2.s=GetGadgetItemText(#list,i,1)
  104. If Not (text.s="")
  105. prew.s="Dialogue: Marked=0,"+starttime.s+","+starttime2.s+",Default,,0000,0000,0000,,"+text.s
  106. EndIf
  107. WriteStringN(#file,prew.s)
  108. text.s=text2.s
  109. starttime.s=starttime2.s
  110. Next
  111. CloseFile(#file)
  112. EndIf
  113. EndSelect
  114. EndIf
  115. Until wid=#PB_Event_CloseWindow


还有一个文件,文件名叫做"head.txt",文件内容:
复制代码
  1. [Script Info]
  2. ScriptType: v4.00
  3. Collisions: Normal
  4. PlayResX: 640
  5. PlayResY: 480
  6. Timer: 100.0000
  7. [V4 Styles]
  8. Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
  9. Style: Default,simhei,24,&Hffffff,&H00ffff,&H444444,&H444444,-1,0,1,1,0,2,5,5,10,15,1
  10. [Events]
  11. Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text


原理全部模仿MR大的某物……本程序适合配合按键精灵类似软件使用

顺便借这块地方问一下MR大,为什么我对CoolEdit的那个显示时间的框框进行sendmessage它不返回东西?对记事本等物(甚至开始菜单)都有返回东西……
引用

feelingmtg@2007-01-14 22:59

偶也找人给偶写出了一个小东西
虽然延时还有点问题
调了优先级以后就可以暂时解决


先用用试试
引用

MeteorRain@2007-01-15 00:11

有可能是那个时间框不是标准的windows控件。

顺便贡献一些代码,C#里调用FMOD加载音频产生波峰数据的。
复制代码
  1. private void loadaudio(string filename)
  2. {
  3. if(curraudio != "")
  4. {
  5. sound.release();
  6. peakdata = null;
  7. weakdata = null;
  8. }
  9. hScrollBar1.Value = 0;
  10. curraudio = filename;
  11. statusBar1.Text = string.Format(lang._("message", "openfile"), curraudio);
  12. menuclosea.Enabled = true;
  13. FMOD.RESULT result = system.createStream(curraudio, FMOD.MODE.HARDWARE | FMOD.MODE.ACCURATETIME, ref sound);
  14. sound.seekData(0);
  15. ERRCHECK(result);
  16. // build waveform data
  17. /* the following variables used when loading from cache file:
  18. *
  19. * audiolength
  20. * peakdata[], weakdata[], globalpeak, samplerate
  21. *
  22. */
  23. if(System.IO.File.Exists(curraudio + ".peak"))
  24. {
  25. // loading from cache file
  26. /* cache file structure
  27. * audiolength 4 bytes
  28. * global peak 4 bytes
  29. * samplerate 4 bytes
  30. * peakdata[0], weakdata[0], p1, w1, ... (interlaced) any bytes
  31. */
  32. statusBar1.Text = lang._("message", "loadcache");
  33. FileStream fs = new FileStream(curraudio + ".peak", FileMode.Open, FileAccess.Read);
  34. BinaryReader r = new BinaryReader(fs);
  35. audiolength = r.ReadInt32();
  36. globalpeak = r.ReadInt32();
  37. samplerate = r.ReadUInt32();
  38. int i;
  39. peakdata = new short[audiolength];
  40. weakdata = new short[audiolength];
  41. for(i = 0; i < audiolength; i++)
  42. {
  43. peakdata[i] = r.ReadInt16();
  44. weakdata[i] = r.ReadInt16();
  45. }
  46. r.Close();
  47. r = null;
  48. fs.Close();
  49. fs = null;
  50. }
  51. else
  52. {
  53. uint l1 = 0, l2 = 0;
  54. sound.getLength(ref l1, FMOD.TIMEUNIT.PCM);
  55. sound.getLength(ref l2, FMOD.TIMEUNIT.MS);
  56. l1 = (uint)((ulong)l1 * 1000 / l2);
  57. l2 *= wscale;
  58. samplerate = l1 / wscale;
  59. short peak, weak;
  60. int pos = 0, i;
  61. short[] buffer = new short[samplerate * 2];
  62. peakdata = new short[l2 / 1000 + 50];
  63. weakdata = new short[l2 / 1000 + 50];
  64. uint samplerateb = samplerate * 4;
  65. IntPtr buff = System.Runtime.InteropServices.Marshal.AllocHGlobal((int)samplerateb);
  66. do
  67. {
  68. sound.readData(buff, samplerateb, ref l1);
  69. System.Runtime.InteropServices.Marshal.Copy(buff, buffer, 0, (int)samplerateb / 2);
  70. peak = weak = 0;
  71. for(i = 0; i < l1 / 4; i++)
  72. {
  73. if(buffer[i] > peak)
  74. peak = buffer[i];
  75. if(buffer[i] < weak)
  76. weak = buffer[i];
  77. }
  78. peakdata[pos] = peak;
  79. weakdata[pos] = weak;
  80. pos++;
  81. if(pos < (l2 / 1000 + 5) && pos % 500 == 0)
  82. statusBar1.Text = string.Format(lang._("message", "openfile"), curraudio) + " " + (pos * 100 / (l2 / 1000 + 5)) + "%";
  83. Application.DoEvents();
  84. } while (l1 == samplerateb);
  85. audiolength = pos;
  86. System.Runtime.InteropServices.Marshal.FreeHGlobal(buff);
  87. peak = 0;
  88. statusBar1.Text = lang._("message", "normalize");
  89. for(i = 0; i < audiolength; i++)
  90. {
  91. if(peakdata[i] > peak)
  92. peak = peakdata[i];
  93. if(-weakdata[i] > peak)
  94. peak = (short)-weakdata[i];
  95. }
  96. globalpeak = peak;
  97. // creating peak cache file
  98. FileStream fs = new FileStream(curraudio + ".peak", FileMode.CreateNew);
  99. BinaryWriter w = new BinaryWriter(fs);
  100. w.Write(audiolength);
  101. w.Write(globalpeak);
  102. w.Write(samplerate);
  103. for(i = 0; i < audiolength; i++)
  104. {
  105. w.Write(peakdata[i]);
  106. w.Write(weakdata[i]);
  107. }
  108. w.Close();
  109. w = null;
  110. fs.Close();
  111. fs = null;
  112. }
  113. statusBar1.Text += " Done";
  114. calcscrollbar();
  115. pictureBox1.Refresh();
  116. sound.release();
  117. system.createStream(curraudio, FMOD.MODE.ACCURATETIME, ref sound);
  118. system.playSound(FMOD.CHANNELINDEX.FREE, sound, true, ref channel);
  119. }
引用

雷鸣@2007-01-15 12:15

引用
最初由 云羽 发布
用按键精灵咯


云羽能把你现在用的按键精灵给我一份吗?
:)
引用

«123»共3页

| TOP