File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,17 +32,13 @@ public static string GetName(string id)
3232 return Regex . IsMatch ( id , "[FM]\\ d+" ) ? $ "$({ id } )" : "" ;
3333 }
3434
35- public static string GetId ( string name , string defaultName = null )
35+ public static string GetId ( string name )
3636 {
3737 foreach ( var singer in SingerNames . Where ( singer => singer . Value . Equals ( name ) ) )
3838 {
3939 return singer . Key ;
4040 }
41- if ( Regex . IsMatch ( name , "\\ $\\ ([FM]\\ d+\\ )" ) )
42- {
43- return name . Substring ( 2 , name . Length - 3 ) ;
44- }
45- return defaultName ?? "" ;
41+ return Regex . IsMatch ( name , "\\ $\\ ([FM]\\ d+\\ )" ) ? name . Substring ( 2 , name . Length - 3 ) : "" ;
4642 }
4743 }
4844
Original file line number Diff line number Diff line change @@ -109,9 +109,14 @@ private SingingTool.Model.ITrack EncodeTrack(Track track)
109109 switch ( track )
110110 {
111111 case SingingTrack singingTrack :
112+ var singerId = Singers . GetId ( singingTrack . AISingerName ) ;
113+ if ( singerId == "" )
114+ {
115+ singerId = Singers . GetId ( DefaultSinger ) ;
116+ }
112117 var sTrack = new SingingTool . Model . SingingTrack
113118 {
114- AISingerId = Singers . GetId ( singingTrack . AISingerName , DefaultSinger ) ,
119+ AISingerId = singerId ,
115120 ReverbPreset = ReverbPresets . GetIndex ( singingTrack . ReverbPreset )
116121 } ;
117122 foreach ( var note in singingTrack . NoteList )
@@ -156,7 +161,7 @@ private SingingTool.Model.Note EncodeNote(Note note)
156161 KeyIndex = note . KeyNumber + 12 ,
157162 Lyric = note . Lyric ,
158163 HeadTag = NoteHeadTags . GetIndex ( note . HeadTag ) ,
159- Pronouncing = note . Pronunciation
164+ Pronouncing = note . Pronunciation ? . ToLower ( )
160165 } ;
161166 resultNote . WidthPos = ( int ) Math . Round (
162167 Synchronizer . GetActualTicksFromTicks ( note . StartPos + note . Length ) ) - resultNote . ActualStartPos ;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<Plugin >
33 <Name >BinSvip</Name >
4- <Version >1.1.0 </Version >
4+ <Version >1.1.1 </Version >
55 <Author >YQ之神</Author >
66 <HomePage >https://space.bilibili.com/102844209</HomePage >
77 <Descriptions >原始二进制 .svip 文件转换插件。
 若要指定歌手编号与名称的转换关系,或添加已拥有编号但未公开发行的歌手,请修改 SingerDict.json。
You can’t perform that action at this time.
0 commit comments