antiprism / mpd_oled

MPD, Volumio, RuneAudio and Moode OLED status and spectrum display for Raspberry Pi (and similar)
Other
168 stars 45 forks source link

hello how it use with mic without player #68

Closed girs1982 closed 2 years ago

girs1982 commented 3 years ago

it possible? and how it run, i need to see eq when i speack to mic in raspberry pi zero

antiprism commented 3 years ago

Hi girs1982

The mpd_oled program is written to work with MPD, so perhaps you could install MPD and then play audio from your microphone through it

https://www.musicpd.org/doc/html/plugins.html#input-plugins

Adrian.

girs1982 commented 3 years ago

thnx i try it, and what the instaruction to compile need?

i install and run , i add mpc , but cant see anything, and can hear mic on spk, but line not change

what to do? image

image

great thnx i done it, need audio_output { type "fifo" name "mpd_oled_FIFO" path "/tmp/mpd_oled_fifo" format "44100:16:2"

buffer_time "500000"

} to mpd conf

supercrab commented 3 years ago

You can easily change the mpd_oled config to use mic input. In fact I use mic input instead of loopback because I could let get it it work.

On my USB cheapo soundcard, I used this command to use my mic input Mpd_oled -c 'alsa,hw:5,0'

girs1982 commented 3 years ago

Вы можете легко изменить конфигурацию mpd_oled для использования микрофонного входа. Фактически, я использую микрофонный вход вместо обратной петли, потому что я мог позволить ему работать.

На моей дешевой звуковой карте USB я использовал эту команду, чтобы использовать микрофонный вход Mpd_oled -c 'alsa,hw:5,0'

не работает ,только часы показывает

antiprism commented 3 years ago

Hi girs1982

does not work, only the clock shows

The spectrum screen is only shown when the player (mpd) is playing. If you want to avoid using the player then you will need to change the mpd_oled source code (but I cannot help with this).

Adrian.

girs1982 commented 3 years ago

Привет девочки1982

не работает, только часы показывают

Экран спектра отображается только при воспроизведении плеера (mpd). Если вы хотите избежать использования плеера, вам нужно будет изменить исходный код mpd_oled (но я не могу с этим помочь).

Адриан.

with mpd all ok, thnx , but Mpd_oled -c 'alsa,hw:5,0' not work

supercrab commented 3 years ago

You might need to replace hw:5,0 with the name of your USB device, you should be able to find it using aplay -l and will need to test all the device names and see which one works. You will still need to change mpd_oled source to always display the spectrum analyser.

girs1982 commented 3 years ago

Возможно, вам придется заменить hw:5,0имя вашего USB-устройства, вы сможете найти его с помощью, aplay -lи вам нужно будет проверить все имена устройств и посмотреть, какое из них работает. Вам все равно придется менять mpd_oledисточник, чтобы анализатор спектра всегда отображался.

i done it but see nothing, i use i2s mic hw:1,0 work only with mpd + mpc

supercrab commented 3 years ago

What happens if you do arecord -D hw:1,0 -V stereo -r 44100 -f S16_LE -c 1 /dev/null? Does the mic work with mpd_oled when mpd is playing?

girs1982 commented 3 years ago

Что произойдет, если вы это сделаете arecord -D hw:1,0 -V stereo -r 44100 -f S16_LE -c 1 /dev/null? Работает ли микрофон с mpd_oled при воспроизведении mpd?

with mpd all work , i try it arecord -D hw:1,0 -V stereo -r 44100 -f S16_LE -c 1 /dev/null it not work

mpc add alsa://hw:1,0 mpc play sudo mpd_oled -o 1 -b 10 -g 1 -f 20 -p mpd WORK

supercrab commented 3 years ago

What happens when you run arecord -D hw:1,0 -V stereo -r 44100 -f S16_LE -c 1 /dev/null?

girs1982 commented 3 years ago

What happens when you run arecord -D hw:1,0 -V stereo -r 44100 -f S16_LE -c 1 /dev/null?

busy device

supercrab commented 3 years ago

You might have to stop the mpd_oled process with killall mpd_oled and stop any other programs that are using the mic.

girs1982 commented 3 years ago

You might have to stop the mpd_oled process with killall mpd_oled and stop any other programs that are using the mic.

how it work whith mpd oled ? what command run? i can reboot

supercrab commented 3 years ago

this is for testing you're using the right hardware device name and that the signal is being received correctly.

girs1982 commented 3 years ago

это необходимо для проверки того, что вы используете правильное имя аппаратного устройства и правильно ли получаете сигнал.

it will work after reboot, what command need to start mic & mpd_oled?

supercrab commented 3 years ago

I thought it would be sudo mpd_oled -o 1 -c 'alsa,hw:1,0' but you said that didn't work?

girs1982 commented 3 years ago

Я думал, что так будет, sudo mpd_oled -o 1 -c 'alsa,hw:1,0'но ты сказал, что это не сработало?

Error loading config. cava was built without 'alsa' input support i stop mdp service and see only cloc image

supercrab commented 3 years ago

It looks like that CAVA is built without ALSA support but didn't you say mpd_oled did work for you?

Try this for monitoring the mic:

arecord -D hw:1,0 /dev/null

girs1982 commented 3 years ago

no it error was then mpd player was run, i kill it, an erros no, but in oled only clock

supercrab commented 3 years ago

I think you need to build CAVA with ALSA support but I don't know how to do that :(

girs1982 commented 3 years ago

Я думаю, вам нужно создать CAVA с поддержкой ALSA, но я не знаю, как это сделать :(

i make cava git clone https://github.com/karlstav/cava cd cava ./autogen.sh ./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpdoled make sudo make install-strip

supercrab commented 3 years ago

Maybe you have to take out one of these? --disable-input-portaudio --disable-input-sndio --disable-input-pulse

girs1982 commented 3 years ago

maybe how you done it?

supercrab commented 3 years ago

Maybe you could try downloading and building mpd_oled from my fork?

https://github.com/supercrab/mpd_oled

girs1982 commented 3 years ago

Maybe you could try downloading and building mpd_oled from my fork?

https://github.com/supercrab/mpd_oled

i rebuild cava but not work, with mpd all work

supercrab commented 3 years ago

What do you mean it doesn't work?

girs1982 commented 3 years ago

What do you mean it doesn't work?

without mpd player

supercrab commented 3 years ago

you need to change main.cpp and recompile mpd_oled to remove the dependency from mpd

antiprism commented 3 years ago

Hi girs1982

By default, cava will include the functionality available when it is built, so if an ALSA development package isn't installed then cava will not include ALSA support.

If you are using a Debian-based OS that doesn't include an ALSA development package then you can install it with

 sudo apt install libasound2-dev

If you then clone a fresh copy of cava and build it, the cava binary should include ALSA support (check the log when you run configure).

Adrian.

girs1982 commented 3 years ago

вам нужно изменить main.cppи перекомпилировать, mpd_oledчтобы удалить зависимость отmpd

what need change? send me code

supercrab commented 3 years ago

You’ll have to edit the code yourself 😬

girs1982 commented 3 years ago

Hi girs1982

The mpd_oled program is written to work with MPD, so perhaps you could install MPD and then play audio from your microphone through it

https://www.musicpd.org/doc/html/plugins.html#input-plugins

Adrian.

how it compile with wiringPi? && how recompile only main.cpp? error: conflicting declaration of C function ‘void bcm2835_delayMicroseconds(unsigned int)’

antiprism commented 3 years ago

Hi girs1982

Sorry, I can't help with programming questions,

Adrian.

antiprism commented 2 years ago

No further replies, so closing.