『漫游』酷论坛>『字幕制作交流区』>[转贴]卡拉时间精确控 ..
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源代码:
- Enumeration
- #Win
- #file
- #file2
- #menu
- #msave
- #mopen
- #mexport
- #mimport
- #mrun
- #mtop
- #list
- EndEnumeration
-
-
- Procedure gettime(aa.l)
- While 1=1
- If GetMenuItemState(#menu,#mrun)=1
- ct.s=GetClipboardText()
- If Not(ct.s="") And GetMenuItemState(#menu,#mrun)=1
- SetClipboardText("")
- ln=GetGadgetState(#list)
- ctp.s="0:"+Trim(Mid(ct.s,1,Len(ct.s)-1))
- If Not (ln=-1)
- SetGadgetItemText(#list,ln,ctp.s,0)
- EndIf
- If Not (GetGadgetState(#list)=CountGadgetItems(#list)-1)
- SetGadgetState(#list,ln+1)
- EndIf
- EndIf
- EndIf
- Delay(10)
- Wend
- EndProcedure
-
- OpenWindow(#win,0,0,530,150,"Audition Sub")
- CreateMenu(#menu,WindowID(#win))
- MenuTitle("Main")
- MenuItem(#mopen,"Open Project")
- MenuItem(#msave,"Save Project")
- MenuItem(#mimport,"Import Text")
- MenuItem(#mexport,"Save as SSA...")
- MenuItem(#mrun,"Get")
- MenuItem(#mtop,"On top")
- SetMenuItemState(#menu,#mtop,1)
- StickyWindow(#win,1)
- CreateGadgetList(WindowID(#win))
- ListIconGadget(#list,0,0,530,130,"Start",100)
- AddGadgetColumn(#list,1,"Text",425)
-
- CreateThread(@gettime(),1)
- Repeat
- wid=WaitWindowEvent()
- If wid=#PB_Event_Menu
- Select EventMenu()
- Case #mopen
- fn.s=OpenFileRequester("Open","","*.csp|*.csp",0)
- If Not (fn.s="")
- OpenFile(#file,fn.s)
- While Not Eof(#file)
- AddGadgetItem(#list,-1,ReadString(#file)+Chr(10)+ReadString(#file))
- Wend
- CloseFile(#file)
- EndIf
- Case #msave
- fn.s=SaveFileRequester("Save","","*.csp|*.csp",0)
- If Not(fn.s="")
- CreateFile(#file,fn.s)
- For i=0 To CountGadgetItems(#list)-1
- WriteStringN(#file,GetGadgetItemText(#list,i,0)+Chr(10)+GetGadgetItemText(#list,i,1))
- Next
- CloseFile(#file)
- EndIf
- Case #mtop
- SetMenuItemState(#menu,#mtop,1-GetMenuItemState(#menu,#mtop))
- If GetMenuItemState(#menu,#mtop)=1
- StickyWindow(#win,1)
- Else
- StickyWindow(#win,0)
- EndIf
- Case #mrun
- SetMenuItemState(#menu,#mrun,1-GetMenuItemState(#menu,#mrun))
- Case #mimport
- fn.s=OpenFileRequester("Open","","*.txt|*.txt",0)
- If Not (fn.s="")
- OpenFile(#file,fn.s)
- ClearGadgetItemList(#list)
- While Not (Eof(#file))
- AddGadgetItem(#list,-1,Chr(10)+ReadString(#file))
- Wend
- SetGadgetState(#list,0)
- CloseFile(#file)
- EndIf
- Case #mexport
- fn.s=OpenFileRequester("Save As","","*.SSA|*.SSA",0)
- If Not(fn.s="")
- CreateFile(#file,fn.s)
- OpenFile(#file2,"head.txt")
- While Not (Eof(#file2))
- WriteStringN(#file,ReadString(#file2))
- Wend
- CloseFile(#file2)
- starttime.s=GetGadgetItemText(#list,i,0)
- text.s=GetGadgetItemText(#list,i,1)
- For i=1 To CountGadgetItems(#list)-1
- starttime2.s=GetGadgetItemText(#list,i,0)
- text2.s=GetGadgetItemText(#list,i,1)
- If Not (text.s="")
- prew.s="Dialogue: Marked=0,"+starttime.s+","+starttime2.s+",Default,,0000,0000,0000,,"+text.s
- EndIf
- WriteStringN(#file,prew.s)
- text.s=text2.s
- starttime.s=starttime2.s
- Next
- CloseFile(#file)
- EndIf
- EndSelect
- EndIf
- Until wid=#PB_Event_CloseWindow
还有一个文件,文件名叫做"head.txt",文件内容:
- [Script Info]
- ScriptType: v4.00
- Collisions: Normal
- PlayResX: 640
- PlayResY: 480
- Timer: 100.0000
-
- [V4 Styles]
- Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
- Style: Default,simhei,24,&Hffffff,&H00ffff,&H444444,&H444444,-1,0,1,1,0,2,5,5,10,15,1
-
- [Events]
- 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加载音频产生波峰数据的。
- private void loadaudio(string filename)
- {
- if(curraudio != "")
- {
- sound.release();
- peakdata = null;
- weakdata = null;
- }
- hScrollBar1.Value = 0;
- curraudio = filename;
- statusBar1.Text = string.Format(lang._("message", "openfile"), curraudio);
- menuclosea.Enabled = true;
- FMOD.RESULT result = system.createStream(curraudio, FMOD.MODE.HARDWARE | FMOD.MODE.ACCURATETIME, ref sound);
- sound.seekData(0);
- ERRCHECK(result);
-
- // build waveform data
- /* the following variables used when loading from cache file:
- *
- * audiolength
- * peakdata[], weakdata[], globalpeak, samplerate
- *
- */
- if(System.IO.File.Exists(curraudio + ".peak"))
- {
- // loading from cache file
-
- /* cache file structure
- * audiolength 4 bytes
- * global peak 4 bytes
- * samplerate 4 bytes
- * peakdata[0], weakdata[0], p1, w1, ... (interlaced) any bytes
- */
- statusBar1.Text = lang._("message", "loadcache");
- FileStream fs = new FileStream(curraudio + ".peak", FileMode.Open, FileAccess.Read);
- BinaryReader r = new BinaryReader(fs);
- audiolength = r.ReadInt32();
- globalpeak = r.ReadInt32();
- samplerate = r.ReadUInt32();
- int i;
- peakdata = new short[audiolength];
- weakdata = new short[audiolength];
- for(i = 0; i < audiolength; i++)
- {
- peakdata[i] = r.ReadInt16();
- weakdata[i] = r.ReadInt16();
- }
- r.Close();
- r = null;
- fs.Close();
- fs = null;
-
- }
- else
- {
- uint l1 = 0, l2 = 0;
- sound.getLength(ref l1, FMOD.TIMEUNIT.PCM);
- sound.getLength(ref l2, FMOD.TIMEUNIT.MS);
- l1 = (uint)((ulong)l1 * 1000 / l2);
- l2 *= wscale;
- samplerate = l1 / wscale;
- short peak, weak;
- int pos = 0, i;
- short[] buffer = new short[samplerate * 2];
- peakdata = new short[l2 / 1000 + 50];
- weakdata = new short[l2 / 1000 + 50];
- uint samplerateb = samplerate * 4;
- IntPtr buff = System.Runtime.InteropServices.Marshal.AllocHGlobal((int)samplerateb);
- do
- {
- sound.readData(buff, samplerateb, ref l1);
- System.Runtime.InteropServices.Marshal.Copy(buff, buffer, 0, (int)samplerateb / 2);
- peak = weak = 0;
- for(i = 0; i < l1 / 4; i++)
- {
- if(buffer[i] > peak)
- peak = buffer[i];
- if(buffer[i] < weak)
- weak = buffer[i];
- }
- peakdata[pos] = peak;
- weakdata[pos] = weak;
- pos++;
- if(pos < (l2 / 1000 + 5) && pos % 500 == 0)
- statusBar1.Text = string.Format(lang._("message", "openfile"), curraudio) + " " + (pos * 100 / (l2 / 1000 + 5)) + "%";
- Application.DoEvents();
- } while (l1 == samplerateb);
- audiolength = pos;
- System.Runtime.InteropServices.Marshal.FreeHGlobal(buff);
- peak = 0;
- statusBar1.Text = lang._("message", "normalize");
- for(i = 0; i < audiolength; i++)
- {
- if(peakdata[i] > peak)
- peak = peakdata[i];
- if(-weakdata[i] > peak)
- peak = (short)-weakdata[i];
- }
- globalpeak = peak;
-
- // creating peak cache file
- FileStream fs = new FileStream(curraudio + ".peak", FileMode.CreateNew);
- BinaryWriter w = new BinaryWriter(fs);
- w.Write(audiolength);
- w.Write(globalpeak);
- w.Write(samplerate);
- for(i = 0; i < audiolength; i++)
- {
- w.Write(peakdata[i]);
- w.Write(weakdata[i]);
- }
- w.Close();
- w = null;
- fs.Close();
- fs = null;
- }
- statusBar1.Text += " Done";
- calcscrollbar();
- pictureBox1.Refresh();
- sound.release();
-
- system.createStream(curraudio, FMOD.MODE.ACCURATETIME, ref sound);
- system.playSound(FMOD.CHANNELINDEX.FREE, sound, true, ref channel);
- }
雷鸣@2007-01-15 12:15
引用
最初由 云羽 发布
用按键精灵咯
云羽能把你现在用的按键精灵给我一份吗?
:)
«123»共3页
| TOP