mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-21 15:51:31 +00:00
Keeps old one and adds new one as another option
This commit is contained in:
30
tools/midi2piano/midi2piano.sln
Normal file
30
tools/midi2piano/midi2piano.sln
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C# Express 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "midi2piano", "midi2piano\midi2piano.csproj", "{68C84B61-F710-491C-BEE8-5E362C167897}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Debug|x86.Build.0 = Debug|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|x86.ActiveCfg = Release|x86
|
||||
{68C84B61-F710-491C-BEE8-5E362C167897}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
tools/midi2piano/midi2piano.v12.suo
Normal file
BIN
tools/midi2piano/midi2piano.v12.suo
Normal file
Binary file not shown.
135
tools/midi2piano/midi2piano/Form1.Designer.cs
generated
Normal file
135
tools/midi2piano/midi2piano/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,135 @@
|
||||
namespace midi2piano
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.OutputTxt = new System.Windows.Forms.TextBox();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.importMIDIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.importDlg = new System.Windows.Forms.OpenFileDialog();
|
||||
this.halpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OutputTxt
|
||||
//
|
||||
this.OutputTxt.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.OutputTxt.Location = new System.Drawing.Point(0, 24);
|
||||
this.OutputTxt.Multiline = true;
|
||||
this.OutputTxt.Name = "OutputTxt";
|
||||
this.OutputTxt.ReadOnly = true;
|
||||
this.OutputTxt.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.OutputTxt.Size = new System.Drawing.Size(284, 240);
|
||||
this.OutputTxt.TabIndex = 0;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.copyToolStripMenuItem,
|
||||
this.halpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(284, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.importMIDIToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// importMIDIToolStripMenuItem
|
||||
//
|
||||
this.importMIDIToolStripMenuItem.Name = "importMIDIToolStripMenuItem";
|
||||
this.importMIDIToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
|
||||
this.importMIDIToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.importMIDIToolStripMenuItem.Text = "&Import MIDI...";
|
||||
this.importMIDIToolStripMenuItem.Click += new System.EventHandler(this.importMIDIToolStripMenuItem_Click);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
|
||||
this.copyToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
|
||||
this.copyToolStripMenuItem.Text = "&Copy";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// importDlg
|
||||
//
|
||||
this.importDlg.Filter = "MIDI File|*.midi;*.mid";
|
||||
//
|
||||
// halpToolStripMenuItem
|
||||
//
|
||||
this.halpToolStripMenuItem.Name = "halpToolStripMenuItem";
|
||||
this.halpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.halpToolStripMenuItem.Text = "&Halp";
|
||||
this.halpToolStripMenuItem.Click += new System.EventHandler(this.halpToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 264);
|
||||
this.Controls.Add(this.OutputTxt);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Form1";
|
||||
this.Text = "MIDI2Piano";
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox OutputTxt;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem importMIDIToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.OpenFileDialog importDlg;
|
||||
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem halpToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
298
tools/midi2piano/midi2piano/Form1.cs
Normal file
298
tools/midi2piano/midi2piano/Form1.cs
Normal file
@@ -0,0 +1,298 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Sanford.Multimedia;
|
||||
using Sanford.Multimedia.Midi;
|
||||
|
||||
namespace midi2piano
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
struct PNote
|
||||
{
|
||||
public float Length;
|
||||
public string Note;
|
||||
|
||||
public PNote(float length, string note)
|
||||
{
|
||||
Length = length;
|
||||
Note = note;
|
||||
}
|
||||
|
||||
public static readonly PNote Default = new PNote(0, "");
|
||||
}
|
||||
|
||||
private void importMIDIToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (importDlg.ShowDialog(this)
|
||||
== System.Windows.Forms.DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
List<PNote> notes = new List<PNote>();
|
||||
PNote curNote = PNote.Default;
|
||||
float tempo = 1;
|
||||
float timeSig = 4f;
|
||||
|
||||
// first, we pull midi data
|
||||
Sequence s = new Sequence(importDlg.FileName);
|
||||
|
||||
// quickly see if there's a piano track first
|
||||
// and get the tempo as well
|
||||
int piano = -1;
|
||||
for (int it = 0; it < s.Count; it++)
|
||||
{
|
||||
Track t = s[it];
|
||||
foreach (MidiEvent me in t.Iterator())
|
||||
{
|
||||
switch (me.MidiMessage.MessageType)
|
||||
{
|
||||
case MessageType.Channel:
|
||||
{
|
||||
ChannelMessage m = (ChannelMessage)me.MidiMessage;
|
||||
if (m.Command == ChannelCommand.ProgramChange)
|
||||
if ((GeneralMidiInstrument)m.Data1 == GeneralMidiInstrument.AcousticGrandPiano)
|
||||
{
|
||||
piano = it;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MessageType.Meta:
|
||||
{
|
||||
MetaMessage m = (MetaMessage)me.MidiMessage;
|
||||
if (m.MetaType == MetaType.Tempo)
|
||||
tempo = (new TempoChangeBuilder(m)).Tempo;
|
||||
else if (m.MetaType == MetaType.TimeSignature)
|
||||
timeSig = new TimeSignatureBuilder(m).Denominator;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (piano >= 0)
|
||||
break;
|
||||
}
|
||||
if (piano >= 0)
|
||||
break;
|
||||
}
|
||||
|
||||
// didn't find one, so just try 0th track anyway
|
||||
if (piano == -1)
|
||||
piano = 0;
|
||||
|
||||
// now, pull all notes (and tempo)
|
||||
// and make sure it's a channel that has content
|
||||
for (int it = piano; it < s.Count; it++)
|
||||
{
|
||||
Track t = s[it];
|
||||
|
||||
int delta = 0;
|
||||
foreach (MidiEvent me in t.Iterator())
|
||||
{
|
||||
delta += me.DeltaTicks;
|
||||
|
||||
switch (me.MidiMessage.MessageType)
|
||||
{
|
||||
case MessageType.Channel:
|
||||
{
|
||||
ChannelMessage m = (ChannelMessage)me.MidiMessage;
|
||||
switch (m.Command)
|
||||
{
|
||||
case ChannelCommand.NoteOn:
|
||||
if (curNote.Note != "")
|
||||
{
|
||||
curNote.Length = delta / 1000F;
|
||||
delta = 0;
|
||||
notes.Add(curNote);
|
||||
}
|
||||
|
||||
curNote.Note = note2Piano(m.Data1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MessageType.Meta:
|
||||
{
|
||||
MetaMessage m = (MetaMessage)me.MidiMessage;
|
||||
if (m.MetaType == MetaType.Tempo)
|
||||
tempo = (new TempoChangeBuilder(m)).Tempo;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we get last note
|
||||
if (curNote.Note != "")
|
||||
{
|
||||
curNote.Length = delta / 1000F;
|
||||
notes.Add(curNote);
|
||||
}
|
||||
|
||||
// we found a track with content!
|
||||
if (notes.Count > 0)
|
||||
break;
|
||||
}
|
||||
|
||||
// compress redundant accidentals/octaves
|
||||
char[] notemods = new char[7];
|
||||
int[] noteocts = new int[7];
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
notemods[i] = 'n';
|
||||
noteocts[i] = 3;
|
||||
}
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
string noteStr = notes[i].Note;
|
||||
int cur_note = noteStr[0] - 0x41;
|
||||
char mod = noteStr[1];
|
||||
int oct = int.Parse(noteStr.Substring(2));
|
||||
|
||||
noteStr = noteStr.Substring(0, 1);
|
||||
if (mod != notemods[cur_note])
|
||||
{
|
||||
noteStr += new string(mod, 1);
|
||||
notemods[cur_note] = mod;
|
||||
}
|
||||
if (oct != noteocts[cur_note])
|
||||
{
|
||||
noteStr += oct.ToString();
|
||||
noteocts[cur_note] = oct;
|
||||
}
|
||||
|
||||
notes[i] = new PNote(notes[i].Length, noteStr);
|
||||
}
|
||||
|
||||
// now, we find what the "beat" length should be,
|
||||
// by counting numbers of times for each length, and finding statistical mode
|
||||
Dictionary<float, int> scores = new Dictionary<float, int>();
|
||||
foreach (PNote n in notes)
|
||||
{
|
||||
if (n.Length != 0)
|
||||
if (scores.Keys.Contains(n.Length))
|
||||
scores[n.Length]++;
|
||||
else
|
||||
scores.Add(n.Length, 1);
|
||||
}
|
||||
float winner = 1;
|
||||
int score = 0;
|
||||
foreach (KeyValuePair<float, int> kv in scores)
|
||||
{
|
||||
if (kv.Value > score)
|
||||
{
|
||||
winner = kv.Key;
|
||||
score = kv.Value;
|
||||
}
|
||||
}
|
||||
// realign all of them to match beat length
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
notes[i] = new PNote(notes[i].Length / winner, notes[i].Note);
|
||||
}
|
||||
|
||||
// compress chords down
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
if (notes[i].Length == 0 && i < notes.Count - 1)
|
||||
{
|
||||
notes[i + 1] = new PNote(notes[i + 1].Length, notes[i].Note + "-" + notes[i + 1].Note);
|
||||
notes.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
// add in time
|
||||
for (int i = 0; i < notes.Count; i++)
|
||||
{
|
||||
float len = notes[i].Length;
|
||||
notes[i] = new PNote(len, notes[i].Note + (len != 1 ? "/" + (1 / len).ToString("0.##") : ""));
|
||||
}
|
||||
|
||||
// what is the bpm, anyway?
|
||||
int rpm = (int)(28800000 / tempo / winner); // 60 * 1,000,000 * .48 the .48 is because note lengths for some reason midi makes the beat note be .48 long
|
||||
|
||||
// now, output!
|
||||
string line = "";
|
||||
string output = "";
|
||||
int lineCount = 1;
|
||||
foreach (PNote n in notes)
|
||||
{
|
||||
if (line.Length + n.Note.Length + 1 > 51)
|
||||
{
|
||||
output += line.Substring(0, line.Length - 1) + "\r\n";
|
||||
line = "";
|
||||
if (lineCount == 50)
|
||||
break;
|
||||
lineCount++;
|
||||
}
|
||||
line += n.Note + ",";
|
||||
}
|
||||
if (line.Length > 0)
|
||||
output += line.Substring(0, line.Length - 1);
|
||||
OutputTxt.Text = "BPM: " + rpm.ToString() + "\r\n" + output;
|
||||
OutputTxt.SelectAll();
|
||||
}
|
||||
|
||||
public enum NoteNames
|
||||
{
|
||||
C = 0,
|
||||
D = 2,
|
||||
E = 4,
|
||||
F = 5,
|
||||
G = 7,
|
||||
A = 9,
|
||||
B = 11
|
||||
}
|
||||
|
||||
string note2Piano(int n)
|
||||
{
|
||||
string name, arg, octave;
|
||||
name = Enum.GetName(typeof(NoteNames), (NoteNames)(n % 12));
|
||||
if (name == null)
|
||||
{
|
||||
name = Enum.GetName(typeof(NoteNames), (NoteNames)((n + 1) % 12));
|
||||
arg = "b";
|
||||
}
|
||||
else
|
||||
{
|
||||
arg = "n";
|
||||
}
|
||||
octave = (n / 12 - 1).ToString();
|
||||
|
||||
return name + arg + octave;
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OutputTxt.SelectAll();
|
||||
OutputTxt.Copy();
|
||||
}
|
||||
|
||||
private void halpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show(this,
|
||||
"This program prefers MIDIs that have a single track, otherwise it picks the first piano track it finds, else the first track. Songs with odd tempos may have their BPM's calculated wrong.",
|
||||
"Halp", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
126
tools/midi2piano/midi2piano/Form1.resx
Normal file
126
tools/midi2piano/midi2piano/Form1.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="importDlg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
34
tools/midi2piano/midi2piano/Properties/AssemblyInfo.cs
Normal file
34
tools/midi2piano/midi2piano/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("midi2piano")]
|
||||
[assembly: AssemblyProduct("midi2piano")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type. Only Windows
|
||||
// assemblies support COM.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// On Windows, the following GUID is for the ID of the typelib if this
|
||||
// project is exposed to COM. On other platforms, it unique identifies the
|
||||
// title storage container when deploying this assembly to the device.
|
||||
[assembly: Guid("9752c562-edc1-40da-8fa1-619df747e0f3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
BIN
tools/midi2piano/midi2piano/Sanford.Multimedia.Midi.dll
Normal file
BIN
tools/midi2piano/midi2piano/Sanford.Multimedia.Midi.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
tools/midi2piano/midi2piano/bin/x86/Release/midi2piano.exe
Normal file
BIN
tools/midi2piano/midi2piano/bin/x86/Release/midi2piano.exe
Normal file
Binary file not shown.
83
tools/midi2piano/midi2piano/midi2piano.csproj
Normal file
83
tools/midi2piano/midi2piano/midi2piano.csproj
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>midi2piano</RootNamespace>
|
||||
<AssemblyName>midi2piano</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Sanford.Multimedia.Midi, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>.\Sanford.Multimedia.Midi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Binary file not shown.
Reference in New Issue
Block a user