1
0
mirror of synced 2024-11-27 21:10:48 +01:00

can vary seconds of silence

This commit is contained in:
NotImplementedLife 2023-07-28 18:15:05 +03:00
parent 6af159fb40
commit bf77531491
5 changed files with 132 additions and 40 deletions

98
MainForm.Designer.cs generated
View File

@ -75,11 +75,11 @@
this.LoadedMusicBox = new System.Windows.Forms.ListBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.panel4 = new System.Windows.Forms.Panel();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.TjaEncShiftJIS = new System.Windows.Forms.RadioButton();
this.TjaEncUTF8 = new System.Windows.Forms.RadioButton();
this.TjaEncAuto = new System.Windows.Forms.RadioButton();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.AddSilenceBox = new System.Windows.Forms.CheckBox();
this.FeedbackBox = new System.Windows.Forms.TextBox();
this.CreateBackButton = new System.Windows.Forms.Button();
@ -90,6 +90,8 @@
this.TJASelector = new TaikoSoundEditor.PathSelector();
this.AudioFileSelector = new TaikoSoundEditor.PathSelector();
this.label10 = new System.Windows.Forms.Label();
this.SilenceBox = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.TabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout();
@ -110,8 +112,9 @@
this.groupBox3.SuspendLayout();
this.tabPage3.SuspendLayout();
this.panel4.SuspendLayout();
this.groupBox9.SuspendLayout();
this.groupBox10.SuspendLayout();
this.groupBox9.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.SilenceBox)).BeginInit();
this.SuspendLayout();
//
// TabControl
@ -656,6 +659,30 @@
this.panel4.Size = new System.Drawing.Size(374, 318);
this.panel4.TabIndex = 2;
//
// groupBox10
//
this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox10.Controls.Add(this.label3);
this.groupBox10.Controls.Add(this.SilenceBox);
this.groupBox10.Controls.Add(this.groupBox9);
this.groupBox10.Controls.Add(this.AddSilenceBox);
this.groupBox10.Controls.Add(this.FeedbackBox);
this.groupBox10.Controls.Add(this.CreateBackButton);
this.groupBox10.Controls.Add(this.CreateOkButton);
this.groupBox10.Controls.Add(this.label2);
this.groupBox10.Controls.Add(this.SongNameBox);
this.groupBox10.Controls.Add(this.label9);
this.groupBox10.Controls.Add(this.TJASelector);
this.groupBox10.Controls.Add(this.AudioFileSelector);
this.groupBox10.Controls.Add(this.label10);
this.groupBox10.Location = new System.Drawing.Point(3, 3);
this.groupBox10.Name = "groupBox10";
this.groupBox10.Size = new System.Drawing.Size(368, 312);
this.groupBox10.TabIndex = 8;
this.groupBox10.TabStop = false;
this.groupBox10.Text = "Create new sound";
//
// groupBox9
//
this.groupBox9.Controls.Add(this.TjaEncShiftJIS);
@ -702,46 +729,24 @@
this.TjaEncAuto.Text = "Auto";
this.TjaEncAuto.UseVisualStyleBackColor = true;
//
// groupBox10
//
this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox10.Controls.Add(this.groupBox9);
this.groupBox10.Controls.Add(this.AddSilenceBox);
this.groupBox10.Controls.Add(this.FeedbackBox);
this.groupBox10.Controls.Add(this.CreateBackButton);
this.groupBox10.Controls.Add(this.CreateOkButton);
this.groupBox10.Controls.Add(this.label2);
this.groupBox10.Controls.Add(this.SongNameBox);
this.groupBox10.Controls.Add(this.label9);
this.groupBox10.Controls.Add(this.TJASelector);
this.groupBox10.Controls.Add(this.AudioFileSelector);
this.groupBox10.Controls.Add(this.label10);
this.groupBox10.Location = new System.Drawing.Point(3, 3);
this.groupBox10.Name = "groupBox10";
this.groupBox10.Size = new System.Drawing.Size(368, 293);
this.groupBox10.TabIndex = 8;
this.groupBox10.TabStop = false;
this.groupBox10.Text = "Create new sound";
//
// AddSilenceBox
//
this.AddSilenceBox.AutoSize = true;
this.AddSilenceBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.AddSilenceBox.Checked = true;
this.AddSilenceBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.AddSilenceBox.Location = new System.Drawing.Point(7, 153);
this.AddSilenceBox.Name = "AddSilenceBox";
this.AddSilenceBox.Size = new System.Drawing.Size(143, 19);
this.AddSilenceBox.Size = new System.Drawing.Size(121, 19);
this.AddSilenceBox.TabIndex = 19;
this.AddSilenceBox.Text = "Delay before song (3s)";
this.AddSilenceBox.Text = "Delay before song";
this.AddSilenceBox.UseVisualStyleBackColor = true;
this.AddSilenceBox.CheckedChanged += new System.EventHandler(this.AddSilenceBox_CheckedChanged);
//
// FeedbackBox
//
this.FeedbackBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.FeedbackBox.Location = new System.Drawing.Point(7, 209);
this.FeedbackBox.Location = new System.Drawing.Point(7, 228);
this.FeedbackBox.Multiline = true;
this.FeedbackBox.Name = "FeedbackBox";
this.FeedbackBox.Size = new System.Drawing.Size(356, 78);
@ -750,7 +755,7 @@
// CreateBackButton
//
this.CreateBackButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CreateBackButton.Location = new System.Drawing.Point(206, 173);
this.CreateBackButton.Location = new System.Drawing.Point(206, 199);
this.CreateBackButton.Name = "CreateBackButton";
this.CreateBackButton.Size = new System.Drawing.Size(75, 23);
this.CreateBackButton.TabIndex = 17;
@ -761,7 +766,7 @@
// CreateOkButton
//
this.CreateOkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.CreateOkButton.Location = new System.Drawing.Point(287, 173);
this.CreateOkButton.Location = new System.Drawing.Point(287, 199);
this.CreateOkButton.Name = "CreateOkButton";
this.CreateOkButton.Size = new System.Drawing.Size(75, 23);
this.CreateOkButton.TabIndex = 16;
@ -834,6 +839,32 @@
this.label10.TabIndex = 8;
this.label10.Text = "Audio file";
//
// SilenceBox
//
this.SilenceBox.Location = new System.Drawing.Point(133, 152);
this.SilenceBox.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.SilenceBox.Name = "SilenceBox";
this.SilenceBox.Size = new System.Drawing.Size(42, 23);
this.SilenceBox.TabIndex = 20;
this.SilenceBox.Value = new decimal(new int[] {
3,
0,
0,
0});
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(181, 154);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(50, 15);
this.label3.TabIndex = 21;
this.label3.Text = "seconds";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
@ -867,10 +898,11 @@
this.groupBox3.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout();
this.groupBox10.ResumeLayout(false);
this.groupBox10.PerformLayout();
this.groupBox9.ResumeLayout(false);
this.groupBox9.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.SilenceBox)).EndInit();
this.ResumeLayout(false);
}
@ -939,5 +971,7 @@
private RadioButton TjaEncShiftJIS;
private RadioButton TjaEncUTF8;
private RadioButton TjaEncAuto;
private NumericUpDown SilenceBox;
private Label label3;
}
}

View File

@ -137,7 +137,6 @@ namespace TaikoSoundEditor
LoadedMusicBinding.DataSource = MusicInfos.Items.Where(mi => mi.UniqueId != 0).ToList();
LoadedMusicBox.DataSource = LoadedMusicBinding;
TabControl.SelectedIndex = 1;
});
BindingSource LoadedMusicBinding;
@ -288,7 +287,7 @@ namespace TaikoSoundEditor
File.WriteAllText("tja.txt", tja.ToString());
var seconds = AddSilenceBox.Checked ? (int)Math.Ceiling(tja.Headers.Offset + 3) : 0;
var seconds = AddSilenceBox.Checked ? (int)Math.Ceiling(tja.Headers.Offset + (int)SilenceBox.Value) : 0;
if (seconds < 0) seconds = 0;
@ -759,5 +758,10 @@ namespace TaikoSoundEditor
return;
}
});
private void AddSilenceBox_CheckedChanged(object sender, EventArgs e)
{
SilenceBox.Enabled = AddSilenceBox.Checked;
}
}
}

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2023-07-22T09:07:26.2620601Z;True|2023-07-22T12:06:39.9230498+03:00;True|2023-07-22T11:29:18.0153916+03:00;True|2023-07-22T08:23:07.5000923+03:00;True|2023-07-21T20:03:15.6598520+03:00;True|2023-07-21T19:41:13.2800435+03:00;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00;</History>
<History>True|2023-07-22T16:07:39.3718711Z;True|2023-07-22T19:06:41.2393088+03:00;True|2023-07-22T12:07:26.2620601+03:00;True|2023-07-22T12:06:39.9230498+03:00;True|2023-07-22T11:29:18.0153916+03:00;True|2023-07-22T08:23:07.5000923+03:00;True|2023-07-21T20:03:15.6598520+03:00;True|2023-07-21T19:41:13.2800435+03:00;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

View File

@ -31,6 +31,60 @@
</ItemGroup>
<ItemGroup>
<None Update="Tools\7z\7za.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\7za.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\7zxa.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipEng.hlf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipEng.lng">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipFar.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipFar64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipRus.hlf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7-ZipRus.lng">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\7zToFar.ini">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\far7z.reg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\Far\far7z.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\history.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\License.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\readme.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\x64\7za.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\x64\7za.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\7z\x64\7zxa.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tools\sox\batch-example.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

View File

@ -16,7 +16,7 @@ namespace TaikoSoundEditor.Utils
}
catch(FormatException ex)
{
throw new FormatException($"{ex.Message} : {value} to int", ex);
throw new FormatException($"{ex.Message} : '{value ?? "<null>"}' to int", ex);
}
}