Rawer

Under Construction

Hillside Media Visualizer

Yesterday/this morning I made a tune. This afternoon I made a visualization for it.

I named it after the first thing I saw when I looked out of the window : Hillside (live demo).

I've spent most of the last couple of weeks working on Semem (I'm blogging that on tensegrity.it). I had one of those phases where I seemed to be going around in circles - there was a disconnect in my integration somewhere. But I got past that, it was mostly down to a slip-up with namespaces. But I was spending more and more time in the music room.

I like to stick music room things up on YouTube. Often impulsive, after a few beers. Recently a lot have been short things I've come up with playing with the modular synth. But spending more time in there got me more involved. The latest tune I've been playing with (it might not be finished) seemed to require more than yet another bloke leaning over synth/computer video.

I have looked around at music visualizers a bit recently. I used one for the track Feral August the other day. But it was a really long-winded workflow getting the video together. Would be quicker to have something running live...

Coincidentally someone linked to a CodePen neat simulation of a solar flare on Reddit. Inplemented in a single HTML file. Cool, I'll have that.

With considerable help from Claude Code I flipped it into a Vite project to make it easier to extend/reuse. Then added an audio player, hooked in a few of the algorithm parameters to it. Good fun.

Code & docs on GitHub

Hillside Media Visualizer

Lyrics

I have a tune prepared that really needs a voice on top. The problem is I lack lyrics.

Stream of consciousness while it was playing gave me the following :

I've not got the words for how I feel
or how I deal with the situation

The lights are one but there's no-one home
and I often wonder about you

forgive me my exasperation  
I guess I'll find the way
when I'm not looking

thank you for the salad.

Now Claude, can you extend this into a song with three verses and a chorus. The chorus should be about the salad I was given by a neighbour, a very nice gesture. Can you render the final version as a markdown artifact in Italian but following the same rhyming scheme as the English.

# The Salad Song

## Verse 1
I've not got the words for how I feel  
or how I deal with the situation  
The lights are on but there's no-one home  
and I often think still of you  
forgive me my frustration  
I think I'll find the way  
when I'm not looking for it  

## Chorus
Thank you for the green salad  
a sweet gesture, lights the heart  
at my door you knocked  
with kindness you showed  
that even in gray moments  
someone still thinks of me  
thank you for the salad  

## Verse 2
The days pass like fog  
they slip away through my hands  
I search for answers in the stars  
but silence is company  
Loneliness follows me  
But I know this too will pass  
when the sun returns  

## Chorus
Thank you for the green salad  
a sweet gesture, lights the heart  
at my door you knocked  
with kindness you showed  
that even in gray moments  
someone still thinks of me  
thank you for the salad  

## Verse 3
Perhaps tomorrow will be different  
and I'll manage to smile again  
Small gestures, great meanings  
like the salad from an hour ago  
Humanity shows itself this way  
in the simplest details  
when you least expect it  

## Final Chorus
Thank you for the green salad  
a sweet gesture, lights the heart  
at my door you knocked  
with kindness you showed  
that even in dark moments  
someone still watches over me  
thank you for the salad

Here we go :

# Canzone dell'Insalata

## Strofa 1
Non ho parole per come mi sento  
o come affronto questa situazione  
Le luci accese ma nessuno in casa  
e spesso penso ancora a te  
perdonami la mia frustrazione  
Credo che troverò la via  
quando non la sto cercando  

## Ritornello
Grazie per l'insalata verde  
un gesto dolce, il cuore accende  
nella mia porta hai bussato  
con gentilezza hai dimostrato  
che anche nei momenti grigi  
qualcuno pensa ancora a me  
grazie per l'insalata  

## Strofa 2
I giorni passano come nebbia  
tra le mani scivolano via  
Cerco risposte nelle stelle  
ma il silenzio è compagnia  
La solitudine mi segue  
Ma so che passerà anche questo  
quando il sole tornerà  

## Ritornello
Grazie per l'insalata verde  
un gesto dolce, il cuore accende  
nella mia porta hai bussato  
con gentilezza hai dimostrato  
che anche nei momenti grigi  
qualcuno pensa ancora a me  
grazie per l'insalata  

## Strofa 3
Forse domani sarà diverso  
e riuscirò a sorridere ancora  
Piccoli gesti, grandi significati  
come l'insalata di un'ora fa  
L'umanità si mostra così  
nei dettagli più semplici  
quando meno te l'aspetti  

## Ritornello Finale
Grazie per l'insalata verde  
un gesto dolce, il cuore accende  
nella mia porta hai bussato  
con gentilezza hai dimostrato  
che anche nei momenti bui  
qualcuno veglia ancora su me  
grazie per l'insalata

Lyrics

ADHD and Me

Ok, I started and then bored myself. To be continued...

I got a formal diagnosis a couple of years ago. To say it explains a lot would be a massive understatement. I'd like to give my personal take.

What is ADHD?

The condition categorized as Attention Deficit Hyperactivity Disorder is almost certainly not what you think. For starters, the naming is way off from what there is. I saw a discussion on this somewhere in the socials, someone made the point that it's named for how it impacts other people, irrespective of the condition itself. The poster offered an alternative "Can't sit still disorder". Better, but it still doesn't capture much.

The medical profession is very bad at this kind of thing. Psychiatry hasn't quite got out of the Victorian era, it still bears the scars of that motherlover Freud. The DSM-5 definition isn't very helpful :

A persistent pattern of inattention and/or hyperactivity-impulsivity that interferes with functioning or development, as characterized by...

...a lot of failings.

And it's wrong from the get-go. Ok, I'm heavily influenced by my own bag here, but I'll have a stab :

  • ADHD is the result of a set of genetic deviations from the norm, carried by (my guess) 5% of the human population, with various levels of expression (these are in the same ballpark as autistic traits, a lot of overlap)
  • it is characterized by distinctive cognitive traits, strongly associated with attention
  • hyperactivity is a feature, but this is typically internal, outward expression is commonly blocked as a learnt behaviour, this is the notion of "masking"
  • it is orthogonal from general intelligence though markers for what is considered intelligence are common : learning difficulties and/or "gifted" attributes are common

I believe there's a strong argument to be made that human civilization depends on these particular kinds of neurodiversity for its existence. A recent paper suggested that the traits were beneficial in hunter-gatherer societies as the carriers might explore new regions, potentially finding more sustenance.

My Diagnosis

It's hilarious how long it took me to figure it out. I think I was 59 (61 now, I think) before it went down on paper. I've been under a psychiatrist on and off for decades. The diagnoses always started with my tendency for heavy drinking. Of course anxiety and depression topped the billboard, followed by bipolar and hints of psychosis. I've had a crazy pharmacopiea over the years, even before looking at self-medication. But those bits were all symptoms. The primary root cause was that I had a hyperactive head.

A stupid thing on my part is that a friend Reto had actually identified the traits in me a couple of decades ago, even gave me some Ritalin before I was due to have some conference duties. But I didn't believe it. I don't have the motor bits associated with hyperactivity. I really enjoy (some) social situations, which kind-of ruled out the autistic/formally-known-as-Aspergers spectrum.

Something compelled me to take another look, I had a go at the Adult screening test which is really quick but gives results strong correlated with the whole pile of ADHD traits. I told my shrink about this, I did a very lengthy paperwork test, I was given a look that said "we've got a right one here".

Another source of amusement is how slow on the uptake my parents were. Both teachers, in fact my father lectured on (art) therapy for people with special needs. My older brother has traits in a similar domain, but has done alright with his eccentricities, channeled into the creative arts. I'm reasonably certain my father has some of the odd genes.

Caroline had a story about my dad meeting this friend Sean (the fiddler) out in a shopping street. They got into conversation, then mid-sentence my dad just wandered off. I'm guessing he saw something in a shop window.

My mother died last December, and I'm kinda annoyed that although we were very close, she was still clueless about my neurodiversity. I'd tell her I was stuck with something, she'd predictably retort with "well everyone finds that hard work, you just have to do it". Useless. Her side of the family are riddled with eccentricity, neurodiversity too. I only found out last year my cousin from the states (a talented writer) has the same diagnosis as me. Her father, my Uncle Doug, had a reputation as a heavy drinker, but if you look more closely, he did exactly what I did, latched on to alcohol as self-medication.

Whelmed

I'll have to fill this out later. It's overwhelming. I live in a continuous state of being overwhelmed. Normal things, obviously - tidying the kitchen. But I also have a tendency to do things that I find difficult. As I type, in the background I've got Claude Code working on Semantic Web memory for large language models. It's a hard problem.

More amusement. By trade I'm a computer programmer. I was ever so lucky to discover this stuff as a teenager, it's (allegedly) a kind of work I can do. But I am so mediocre at it. Pretty good head for systems, day-to-day coding, rubbish.

If there were a credible form of intelligence test, I believe I'd land average, or maybe just below average. But if something gets my attention, I'm not letting go. Like a very ill-tempered Jack Russell. The code I'm working on now is an extension of things I worked on 25 years ago. I got into coding AI in the 1990s, so funny it's now The Thing.

The Booze and Stuff

Yeah, this deserves its own section. I did spend most of my adult life with a legitimate medical diagnosis of alcoholic. I still drink a lot more than medics advise, but here's where recognising my neurodiversity really came in handy. Switching from wine as my go-to to beer was a good step, I no longer have the physical horrors.

ADHD and Me

Watch

Postcraft, my massively overengineered static site builder just got a bit more complicated (but a lot more efficient). It's actually a series of apps ("transmissions") using Transmissions, my pipeliney thing. This is what they used to do :

  • md-to-sparqlstore - walked a given dir on my local fs, reading all the markdown files, posting these off to a SPARQL store
  • sparqlstore-to-html - queries the SPARQL store and renders the individual results as HTML pages
  • sparqlstore-to-site-indexes - ditto, to make an index.html of recent posts

For every new blog post I made, every single one of the hundreds of existing posts also got re-processed. Not very efficient.

So I've added a filesystem Watch service. When a file changes, then it goes through the processing. When I say I, Claude Code did most of the work. I have looked at node's watch before and it is relatively straightforward to use. But there was a fair bit of textbook-like code that needed implementing. Now I have a watch-config.json that looks like this:

[
    {
        "name": "postcraft-render",
        "dirs": [
            "~/sites/danny.ayers.name/postcraft/content/raw"
        ],
        "apps": [
            "md-to-store ~/sites/danny.ayers.name/postcraft",
            "store-to-html  ~/sites/danny.ayers.name/postcraft",
            "sparqlstore-to-site-indexes  ~/sites/danny.ayers.name/postcraft"
        ],
        "watchEvents": [
            "change"
        ]
    }
]

It watches dirs and on changed files triggers a call to the apps in sequence. The path given with each app is the location of a tt.ttl file which contains the settings for the app. Here's the core of the transmissions.ttl for md-to-store :

:md-to-store a :Transmission ;
   :pipe (:p10 :p20 :p30 :p40 :p50) .

:p10 a :Restructure ;
     :settings :prepFilename .

:p20 a :FileReader ;
     :settings :readerSet .

:p30 a :Escaper .

:p40 a :MakeEntry ;
     :settings :entryExtras .

:p50 a :SPARQLUpdate ;
     :settings :storeArticle .

Here are the statements for the settings for Restructure process :

:prepFilename a :ConfigSet  ;
    :rename (:pf1)  .
        :pf1    :pre    "sourcePath" ;
                :post   "sourceFile"  .

Restructure modifies the shape of the data, a message passed along the pipeline transmission in the form of a JSON object. It's needed here because the watch system does a call using sourcePath as the name of the changed file, but the Filereader process expects a sourceFile.

Like I said, this is all seriously over-engineered for a static site builder. But the component processors like Restructure and Filereader have no direct coupling and are totally reusable. A major reason for applying this to the static site builder is that the posts going into the SPARQL store are now part of my Personal Knowledgebase. Using that is over in the realm of Semem.

Having said all that, what I don't have yet is an easy way of tidying up. I created lots of blog entries in setting this up, the only reliable way I have for cleaning now is to empty the graph in the SPARQL store and run the process-everything transmissions. Hey ho.

Watch

Watching

This may now be working

Watching