Cog is a free, open-source audio player for Mac, iPhone and iPad. It plays a very wide range of formats, from everyday lossy and lossless audio to tracker modules, video game music and MIDI, and it takes care over how they sound.
Every platform is built from this one repository and shares the same audio engine and format plugins. The Mac and iOS apps are released separately.
- Mac App Store: Cog
- Direct download: cog.losno.co. This edition updates itself with Sparkle.
Cog runs on macOS 12 or later, and on iOS and iPadOS 18 or later.
Each format is handled by a plugin under Plugins/:
- Common formats: MP3, AAC, ALAC, FLAC, Ogg Vorbis, Opus, WavPack, Musepack, Shorten, and anything else Core Audio or FFmpeg can decode
- Tracker modules: libopenmpt, HivelyTracker, Organya and Syntrax
- Video game music: Game_Music_Emu, vgmstream, libvgm, sidplay (C64 SID), AdPlug (AdLib), and the PSF family through HighlyComplete
- MIDI, through Cog's built-in synthesizers (SoundFonts, OPL3 FM, and Roland SC-55 emulation from your own ROM set), or through Audio Unit instruments on the Mac
- Playlists and containers: cue sheets, M3U and PLS, and files inside archives
- Streams over HTTP and HLS
Sound
- ReplayGain by album or track, with clipping prevention, falling back to Sound Check
- An equalizer with presets
- Speed and pitch control with the Rubber Band or Signalsmith Stretch engines, or plain varispeed like a record player
- Spatial audio: surround tracks are spatialized on headphones and stereo speakers, with head tracking
- On the Mac, an exclusive mode that takes the output device for Cog and runs it at each track's sample rate
Listening
- A spectrum visualizer
- Synced lyrics from the file's own tags, or looked up on LRCLIB when the file has none
- Scrobbling to Last.fm and ListenBrainz
On the Mac
- A playlist with an Info Inspector, a file tree browser, Spotlight search, and a mini window
- Global hot keys, notifications, and AppleScript support
- Remote Control (macOS 13 or later): with the bundled
cog-mcptool, MCP clients such as AI assistants can control playback and the playlist
On iPhone and iPad
- Plays files and folders from the Files app where they are, without importing copies
- Now Playing with a scrubbing slider, fast forward and rewind by holding Next and Previous, and lock screen controls
Cog runs in the App Sandbox, so it can only open folders you have granted it. Grant them in Settings → General. Right-clicking the list there lets you edit it, and can suggest additions based on the current playlist. The suggestions cover every path not already granted, so pick only the few folders that hold most of your music. Your Music, Downloads and Movies folders are granted already.
-
Clone the repository and its submodules:
git submodule update --init --recursive
-
Create
Xcode-config/DEVELOPMENT_TEAM.xcconfigwith your team ID. That file is gitignored. Because thegroup.org.cogx.cogApp Group belongs to the upstream team, also turn off provisioning profiles:DEVELOPMENT_TEAM = YOURTEAMID PROVISIONING_PROFILE_SUPPORTED = NOXcode-config/Shared.xcconfigexplains both settings and how to find your team ID. -
Install the hooks, so a team ID never ends up committed in a project file:
git config core.hooksPath .githooks
-
Optionally, turn on Last.fm scrobbling by copying
Xcode-config/Secrets.template.xcconfigtoXcode-config/Secrets.xcconfigand adding your API key.
-
Unpack the prebuilt static and dynamic libraries. Repeat this whenever
ThirdParty/libraries.tar.xzchanges:cd ThirdParty tar xvf libraries.tar.xz -
Open
Cog.xcodeprojand build one of the two schemes:Scheme Builds CogThe App Store edition Cog DirectThe direct edition (Release-Direct): adds Sparkle and the donation menu
-
Run
iOS/prepare.sh. It applies the patches the iOS build needs to some submodules, and builds the third-party libraries for iOS, which takes a few minutes and needsbrew install cmake ninja. The "Check if Cog builds for iOS" workflow also publishes them as itsios-librariesartifact. -
Open
iOS/MobileCog.xcodeprojand build theCogscheme.
The iOS project is generated, so don't change it in Xcode.
iOS/README.md explains how it is laid out and how to
regenerate it.
Vincent Spader wrote Cog and released it under the GPL. When its development stopped, Christopher Snowhill forked it in 2013 and has maintained it since.
Cog is licensed under the GNU General Public License. See COPYING.
The libraries under ThirdParty/, Frameworks/ and Plugins/ remain under
their own licenses and copyrights. Some have been modified to build in Cog.
Christopher Snowhill, chris@kode54.net
Share and enjoy.