Skip to main content

A Python library to control the MOC (music on console) audio player

Project description

Install

Install the actual MOC player/server

% sudo apt-get install -y moc

or

% brew install moc
% jackd -d coreaudio

Note: if using a Mac, you need to run jack in another terminal EVERY TIME (i.e. jackd -d coreaudio).

Verify that the MOC server can start

% mocp

Press q to quit.

Install with pip

% pip3 install mocp

Usage

In [1]: import moc

In [2]: moc.find_and_play('~/music-dir/blah*')

In [3]: moc.go('12:15')         # jump to particular point in current track

In [4]: moc.go('1h23m12s')      # jump to particular point in current track

In [5]: moc.go(500)             # jump to particular point in current track

In [6]: moc.info_string()
Out[6]: '08:21 (501) of 95:35 into /home/user/music-dir/blah-thing/file.mp3'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mocp-0.4.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mocp-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mocp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b494c886eb75bea48a3552874317de9d7410f2af8bc63fd0e5a8e4b7b6d4ca70
MD5 39f6e266d9467d9be77f4ce1e66680fe
BLAKE2b-256 6dfdb114cdbed6d4ee549a37397df0a0da5a5e7b233b784308b4313de5e6a0a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page