{"id":22729462,"url":"https://github.com/autumnsky1010/soundmaker","last_synced_at":"2025-04-13T22:51:59.037Z","repository":{"id":63363636,"uuid":"550736872","full_name":"AutumnSky1010/SoundMaker","owner":"AutumnSky1010","description":"You can do The following content with this library.   1. make the sound of chiptune(old game sound)  2. export sound to a file of wave format.","archived":false,"fork":false,"pushed_at":"2025-01-03T08:19:03.000Z","size":10520,"stargazers_count":15,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T07:05:36.092Z","etag":null,"topics":["audio","chiptune","csharp","dotnet","music","sound","wavefile"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AutumnSky1010.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-13T08:43:30.000Z","updated_at":"2025-01-03T08:19:07.000Z","dependencies_parsed_at":"2024-06-05T15:21:33.296Z","dependency_job_id":"5070167e-e799-41a4-b954-9338de34610a","html_url":"https://github.com/AutumnSky1010/SoundMaker","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutumnSky1010%2FSoundMaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutumnSky1010%2FSoundMaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutumnSky1010%2FSoundMaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutumnSky1010%2FSoundMaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AutumnSky1010","download_url":"https://codeload.github.com/AutumnSky1010/SoundMaker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794561,"owners_count":21162614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","chiptune","csharp","dotnet","music","sound","wavefile"],"created_at":"2024-12-10T18:10:01.756Z","updated_at":"2025-04-13T22:51:59.016Z","avatar_url":"https://github.com/AutumnSky1010.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![SoundMakerCover](https://user-images.githubusercontent.com/66455966/206901705-974f5a63-46db-435c-bdb1-1717e8bb7883.png)  \n[![Pipeline](https://github.com/AutumnSky1010/SoundMaker/actions/workflows/build.yml/badge.svg)](https://github.com/AutumnSky1010/SoundMaker/actions/workflows/build.yml)  \n\n## 🗺️言語(Language)\n1) [日本語](#概要)\n2) [English](#overview)\n\n## 🎵概要\n本ライブラリを用いると、以下の事が可能です。\n- チップチューンサウンド？を作成する\n- waveファイルにサウンドを書き込む\n\n## 📑ドキュメント\n[Wiki](https://github.com/AutumnSky1010/SoundMaker/wiki)\n\n## ⛰️要件\n.NET 8 以降\n\n## ⏬インストール方法\n### NuGet\n\n[SoundMaker](https://www.nuget.org/packages/SoundMaker/)\n\n## 🎶簡単な使い方\n```CSharp\nusing SoundMaker;\nusing SoundMaker.Sounds;\nusing SoundMaker.Sounds.Score;\nusing SoundMaker.Sounds.SoundChannels;\nusing SoundMaker.WaveFile;\n\nnamespace YourNamespace;\npublic static class YourClass\n{\n    private static void Main()\n    {\n        // サウンドの形式を作成する。\n        var builder = FormatBuilder.Create()\n            .WithFrequency(48000)\n            .WithBitDepth(16)\n            .WithChannelCount(2);\n\n        var soundFormat = builder.ToSoundFormat();\n        StereoWave wave = MakeStereoWave(soundFormat);\n\n        // ファイルに書き込む。\n        var sound = new SoundWaveChunk(wave.GetBytes(soundFormat.BitRate));\n        var waveFileFormat = builder.ToFormatChunk();\n        var writer = new WaveWriter(waveFileFormat, sound);\n        string filePath = \"sample.wav\";\n        writer.Write(filePath);\n    }\n\n    private static StereoWave MakeStereoWave(SoundFormat format)\n    {\n        // 一分間の四分音符の個数\n        int tempo = 100;\n        // まず、音のチャンネルを作成する必要がある。\n        // 現段階では矩形波、三角波、疑似三角波、ロービットノイズに対応している。\n        var rightChannel = new SquareSoundChannel(tempo, format, SquareWaveRatio.Point25, PanType.Right)\n        {\n            // ISoundComponentを実装したクラスのオブジェクトをチャンネルに追加していく。\n            // 現段階では普通の音符、休符、タイ、連符を使うことができる。\n            new Note(Scale.C, 5, LengthType.Eighth, isDotted: true),\n            new Tie(new Note(Scale.D, 5, LengthType.Eighth), LengthType.Eighth),\n            new Tuplet(GetComponents(), LengthType.Quarter)\n        };\n        var rightChannel2 = new SquareSoundChannel(tempo, format, SquareWaveRatio.Point125, PanType.Right)\n        {\n            new Note(Scale.C, 4, LengthType.Eighth, isDotted: true),\n            new Note(Scale.D, 4, LengthType.Quarter),\n            new Rest(LengthType.Quarter)\n        };\n        var leftChannel = new TriangleSoundChannel(tempo, format, PanType.Left)\n        {\n            new Note(Scale.C, 3, LengthType.Eighth, isDotted: true),\n            new Note(Scale.D, 3, LengthType.Quarter),\n            new Rest(LengthType.Quarter)\n        };\n\n        var channels = new List\u003cISoundChannel\u003e() { rightChannel, rightChannel2, leftChannel };\n        // ミックスは'StereoMixer'クラスで行う。 \n        return new StereoMixer(channels).Mix();\n    }\n\n    private static IReadOnlyList\u003cBasicSoundComponentBase\u003e GetComponents()\n    {\n        return new List\u003cBasicSoundComponentBase\u003e()\n        {\n            new Note(Scale.E, 5, LengthType.Eighth),\n            new Note(Scale.F, 5, LengthType.Eighth),\n            new Note(Scale.G, 5, LengthType.Eighth),\n        };\n    }\n}\n\n\n```\n\n## 👀詳細\n### 出力形式\n**サンプリング周波数**\n- 48000Hz\n- 44100Hz\n\n**量子化ビット数**\n- 16bit\n- 8bit\n\n**チャンネル数**\n- Stereo 2ch\n- Monaural 1ch\n\n## 🍄作った人のツイッター\n[Twitter(X)](https://x.com/DTB_AutumnSky)  \n\n## ©️ライセンス\nMIT License\n\n## 🎵Overview\nYou can do The following content with this library.\n- make the sound of chiptune\n- export sound to a file of wave format.\n\n## 📑Documentation\n[Wiki](https://github.com/AutumnSky1010/SoundMaker/wiki)\n\n## ⛰️Requirement\n.NET 8 or later\n\n## ⏬Installation\n### NuGet\n\n[SoundMaker](https://www.nuget.org/packages/SoundMaker/)\n\n## 🎶Usage\n```CSharp\nusing SoundMaker;\nusing SoundMaker.Sounds;\nusing SoundMaker.Sounds.Score;\nusing SoundMaker.Sounds.SoundChannels;\nusing SoundMaker.WaveFile;\n\nnamespace YourNamespace;\npublic static class YourClass\n{\n    private static void Main()\n    {\n        // Create a sound format.\n        var builder = FormatBuilder.Create()\n            .WithFrequency(48000)\n            .WithBitDepth(16)\n            .WithChannelCount(2);\n\n        var soundFormat = builder.ToSoundFormat();\n        StereoWave wave = MakeStereoWave(soundFormat);\n\n        // Write to a file.\n        var sound = new SoundWaveChunk(wave.GetBytes(soundFormat.BitRate));\n        var waveFileFormat = builder.ToFormatChunk();\n        var writer = new WaveWriter(waveFileFormat, sound);\n        string filePath = \"sample.wav\";\n        writer.Write(filePath);\n    }\n\n    private static StereoWave MakeStereoWave(SoundFormat format)\n    {\n        // The number of quarter notes per minute\n        int tempo = 100;\n        // First, you need to create sound channels.\n        // Currently, it supports square wave, triangle wave, pseudo-triangle wave, and low-bit noise.\n        var rightChannel = new SquareSoundChannel(tempo, format, SquareWaveRatio.Point25, PanType.Right)\n        {\n            // Add objects of classes that implement ISoundComponent to the channel.\n            // Currently, you can use normal notes, rests, ties, and tuplets.\n            new Note(Scale.C, 5, LengthType.Eighth, isDotted: true),\n            new Tie(new Note(Scale.D, 5, LengthType.Eighth), LengthType.Eighth),\n            new Tuplet(GetComponents(), LengthType.Quarter)\n        };\n        var rightChannel2 = new SquareSoundChannel(tempo, format, SquareWaveRatio.Point125, PanType.Right)\n        {\n            new Note(Scale.C, 4, LengthType.Eighth, isDotted: true),\n            new Note(Scale.D, 4, LengthType.Quarter),\n            new Rest(LengthType.Quarter)\n        };\n        var leftChannel = new TriangleSoundChannel(tempo, format, PanType.Left)\n        {\n            new Note(Scale.C, 3, LengthType.Eighth, isDotted: true),\n            new Note(Scale.D, 3, LengthType.Quarter),\n            new Rest(LengthType.Quarter)\n        };\n\n        var channels = new List\u003cISoundChannel\u003e() { rightChannel, rightChannel2, leftChannel };\n        // Mixing is done by the 'StereoMixer' class. \n        return new StereoMixer(channels).Mix();\n    }\n\n    private static IReadOnlyList\u003cBasicSoundComponentBase\u003e GetComponents()\n    {\n        return new List\u003cBasicSoundComponentBase\u003e()\n        {\n            new Note(Scale.E, 5, LengthType.Eighth),\n            new Note(Scale.F, 5, LengthType.Eighth),\n            new Note(Scale.G, 5, LengthType.Eighth),\n        };\n    }\n}\n```\n\n## 👀Features\n### Output format\n**Sampling frequency**\n- 48000Hz\n- 44100Hz\n\n**Quantization bit rate**\n- 16bit\n- 8bit\n\n**Number of Channels**\n- Stereo 2ch\n- Monaural 1ch\n\n## 🍄Author\n[Twitter(X)](https://x.com/DTB_AutumnSky)\n\n## ©️License\nSoundMaker is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautumnsky1010%2Fsoundmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautumnsky1010%2Fsoundmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautumnsky1010%2Fsoundmaker/lists"}