Thank you for your donation!


Idea: Nanosound DACs + Plugins + App
#1
Hi!,

I would actually love to have this DAC on Moode, I'm quite new in Raspberry Pi players, I tried first with Volumio which I loved how easy is to install but what I love from Moode the customizations.

Nowadays I'm having stability wi-fi problems with Volumio, today is my first day with Moode and I really love it


I was checking different DACs and I found the Nanosound DAC Pro which includes physical buttons + and OLED screen: https://nanomesher.com/store/NanoSound-D...-p90621094

Unfortunately there's no official support or easy configuration for it on Moode... actually on Volumio you have a plugin to make everything works flawlessly (it seems)

In addition I would like to share my thoughts to include the chance to create plugins like Volumio has and an Android app, even though I'm aware this app is basically a web connection to the app but it includes permanent push notifications with track names (even on web radios), posibility to pause, and change songs

In summary, Moode would be the perfect music player for Pi with the following additions:

- Bit bigger support for I2S DACs
- Chances to install plugins like Volumio has
- Android/iOS app with push notifications

Thanks a lot for making this amazing Music player!!

Cheers,
Bruno.
Reply
#2
Does the manufacturer of this device provide any instructions on how to integrate it?
Reply
#3
(01-19-2019, 07:15 PM)Tim Curtis Wrote: Does the manufacturer of this device provide any instructions on how to integrate it?

Hi!, actually they don't provide detailed instructions for software implementation, it's probably on the other way around, I could read this post from their forum looking for an API to start the implementation from their side on moOde: https://nanomesher.com/forum/?view=thread&id=9

I remember reading a post that I cannot find anymore that was somebody asking to make this DAC work on moOde and somebody told him to choose HiFi Berry DAC to make it work but I cannot confirm this.

I was taking a look at the mentioned moOde API on nanosound forum but I couldn't find it, if you have any info about it, please let me know and I can post it on nanosound forum so they can start the implementation to moOde.

The other information is the GPIO connections which seems to be quite straightforward: https://nanomesher.com/nanosound-gpio-usage/

Cheers!
Bruno.
Reply
#4
(01-20-2019, 10:35 AM)dedero Wrote:
(01-19-2019, 07:15 PM)Tim Curtis Wrote: Does the manufacturer of this device provide any instructions on how to integrate it?

Hi!, actually they don't provide detailed instructions for software implementation, it's probably on the other way around, I could read this post from their forum looking for an API to start the implementation from their side on moOde: https://nanomesher.com/forum/?view=thread&id=9

I remember reading a post that I cannot find anymore that was somebody asking to make this DAC work on moOde and somebody told him to choose HiFi Berry DAC to make it work but I cannot confirm this.

I was taking a look at the mentioned moOde API on nanosound forum but I couldn't find it, if you have any info about it, please let me know and I can post it on nanosound forum so they can start the implementation to moOde.

The other information is the GPIO connections which seems to be quite straightforward: https://nanomesher.com/nanosound-gpio-usage/

Cheers!
Bruno.


1) regarding the Nanosound DAC itself, it apparently feeds a PCM5122 DAC chip via I2S. So does the HiFiBerry DAC+ Pro (not the HiFiBerry DAC+ which uses the PCM5102). That would be the first device selection I'd try in moOde. 

2) as for the buttons and display, it's hard to tell how much homework you are asking folks on this forum to do on someone else's behalf. 

The nanomesher discussion you mention contained a link to an old diyaudio post by Tim [1] which  outlined the moving parts in moOde that make up the "API". In particular, he mentioned the currentsong.txt file, commands like mpc and vol.sh, and the sqlite3 database. In this forum you are in now there are numerous FAQs and Guides by folks about how they interfaced buttons and displays and IR receivers and such using this information and the RaspberryPi GPIO interface.

Regards,
Kent


[1] that post is dated 26th December 2015. Since that time there have been changes. Most notably, the location of the currentsong.txt file was changed from /var/www to /var/local/www when the ability to squash the /var/www directory was introduced.
Reply
#5
(01-20-2019, 10:35 AM)dedero Wrote:
(01-19-2019, 07:15 PM)Tim Curtis Wrote: Does the manufacturer of this device provide any instructions on how to integrate it?

Hi!, actually they don't provide detailed instructions for software implementation, it's probably on the other way around, I could read this post from their forum looking for an API to start the implementation from their side on moOde: https://nanomesher.com/forum/?view=thread&id=9

I remember reading a post that I cannot find anymore that was somebody asking to make this DAC work on moOde and somebody told him to choose HiFi Berry DAC to make it work but I cannot confirm this.

I was taking a look at the mentioned moOde API on nanosound forum but I couldn't find it, if you have any info about it, please let me know and I can post it on nanosound forum so they can start the implementation to moOde.

The other information is the GPIO connections which seems to be quite straightforward: https://nanomesher.com/nanosound-gpio-usage/

Cheers!
Bruno.

See below for how to interface to moOde for volume, playback control and lcd.

Volume control
Code:
pi@rp3:~ $ /var/www/vol.sh --help
Usage: vol.sh [OPTION] [VOLUME]
Change the volume and update the knob.

With no OPTION or VOLUME, print the current volume.
With just VOLUME, set current volume to VOLUME.

-up            VOLUME  value between 1 and 100
-dn            VOLUME  value between 1 and 100
-mute          mute or unmute the volume
-restore       set volume to current knob volume
--version      print the program version
--help         print this help text
pi@rp3:~ $

Playback control
Code:
mpc play
mpc pause
mpc next
mpc prev

Data for LCD
- Enable  "External metadata" in System config
- when data changes the file is updated within 3 secs
Code:
Radio Station

pi@rp3:~ $ cat /var/local/www/currentsong.txt
file=http://aac-64.streamthejazzgroove.com:80/stream
artist=Radio station
album=The Jazz Groove
title=Pat Martino - How Insensitive
coverurl=images/radio-logos/The Jazz Groove.jpg
track=
date=
composer=
encoded=VBR
bitrate=69 kbps
outrate=16 bit, 44.1 kHz, Stereo, 1.411 mbps
volume=11
mute=0
state=play
pi@rp3:~ $

Song file

pi@rp3:~ $ cat /var/local/www/currentsong.txt
file=NAS/Music/Antoine Hervé/Summertime/01 Love for Sale.flac
artist=Antoine Hervé
album=Summertime
title=Love for Sale
coverurl=/coverart.php/NAS%2FMusic%2FAntoine%20Herv%C3%A9%2FSummertime%2F01%20Love%20for%20Sale.flac
track=1
date=2002
composer=Cole Porter
encoded=16/44.1 FLAC
bitrate=651 kbps
outrate=16 bit, 44.1 kHz, Stereo, 1.411 mbps
volume=11
mute=0
state=play
pi@rp3:~ $ 

Renderer (Bluetooth, Airplay, Spotify, Squeezelite)

pi@rp3:~ $ cat /var/local/www/currentsong.txt
file=Bluetooth Active
outrate=16 bit, 44.1 kHz, Stereo, 1.411 mbps
pi@rp3:~ $ 

Updating LCD Dsplay
Code:
Method #1 Using LCD Updater engine with a Python script

1. Turn on "LCD update engine" in System config
2. Write a Python script that updates the LCD using data parsed from currentsong.txt metadata file.
3. NOTE: this script MUST NOT have a polling loop for detecting changes in the metadata file. The LCD update engine provides the "loop" outside of the script. The advantage is that it uses the efficient inotifywait event system instead of a less efficient polling loop to detect when the data file changes.

Method #2 - Using stand-along Python Script with its own polling loop

1. Write a Python script that updates the LCD using data parsed from currentsong.txt file
2. NOTE: This script MUST contain its own polling loop to detect changes in the metadata file
Reply
#6
@TheOldPresbyope Thanks for the info regarding the DAC to choose from the list, actually I can't even imagine how much homework I'm asking to do because I bought my first RPi one week ago and I found this amazing kind music players around and I'm still testing them, Volumio and moOde. Coming from something far from a developer, that's the main reason I opened a thread in "features" section instead of "guides" or "problems" and I shared my thoughts about creating a plugin section on moOde to make this kind of implementations easier, no only from the users point of view (I would say, the easier are the configs, the more active users will be using this awesome music player) but also from the manufacturers point of view, where they get an easier way to implement their creations and make them work efficiently on moOde.

@Tim Curtis thanks a lot for the info!, I will try to implement it and post my results (if there any!)

Regarding the "suggested features" I posted in the beginning, is there a chance to make them happen?, that's actually the main interest I'm having on them, the possibility to implement them (no matter in which time), but just to know (and also let the users know) whether are planned in some way for future releases.

Thanks!

Cheers,
Bruno.
Reply
#7
(01-20-2019, 03:48 PM)dedero Wrote: @TheOldPresbyope  Thanks for the info regarding the DAC to choose from the list, actually I can't even imagine how much homework I'm asking to do because I bought my first RPi one week ago and I found this amazing kind music players around and I'm still testing them, Volumio and moOde. Coming from something far from a developer, that's the main reason I opened a thread in "features" section instead of "guides" or "problems" and I shared my thoughts about creating a plugin section on moOde to make this kind of implementations easier, no only from the users point of view (I would say, the easier are the configs, the more active users will be using this awesome music player) but also from the manufacturers point of view, where they get an easier way to implement their creations and make them work efficiently on moOde.

@Tim Curtis  thanks a lot for the info!, I will try to implement it and post my results (if there any!)

Regarding the "suggested features" I posted in the beginning, is there a chance to make them happen?, that's actually the main interest I'm having on them, the possibility to implement them (no matter in which time), but just to know (and also let the users know) whether are planned in some way for future releases.

Thanks!

Cheers,
Bruno.


Hi All,

Thanks for your interest in NanoSound products.  Although we dont have a plan to support moodeaudio yet, we are more than happy to give help those who would like to build a driver for it.  @Tim Curtis 's info was very useful. 

Our suggestion are:
- Build a python daemon for listening to the buttons and execute the commands for play, next , volumio control etc.
This is an example of how to listen to all the buttons on NanoSound DAC (our other product ProdBoard use the same GPIOs) https://github.com/nanomesher/Nanomesher...onsDemo.py

- Build another python daemon for polling the /var/local/www/currentsong.txt and display on the OLED.
This is an example of how to display on OLED
https://github.com/nanomesher/Nanomesher...ac_oled.py
https://github.com/nanomesher/Nanomesher...layDemo.py

- Infrared (use LIRC)
This is the config used by nanosound, with the key mapping
https://github.com/nanomesher/Nanomesher...sound_lirc

To set up the python libraries, this guide will be useful:
https://nanomesher.com/prodboard-support/

Finally, Thank so much for your interest in NanoSound and dont forget to take a look at our latest DAC2.

https://www.kickstarter.com/projects/nan...io-dac-boa
Reply


Forum Jump: