Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

drrayy001/Audio-Cutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

✂️ Lossless Audio Cutter Pro

A sleek, lightweight, and high-performance native Windows desktop application to trim MP3 and WAV files with 100% zero re-encoding (zero quality loss).

Built in clean C# WinForms, it uses a custom-painted interactive waveform display, double-selection range markers, and precise millisecond-level timeline controls.

Lossless Audio Cutter Pro Logo


✨ Features

  • 100% Lossless Slicing: Trims audio streams at the frame/sample level. There is no decoding and re-encoding process, which preserves the original quality and makes exports instantaneous.
  • Drag-and-Drop Loader: Drag any .mp3 or .wav file straight from Windows File Explorer into the window to load it.
  • Interactive Waveform display: Renders a custom double-buffered cyan/blue gradient peak visualization of the audio track.
  • Dual Boundary Markers: Drag the start and end handles on the waveform canvas to establish your cut boundaries visually.
  • Precise Fine-Tuning: Spinners for Minutes, Seconds, and Milliseconds allow you to dial in selections with pinpoint accuracy.
  • Playhead Tracking & Snapping: Real-time playhead scroll indicator, featuring convenient buttons to snap selection markers to the playhead as you listen.
  • Self-Contained Executable: Embeds a multi-resolution application icon inside the .exe binary. The app extracts its own icon at runtime so it displays on your taskbar and title bar even when moved in isolation.

🛠️ How It Works (Technical Overview)

Unlike typical audio editors that decode MP3s to PCM and encode them back (which introduces compression artifacts and quality loss), this program performs direct binary byte slicing:

  • MP3 Cutting: The app parses the MP3 file frame-by-frame using NAudio.Wave.Mp3FileReader. It identifies the ID3v2 metadata tags at the beginning, extracts the raw binary frame arrays (Mp3Frame.RawData) that fall within your start and end timestamps, and concatenates them. This preserves the original ID3 tags (artist, title, cover art) and maintains the original frame bitrates losslessly.
  • WAV Slicing: The program parses the RIFF chunk format and calculates the block-aligned sample boundary offsets. It seeks to the start byte of the data chunk and streams the raw, uncompressed PCM byte data directly into a new WAV writer.

🚀 Getting Started (Build & Run)

Because the project is written in C# 5 compatible syntax, it requires no external compiler installations or software development kits. It compiles out of the box using the native C# compiler pre-installed on every Windows 10/11 system.

1. Clone the Repository

git clone https://github.com/yourusername/lossless-audio-cutter.git
cd lossless-audio-cutter

2. Download Dependencies (NAudio)

Restore the required NAudio.dll assembly from the official NuGet repository by executing the PowerShell script:

powershell -ExecutionPolicy Bypass -File download_dependencies.ps1

3. Compile the Executable

Invoke the build script to convert the assets and compile the source file:

powershell -ExecutionPolicy Bypass -File build.ps1

This script will dynamically package assets/icon.png into a multi-resolution Windows icon.ico file (embedding 16x16, 32x32, 48x48, and 256x256 resolutions) and compile src/AudioCutter.cs with the icon embedded directly into AudioCutter.exe.

4. Launch the App

Double-click the generated AudioCutter.exe file in the root folder to start editing!


📦 Directory Structure

├── assets/
│ ├── icon.png # Source high-resolution PNG icon
│ └── icon.ico # Generated multi-resolution Windows icon
├── src/
│ └── AudioCutter.cs # C# WinForms application source file
├── .gitignore # Files to ignore in Git commits
├── README.md # Project documentation
├── LICENSE # Permissive MIT License
├── download_dependencies.ps1 # Dependency restoration script
└── build.ps1 # Main compilation script

📄 License

This project is licensed under the permissive MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /