INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Custom JRiver Windows Icons + Batch Files  (Read 3704 times)

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 690
Custom JRiver Windows Icons + Batch Files
« on: August 26, 2016, 02:02:24 pm »

One button music playback

One of my biggest complaints about digital music has been the number of steps it takes to play music in a multi-zone system. For an example, compare a playing CD at about five steps (find CD on shelf, put CD in player, turn on system, set amp input, press play) to playing a Digital Album at about nine steps (turn on amp, set amp input, turn on monitor, unlock computer, open JRiver, set zone, select correct view, search to find album, click mouse and send to zone). That's about double the steps. For multi-zone, also add a few to turn on the kitchen and bedroom sound systems (or keep them on all the time). Add multiple sources like Pandora and you add more actions to stop music that is currently playing. If you are using a computer, no big deal. But if you are working away from the system it becomes a learned skill to start or change the music.

A few years back JRiver developed the Car Radio feature, which inspired me with an idea for a one-touch music playback system, like the Amazon Buy-Now button. It's almost there, and I want to share the work here in the hope it is helpful to others as well.

Hardware

I have a small fanless computer called the ECS Liva. It runs all the time, very low power usage. The benchmark is terrible (JMark 659!), but that has never been a problem for audio. This connected to a stereo and speakers via USB and a TV via HDMI. Then I have three or four other airplay zones in the house via the Tuneblade system (outlined by Hilton here https://yabb.jriver.com/interact/index.php/topic,95760.0.html)

There are also two USB IR devices that I use to communicate with the amplifier and a remote control. These are in a project box on a USB hub, and I recently added a Z-Stick for EnGen. More details on that below.

Zones

I use two zones in everyday use, one for "House Radio" playback aka Hilton and another for "Hifi" playback. They have different DSP settings based on usage. House Radio plays throughout the house in three or four systems and has Loudness and Bass Boost for low volume background listening; Hifi plays only in one system using bit-perfect 2-channel playback.

Interface

The idea is to keep all buttons on the Windows 10 desktop, give them all a specific playback function, and display Playing Now on the desktop. A screenshot posted is below. The icons are all shortcuts to Windows batch files, and the icons are custom icons created from jpg files (I used icoconvert.com).

Icons are organized using a program called Fences (http://www.stardock.com/products/fences/), keeps them from getting jumbled if an HDMI cable gets disconnected.

I also use CD Art Display to show the now playing album on the desktop. (http://cdartdisplay.byethost8.com/)

Remote Control

I have a Samsung LCD TV and Remote, and only about 5 of the 45 buttons are in regular use (most of the buttons don't do anything when you aren't in TV mode, which was a huge advantage for the next step.) This is a huge waste, why not use one remote for everything? So I looked for an IR reciever that could see the codes from any available remote, a program that could interpret these, and an IR blaster that could talk to the program and send signals to the amp. Right now that is an FLIRC receiver, the Eventghost software, and the USB-UIRT blaster.

FLIRC catches any remote IR command and translates it to a keyboard command, such as ENTER or CTL-ALT-O. Eventghost catches the keyboard command and sends commands to the USB blaster. The idea is to have this running system wide.

A USB keyboard/touchpad sits by the TV, and the arrow/select buttons on the Samsung remote map to cursor arrows and the enter key.

Code

Here is where it gets interesting. JRiver, Eventghost, and now EnGen all support command line instructions. You can sequence the most of the steps for digital music playback via batch file commands. Running an icon opens a batch file which will kill current playback from all sources, switch zones, switch amp input, activate JRiver view, play file, and turn on zone systems. Here are two examples with notes, one starts a Play Doctor command. The other plays a Pandora Station.

I added the spaces and comments (*) to the code below.

Code: [Select]
*make batch file windows unobstrusive and small:
echo off
mode con cols=15 lines=1

*Set a JRiver view so I can quickly find a favorite album from the minimized window:
C:\Windows\System32\MC22.exe /ShowTreePath "Audio\2. Mixed Favorites"

*Stop playback in both zones
C:\Windows\System32\MC22.exe /MCC 10002,16777216
C:\Windows\System32\MC22.exe /MCC 10002,33554432

*set House Radio Zone:
C:\Windows\System32\MC22.exe /MCC 10011,1

*hides the left tree panel, I don't need it anymore
C:\Windows\System32\MC22.exe /MCC 22029

*play Doctor with seed
C:\Windows\System32\MC22.exe "/MCWS/v1/Playback/PlayDoctor?Seed=Rock and Pop Music&Zone=Radio&ZoneType=Name"

*minimize JRiver, CD Art Display fuctions as Playing Now and for controls
C:\Windows\System32\MC22.exe /MCC 10014

*kills IExplore, which is used only to run Pandora
taskkill /F /IM iexplore.exe

*turn on zone music player with Engen to power outlet
"C:\Program Files (x86)\J River\Engen 1\Server\EngenClient.exe" -n basic_set(6,99)

*switch Amp Input using eventghost and USB-IRT blaster
"C:\Program Files (x86)\EventGhost\eventghost.exe" -e NR

*mimimize Eventghost windows
"C:\Program Files (x86)\EventGhost\eventghost.exe" -e Hide


Code: [Select]
echo off
mode con cols=15 lines=1

*stop any current Pandora playback
taskkill /F /IM iexplore.exe

*stop MC Playback
C:\Windows\System32\MC22.exe /MCC 10002,16777216
C:\Windows\System32\MC22.exe /MCC 10002,335544328

*play pandora
start /D"C:\Program Files\Internet Explorer" iexplore.exe http://www.pandora.com/station/play/2723514882308082891

*turn on zones and set amp input
"C:\Program Files (x86)\EventGhost\eventghost.exe" -e PiOn
"C:\Program Files (x86)\EventGhost\eventghost.exe" -e NR
"C:\Program Files (x86)\EventGhost\eventghost.exe" -e Hide


Finished Project

Icons on the left side ("fence") play to the House Radio and are circular. Icons on the right are square and play "CD's" in the Hifi zone. Now Playing is in the lower light. Engen Lights are in the top, and reset batch files are in at the bottom. I use a hidden taskbar to launch programs.

I've had a couple of challenges building this, and a few more things to work out. Eventghost has some focus problems with its keystroke logger, and FLIRC only sends key commands from remote controls (CRTL+ALT+X etc). So to consistently call functions from the FLIRC remote, I had to program a button to Win-D, which puts focus on the desktop. Also, the IR command for power on and power off is the same for my amp, so I can't reliably know whether the IR command will turn on or off if the cabinet which houses electronics is closed. But none of these are big problems.

Once the icon cache crashed on Windows 10 and all icons disappeared throughout the OS. I had to reinstall windows and increase the cache size. That was fun.

The end result is that the Windows Desktop effectively becomes a fully customizable JRiver skin. JRiver, Engen, and Eventghost do all the work behind the scenes. A keyboard touchpad and the Samsung remote can select and execute the icons aka Theater View.

As an added bonus, several of the TV buttons map to Engen commands, so the TV remote turns lights on and off. Those random colored Red A, Blue B, Yellow C, and Blue D buttons on the remote now change the colors of lights in the house.

As far as the number of steps to play an album, I'd say we are back to about the same as opening a CD in 1996! The buttons call Smartlists, so the content varies enough to keep things interesting. Also, it's simple enough that I'm not the only person in the house using the stereo. So that's officially mission accomplished.

It's been cool to see JRiver build Panel and Engen over the past few months. My desktop button interface here is a close cousin to the idea of a Scene in Engen. It sounds like the plans for Engen home automation are expansive and may include sequenced device controls: https://yabb.jriver.com/interact/index.php/topic,106220.0.html.

Thanks for taking the time to read this, I hope it is helpful and interesting.

PS. I'd like to send a huge thanks to two forum members. First, Hilton for his Tuneblade Audio System, which I use everyday, it is just fantastic and rarely fails! I've even got an LP record player going into a ADC and streaming around the house. Thanks for posting that and many other of your JRiver projects, Hilton!

Second, to MrC. I often think of his quote below. This heuristic helped keep this project grounded and (mostly) on budget. He's not on Interact  anymore and I sure miss his incredibly sharp mind and generous help!


When scoping out the merits of an idea for a project like this, always start with Goals and Requirements.

What real-world problem are you trying to solve?

What are the Requirements of any solution?
Logged
Pages: [1]   Go Up