-- Leo's gemini proxy

-- Connecting to gmi.osiux.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=es_AR

`tty` *Music On Console*


AUTHOR: Osiris Alejandro Gomez

EMAIL: osiux@osiux.com

DATE: 2021-02-14 11:27


#+ATTR_HTML: :width 640 :height 360 :title tty music on console screenshot

[IMG]

[1]


*Music On Console*


Amo la consola, tty, terminal o emulador de terminal en todas sus formas, la interfaz de texto es la interfaz universal, simple, rápida y muy portable y por esto nada mejor que reproducir música en modo texto.


Luego de probar varios reproductores, hace años que me quedé con el mejor, estoy hablando `mocp` ^1[2] *`Music On Console`*, principalmente porque se basa en el uso de directorios y archivos, cuenta con toda las funcionalidades que esperas de un reproductor y se queda en segundo plano si no querés verlo :P


*DJ*


Jugando a ser *DJ* desde la `tty`, para complementar la visualización, usando `tmux` ^2[3], dividí en varios paneles la ventana y agregué `pulsemixer` ^3[4] para manejar volumen y `cava` ^4[5] para tener una hermosa barra de espectro de audio.


`pulsemixer`


Es muy simple de instalar, desde los repositorios de *Debian*.


apt install pulsemixer

`cava`


Si bien `cava` originalmente era para *ALSA*, funciona muy bien con *PulseAudio* y la instalación desde el código fuente es muy simple:


git clone https://github.com/karlstav/cava
cd cava
apt install libfftw3-dev libasound2-dev libncursesw5-dev \
            libpulse-dev libtool automake libiniparser-dev
export CPPFLAGS=-I/usr/include/iniparser
./autogen.sh
./configure
make
make install

`tmux`


Para integrar `mocp`, `pulsemixer` y `cava` uso un *script bash* para dividir una sesion de `tmux` en varios paneles:


#!/bin/bash

# This script comes with ABSOLUTELY NO WARRANTY, use at own risk
# Copyright (C) 2016 Osiris Alejandro Gomez <osiux@osiux.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.gmi/licenses/>.

cd "$HOME/music"

tmux ls | grep moc >/dev/null 2>/dev/null
OK=$(echo $?)

if [[ "$OK" -ne 0 ]]
then
  tmux new-session -d -s moc '/usr/bin/mocp'
  tmux select-window  -t moc:0
  tmux split-window   -v '/usr/bin/pulsemixer'
  tmux split-window   -v '/usr/local/bin/cava'
fi

tmux a -t moc

`osiux.tty-music`


Tengo a medio terminar un rol de *Ansible* que además de instalar y configurar `mocp`, `pulsemixer` y `cava`, incluye otras utilidades para música y audio desde la consola, en breve estaré publicando el rol...


ChangeLog


`2023-07-13 22:58`[6] agregar DESCRIPTION, KEYWORDS y actualizar OpenGraph en *Music On Console*

`2022-11-13 20:39`[7] agregar y actualizar tags OpenGraph

`2021-02-14 12:05`[8] agregar `tty` *Music On Console*


1: file:img/tty-music-on-console.png

2: https://github.com/jonsafari/mocp

3: https://osiux.com/tmux-terminator-awesome.html

4: https://github.com/GeorgeFilipkin/pulsemixer

5: https://github.com/karlstav/cava

6: https://gitlab.com/osiux/osiux.gitlab.io/-/commit/dce8a1b754ee86eb0c15b3319684463db71a5a3c

7: https://gitlab.com/osiux/osiux.gitlab.io/-/commit/bf3a61526ad2a73cecb77a18995f1d63494e3664

8: https://gitlab.com/osiux/osiux.gitlab.io/-/commit/f2bf6f7c39e77cff5c3dc0029a07abd457eee7be

-- Response ended

-- Page fetched on Fri May 17 06:26:51 2024