git-svn-id: http://svn.sourceforge.jp/svnroot/lipsync@8 b1f601f4-4f45-0410-8980-aecacb008692

This commit is contained in:
kbinani
2009-07-29 17:03:20 +00:00
parent 0453ea1636
commit 8ab2a598b3
49 changed files with 3567 additions and 1370 deletions

View File

@@ -56,6 +56,10 @@ namespace Boare.Lib.Vsq {
this.PlayMode = play_mode;
}
public VsqCommon()
: this( "Miku", System.Drawing.Color.FromArgb( 179, 181, 123 ), 1, 1 ) {
}
/// <summary>
/// MetaTextのテキストファイルからのコンストラクタ
/// </summary>

View File

@@ -29,6 +29,9 @@ namespace Boare.Lib.Vsq {
public int Program;
public int Language;
public IconHandle() {
}
public object Clone() {
IconHandle ret = new IconHandle();
ret.Caption = Caption;
@@ -61,7 +64,7 @@ namespace Boare.Lib.Vsq {
public Lyric L0;
public int Index;
internal LyricHandle() {
public LyricHandle() {
}
/// <summary>
@@ -104,6 +107,8 @@ namespace Boare.Lib.Vsq {
public int Length;
public VibratoHandle(){
StartRate = 64;
StartDepth = 64;
RateBP = new VibratoBPList();
DepthBP = new VibratoBPList();
}
@@ -140,8 +145,50 @@ namespace Boare.Lib.Vsq {
}
}
[Serializable]
public class NoteHeadHandle : ICloneable {
public int Index;
public string IconID;
public string IDS;
public int Original;
public string Caption;
public int Length;
public int Duration;
public int Depth;
public NoteHeadHandle() {
}
public object Clone() {
NoteHeadHandle result = new NoteHeadHandle();
result.Index = Index;
result.IconID = IconID;
result.IDS = this.IDS;
result.Original = this.Original;
result.Caption = this.Caption;
result.Length = this.Length;
result.Duration = Duration;
result.Depth = Depth;
return result;
}
public VsqHandle castToVsqHandle() {
VsqHandle ret = new VsqHandle();
ret.m_type = VsqHandleType.NoteHeadHandle;
ret.Index = Index;
ret.IconID = IconID;
ret.IDS = IDS;
ret.Original = Original;
ret.Caption = Caption;
ret.Length = Length;
ret.Duration = Duration;
ret.Depth = Depth;
return ret;
}
}
/// <summary>
/// ハンドルを取り扱います。ハンドルにはLyricHandle、VibratoHandleおよびIconHandleがある
/// ハンドルを取り扱います。ハンドルにはLyricHandle、VibratoHandle、IconHandleおよびNoteHeadHandleがある
/// </summary>
[Serializable]
public class VsqHandle {
@@ -159,6 +206,8 @@ namespace Boare.Lib.Vsq {
public VibratoBPList RateBP;
public int Language;
public int Program;
public int Duration;
public int Depth;
public LyricHandle castToLyricHandle() {
LyricHandle ret = new LyricHandle();
@@ -197,6 +246,18 @@ namespace Boare.Lib.Vsq {
return ret;
}
public NoteHeadHandle castToNoteHeadHandle() {
NoteHeadHandle ret = new NoteHeadHandle();
ret.Caption = Caption;
ret.Depth = Depth;
ret.Duration = Duration;
ret.IconID = IconID;
ret.IDS = IDS;
ret.Length = Length;
ret.Original = Original;
return ret;
}
internal VsqHandle() {
}
@@ -235,6 +296,8 @@ namespace Boare.Lib.Vsq {
int rate_bp_num = 0;
Language = 0;
Program = 0;
Duration = 0;
Depth = 64;
string tmpDepthBPX = "";
string tmpDepthBPY = "";
@@ -247,6 +310,7 @@ namespace Boare.Lib.Vsq {
spl = last_line.Split( new char[] { '=' } );
switch ( spl[0] ) {
case "Language":
m_type = VsqHandleType.Singer;
Language = int.Parse( spl[1] );
break;
case "Program":
@@ -283,6 +347,7 @@ namespace Boare.Lib.Vsq {
tmpDepthBPY = spl[1];
break;
case "StartRate":
m_type = VsqHandleType.Vibrato;
StartRate = int.Parse( spl[1] );
break;
case "RateBPNum":
@@ -298,19 +363,26 @@ namespace Boare.Lib.Vsq {
m_type = VsqHandleType.Lyric;
L0 = new Lyric( spl[1] );
break;
case "Duration":
m_type = VsqHandleType.NoteHeadHandle;
Duration = int.Parse( spl[1] );
break;
case "Depth":
Duration = int.Parse( spl[1] );
break;
}
if ( sr.peek() < 0 ) {
break;
}
last_line = sr.readLine();
}
if ( IDS != "normal" ) {
/*if ( IDS != "normal" ) {
m_type = VsqHandleType.Singer;
} else if ( IconID != "" ) {
m_type = VsqHandleType.Vibrato;
} else {
m_type = VsqHandleType.Lyric;
}
}*/
// RateBPX, RateBPYの設定
if ( m_type == VsqHandleType.Vibrato ) {
@@ -438,6 +510,15 @@ namespace Boare.Lib.Vsq {
result += "Language=" + Language + Environment.NewLine;
result += "Program=" + Program;
break;
case VsqHandleType.NoteHeadHandle:
result += Environment.NewLine + "IconID=" + IconID + Environment.NewLine;
result += "IDS=" + IDS + Environment.NewLine;
result += "Original=" + Original + Environment.NewLine;
result += "Caption=" + Caption + Environment.NewLine;
result += "Length=" + Length + Environment.NewLine;
result += "Duration=" + Duration + Environment.NewLine;
result += "Depth=" + Depth;
break;
default:
break;
}

View File

@@ -23,9 +23,9 @@ namespace Boare.Lib.Vsq {
/// </summary>
[Serializable]
public class VsqID : ICloneable {
public int value;
internal int value;
public VsqIDType type;
public int IconHandle_index;
internal int IconHandle_index;
public IconHandle IconHandle;
public int Length;
public int Note;
@@ -35,11 +35,13 @@ namespace Boare.Lib.Vsq {
public int PMbPortamentoUse;
public int DEMdecGainRate;
public int DEMaccent;
public int LyricHandle_index;
internal int LyricHandle_index;
public LyricHandle LyricHandle;
public int VibratoHandle_index;
internal int VibratoHandle_index;
public VibratoHandle VibratoHandle;
public int VibratoDelay;
internal int NoteHeadHandle_index;
public NoteHeadHandle NoteHeadHandle;
public static VsqID EOS = new VsqID( -1 );
@@ -68,6 +70,9 @@ namespace Boare.Lib.Vsq {
result.VibratoHandle = (VibratoHandle)this.VibratoHandle.Clone();
}
result.VibratoDelay = this.VibratoDelay;
if ( NoteHeadHandle != null ) {
result.NoteHeadHandle = (NoteHeadHandle)NoteHeadHandle.Clone();
}
return result;
}
@@ -80,6 +85,9 @@ namespace Boare.Lib.Vsq {
value = a_value;
}
public VsqID()
: this( 0 ) {
}
/// <summary>
/// テキストファイルからのコンストラクタ
@@ -94,6 +102,7 @@ namespace Boare.Lib.Vsq {
this.IconHandle_index = -2;
this.LyricHandle_index = -1;
this.VibratoHandle_index = -1;
this.NoteHeadHandle_index = -1;
this.Length = 0;
this.Note = 0;
this.Dynamics = 0;
@@ -154,6 +163,10 @@ namespace Boare.Lib.Vsq {
case "PMbPortamentoUse":
PMbPortamentoUse = int.Parse( spl[1] );
break;
case "NoteHeadHandle":
NoteHeadHandle_index = VsqHandle.HandleIndexFromString( spl[1] );
break;
}
if ( sr.peek() < 0 ) {
break;
@@ -162,7 +175,6 @@ namespace Boare.Lib.Vsq {
}
}
public override string ToString() {
string ret = "{Type=" + type;
switch ( type ) {
@@ -191,7 +203,6 @@ namespace Boare.Lib.Vsq {
return ret;
}
/// <summary>
/// インスタンスをテキストファイルに出力します
/// </summary>
@@ -216,6 +227,9 @@ namespace Boare.Lib.Vsq {
sw.writeLine( "VibratoHandle=h#" + VibratoHandle_index.ToString( "0000" ) );
sw.writeLine( "VibratoDelay=" + VibratoDelay );
}
if ( NoteHeadHandle != null ) {
sw.writeLine( "NoteHeadHandle=h#" + NoteHeadHandle_index.ToString( "0000" ) );
}
break;
case VsqIDType.Singer:
sw.writeLine( "IconHandle=h#" + IconHandle_index.ToString( "0000" ) );

View File

@@ -64,7 +64,7 @@ namespace Boare.Lib.Vsq {
UnknownFloat = 0.000000f;
}
private Lyric() {
public Lyric() {
}
/// <summary>
@@ -97,6 +97,18 @@ namespace Boare.Lib.Vsq {
}
}
/// <summary>
/// XMLシリアライズ用
/// </summary>
public string PhoneticSymbol {
get {
return getPhoneticSymbol();
}
set {
setPhoneticSymbol( value );
}
}
public string[] getPhoneticSymbolList() {
string[] ret = new string[m_phonetic_symbol.Length];
for ( int i = 0; i < m_phonetic_symbol.Length; i++ ) {

View File

@@ -12,9 +12,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text;
namespace Boare.Lib.Vsq {
@@ -30,6 +29,10 @@ namespace Boare.Lib.Vsq {
return res;
}
public VsqMaster()
: this( 1 ) {
}
/// <summary>
/// プリメジャー値を指定したコンストラクタ
/// </summary>

View File

@@ -13,8 +13,8 @@
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Text;
namespace Boare.Lib.Vsq {
@@ -57,6 +57,10 @@ namespace Boare.Lib.Vsq {
Slave = new List<VsqMixerEntry>();
}
public VsqMixer()
: this( 0, 0, 0, 0 ) {
}
/// <summary>
/// テキストファイルからのコンストラクタ
/// </summary>
@@ -261,6 +265,10 @@ namespace Boare.Lib.Vsq {
this.Mute = mute;
this.Solo = solo;
}
public VsqMixerEntry()
: this( 0, 0, 0, 0 ) {
}
}
}

View File

@@ -13,10 +13,9 @@
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
using System.Text;
namespace Boare.Lib.Vsq {
@@ -26,9 +25,9 @@ namespace Boare.Lib.Vsq {
[Serializable]
public class VsqMetaText : ICloneable {
public VsqCommon Common;
internal VsqMaster master;
internal VsqMixer mixer;
private VsqEventList m_events;
public VsqMaster master;
public VsqMixer mixer;
public VsqEventList Events;
/// <summary>
/// PIT。ピッチベンド(pitchBendBPList)。default=0
/// </summary>
@@ -53,18 +52,26 @@ namespace Boare.Lib.Vsq {
/// CLE。クリアネス(epRESlopeDepthBPList)。default=0
/// </summary>
public VsqBPList CLE;
private VsqBPList reso1FreqBPList;
private VsqBPList reso2FreqBPList;
private VsqBPList reso3FreqBPList;
private VsqBPList reso4FreqBPList;
private VsqBPList reso1BWBPList;
private VsqBPList reso2BWBPList;
private VsqBPList reso3BWBPList;
private VsqBPList reso4BWBPList;
private VsqBPList reso1AmpBPList;
private VsqBPList reso2AmpBPList;
private VsqBPList reso3AmpBPList;
private VsqBPList reso4AmpBPList;
public VsqBPList reso1FreqBPList;
public VsqBPList reso2FreqBPList;
public VsqBPList reso3FreqBPList;
public VsqBPList reso4FreqBPList;
public VsqBPList reso1BWBPList;
public VsqBPList reso2BWBPList;
public VsqBPList reso3BWBPList;
public VsqBPList reso4BWBPList;
public VsqBPList reso1AmpBPList;
public VsqBPList reso2AmpBPList;
public VsqBPList reso3AmpBPList;
public VsqBPList reso4AmpBPList;
/// <summary>
/// Harmonics。(EpRSineBPList)default = 64
/// </summary>
public VsqBPList harmonics;
/// <summary>
/// Effect2 Depth。
/// </summary>
public VsqBPList fx2depth;
/// <summary>
/// GEN。ジェンダーファクター(genderFactorBPList)。default=64
/// </summary>
@@ -89,10 +96,10 @@ namespace Boare.Lib.Vsq {
if ( mixer != null ) {
res.mixer = (VsqMixer)mixer.Clone();
}
if ( m_events != null ) {
res.m_events = new VsqEventList();
for ( Iterator itr = m_events.iterator(); itr.hasNext(); ) {
res.m_events.add( (VsqEvent)((VsqEvent)itr.next()).Clone() );
if ( Events != null ) {
res.Events = new VsqEventList();
for ( Iterator itr = Events.iterator(); itr.hasNext(); ) {
res.Events.add( (VsqEvent)((VsqEvent)itr.next()).Clone() );
}
}
if ( PIT != null ) {
@@ -149,6 +156,12 @@ namespace Boare.Lib.Vsq {
if ( reso4AmpBPList != null ) {
res.reso4AmpBPList = (VsqBPList)reso4AmpBPList.Clone();
}
if ( harmonics != null ) {
res.harmonics = (VsqBPList)harmonics.Clone();
}
if ( fx2depth != null ) {
res.fx2depth = (VsqBPList)fx2depth.Clone();
}
if ( GEN != null ) {
res.GEN = (VsqBPList)GEN.Clone();
}
@@ -162,7 +175,7 @@ namespace Boare.Lib.Vsq {
}
public VsqEventList getEventList() {
return m_events;
return Events;
}
internal VsqBPList getElement( string curve ) {
@@ -185,6 +198,34 @@ namespace Boare.Lib.Vsq {
return this.PIT;
case "por":
return this.POR;
case "harmonics":
return this.harmonics;
case "fx2depth":
return this.fx2depth;
case "reso1amp":
return this.reso1AmpBPList;
case "reso1bw":
return this.reso1BWBPList;
case "reso1freq":
return this.reso1FreqBPList;
case "reso2amp":
return this.reso2AmpBPList;
case "reso2bw":
return this.reso2BWBPList;
case "reso2freq":
return this.reso2FreqBPList;
case "reso3amp":
return this.reso2AmpBPList;
case "reso3bw":
return this.reso3BWBPList;
case "reso3freq":
return this.reso3FreqBPList;
case "reso4amp":
return this.reso4AmpBPList;
case "reso4bw":
return this.reso4BWBPList;
case "reso4freq":
return this.reso4FreqBPList;
default:
return null;
}
@@ -289,7 +330,7 @@ namespace Boare.Lib.Vsq {
/// Singerプロパティに指定されている
/// </summary>
public string getSinger() {
for ( Iterator itr = m_events.iterator(); itr.hasNext(); ) {
for ( Iterator itr = Events.iterator(); itr.hasNext(); ) {
VsqEvent item = (VsqEvent)itr.next();
if ( item.ID.type == VsqIDType.Singer ) {
return item.ID.IconHandle.IDS;
@@ -299,7 +340,7 @@ namespace Boare.Lib.Vsq {
}
public void setSinger( string value ) {
for ( Iterator itr = m_events.iterator(); itr.hasNext(); ) {
for ( Iterator itr = Events.iterator(); itr.hasNext(); ) {
VsqEvent item = (VsqEvent)itr.next();
if ( item.ID.type == VsqIDType.Singer ) {
item.ID.IconHandle.IDS = value;
@@ -314,9 +355,9 @@ namespace Boare.Lib.Vsq {
/// <returns></returns>
public int getIndexOfEOS() {
int result;
if ( m_events.getCount() > 0 ) {
int ilast = m_events.getCount() - 1;
result = m_events.getElement( ilast ).Clock;
if ( Events.getCount() > 0 ) {
int ilast = Events.getCount() - 1;
result = Events.getElement( ilast ).Clock;
} else {
result = -1;
}
@@ -334,11 +375,11 @@ namespace Boare.Lib.Vsq {
int current_id = -1;
int current_handle = -1;
List<VsqEvent> events = new List<VsqEvent>();
for ( Iterator itr = m_events.iterator(); itr.hasNext(); ) {
for ( Iterator itr = Events.iterator(); itr.hasNext(); ) {
events.Add( (VsqEvent)itr.next() );
}
events.Sort();
for( int i = 0; i < events.Count; i++ ){
for ( int i = 0; i < events.Count; i++ ) {
VsqEvent item = events[i];
VsqID id_item = (VsqID)item.ID.Clone();
current_id++;
@@ -368,6 +409,14 @@ namespace Boare.Lib.Vsq {
handle.Add( handle_item );
id_item.VibratoHandle_index = current_handle;
}
// NoteHeadHandle
if ( item.ID.NoteHeadHandle != null ) {
current_handle++;
VsqHandle handle_item = item.ID.NoteHeadHandle.castToVsqHandle();
handle_item.Index = current_handle;
handle.Add( handle_item );
id_item.NoteHeadHandle_index = current_handle;
}
id.Add( id_item );
}
}
@@ -398,6 +447,7 @@ namespace Boare.Lib.Vsq {
for ( i = 0; i < handle.Count; i++ ) {
handle[i].write( sw, encode );
}
string version = Common.Version;
if ( PIT.getCount() > 0 ) {
PIT.print( sw, start, "[PitchBendBPList]" );
}
@@ -416,44 +466,52 @@ namespace Boare.Lib.Vsq {
if ( CLE.getCount() > 0 ) {
CLE.print( sw, start, "[EpRESlopeDepthBPList]" );
}
if ( version.StartsWith( "DSB2" ) ) {
if ( harmonics.getCount() > 0 ) {
harmonics.print( sw, start, "[EpRSineBPList]" );
}
if ( fx2depth.getCount() > 0 ) {
fx2depth.print( sw, start, "[VibTremDepthBPList]" );
}
if ( reso1FreqBPList.getCount() > 0 ) {
reso1FreqBPList.print( sw, start, "[Reso1FreqBPList]" );
}
if ( reso2FreqBPList.getCount() > 0 ) {
reso2FreqBPList.print( sw, start, "[Reso2FreqBPList]" );
}
if ( reso3FreqBPList.getCount() > 0 ) {
reso3FreqBPList.print( sw, start, "[Reso3FreqBPList]" );
}
if ( reso4FreqBPList.getCount() > 0 ) {
reso4FreqBPList.print( sw, start, "[Reso4FreqBPList]" );
}
if ( reso1FreqBPList.getCount() > 0 ) {
reso1FreqBPList.print( sw, start, "[Reso1FreqBPList]" );
}
if ( reso2FreqBPList.getCount() > 0 ) {
reso2FreqBPList.print( sw, start, "[Reso2FreqBPList]" );
}
if ( reso3FreqBPList.getCount() > 0 ) {
reso3FreqBPList.print( sw, start, "[Reso3FreqBPList]" );
}
if ( reso4FreqBPList.getCount() > 0 ) {
reso4FreqBPList.print( sw, start, "[Reso4FreqBPList]" );
}
if ( reso1BWBPList.getCount() > 0 ) {
reso1BWBPList.print( sw, start, "[Reso1BWBPList]" );
}
if ( reso2BWBPList.getCount() > 0 ) {
reso2BWBPList.print( sw, start, "[Reso2BWBPList]" );
}
if ( reso3BWBPList.getCount() > 0 ) {
reso3BWBPList.print( sw, start, "[Reso3BWBPList]" );
}
if ( reso4BWBPList.getCount() > 0 ) {
reso4BWBPList.print( sw, start, "[Reso4BWBPList]" );
}
if ( reso1BWBPList.getCount() > 0 ) {
reso1BWBPList.print( sw, start, "[Reso1BWBPList]" );
}
if ( reso2BWBPList.getCount() > 0 ) {
reso2BWBPList.print( sw, start, "[Reso2BWBPList]" );
}
if ( reso3BWBPList.getCount() > 0 ) {
reso3BWBPList.print( sw, start, "[Reso3BWBPList]" );
}
if ( reso4BWBPList.getCount() > 0 ) {
reso4BWBPList.print( sw, start, "[Reso4BWBPList]" );
}
if ( reso1AmpBPList.getCount() > 0 ) {
reso1AmpBPList.print( sw, start, "[Reso1AmpBPList]" );
}
if ( reso2AmpBPList.getCount() > 0 ) {
reso2AmpBPList.print( sw, start, "[Reso2AmpBPList]" );
}
if ( reso3AmpBPList.getCount() > 0 ) {
reso3AmpBPList.print( sw, start, "[Reso3AmpBPList]" );
}
if ( reso4AmpBPList.getCount() > 0 ) {
reso4AmpBPList.print( sw, start, "[Reso4AmpBPList]" );
if ( reso1AmpBPList.getCount() > 0 ) {
reso1AmpBPList.print( sw, start, "[Reso1AmpBPList]" );
}
if ( reso2AmpBPList.getCount() > 0 ) {
reso2AmpBPList.print( sw, start, "[Reso2AmpBPList]" );
}
if ( reso3AmpBPList.getCount() > 0 ) {
reso3AmpBPList.print( sw, start, "[Reso3AmpBPList]" );
}
if ( reso4AmpBPList.getCount() > 0 ) {
reso4AmpBPList.print( sw, start, "[Reso4AmpBPList]" );
}
}
if ( GEN.getCount() > 0 ) {
@@ -462,15 +520,17 @@ namespace Boare.Lib.Vsq {
if ( POR.getCount() > 0 ) {
POR.print( sw, start, "[PortamentoTimingBPList]" );
}
if ( OPE.getCount() > 0 ) {
OPE.print( sw, start, "[OpeningBPList]" );
if ( version.StartsWith( "DSB3" ) ) {
if ( OPE.getCount() > 0 ) {
OPE.print( sw, start, "[OpeningBPList]" );
}
}
}
private void writeEventList( TextMemoryStream sw, int eos ) {
sw.writeLine( "[EventList]" );
List<VsqEvent> temp = new List<VsqEvent>();
for ( Iterator itr = m_events.iterator(); itr.hasNext(); ) {
for ( Iterator itr = Events.iterator(); itr.hasNext(); ) {
temp.Add( (VsqEvent)itr.next() );
}
temp.Sort();
@@ -514,75 +574,80 @@ namespace Boare.Lib.Vsq {
private VsqMetaText( string name, int pre_measure, string singer, bool is_first_track ) {
Common = new VsqCommon( name, Color.FromArgb( 179, 181, 123 ), 1, 1 );
PIT = new VsqBPList( 0, -8192, 8192 );
PIT.add( 0, PIT.getDefault() );
PIT = new VsqBPList( 0, -8192, 8191 );
//PIT.add( 0, PIT.getDefault() );
PBS = new VsqBPList( 2, 0, 24 );
PBS.add( 0, PBS.getDefault() );
//PBS.add( 0, PBS.getDefault() );
DYN = new VsqBPList( 64, 0, 127 );
DYN.add( 0, DYN.getDefault() );
//DYN.add( 0, DYN.getDefault() );
BRE = new VsqBPList( 0, 0, 127 );
BRE.add( 0, BRE.getDefault() );
//BRE.add( 0, BRE.getDefault() );
BRI = new VsqBPList( 64, 0, 127 );
BRI.add( 0, BRI.getDefault() );
//BRI.add( 0, BRI.getDefault() );
CLE = new VsqBPList( 0, 0, 127 );
CLE.add( 0, CLE.getDefault() );
//CLE.add( 0, CLE.getDefault() );
reso1FreqBPList = new VsqBPList( 255, 0, 255 );
reso1FreqBPList.add( 0, reso1FreqBPList.getDefault() );
reso1FreqBPList = new VsqBPList( 64, 0, 127 );
//reso1FreqBPList.add( 0, reso1FreqBPList.getDefault() );
reso2FreqBPList = new VsqBPList( 255, 0, 255 );
reso2FreqBPList.add( 0, reso2FreqBPList.getDefault() );
reso2FreqBPList = new VsqBPList( 64, 0, 127 );
//reso2FreqBPList.add( 0, reso2FreqBPList.getDefault() );
reso3FreqBPList = new VsqBPList( 255, 0, 255 );
reso3FreqBPList.add( 0, reso3FreqBPList.getDefault() );
reso3FreqBPList = new VsqBPList( 64, 0, 127 );
//reso3FreqBPList.add( 0, reso3FreqBPList.getDefault() );
reso4FreqBPList = new VsqBPList( 255, 0, 255 );
reso4FreqBPList.add( 0, reso4FreqBPList.getDefault() );
reso4FreqBPList = new VsqBPList( 64, 0, 127 );
//reso4FreqBPList.add( 0, reso4FreqBPList.getDefault() );
reso1BWBPList = new VsqBPList( 255, 0, 255 );
reso1BWBPList.add( 0, reso1BWBPList.getDefault() );
reso1BWBPList = new VsqBPList( 64, 0, 127 );
//reso1BWBPList.add( 0, reso1BWBPList.getDefault() );
reso2BWBPList = new VsqBPList( 255, 0, 255 );
reso2BWBPList.add( 0, reso2BWBPList.getDefault() );
reso2BWBPList = new VsqBPList( 64, 0, 127 );
//reso2BWBPList.add( 0, reso2BWBPList.getDefault() );
reso3BWBPList = new VsqBPList( 255, 0, 255 );
reso3BWBPList.add( 0, reso3BWBPList.getDefault() );
reso3BWBPList = new VsqBPList( 64, 0, 127 );
//reso3BWBPList.add( 0, reso3BWBPList.getDefault() );
reso4BWBPList = new VsqBPList( 255, 0, 255 );
reso4BWBPList.add( 0, reso4BWBPList.getDefault() );
reso4BWBPList = new VsqBPList( 64, 0, 127 );
//reso4BWBPList.add( 0, reso4BWBPList.getDefault() );
reso1AmpBPList = new VsqBPList( 255, 0, 255 );
reso1AmpBPList.add( 0, reso1AmpBPList.getDefault() );
reso1AmpBPList = new VsqBPList( 64, 0, 127 );
//reso1AmpBPList.add( 0, reso1AmpBPList.getDefault() );
reso2AmpBPList = new VsqBPList( 255, 0, 255 );
reso2AmpBPList.add( 0, reso2AmpBPList.getDefault() );
reso2AmpBPList = new VsqBPList( 64, 0, 127 );
//reso2AmpBPList.add( 0, reso2AmpBPList.getDefault() );
reso3AmpBPList = new VsqBPList( 255, 0, 255 );
reso3AmpBPList.add( 0, reso3AmpBPList.getDefault() );
reso3AmpBPList = new VsqBPList( 64, 0, 127 );
//reso3AmpBPList.add( 0, reso3AmpBPList.getDefault() );
reso4AmpBPList = new VsqBPList( 255, 0, 255 );
reso4AmpBPList.add( 0, reso4AmpBPList.getDefault() );
reso4AmpBPList = new VsqBPList( 64, 0, 127 );
//reso4AmpBPList.add( 0, reso4AmpBPList.getDefault() );
harmonics = new VsqBPList( 64, 0, 127 );
//harmonics.add( 0, harmonics.getDefault() );
fx2depth = new VsqBPList( 64, 0, 127 );
GEN = new VsqBPList( 64, 0, 127 );
GEN.add( 0, GEN.getDefault() );
//GEN.add( 0, GEN.getDefault() );
POR = new VsqBPList( 64, 0, 127 );
POR.add( 0, POR.getDefault() );
//POR.add( 0, POR.getDefault() );
OPE = new VsqBPList( 127, 0, 127 );
OPE.add( 0, OPE.getDefault() );
//OPE.add( 0, OPE.getDefault() );
if ( is_first_track ) {
master = new VsqMaster( pre_measure );
} else {
master = null;
}
m_events = new VsqEventList();
Events = new VsqEventList();
VsqID id = new VsqID( 0 );
id.type = VsqIDType.Singer;
id.IconHandle = new IconHandle();
@@ -593,31 +658,33 @@ namespace Boare.Lib.Vsq {
id.IconHandle.Length = 1;
id.IconHandle.Language = 0;
id.IconHandle.Program = 0;
m_events.add( new VsqEvent( 0, id ) );
Events.add( new VsqEvent( 0, id ) );
}
public VsqMetaText( TextMemoryStream sr ) {
List<KeyValuePair<int, int>> t_event_list = new List<KeyValuePair<int, int>>();
Dictionary<int, VsqID> __id = new Dictionary<int, VsqID>();
Dictionary<int, VsqHandle> __handle = new Dictionary<int, VsqHandle>();
PIT = new VsqBPList( 0, -8192, 8192 );
PIT = new VsqBPList( 0, -8192, 8191 );
PBS = new VsqBPList( 2, 0, 24 );
DYN = new VsqBPList( 64, 0, 127 );
BRE = new VsqBPList( 0 , 0, 127);
BRI = new VsqBPList( 64, 0, 127 );
CLE = new VsqBPList( 0, 0, 127 );
reso1FreqBPList = new VsqBPList( 255, 0, 255 );
reso2FreqBPList = new VsqBPList( 255, 0, 255 );
reso3FreqBPList = new VsqBPList( 255, 0, 255 );
reso4FreqBPList = new VsqBPList( 255, 0, 255 );
reso1BWBPList = new VsqBPList( 255, 0, 255 );
reso2BWBPList = new VsqBPList( 255, 0, 255 );
reso3BWBPList = new VsqBPList( 255, 0, 255 );
reso4BWBPList = new VsqBPList( 255, 0, 255 );
reso1AmpBPList = new VsqBPList( 255, 0, 255 );
reso2AmpBPList = new VsqBPList( 255, 0, 255 );
reso3AmpBPList = new VsqBPList( 255, 0, 255 );
reso4AmpBPList = new VsqBPList( 255, 0, 255 );
reso1FreqBPList = new VsqBPList( 64, 0, 127 );
reso2FreqBPList = new VsqBPList( 64, 0, 127 );
reso3FreqBPList = new VsqBPList( 64, 0, 127 );
reso4FreqBPList = new VsqBPList( 64, 0, 127 );
reso1BWBPList = new VsqBPList( 64, 0, 127 );
reso2BWBPList = new VsqBPList( 64, 0, 127 );
reso3BWBPList = new VsqBPList( 64, 0, 127 );
reso4BWBPList = new VsqBPList( 64, 0, 127 );
reso1AmpBPList = new VsqBPList( 64, 0, 127 );
reso2AmpBPList = new VsqBPList( 64, 0, 127 );
reso3AmpBPList = new VsqBPList( 64, 0, 127 );
reso4AmpBPList = new VsqBPList( 64, 0, 127 );
harmonics = new VsqBPList( 64, 0, 127 );
fx2depth = new VsqBPList( 64, 0, 127 );
GEN = new VsqBPList( 64, 0, 127 );
POR = new VsqBPList( 64, 0, 127 );
OPE = new VsqBPList( 127, 0, 127 );
@@ -679,6 +746,12 @@ namespace Boare.Lib.Vsq {
case "[EpRESlopeDepthBPList]":
last_line = CLE.appendFromText( sr );
break;
case "[EpRSineBPList]":
last_line = harmonics.appendFromText( sr );
break;
case "[VibTremDepthBPList]":
last_line = fx2depth.appendFromText( sr );
break;
case "[Reso1FreqBPList]":
last_line = reso1FreqBPList.appendFromText( sr );
break;
@@ -755,15 +828,18 @@ namespace Boare.Lib.Vsq {
if ( __handle.ContainsKey( __id[i].VibratoHandle_index ) ) {
__id[i].VibratoHandle = __handle[__id[i].VibratoHandle_index].castToVibratoHandle();
}
if ( __handle.ContainsKey( __id[i].NoteHeadHandle_index ) ) {
__id[i].NoteHeadHandle = __handle[__id[i].NoteHeadHandle_index].castToNoteHeadHandle();
}
}
// idをeventListに埋め込み
m_events = new VsqEventList();
Events = new VsqEventList();
for ( int i = 0; i < t_event_list.Count; i++ ) {
int clock = t_event_list[i].Key;
int id_number = t_event_list[i].Value;
if ( __id.ContainsKey( id_number ) ) {
m_events.add( new VsqEvent( clock, (VsqID)__id[id_number].Clone() ) );
Events.add( new VsqEvent( clock, (VsqID)__id[id_number].Clone() ) );
}
}
}
@@ -805,7 +881,8 @@ namespace Boare.Lib.Vsq {
public enum VsqHandleType {
Lyric,
Vibrato,
Singer
Singer,
NoteHeadHandle,
}
}