A Locking Problem

I have been aware for quite some time that, occasionally, plays of music made by AMP would not get recorded in the PLAYS table as they should. It's difficult to know precisely why: when you're developing the code and saving changes to the script as it's playing something, it could well be that your editing has caused the 'record in PLAYS' bit of code to get skipped.

Or it could be a locking issue. Putting it at its simplest, databases cannot have one person modifying data whilst simultaneously allowing a second person to read that data. If I am in the process of withdrawing £5000 from my bank account just as a credit check is being performed, do we let the credit agency see the £5000 in the account? Or do we see it missing the £5000, even though I might be about to type 'Cancel' at the ATM? To resolve these data concurrency issues, all databases implement a form of 'locking': if I am going to withdraw money from my account, we lock the data until my withdrawal is complete, so that no-one can see it, either with or without the £5000, then when I'm finished at the ATM, we unlock and people can read the definite results. [...] 

Continue Reading

Scarlatti In Bulk

Thanks to another recent video by David Hurwitz, I was finally persuaded to bite the bullet and splash out on the complete Domenico Scarlatti keyboard sonatas as performed by Scott Ross (the album artwork of which appears off to the left). It's a 34-CD collection, available for purchase from Presto Classical at only around £2.50 a box, which seems reasonable value to me.

Curiously, this collection of works has previously been discussed by me in comments on this blog piece, where I was asked by 'DACO' how I would go about tagging the multiple Chopin Nocturnes or the even more multitudinous Scarlatti keyboard sonatas. I had to answer DACO in that exchange in the abstract, since I didn't at that point actually own the Scarlatti. The general principle I advanced, however, was: group lots of little pieces together in whatever way makes them accessible and attractive to play. Thus, I could speak from experience: a CD of Britten arrangements of folksongs would be ripped and catalogued as a single collection of folksongs, rather than 21 short pieces of (usually) less than 3 minutes' duration. Similarly, I had only just completed a re-rip of the complete works of Percy Grainger, where because of the quantity of music involved, and its overall great similarity, I found it more expedient to essentially rip entire CDs as 'Grainger Compilations' than try to separate out each individual composition as its own 'album'. [...] 

Continue Reading

Colour Perception and Sorting

This is yet another story about AMP (my ever-evolving music player) being updated. This one, however, has a subtle twist that most of you probably won't care about, let alone make use of.

It's all to do with colour. In all my software, I try to use just four colours in a consistent way: (1) Terminal Default Foreground; (2) Bright Red; (3) Bright Yellow; and (4) Bright Blue. The terminal default will depend on what colour scheme you've configured your terminal to use. Commonly, as in the screenshot on the left, it's bright green for me and my desktops. It's used to display fairly 'static informational' text: things like the program name, the data labels and so on. Bright Red is used to display error or out-of-condition messages or alerts to program behaviours. Bright yellow is used to display user-input or fairly static information derived from user input (such as the folder path/name from which you're currently playing music). Finally, Bright Blue is used to display fairly dynamic text derived from user input (the name of the database you're using, for example, or any override switches you've specified that affects what music will be selected for play). I may not always be entirely consistent with the way I use my colours, but that's the general scheme I try to use and stick to, anyway! [...] 

Continue Reading

Cute Cat

For no particular reason, other than wanting to post something that didn't involve a new update to some software script or other, I would like to take this opportunity to share with you all the latest picture of Harper, my cat. He was a rescue cat -though the pound wouldn't tell us why and what he was rescued from. He did have an aversion to feet for a long time, though, so we figured he might have been the victim of some injudicious kicks in his time. I called him Harper because of the lines in 'To Kill a Mockingbird': "Remember it's a sin to kill a mockingbird. Mockingbirds don't do one thing but make music for us to enjoy…but sing their hearts out for us. That's why it's a sin to kill a mockingbird." It's a sin to kick a cat, too.

Anyway, he wouldn't have anything to do with me for the first year he was at home (in Australia). Literally: he wouldn't come to me for anything, wouldn't jump on my lap, nothing. A no-contact order was clearly in place. [...] 

Continue Reading

Tweaks and Twiddles

Another round of software tweaks and twiddles -mostly minor, some a little more significant.

First, AMP has been bumped a couple of notches to 1.16. It's mostly to do with a few colour tweaks, but also an annoying bug dealing with distros that don't have the 'bc' utility installed by default.  Those should all now work fine (so that's OpenSuse, Endeavour OS, Debian, Arch and Raspbian). [...] 

Continue Reading

SACD ISO: Knifing a Fork!

NOTE: This article was originally published in 2021. It compared the Sound Linux More version of the 'sacd' utility with its original source, the Robert Tari-written program called odio-sacd. Unfortunately, as of July 2025, Robert Tari appears to have disappeared off the Internet: his software repositories have all been pulled and are now publicly inaccessible. The comparison was therefore valid four years ago, but is no longer relevant: the odio-sacd software is simply unobtainable, whilst the sacd utility remains easily downloadable. Any recommendations made in 2021 to use odio-sacd should therefore now not be followed.

I will note that the original article's mentioning that 'sacd' relies on Intel/AMD CPU features and that odio-sacd did not still applies. This means that using sacd is not possible at all on Raspberry Pi single board computers using ARM CPUs. [...] 

Continue Reading

Roller-coaster Ride

Today has been fun, in an up-and-down and terrifying sort of way!

First the good news: I finally managed to build a pure Arch-based virtual machine with no slip-ups, mistakes or catastrophes. Installing Arch is never for the faint-hearted and I've done it lots of times in the past... but never done it 'quite right', with always something missing or not-quite-working! I accordingly long ago gave up hope of ever achieving something that seemed stable and functional. But that run of ducks was broken today! Hurrah. (And I've written up how I did it here). [...] 

Continue Reading

Pi-faced!

A correspondent from the west coast of the USA recently got in touch to say that whilst he enjoyed using some of my music-related software, he regretted having to point out that the code didn't run properly on his Raspberry Pi running the Raspbian Linux distro ...but that he'd hacked a way to get it to work anyway.

A couple of thoughts came to mind when I read that. First, the grumpy-me thought that it was no wonder that the software didn't work on Raspbian, because I go to the effort of listing the distros I've actually tested my stuff on... and Raspbian isn't listed there! [...] 

Continue Reading

A couple of changes...

You will perhaps have noticed a dramatic change to the 'look and feel' of the website: the result of getting bored with what had been the look-and-feel for nearly 2 years, I'm afraid! I've gone minimal and, I hope, more 'punchy' and easier to read in consequence.

There may be a few colour/font tweaks and twiddles in the days and weeks to come, but I think most of the disruption is done and dusted. [...] 

Continue Reading

Duration-based Plays

Another week, another new version of the Absolutely Baching Music Player (AMP to its friends). We move from 1.10 to 1.11... and the new release contains two basic new features being introduced!

First, a new run-time parameter is provided called --artsize=xxx. The 'xxx' values permitted are 'small', 'medium' and 'large', with 'medium' being the default if the parameter is not supplied at all, or if it's supplied with an otherwise invalid value. [...] 

Continue Reading