Skip to content

Commit

Permalink
1.0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Mar 6, 2014
1 parent 313537c commit 588d2e7
Show file tree
Hide file tree
Showing 36 changed files with 605 additions and 350 deletions.
8 changes: 4 additions & 4 deletions Faders/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Faders")]
[assembly: AssemblyTitle("Fader Volumers for Musicript")]
[assembly: AssemblyDescription("Mygod")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mygod")]
[assembly: AssemblyProduct("Faders")]
[assembly: AssemblyProduct("Fader Volumers for Musicript")]
[assembly: AssemblyCopyright("Copyright © Mygod 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand All @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.1")]
[assembly: AssemblyFileVersion("1.0.2.1")]
[assembly: AssemblyVersion("1.0.3.2")]
[assembly: AssemblyFileVersion("1.0.3.2")]
2 changes: 1 addition & 1 deletion Faders/Faders.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Mygod.Musicript.VolumeControllers.Faders
namespace Mygod.Musicript.Volumers.Faders
{
/// <summary>
/// 线性衰减器。
Expand Down
6 changes: 3 additions & 3 deletions Faders/Faders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{330A8B06-12C6-482C-8AA3-AD9A4C4BA77B}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Mygod.Musicript.VolumeControllers.Faders</RootNamespace>
<RootNamespace>Mygod.Musicript.Volumers.Faders</RootNamespace>
<AssemblyName>Faders</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand All @@ -23,11 +23,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Musicript\Presets\VolumeControllers\</OutputPath>
<OutputPath>..\Musicript\Presets\Volumers\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\Musicript\Presets\VolumeControllers\Faders.XML</DocumentationFile>
<DocumentationFile>..\Musicript\Presets\Volumers\Faders.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
8 changes: 4 additions & 4 deletions Inflection/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Inflection")]
[assembly: AssemblyTitle("Inflection Pitchers for Musicript")]
[assembly: AssemblyDescription("Mygod")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mygod")]
[assembly: AssemblyProduct("Inflection")]
[assembly: AssemblyProduct("Inflection Pitchers for Musicript")]
[assembly: AssemblyCopyright("Copyright © Mygod 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand All @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.1")]
[assembly: AssemblyFileVersion("1.0.2.1")]
[assembly: AssemblyVersion("1.0.3.2")]
[assembly: AssemblyFileVersion("1.0.3.2")]
18 changes: 9 additions & 9 deletions Inflection/Inflection.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;

namespace Mygod.Musicript.Interpolators.Inflection
namespace Mygod.Musicript.Pitchers.Inflection
{
/// <summary>
/// 线性变调插值
/// 线性变调
/// </summary>
public sealed class LinearInflection
{
Expand All @@ -19,12 +19,12 @@ public void SetSpeed(string value)
}

/// <summary>
/// 插值
/// 变调
/// </summary>
/// <param name="frequency">原频率。</param>
/// <param name="time">时刻。</param>
/// <returns>插值后映射到的时刻。</returns>
public double Interpolate(double frequency, double time)
/// <returns>变调后映射到的时刻。</returns>
public double Pitch(double frequency, double time)
{
var result = time * (frequency + speed * time / 2);
if (speed >= 0) return result;
Expand All @@ -34,7 +34,7 @@ public double Interpolate(double frequency, double time)
}

/// <summary>
/// 对数变调插值
/// 对数变调
/// </summary>
public sealed class LogarithmicInflection
{
Expand All @@ -50,12 +50,12 @@ public void SetSpeed(string value)
}

/// <summary>
/// 插值
/// 变调
/// </summary>
/// <param name="frequency">原频率。</param>
/// <param name="time">时刻。</param>
/// <returns>插值后映射到的时刻。</returns>
public double Interpolate(double frequency, double time)
/// <returns>变调后映射到的时刻。</returns>
public double Pitch(double frequency, double time)
{
if (Math.Abs(speed) < 1e-8) return frequency * time;
// no inflection
Expand Down
6 changes: 3 additions & 3 deletions Inflection/Inflection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{037D134F-FCDC-4FC8-8A8D-FF808BDC5AEF}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>Mygod.Musicript.Interpolators.Inflection</RootNamespace>
<RootNamespace>Mygod.Musicript.Pitchers.Inflection</RootNamespace>
<AssemblyName>Inflection</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
Expand All @@ -23,11 +23,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Musicript\Presets\Interpolators\</OutputPath>
<OutputPath>..\Musicript\Presets\Pitchers\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\Musicript\Presets\Interpolators\Inflection.XML</DocumentationFile>
<DocumentationFile>..\Musicript\Presets\Pitchers\Inflection.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
12 changes: 12 additions & 0 deletions Musicript.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Inflection", "Inflection\In
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Faders", "Faders\Faders.csproj", "{330A8B06-12C6-482C-8AA3-AD9A4C4BA77B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oscillators", "Oscillators\Oscillators.csproj", "{1B205A8F-2FBD-4BD5-8744-853B71C94C19}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -82,6 +84,16 @@ Global
{330A8B06-12C6-482C-8AA3-AD9A4C4BA77B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{330A8B06-12C6-482C-8AA3-AD9A4C4BA77B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{330A8B06-12C6-482C-8AA3-AD9A4C4BA77B}.Release|x86.ActiveCfg = Release|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Debug|x86.ActiveCfg = Debug|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Release|Any CPU.Build.0 = Release|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1B205A8F-2FBD-4BD5-8744-853B71C94C19}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
30 changes: 11 additions & 19 deletions Musicript/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,21 @@ public sealed partial class App
{
static App()
{
AppDomain.CurrentDomain.UnhandledException +=
OnUnhandledException;
AppDomain.CurrentDomain.SetData
("PRIVATE_BINPATH", "Resources\\Libraries");
var m = typeof(AppDomainSetup).GetMethod("UpdateContextProperty",
BindingFlags.NonPublic | BindingFlags.Static);
var fusion = typeof(AppDomain).GetMethod("GetFusionContext",
BindingFlags.NonPublic | BindingFlags.Instance);
m.Invoke(null, new[]
{
fusion.Invoke(AppDomain.CurrentDomain, null),
"PRIVATE_BINPATH", "Bin"
});
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
AppDomain.CurrentDomain.SetData("PRIVATE_BINPATH", "Resources\\Libraries");
var m = typeof(AppDomainSetup)
.GetMethod("UpdateContextProperty", BindingFlags.NonPublic | BindingFlags.Static);
var fusion = typeof(AppDomain)
.GetMethod("GetFusionContext", BindingFlags.NonPublic | BindingFlags.Instance);
m.Invoke(null, new[] { fusion.Invoke(AppDomain.CurrentDomain, null), "PRIVATE_BINPATH", "Bin" });
}

private static void OnUnhandledException
(object sender, UnhandledExceptionEventArgs e)
private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
OnError(e.ExceptionObject as Exception);
}

private void OnUnhandledException
(object sender, DispatcherUnhandledExceptionEventArgs e)
private void OnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
e.Handled = true;
OnError(e.Exception);
Expand All @@ -45,8 +37,8 @@ private static void OnError(Exception e)
var msg = e.GetMessage();
File.AppendAllText("crash.log", msg + Environment.NewLine);
TaskDialog.Show(null, "貌似这个程序发生了某种未知错误。",
"为了解决此问题,请将目录下的 crash.log 发给作者。(mygod.tk)",
TaskDialogType.Error, expandedInfo: e.GetMessage());
"为了解决此问题,请将目录下的 crash.log 发给作者。(mygod.tk)",
TaskDialogType.Error, expandedInfo: e.GetMessage());
Current.Shutdown();
}
}
Expand Down
4 changes: 2 additions & 2 deletions Musicript/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.1")]
[assembly: AssemblyFileVersion("1.0.2.1")]
[assembly: AssemblyVersion("1.0.3.4")]
[assembly: AssemblyFileVersion("1.0.3.4")]
Loading

0 comments on commit 588d2e7

Please sign in to comment.