Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


start

I'm a novelist and have an interest in space science and physics. I've been a programmer for more than 40 years and I like reviewing new and up-and-coming authors.

Please consider registering (see top of page) to help support this site. Your personal data isn't shared with anyone, but it makes me feel good.


Moving Repo's

I had (have) an account on github under the name 'phil-ide', and had two repositories there:

  1. marsclock, software for building a physical clock (using a Raspberry Pi) that tells the current time anywhere on Mars
  2. dlcounter, a plugin for dokuwiki wikis that counts named file-types (e.g. zip files) downloaded from the media library

Rather unfortunately, I lost control of the 'phil-ide' account. Therefore, I have forked the repositories into my 'stroggprog' account, and they are now the official repos for these pieces of software. I have opened 'discussions' on this page so people can inform me if there are any issues surrounding the move. The Dokuwiki plugin page for dlcounter has been updated.

· 2024/06/22 13:45 · Phil Ide

News 2024 June

I've been through some recent posts and added social media sharing links and Discussion posting. I also fixed the Crew in Space page, so it does actually only update when the data changes ^_^ It also intelligently corrects for null data in date fields so dates display correctly.

· 2024/06/21 13:37 · Phil Ide

Whole-home Music

If you read my article MPD Network, you know that I built a home music system using a Raspberry Pi model 4b, which is a credit-card sized computer, pulling a mere 15 watts of power, so is ideal for 'always on' usage. I also described using a NAS (essentially disk-drives on the network and so available to all devices) on which to store all my music. This made it easy to upload music from any machine and perform automatic backups whilst leaving the 'music centre' to just deliver music. I also use a VPN and configured MPD (the music player software) to also stream the music it was currently playing - allowing me to listen to my music when I'm out of the house.

It was time to rethink what was happening in the house.

→ Read more...

· 2024/06/16 14:49 · Phil Ide

Bluedo Multiplayer Game

The title says it all, Bluedo is a multiplayer game. Why am I writing a multiplayer game, and why am I telling the world about it before I've finished writing it? It's an open invitation! Step right up!

→ Read more...

· 2024/06/06 15:15 · Phil Ide

Conky and MPD

Conky displaying an MPD panel Conky is a widget available on Linux, that allows the display of an enormous amount of data about system resources in real-time. Amongst those resources it can display is data available from MPD - Music Player Daemon. However, there are some bits of info that MPD outputs that conky doesn't collect, and some of that is particularly interesting.

It is possible to get that information though, although there are different techniques. For example, this extracts the current queue position and the length of the queue:

${execi 1 (mpc -h romeo status|grep 'playing.'|cut -f2 -d'#'|cut -f1 -d' ')}

As you can see, it requires a bit of shell arcanery, but actually it's pretty straightforward. For the elapsed time, I simply took the values of two conky variables (mpd_length and mpd_elapsed), which appear as 00:00 format time strings, converted them to seconds, subtracted one from the other and turned the result back into a formatted time string. In this case, I wrote a few functions in lua and added the lua script to conky.

For the length of the entire queue, I wrote an application in Rust (which compiles down to optimised machine code). This application fetches the entire playlist from MPD and then iterates through the list extracting the length of the track in seconds, and accumulating the results - then formats the final result as a 00:00:00 formatted time string. The source code is available on GitHub if you want to compile it for yourself.

Update: I have written another function in Rust, this collects a whole bunch of information from the MPD queue, and outputs a Conky parsable formatted string, so it can not only display all that information, but apply Conky positional instructions, such as $alignc, ${offset}, ${voffset}, change colours/font etc. This allows me to display the following queue information: length of the queue as a timestring, elapsed time, remaining time, percentage elapsed. This is available at mpd_queue_stats on GitHub.

You may notice there is a 'File:' marker just below the track title. This only displays if there is no title information available (think of it as a fallback). I found that having the filename displayed with the title makes for a confusing display, to I made them either/or options.

→ Read more...

· 2024/05/24 23:55 · Phil Ide

<< Newer entries | Older entries >>

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
start.txt · Last modified: 2024/06/26 16:57 by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki