MacMusicPlayer is an elegant and minimalist music player for macOS, designed as a menu bar application to provide a seamless music playback experience. Built with SwiftUI, it perfectly integrates into the macOS ecosystem, delivering an exceptional user experience.
- 🎵 Lightweight menu bar player for instant music control
- 🎨 Native macOS interface with perfect light/dark theme support
- 🌍 Multi-language support (English, Simplified Chinese, Traditional Chinese, Japanese, Korean)
- 🎧 MP3 audio format playback
- 🔄 Multiple playback modes (Sequential, Single Loop, Random)
- 💾 Smart memory of last music folder location
- 🚀 Launch at login support
- 😴 Prevent system sleep for uninterrupted music
- ⌨️ Media key control support (Play/Pause/Previous/Next)
- Framework: SwiftUI + AppKit
- Audio Engine: AVFoundation
- Design Pattern: MVVM
- Localization: Multi-language support
- State Management: Native SwiftUI state management
- Persistence: UserDefaults
- System Integration:
- MediaPlayer framework for media control
- ServiceManagement for launch at login
- IOKit for sleep management
- Download the latest
MacMusicPlayer.dmg
from the Releases page - Open the DMG file and drag MacMusicPlayer to your Applications folder
- If you encounter a security prompt on first launch, go to "System Settings" > "Security & Privacy" to allow the application to run
sudo xattr -r -d com.apple.quarantine /Applications/MacMusicPlayer.app
git clone https://github.com/samzong/MacMusicPlayer.git
cd MacMusicPlayer
make install
make uninstall
- On first launch, click the menu bar icon and select "Set Music Source"
- Choose a folder containing MP3 files
- Access the following features through the menu bar icon:
- Play/Pause
- Previous/Next Track
- Switch Playback Mode
- Enable/Disable System Sleep Prevention
- Configure Launch at Login
- Reconfigure Music Folder
- macOS 13.0+
- Xcode 15.0+
- Swift 5.9+
- Clone the repository
git clone https://github.com/samzong/MacMusicPlayer.git
- Open the project
cd MacMusicPlayer
open MacMusicPlayer.xcodeproj
- Build and Run
- Using Xcode: Command + R
- Using command line:
make build
MacMusicPlayer/
├── Managers/ # Business Managers
│ ├── PlayerManager # Playback Control
│ ├── LaunchManager # Launch Management
│ └── SleepManager # Sleep Control
├── Models/ # Data Models
├── Views/ # UI Components
├── Helpers/ # Utility Classes
└── Resources/ # Resource Files
The project supports multiple languages with localization files located at:
MacMusicPlayer/en.lproj/
MacMusicPlayer/zh-Hans.lproj/
MacMusicPlayer/zh-Hant.lproj/
MacMusicPlayer/ja.lproj/
MacMusicPlayer/ko.lproj/
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Support for more audio formats (FLAC, WAV, AAC, etc.)
- Add audio visualization effects
- Playlist management support
- Add audio equalizer
- Online music service integration
- Add keyboard shortcut support
- Audio format conversion support
This project is licensed under the MIT License - see the LICENSE file for details
Thanks to all the developers who have contributed to this project!
For questions or suggestions, please feel free to open an Issue or Pull Request.