Skip to content

Commit

Permalink
changed comment-outs to English
Browse files Browse the repository at this point in the history
  • Loading branch information
AutumnSky1010 committed Nov 17, 2022
1 parent 2eff945 commit 7317d79
Show file tree
Hide file tree
Showing 38 changed files with 109 additions and 96 deletions.
7 changes: 4 additions & 3 deletions SoundMaker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>SoundMaker</Title>
<RepositoryUrl>https://github.com/AutumnSky1010/SoundMaker</RepositoryUrl>
<PackageTags>sound;wave;chiptune;</PackageTags>
<PackageTags>C#;.NET;game;music;sound;chiptune;audio;wave;wav;</PackageTags>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<Authors>AutumnSky1010</Authors>
<Description>You can do The following content with this library.

1. make the sound of chiptune
1. make the sound of chiptune(old game sound)
2. export sound to a file of wave format.</Description>
<PackageIcon>SoundMakerIcon.png</PackageIcon>
<Copyright>Copyright ©2022 AutumnSky1010</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>Fixed a bug that the volume of each note was not reflected.</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Sounds/BitRateType.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
namespace SoundMaker.Sounds;
/// <summary>
/// 量子化ビット数の種類を表す列挙型
/// type of bit rate. 量子化ビット数の種類を表す列挙型
/// </summary>
public enum BitRateType
{
/// <summary>
/// 16ビット
/// 16bit
/// </summary>
SixteenBit = 16,
/// <summary>
/// 8ビット
/// 8bit
/// </summary>
EightBit = 8
}
6 changes: 3 additions & 3 deletions Sounds/ChannelType.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
namespace SoundMaker.Sounds;
/// <summary>
/// チャンネル数を表す列挙型
/// type of channels count. チャンネル数を表す列挙型
/// </summary>
public enum ChannelType
{
/// <summary>
/// モノラル1ch
/// monaural(1ch) モノラル1ch
/// </summary>
Monaural,
/// <summary>
/// ステレオ2ch
/// stereo(2ch) ステレオ2ch
/// </summary>
Stereo
}
12 changes: 6 additions & 6 deletions Sounds/IWave.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
namespace SoundMaker.Sounds;
/// <summary>
/// 波を表すインターフェイス
/// interface for wave. 波を表すインターフェイス
/// </summary>
public interface IWave
{
/// <summary>
/// ミックス済みの波形の音量
/// volume. ミックス済みの波形の音量
/// </summary>
int Volume { get; }

/// <summary>
/// 波形データの配列の長さ。ステレオの場合、GetBytes()の波形データの配列は、二倍の長さになる。
/// length of wave. if stereo wave, return 1/2 of GetWaves().Length. 波形データの配列の長さ。ステレオの場合、GetBytes()の波形データの配列は、二倍の長さになる。
/// </summary>
int Length { get; }

/// <summary>
/// 波形データのバイト列を取得するメソッド。
/// get array of wave data. 波形データのバイト列を取得するメソッド。
/// </summary>
/// <param name="bitRate">ビットレート</param>
/// <returns>波形データのバイト列 : byte[]</returns>
/// <param name="bitRate">bit rate. ビットレート</param>
/// <returns>bytes of wave data. 波形データのバイト列 : byte[]</returns>
byte[] GetBytes(BitRateType bitRate);
}
2 changes: 1 addition & 1 deletion Sounds/MixerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds;
/// <summary>
/// ミキサーの抽象基底クラス
/// mixer base. ミキサーの抽象基底クラス
/// </summary>
public abstract class MixerBase
{
Expand Down
4 changes: 2 additions & 2 deletions Sounds/MonauralMixer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

namespace SoundMaker.Sounds;
/// <summary>
/// モノラル音声をミックスするクラス。
/// mix waves to monaural wave. モノラル音声をミックスするクラス。
/// </summary>
public class MonauralMixer : MixerBase
{
/// <summary>
/// コンストラクタ
/// constructor. コンストラクタ
/// </summary>
/// <param name="channels">channels. チャンネルのリスト(読み取り専用)</param>
public MonauralMixer(IReadOnlyList<ISoundChannel> channels) : base(channels)
Expand Down
2 changes: 1 addition & 1 deletion Sounds/MonauralWave.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SoundMaker.Sounds;
/// <summary>
/// モノラル波形データを表すクラス。
/// monaural wave. モノラル波形データを表すクラス。
/// </summary>
public class MonauralWave : IWave
{
Expand Down
2 changes: 1 addition & 1 deletion Sounds/SamplingFrequencyType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SoundMaker.Sounds;
/// <summary>
/// サンプリング周波数の種類を表す列挙型
/// type of sampling frequency. サンプリング周波数の種類を表す列挙型
/// </summary>
public enum SamplingFrequencyType
{
Expand Down
2 changes: 1 addition & 1 deletion Sounds/Score/BasicSoundComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds.Score;
/// <summary>
/// 音符・休符など音の基本部品を表す抽象基底クラス
/// basic sound component. 音符・休符など音の基本部品を表す抽象基底クラス
/// </summary>
public abstract class BasicSoundComponentBase : ISoundComponent
{
Expand Down
2 changes: 1 addition & 1 deletion Sounds/Score/ISoundComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace SoundMaker.Sounds.Score;

/// <summary>
/// 音の部品を表すインターフェイス
/// interface for sound components. 音の部品を表すインターフェイス
/// </summary>
public interface ISoundComponent
{
Expand Down
16 changes: 8 additions & 8 deletions Sounds/Score/LengthType.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
namespace SoundMaker.Sounds.Score;
/// <summary>
/// 長さのタイプを列挙(音楽的な、「四分」音符、「全」休符のような長さを表す。)
/// type of length. 長さのタイプを列挙(音楽的な、「四分」音符、「全」休符のような長さを表す。)
/// </summary>
public enum LengthType
{
/// <summary>
/// 全音符・休符
/// whole. 全音符・休符
/// </summary>
Whole = 1,
/// <summary>
/// 二分音符・休符
/// half. 二分音符・休符
/// </summary>
Half = 2,
/// <summary>
/// 四分音符・休符
/// quarter. 四分音符・休符
/// </summary>
Quarter = 4,
/// <summary>
/// 八分音符・休符
/// 8. 八分音符・休符
/// </summary>
Eighth = 8,
/// <summary>
/// 十六分音符・休符
/// 16. 十六分音符・休符
/// </summary>
Sixteenth = 16,
/// <summary>
/// 三十二分音符・休符
/// 32. 三十二分音符・休符
/// </summary>
ThrthirtySecond = 32,
/// <summary>
/// 六十四分音符・休符
/// 64. 六十四分音符・休符
/// </summary>
SixtyFourth = 64,
}
2 changes: 1 addition & 1 deletion Sounds/Score/Note.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds.Score;
/// <summary>
/// 音符を表すクラス
/// note. 音符を表すクラス
/// </summary>
public class Note : BasicSoundComponentBase
{
Expand Down
2 changes: 1 addition & 1 deletion Sounds/Score/Rest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds.Score;
/// <summary>
/// 休符を表すクラス
/// rest. 休符を表すクラス
/// </summary>
public class Rest : BasicSoundComponentBase
{
Expand Down
8 changes: 4 additions & 4 deletions Sounds/Score/SquareWaveRatio.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
namespace SoundMaker.Sounds.Score;
/// <summary>
/// デューティ比の列挙型
/// type of duty cycle. デューティ比の列挙型
/// </summary>
public enum SquareWaveRatio
{
/// <summary>
/// デューティ比 : 0.125
/// 12.5%
/// </summary>
Point125,
/// <summary>
/// デューティ比 : 0.25
/// 25%
/// </summary>
Point25,
/// <summary>
/// デューティ比 : 0.5
/// 50%
/// </summary>
Point5
}
2 changes: 1 addition & 1 deletion Sounds/Score/Tie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds.Score;
/// <summary>
/// タイ(同じ高さの音符同士を繋げて、あたかも一つの音符かのように扱う)を表すクラス
/// tie. タイ(同じ高さの音符同士を繋げて、あたかも一つの音符かのように扱う)を表すクラス
/// </summary>
public class Tie : ISoundComponent
{
Expand Down
2 changes: 1 addition & 1 deletion Sounds/Score/Tuplet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SoundMaker.Sounds.Score;
/// <summary>
/// 連符を表すクラス
/// tuplet. 連符を表すクラス
/// </summary>
public class Tuplet : ISoundComponent
{
Expand Down
12 changes: 6 additions & 6 deletions Sounds/SoundChannels/ISoundChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,35 @@ public interface ISoundChannel
public int Tempo { get; }

/// <summary>
/// 音のフォーマット
/// format of the sound. 音のフォーマット
/// </summary>
SoundFormat Format { get; }

/// <summary>
/// ステレオサウンドの場合、左右どちらから音が出るか
/// direction of hearing. ステレオサウンドの場合、左右どちらから音が出るか
/// </summary>
PanType PanType { get; }

/// <summary>
/// 音の波形データを生成するメソッド。
/// create wave data. 音の波形データを生成するメソッド。
/// </summary>
/// <returns>音の波形データの配列 : unsigned short[]</returns>
ushort[] CreateWave();

/// <summary>
/// サウンドコンポーネントを追加するメソッド。
/// add sound component to this. サウンドコンポーネントを追加するメソッド。
/// </summary>
/// <param name="components">追加するサウンドコンポーネント</param>
void Add(ISoundComponent components);

/// <summary>
/// index番目のサウンドコンポーネントを削除するメソッド。
/// remove the sound component at index. index番目のサウンドコンポーネントを削除するメソッド。
/// </summary>
/// <param name="index">削除するサウンドコンポーネントのインデックス</param>
void RemoveAt(int index);

/// <summary>
/// チャンネル内のサウンドコンポーネントを空にするメソッド。
/// clear sound components in this. チャンネル内のサウンドコンポーネントを空にするメソッド。
/// </summary>
void Clear();
}
3 changes: 3 additions & 0 deletions Sounds/SoundChannels/LowBitNoiseSoundChannel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using SoundMaker.Sounds.WaveTypes;

namespace SoundMaker.Sounds.SoundChannels;
/// <summary>
/// this generates low bit noise wave. ロービットノイズを生成するサウンドチャンネル
/// </summary>
public class LowBitNoiseSoundChannel : SoundChannelBase
{
public LowBitNoiseSoundChannel(int tempo, SoundFormat format, PanType panType, int componentsCount) : base(tempo, format, panType, componentsCount)
Expand Down
8 changes: 4 additions & 4 deletions Sounds/SoundChannels/PanType.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
namespace SoundMaker.Sounds.SoundChannels;
/// <summary>
/// 左右どちらから音が出るかを表す列挙型
/// direction of hearing. 左右どちらから音が出るかを表す列挙型
/// </summary>
public enum PanType
{
/// <summary>
/// 左右両方
/// both. 左右両方
/// </summary>
Both,
/// <summary>
/// 右
/// right.
/// </summary>
Right,
/// <summary>
/// 左
/// left.
/// </summary>
Left
}
6 changes: 3 additions & 3 deletions Sounds/SoundChannels/SoundChannelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

namespace SoundMaker.Sounds.SoundChannels;
/// <summary>
/// サウンドチャンネルの抽象基底クラス。
/// sound channel base. サウンドチャンネルの抽象基底クラス。
/// </summary>
public abstract class SoundChannelBase : ISoundChannel
{
/// <summary>
/// コンストラクタ。
/// constructor. コンストラクタ。
/// </summary>
/// <param name="tempo">quarter note/rest per minute. 一分間の四分音符・休符の数</param>
/// <param name="format">format of the sound.音のフォーマット</param>
Expand All @@ -23,7 +23,7 @@ public SoundChannelBase(int tempo, SoundFormat format, PanType panType, int comp
}

/// <summary>
/// コンストラクタ。
/// constructor. コンストラクタ。
/// </summary>
/// <param name="tempo">quarter note/rest per minute. 一分間の四分音符・休符の数</param>
/// <param name="format">format of the sound.音のフォーマット</param>
Expand Down
4 changes: 2 additions & 2 deletions Sounds/SoundChannels/SquareSoundChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace SoundMaker.Sounds.SoundChannels;
/// <summary>
/// 矩形波を生成するサウンドチャンネル
/// this generates square wave. 矩形波を生成するサウンドチャンネル
/// </summary>
public class SquareSoundChannel : SoundChannelBase, ISoundChannel
public class SquareSoundChannel : SoundChannelBase
{
/// <summary>
/// コンストラクタ
Expand Down
5 changes: 4 additions & 1 deletion Sounds/SoundChannels/TriangleSoundChannel.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using SoundMaker.Sounds.WaveTypes;

namespace SoundMaker.Sounds.SoundChannels;
public class TriangleSoundChannel : SoundChannelBase, ISoundChannel
/// <summary>
/// this generates triangle wave. 三角波を生成するチャンネル。
/// </summary>
public class TriangleSoundChannel : SoundChannelBase
{
/// <summary>
/// constructor コンストラクタ
Expand Down
Loading

0 comments on commit 7317d79

Please sign in to comment.