jSomaPlayer

Note: project has been discontinued due to the lack of code quality and the lack of available free time to improve it... If you're interested in the source code despite this, contact me and feel free to refactor it.

jSomaPlayer is a pure java shoutcast stream player (mp3) for the soma fm web radio. It can be used in command-line mode but it can also be controlled via a web browser since it includes a small web-server (jReflect). The browser GUI is optimized for mobile devices (using jo javascript framework). Works perfectly on the Raspberry Pi.

Features

  • Lightweight and easy-to-use player
  • Automatically updates current soma fm channels
  • Displays stream and title info
  • Platform independend, works nicely on the Raspberry Pi (GPIO library included)
  • Player instance can be controlled remotely by any web browser.
  • Remembers last channel played
  • Manage custom shoutcast channels
  • Monitor internet connection and restart player if needed
  • Remote control via webinterface

jSomaPlayer targets the Raspberry Pi since it uses Pi4J (http://pi4j.com).

 

Usage

Start with java:

java -jar jSomaPlayer.jar [options]

Options:

  • -play (start only player, no web service).
  • -if:[interface name, e.g. wlan0], linux only

Other options: see below.

Example: java -jar jSomaPlayer.jar -if:wlan0 -gpin:32 -gpout:7

 

jSomaPlayer on the Raspberry Pi

GPIO options on Raspberry Pi (e.g. in command-line mode):

 

-gpin:nm

-gpout:n

(n,m are integer numbers)

 

Example Raspberry Pi: java -jar jSomaPlayer.jar -play -gpin:32 -gpout:7

(start in command-line mode, use input pins 3 and 2 to switch channels,

use output pin 7, e.g. for LED light).

 

Notes & Troubleshooting

- See http://pi4j.com/usage.html for more information about GPIO.

- Make sure to use an ARM optimized JVM, see 

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

(Player typically uses about 30-35% CPU on the Pi)

- If sound doesn't work (Source Data Line problems) try "sudo modprobe snd_bcm2835"

 

Download

http://sourceforge.net/projects/jsomaplayer/

 

Links

SomaFM commercial free internet radio

 

Icons provided by http://www.glyfx.com.

Blog

SDCLib/J contribution fork
Contributing to IEEE 11073 SDC Family java webservice stack | 2/2/2019

As former main author of the official project in my last job at SurgiTAIX AG, I will maintain ... Read More

LambdaLink - Distributed INotifyPropertyChanged events for .NET
.NET webservice library | 2/2/2019

LambdaLink is a small library for propagating .NET INotifyPropertyChanged events over ... Read More

jReflectServer 2.0
New version released | 1/4/2017

jReflectServer (formerly jReflect) has been updated. Version 2.0 allows distributed code ... Read More

More Blog Entries