Showing posts with label technical. Show all posts
Showing posts with label technical. Show all posts

Sunday, November 01, 2026

counter_game Has Been Released Upon the Unsuspecting World!

Today, I bring you: counter_game, the most simplified of idle games that I can come up with that is still somewhat meaningful.

The premise is simple: increment a 64-bit unsigned integer counter, one at a time.

And that's it.

It's fun because it is hilariously straightforward in terms of what it seeks to do. No funny multipliers, no annoying precision-loss when double-precision floating point numbers are inevitably used (staring at you, Cookie Clicker). Just good old fashioned incrementing of an integer variable.

What's really interesting are two things.

The first, is that modern CPUs are scary fast, even without taking into consideration that there are multiple cores per CPU. On a thermally limited machine that is Eileen-III, I am consistently seeing 5e+09-ish increments per second, while on a machine that does not have that limitation (i.e. running in an air-conditioned room), I had seen 7.4e+09 increments per second.

That's actually more than the burst clock speed of 5.5 GHz to 6.1 GHz that is common these days.

And yet, it still takes decades to truly rollover all 264 different values of the counter.

The second, is the iterations that I had went through to fixing the code up. The original code was written a few months ago, and its requirements were more or less the same as what I had released---increment a large unsigned integer counter in as tight a loop as possible, but have a means of keeping track of the work to resume later on somehow. And maybe have some simple output that is user-triggered to avoid the penalty of doing I/O for something that is ``obviously'' CPU bound.

Oh, and avoid the compiler from optimising away the ``obviously'' do-nothing increment loop.

I started with C99, and wrote something very similar to what I currently have, with the following major differences:
  1. The counter was originally of type static volatile uint64_t, which was because...
  2. ...the original signal handler was doing the actual saving of state, which meant that volatile was needed to tell the compiler to not optimise away what is effectively a ``do-nothing tight loop'' to the compiler; and
  3. I had to resort to some GCC extension of locale to enable thousands separators for the ludicrously large integers because I was too lazy to write my own C99-compliant version.
Reading the current code base should reveal that these things that I talked about were no longer there.

What happened?

Well, I chucked it into GPT-6 to see what the LLM could suggest as code improvements, and through to and fro, managed to converge to the current released version.

The only thing that wasn't really suggested by the LLM was the removal of that volatile specifier---with the signal handler only setting some atomic signal outside of the tight loop, and the logic for the I/O pushed into the tight loop but guarded by a signal comparison, the volatile storage class was no longer needed since the counter variable was in scope for both increment, and reference for the purposes of doing I/O.

For the confused, volatile tells the C99-compiler that a particular variable should be assumed to be backed by memory, which means that when optimising/generating code, the register-only optimisation is not allowed; all references to the volatile variable must load the value from the memory, and subsequently written back, without assuming/keeping the value based on what is in the register.

That change dramatically sped up the increment rate by more than 10-fold, since each increment no longer needed to go through the entire memory hierarchy of L*-caches before reaching RAM.

So with my foray into using LLM for support in software programming, what do I feel? Honestly, it isn't too bad, but to be fair, this is merely about improving an existing program that does something pretty simple---it is not a multi-file project with the full backing documentation of user requirements, project specifications, and everything else under the sun.

As a tool, it is fine for this case, but in some future post, I might talk about another different programming project that I had GPT-6 assist me. Spoiler: that one was a doozy, even though the outcome is still better than what I would do myself.

The key thing to take away is that using these tools really does make me lazier in some ways, and more hardworking in others. Yes, I wouldn't set out to write my own custom C99-compliant code to output the large integers in groups of six digits due to how annoying it was, but with the LLM yelling at me often enough about ``hur hur you claim C99 compliance but you're using GNU extensions you dumbass'' was enough to start the skeleton of that code, and have the GPT-6 finish it up.

``MT, what's the purpose of counter_game then?''

It's an idle game where a counter is diligently incremented one at a time by the CPU without funny modifiers, exponentiation shenanigans, and bad floating point numbers. That's its purpose. It can also act as a low-resource single-thread (not core since I do not put in non-C99-compliant CPU affinity setting code) performance tester for a computer that runs Cygwin/Linux, at least on the dimension of incrementing a register.

I think that's as pithy a response as I have.

Till the next update.

Sunday, October 04, 2026

The Whys of Music Re-engraving

I know it's the weekend, and I had just taken leave on Friday, but I'm still exhausted. Part of the problem is the relative heat/humidity and haze combination, part of it is self-identified burn out. But a large portion of it for this weekend is the need to rewrite lots of music to make it easier to execute as a musician. So this is where this post is going---pet peeves with respect to scores.

There are two big camps here, of which I think I'm probably belonging to the fast-diminishing one. There's the hard copy gang, where we either print the digital copies, or have the hard copies directly. Most of the time, we are looking at the music in terms of how many two-spreads there are, and more importantly, how the page turns work. Most music stands can handle three A4-width scores, but it's really uncommon, hence the two-spread set up. Then there's the soft copy gang, where they get a large-ish Android tablet or Apple iPad, and then use some wireless foot-operated page turner to advance the score forwards or backwards. In this set up, the scores are shown as a single page, and the page turns that the soft copy gang works with is at the single page level, which means that two-page spreads are actually antithetical at some level.

I prefer hard copies for music because I don't trust the music stands to be stable/steady enough to not drop the thousand-dollar digital device some 1.3 m to the floor. It also allows easier annotation with a pencil (never a pen, especially if working with rented music).

Regardless of preference, page turns can make/break proper execution of the music. Part of the reason why I learnt how to do engraving using a tool like Lilypond is to give myself a lot more options to tweaking the scores into ways that make it much easier for me to work with when trying to perform off them. The most obvious use of it is when I compactify hymn scores from however many pages there are into a single [A4] page---for the type of hymns that we play at PPCC, most can fit into a single A4 page, and that's with the lyrics. The hymns are generally short with high repetition, which allows the high compression.

So when composers/arrangers present scores that are ``bad'' for execution, I get exasperated. Because having the original digital source allows for typographic adjustments to make the parts easier for the musicians to work from. As an example, I just spent yesterday reworking a 4-page medley (more like 3 1/4-page) into just 2 pages---I didn't even have to change any of the default size of what Lilypond provides. Not to mention that I even managed to salvage some weirdly non-fitting section names from the original score in the reworked one. And I just spent earlier this morning sorting out a 5-page part to fit into 3-pages, with a page turn after the first page where there is actual time to do the turn.

Most of the time though, I do not resort to reworking the music via Lilypond, mostly because the initial data entry is the most time-consuming---I take about an hour per piece, depending on complexity/length. Good old fashioned photo-editing skills to reduce the white-spaces between rows of staff music to reduce something that takes 3 pages into 2 are used more often than rewriting. Recently for the jianpu stuff, I tried something a bit different---I stacked up the three pages into a single image, and then sliced it into half, after altering the aspect ratio to fit nicely into A3 (slicing in the middle yields 2×A4). It worked well without the same time-consuming nature of trying to squish whitespace. But I've not tried it for staff music---I don't think it can work that well. Besides, I can use Lilypond to do something more sophisticated as compared to jianpu, and at that point, it probably makes more sense to eat the cost of the data entry and then auto-tweak it.

I think most people that I know don't really bother going through the effort to do any of these things to make performing the pieces easier for them. I think the first time I allowed myself to do such drastic modifications [on copies of the original] was about 10 years ago during a Dicapella 50-50 project, where an original medley was deconstructed and reconstructed to fit some new criteria. Ever since then, I had less stomach to trying to ``remember'' how to execute, and just do the computer-equivalent of cut-and-paste to remaster the scores to what I need.

Apart from dealing with bad page turns, sometimes when the score is too damn impossible to read fast enough for playing due to legibility reasons, I'd also go down the re-engraving path. And that was what I did for one piece yesterday also. For some reason, the original piece was just a pain in the ass to read. It wasn't the size---even after blowing up the original to make it larger, it still read really bad. I gave up trying to read it, and just re-engraved it. Both still took up only one page, but it was so much easier to read the Lilypond output in comparison. After staring at both scores pretty hard, the conclusion I had in terms of illegibility of the original was that the staff lines were too damn thin, and the vertical aspect ratio of the staff was just off by enough that the note heads were blending into the lines/spaces, making it stupid hard to tell apart.

And I wasn't the only one who found it difficult to read---someone else actually blew up the score too, except it was closer to blowing it up 4× than the more modest 10% that I initially did. Absolutely bonkers.

Anyway, that's about all I have for today. The upcoming week is an exciting one---I get to watch IRyS in concert on Tuesday via live viewing in the cinema at Suntec City. I don't have her merch, but that's not going to stop me to go see YabaIRyS do her singing thing.

And I got Monster Hunter Rise for a steal at 90% off from the Steam Sale, in order to play on Evie-II. I don't know if I'll like it, but I'm off to a slow start. If it's going to play like Elden Ring, then I'd be happy if I can get like ten to twenty hours of fun out of it. Evie-II is starting to have more and more interesting stuff being run on her, and I am excited.

Truly now, that's about it. Till the next update.

Sunday, September 20, 2026

Freestylin' dizi

Wow. I've not had that much fun at a performance for a long time.

Yesterday, I was part of the TGCO crew playing at a wushu/taiji exhibition event organised by Hui Taiji Training Centre out at Heartbeat@Bedok. The main event was 《师傅出马》, where different taiji masters went on stage to demonstrate their kata (yes, I'm mixing terminology). Our role from TGCO was to play accompaniment music so that their demonstration wouldn't be too dry.

Traditionally, I think they would be playing some pre-selected music over the PA system like some kind of dance set up, with the sound engineer doing the necessary fade out at the end.

This time round though, we had quite a few pieces (several brand new!) prepared beforehand. We had roughly six weeks or so to get ready, and even then, the process was more harrowing than normal, mostly because of the need to match the durations of the pieces that we were playing against the estimated time of the kata for each of the twenty or so masters. It was pretty messy as the original score had to be deconstructed into parts that could be repeated ad nauseam in case of overruns, and even with all the preparatory work, we still ended up being lost in the woods for some of the pieces, with just the bass and rhythm marching forward while all the melodists were confused. That wasn't helped with confusing signals put forth by the conductor during the actual run itself, since even she sometimes messed up where we were repeating from, due to having to actually pay attention to the goings-on of the kata on stage in order to control both the beat as well as when to do a roll cut off.

Overall, we did fine.

While much of all the preparatory work wasn't surprising to me, having done project-based performances before, it was something that the rest of the orchestra were not used to. The cadence in which the piece needed to be quickly understood and rehearsed, lots of adjustments as the pieces were recorded, timed, and reworked to figure out how to match the actual kata durations, and not to mention the even more pressing need for folks to actually pay close attention to the conductor for once---these were definitely new for many of the players because they were used to a more social-style rehearsal, where we'd spend the 2 hours of rehearsals going through just one or two pieces. I have nothing against that social-style rehearsal, but having the orchestra stretch their experiences through this more frenetic pace was definitely a good plus for them. Maybe this might inspire them to actually pay more attention to the conductor, and to perhaps build up their foundational musicianship skills.

The actual fun part of the performance that I had was the execution. It was messy, it was hilarious broken with us being lost in the woods, but it all worked out well. There were three points in the performance where there was nothing but the on-stage overseas master whom we never really interacted with doing his kata, then Justinn on the drums, and me on some dizi. And that was it---the master did his thing, Justinn kept time and rhythm on the drums, while I freestyled on the dizi based on what I was seeing on stage, and what Justinn was providing as the beat. I was so locked in that the 3 minutes, and later on 4 minutes simply passed on by in a blink. I think it was the first time that the orchestra witnessed one of us (me in this case) actually freestyling at a performance ``live'', and they were impressed. Someone even made a wry comment on how ``it was obvious who had been practising and who hadn't''.

Just don't ask me to re-play what I played---I have absolutely no idea. All I remembered was the first piece was an energtic and fast piece in F-minor for the halberd demonstration, while the second is in C-minor with lower and longer notes for the fists demonstration, all improvised on an E♭ bangdi, with the first using C-major fingering, and the second using G-major fingering (flute fingering nomenclature).

``But MT, you said three? There were only two being mentioned!''

The last one was sort of a scam. The item was definitely on the schedule, and it involved ``chi sau'' or ``kokyu ho'' for two people, but there was no indication of what music to play. Then Justinn jumped in to drum, and then she started staring at me from her vantage point in front.

Ah hell, I had to play. So I just grabbed my D beidadi and improvised something in B-minor, with lots of low and long notes.

Successful performance aside, the location was hot and humid being located outdoors. I was sweating like crazy, and thankfully I always had my trusty 1/2-inch Micropore surgical tape. The Micropore tape is carefully stuck near the embouchure hole of the dizi where the upper chin/bottom of the lower lip rests to reduce slippage that can happen due to excessive amounts of sweat. This is an old trick I learnt from working with concert flutes.

All in all, I had a lot of fun at this performance. All I could remember in the build up to the event while travelling there on the chartered bus was this exchange in one of the John Wick movies:
John: Last words, Winston?
Winston: Just have fun out there.
And yes, I had fun out there.

Till the next update.

Monday, September 07, 2026

Keeping EOL Python3.9 Alive in Vim for Black

I'm a bit torn about this entry. Is it considered ``retro'' if we're talking about a system that is on the edge of being abandoned but not wholly yet?

Leaving that thought aside for the moment, let's jump in.

For autoformatting Python source code, my autoformatter of choice is Black, with the only modification of setting the maximum width to 80 instead of whatever number they set.

My text editor of choice is vim, which is Vi Improved.

My POSIX-y environment of choice on Windows is Cygwin.

The problem is that Cygwin has been odiously slow in updating packages. Perhaps it is due to a lack of maintainers, or a maybe a lack of interest ever since Windows Subsystem for Linux (WSL) became a more reliable thing.

For instance, the system-Python version is more or less stuck at 3.9, which resulted in my Python on Cygwin patches list to bring in later versions of Python 3 to allow more modern tooling to run. This remains true even when the Cygwin installer is now attempting to auto-install Python 3.12.

Moving backwards, due to the end-of-life of Python 3.9, Black has moved on too, which made my favourite text editor in Cygwin (i.e. vim) flip out when it tries to run Black.

There are several steps to the fix.
  1. Use only the vim scripts available for 25.11.0;
  2. Ensure that pip is around 25.3;
  3. Update .vimrc to have the line let g:black_use_virtualenv=0;
  4. Do a pip install black using that version and then run Black in vim for the first time.
Once all those are done, the pip version can be safely updated to whatever may work.

The reasons are multi-fold. vim for Cygwin is compiled with the Python 3.9 ABI in place, which means that changing the default Python 3 environment leads to nothing but crashes. pip beyond version 26 drops support for Python 3.9 too, and that crash is even more ridiculous---dataclass suddenly appears with the slots named argument, which doesn't exist in Python 3.9.

So that's about it.

What a bloody mess...

Saturday, May 02, 2026

Yet Another Labour Day Weekend

So it's the Labour Day weekend.

I've always found it very strange that for SIN City, the union leaders are unabashedly the same folks who sit in parliament, which already has a reputation of being more corpo-friendly, whether or not it is justified. And somehow, that doesn't count as a form of conflict of interest.

But that's not the purpose of today---the whys and the hows of this funny situation can be found through the historical archives.

What I want to talk about today is the arrival of Pan's Musical Companion for Alto (Treble) Recorder and Other Melody Instruments: Medieval by Robin Alexander Lucas. Just a small note: if you are clicking on the URL to go to where I bought it (i.e. Waterstones), do note that they are very aggressive about stopping ``bots'' to the point that it can affect the UX pretty drastically.

Anyway, I learnt about this tome from this video from Sarah Jeffery. I figured that I probably should get some ``appropriate'' music for the recorder just so that I can do a bit more proper practice on that instrument, instead of trying to mangle my way through all the other types of music that I'm playing.

There is a problem with the book though---it opens landscape, and is sewn-bound. This means that having the book opened wide and stable enough to actually play from it [on a music stand] is just... not possible.

And so here I am, trying to re-typeset all 105 pieces so that I can shove the compendium into a clear folder and therefore actually be able to play them. Naturally, these are done in LilyPond.

But as I might have mentioned before, Eileen-III's keyboard is kind of sucky. Stuff on the right hand side don't operate in ways that are consistent---the numbers from 6 to 0 either don't show up, or end up being doubled, while the braces are almost always doubled, and the | and / are inconsistent.

I probably should trigger the warranty to replace the keyboard. But that means more downtime and other rather things...

That said, this meant that if I were to typeset all 105 pieces using Eileen-III's existing set up, I'd probably stab myself in my face repeatedly with a rusted pencil. And this is where it is time to bring out my favourite keyboard: HHKB Pro 2.

I had always wanted to use this keyboard with all my various laptops, but the ``normal'' way of putting the keyboard on top of the existing laptop keyboard doesn't work by virtue of the 60% size---the base plate is literally small enough to not span across the non-key parts of the keyboard.

That said, I find that having the HHKB Pro 2 sitting on my lap as I type, is just the perfect comfort level. Combining this position with having the ability to place the open book just in front of me and between Eileen-III meant that it was just that easy to look at the source material and touch-typeset the pieces straight into Frescobaldi.

I may just decide to lug my HHKB Pro 2 to the office just to flex against those who are showing off their ``fancy'' keyboards---mine is smaller, and has the Control key in the right place without any fancy mapping. That said, it's probably as dumb as I make it sound---I don't have any issues with the work laptop keyboard, and despite it being 60%, the HHKB Pro 2 is still sizeable enough that to lug it to and fro daily is just a non-starter, unless I upgrade my backpack to be even larger again.

In the old days, when my work machine was a desktop machine, and when I had a cubicle with enough storage, I could just leave my HHKB Pro 2 in the office. But with all the new space reduction nonsense that is in vogue, it becomes increasingly harder to do things like that.

Ah well.

I think that's all I want to talk about for now. Work is... tiring in all sorts of ways, and I really don't want to be thinking/talking about it unless absolutely necessary.

I suppose that this mini-rant is just an exercise in the use of the HHKB Pro 2, just to remember/enjoy the wonders of the keyboard layout and the Topre keys.

Relative to the Keychron stuff, the keys feel heavier, but without that crazy weird actuating ``click'' sound that comes from the Keychron.

Alright, that's about it for now. Happy Labour Day weekend I suppose, and till the next update.

Wednesday, December 10, 2025

Patches to Build Python3.14.2 on Cygwin

Well, that took a while, but I finally did it.

First, here's the payload (for 3.14.2).

Next, the explanation on what it is.

Cygwin remains as my preferred UNIX-like interface while operating in a primarily Windows environment. The Python interpreter that is still present in Cygwin is Python3.9, which is fine for me.

But the useful yt-dlp tool has pushed their support from Python3.9 to a version that is at least Python3.10, because Python3.9 will not be getting security support from 2025-10-31.

I understand. yt-dlp is a tool that targets a slightly more tech-y user, but not by much. It is also a tool that needs to be continuously updated due to the ever-evolving nature of video services, so having a Python environment that has proper security patches is a good thing.

But Cygwin hasn't a good working Python environment beyond 3.9 as at now. There's a weird Python3.12 build in the background, but it is incomplete and weird. Moreover, if you looked at the same site I linked to earlier, even Python3.12 is seeing the end of security supports at 2028-10-31, which really isn't that far away, should the maintainer of Python in Cygwin actually fix the current build.

So, it's probably better to build my own.

Building Python isn't hard... in Linux. On Windows/Cygwin, it gets complicated.

Which is what the payload (for 3.14.2) is supposed to ease. The contents of the payload can be seen in detail here, but I will outline the rough changes here as well.
  1. uuid support library detection was broken;
  2. List of support libraries defined (in static-compilation for ease of use);
  3. Incomplete detection for clk_id for Cygwin;
  4. Messed up refactoring on LDLIBRARY use that got an unusable name (libpython3.14.dll.a versus the actual libpython3.14.dll); and
  5. Fixing up the way compileall.py does multi-processing (Cygwin's spawn() and forkserver implementations don't work as compared to simple fork()).
So now, I have a nearly-clean build of Python3.14 from which yt-dlp can run well enough.

``MT, why not contribute back the changes to upstream and/or take over the maintenance for Python3.14 on Cygwin?''

Well, it takes time due to the additional responsibilities and accountabilities on these patches that I have done up basically only to get working in my circumstance. So I think I've done the next best thing by putting it on my website, and talking about it here (where it can get indexed and highlighted).

I think that's it for now. Till some update in the future.

Sunday, December 07, 2025

More Jibber Jabber

It's now December. Like everything in life, nothing happens for a long time, and then many things just surge within a short period of time.

That is basically what happened at work. I won't talk about it here though. Instead, I will muse about the things that had been floating in my head on and off over the past few days.

Also, this was started sometime late last night, before I got completely side-tracked chasing down various rabbit holes (like changing the default system font of Windows 11, a process that was in-built, and easy), and deciding at stupid o'clock that it was the perfect time to rename more of my music files so that they don't eat up the 260-character path length limit while also satisfying some sequencing constraints from the dumbness of music players (yes, it's you, Foobar2000, for some damn reason).

------

How does an all out psychotic break down feel like? I sort of understand that being in psychosis effectively means that one has lost connection with reality, but what went through my mind was, what is that supposed to mean?

Is it a scenario where the regular implicit understanding of physics just goes awry? Or is it ``only'' just hallucinations and delusions that are akin to a ``day-time'' version of some messed up dreams?

No, it's not about me trying to get into a state of psychosis, but more of how do I know that I am currently not in a state of psychosis in the first place.

That last bit came about because I was having some rather strange-ish dreams... that felt more real than the reality that I am currently in.

They weren't bad dreams---they seemed to present the ``could have been''. A different kind of future, whether a hypothetical one from the past where the ``timelines diverged'', or of a future that is yet to come should I choose differently now.

------

There was a day where I saw a dude who showed an MRI of his brain. What immediately struck me was just how close the brain-stem was to... the parts that one would normally be aware of (throat, and tongue). It's obvious that the brain-stem needs to pass close to these other commonly ``sensed'' body parts since we have not developed wireless connections to the rest of the body, but the realisation of the close proximity (all within 2 inches) was mind-boggling.

Imagine that as you are swallowing that bolus of macerated food, that the nerve bundle that links up to the rest of your body is just behind all that, under protection from the bones that make up the spinal column. Then imagine that if you slam your tongue backwards hard enough, you can probably slam the nerve bundle against the bones too.

Food going down in front of the dangling spinal cord bundle.

Trippy.

------

I think that the recent few years saw me massing more music than I had done since my undergraduate days. I was collecting music from my childhood (yes, very clichéd), mostly a mixed bag of 1980s and 1990s mando-pop music that originates primarily from Taiwan and Singapore-Malaysia, as well as various English oldies (between the 1950s to 1990s) of the pop-genre. Then I kind of slowed down hard after that---there just wasn't anything worth looking for(?).

Now, some twenty odd years later, I find myself hunting out the vintage stuff (think Prince, Led Zeppelin, Michael Jackson), and new things (like The Hu, a whole stack of hololive Production materials, Bruno Mars, Sabrina Carpenter, Zara Larsson). I've also taken the opportunity to tweak the naming conventions of the files to deal simultaneously with the limited path length, as well as the sequencing problem of the tracks---I know I blamed Foobar2000 above, but considering that I like loading entire directory trees into a single playlist, it is not even wrong that the playback order is governed by the lexicographic order of the file names as opposed to the sort order of the track number.

What really cheesed me off is that the mobile version of Foobar2000 does not handle sorting the playlist by any criteria after it is loaded. I suppose they are expecting users to use the Media Library for all these finagling, but I don't (the Media Library is objectively more useless for anything other than answering queries on ``which music was that with this fragment of a title'', and even then it is still hampered by the IME that is needed---this is true for both the deskop and mobile versions of Foobar2000).

But new music! Cornering the heavy tail of the music from my childhood stuff is getting much easier, since I do not need to rifle through shady music CD sellers with various ``compilation'' CDs that have no clear provenance---as long as I can remember some unique-ish sub-string of the lyrics, the search engine can get me close enough.

Then it becomes a case of how well I can recall and render the lyrics (quality-wise, we're hardly going to find anything better than OPUS sampled at 48 kHz for 128 kbps unless we put on our tricorn hat and sail the seven seas). And I tell you, trying to recall stuff when one's barely trying to actively memorise said stuff back in the day for future recall is hard.

Till date, there are still lost music that I don't know until I hear it and go ``That's it! That's the piece! Damn!''. See 《羞答答的玫瑰静悄悄地开》 as an example---it took me a damn long time to figure out that this is the piece.

But old stuff aside, the new stuff from the land of VTubers is astounding. hololive Productions is a music powerhouse, and to fully embrace it... lies madness. Here's the official stuff that they sell (primarily original music), and here's a fan wiki of original songs.

Chuck in covers, and the madness is going to set it.

But hololive Productions aside, here's a great indie-ish VTuber singer to follow: Alpha Betta. She does frequent karaokes, and she sounds wonderful too. And she probably needs the love from new viewers compared to the larger and more established folks.

------

And that's about it. I'm not apologetic about all the non-sequitur---despite what it may seem, it has been a hard week that just passed.

Sunday, November 02, 2025

Ball x Pit

Well, at least the bots are not hiding themselves, and are being honest about where they are from.

I still don't like the crawling though. But what can one do when one is using a ``free'' almost-always available tool for blogging?

Anyway, it's finally November. NaNoWriMo the organisation has imploded, so NaNoWriMo the event is kind of dead, at least officially. Personally, I probably should continue with the whole ``writing a novel in a month'' deal, but realistically, it's a nice change to do something a little different.

Last month was a doozy. Much happened at work (I won't talk about it other than pointing out that all the waiting for details is exhausting), and even more happened in not-work. The Great Yamaha has arrived! It's a maple great bass recorder from Yamaha (YRGB-61), and according to Wee Aik, it's the first time he's ever heard/seen anyone order it. Mind you, he's a Yamaha products veteran for nearly two decades, so that statement has way more heft to it than expected.

First impressions of The Great Yamaha are good---the tone is sweet, the range is similar to that of the bass flute. I had a brain fart in my excitement at receiving The Great Yamaha that I forgot that the recorder is tuned by moving the headjoint away from the body---we were trying to tune by adjusting the adjustable boccal.

🤦‍♂️

There is a minor issue that I'll need Sean to help remedy---the felt on one of the bumpers seemed to be a little too thin, making it a little harder to hold down the lever that ought to cover the two linked holes. But that's something for the upcoming Friday.

------

I went and played with Atelier Flute Ensemble (AFE) JB over the previous weekend at the auditorium of Afiniti Medini in Medini Iskandar (it's ``across the road'' from Malaysia's Legoland). It's a nice space, but as an auditorium, it meant that it was better at absorbing sound than acoustically bouncing stuff nicely the way some recital spaces do. I spent two nights over at Yong Kang's mum's place, with Friday and Saturday almost fully locked in on the rehearsal and performance respectively. Yong Kang was a good host, but I think that my ``rock bottom'' expectations from living a mostly monk-ish lifestyle probably threw him off by a lot, giving him some serious anxiety of whether his hosting was adequate.

It was more than adequate, for sure. But let's be real:
  • I sleep on a mattress on a floor at home;
  • The apartment I live in has no air-conditioner;
  • I average about one-and-change meals a day;
  • My philosophy to food is usually ``eat to live'';
  • Armed with Eirian-VI, I can kill time better than most people; and
  • I don't really have this urge to buy random junk.
All in all, my expectations are really ``rock bottom'' due to the way I have chosen to live my life, and not because I was trying to be polite or anything.

I think it really throws people off because there really isn't any other obvious indicator that in addition to acting like a weirdo, I actually do live like one [apparently].

Ah well.

The concert itself was fun---I thoroughly enjoyed playing the repertoire that was put together. Going nuts on the articulation with Davie was something that I had not expected myself to do, but considering some of the crazier dynamics that are written for the low flutes, I think it fully justified. One interesting thing to note was the use of direct amplification on the contrabass flute, as well as us bass flutes---it served as a good alternative to the KFC way of having another friendly low instrument player (contrabass or bass clarinet) to join in. They even had me play something for the demo when they were introducing the flute family---I started with a fragment from 《平湖秋月》 to feature the low-B at the penultimate rehearsal but was told it was too short, so I switched to a transposed version of 《瑶族舞曲》, but then someone made a comment about it being played in an orchestra, so I finally just played a transposed version of 《草原的思念》, all to show off that low-B on the bass flute. I think they liked it.

At the end of the concert was a whole series of photo-taking sessions. I was a part of the main groups, but as everyone else had their friends and families coming up to them for a photo in memory of the event, hardly anyone came to me, and I just sat there and absorbed the environment.

It felt a little melancholic, but it was fine---I felt contented from having played more [bass] flute. The location was not in SIN city, and therefore I never really felt comfortable trying to get folks from within SIN city to get tickets to travel waaaaaaaaaaay out of the way just to hear me play the bass line. No matter how I swing it, it just sounds ludicrous.

That said, if AFE JB were to have another concert, I would happily join in and play with them, should they still want me.

------

In other news, Ball x Pit is taking time from Silksong, Persona 5, and The Great Ace Attorney Chronicles 2.

It's Arkanoid combined with Vampire Survivors for the action part, and then there's a bit of Tetris with Plinko for the city-building part (which is a slightly more convoluted mechanism for unlocking new characters and get bonus stat increases---now they involve skill, and feature additional resource gathering/management).

It's fun, and I'm still really new in it. Stay tuned for more information as I [slowly] unlock stuff.

If there's a reason to get a portable hand-held, it might be this one.

------

I've restarted on some digital signal processing work involving the FFT once again. Reason: I needed a better way to extract the chords from sample music files, and I didn't want to rely on some dodgy third party website to do that.

The last time I was experimenting with FFT, I ended up needing scipy and other random-ass Python packages to install. On a Cygwin set up, this is a royal pain in the ass.

The solution is to grab FFTW and libsndfile, and write my own C++ program to do the expensive part of running the FFT, before using Python to do the processing after.

The FFT part is done, and I'm now working on the bucketing of the resultant Discrete Fourier Transform to propose the associated pitches for examination.

But Ball x Pit awaits me!

I think that's about it for now. Till the next update then.

Saturday, October 18, 2025

Ass

Ass. A royal pain in the ass.

Okay, since the last entry where I called out the bot-masters who have been unsympathetically hopping IP addresses but still with the same spoofed user agent information of ``Chrome 125.0/OS X/800×600'', things have been going all over the place for me.

The most recent pain in the ass (literally), is getting hit with gastroenteritis. Not fun, and not sure why I even got hit with this, but I am assuming that it has something to do with the increased stress levels that have muted my immune response, which resulted in the rise of the effects of the nasty-ass bugs that have always been lurking within the body, ready to strike when the forces that usually keep them at bay have lowered their vigilance.

The previous two nights with respect to gastroenteritis wasn't pleasant. The first night (Thursday night), I had very fitful sleep, having to sprint out of ``bed'' to evacuate my bowels. Then I messed up, having the foresight to wear more pants ``just in case'', but forgetting to realise that I was still sleeping on a mattress on the floor (hence ``bed''). So when I finally got into some semblence of deep sleep, a bad leak occurred, and I ended up having to do late night washing, and subsequent sunning of the very lightly soiled (just fluids that made it through the four layers of cloth) mattress.

Last night, I just slept on the floor hard core, no mattress. Drugged up with the right types of meds, I slept fine, without any embarrassing leakages and what-not. The day between the nights was spent sleeping fitfully on the same floor, in a bid to try and recover whatever missing sleep that I had from the night prior, and to just avoid having to think/be conscious about the bloatedness and discomfort that came from gastroenteritis.

Today, I feel better. Gassy as one can get, burping and farting (I don't trust anything that comes out of that orifice!). Head's feeling less woozy to the point that I can sit here and start writing about the nonsense that I had undergone. It also meant that I had to forego the penultimate rehearsal that was held this week for the upcoming concert on 2025-10-25. That is fine---there's one more rehearsal this upcoming Friday, just before the performance. And considering that I'm playing on Davie, a bass flute, we're good, especially since I had fixed the compacted score for one of the pieces---I had missed out an entire row, and it took me an embarrassingly long time to realise that.

------

If one had checked out my domain recently, one would notice that there's a new field that is located in the lower right corner that talks about when the page was ``created''. And a closer look at the usual ``updated'' field on the lower left corner would also reveal that its form has changed somewhat. If the dates look like some ISO-8601 nonsense, it means that the underlying Javascript file is still the very old cached version---it is best to force refresh without using the cache to get the updated version.

Anyway, this is actually part of the mild adjustment of how I handle the ``fuzzification'' of dates, and the realisation that despite having the timestamp of when I updated a page, the provenance (particularly on when the page first came about) was missing. This is something that I had been thinking of doing for some time, but before the changes that I did to conform to the ``new'' security headers, I had no natural space to put that information. With the external validation links for the page with respect to its HTML5/CSS standards conformity having to be retired, I now have the space to put that information, and thus that's where the ``created'' timestamp (with suitable fuzzification) is located.

``But MT, how'd you get these information? Isn't it hard to track when the page is first created?''

See, this is where having my entire website hosted on my own source code repository comes into play. Each page has their own history stored across the commits/revisions/time, and it was just a boring case of finding timestamp of the earliest incarnation of the file. I did that over an evening, and slapped it all together, and finally have what you see today.

And yes, I have this website for at least 17 years as at today. So anyone who claims that they cannot find me on the 'net really hasn't tried hard enough. Hell, this blog has been in existence since 2006, so there's really no excuse whatsoever.

It is the same with finding me by cellphone number---that stupid number has not changed since 2003. So anyone who claims that they cannot find me... haven't really tried.

------

``So MT, you were talking about wanting to cry in some recent post, and yet you cannot. How's that going?''

Oh... I still want to cry, don't get me wrong. But it's getting less terrible, at least for now. Some semblence of a direction has been provided, with some form of assurance being made by someone whom we have little reason to distrust. The gears of bureaucracy have finally started grinding, and it is still a matter of time before we truly see what/where we are heading.

Incidentally, I wrote an extractor specifically to pull out Psalms from ESV, and have been reading through it. Psalms is an interesting form of wisdom literature---they are songs that teach us, songs that show the entire range of emotion of the human condition, while at the same time, reminding us of who/how God is to us.

It is comforting in many ways, and I would like to think of Psalms as being less studied as compared to say Isaiah, Luke or even Romans.

Because how does one go about studying 150 seemingly disparate poems that have crappy meter due to the translation from the original Hebrew to English?

And I think that's all that I want to yammer about for today. This weekend is a long one that is supposed to be relaxing, and I fully intend to try and relax in it, despite the ongoing troubles with gastroenteritis.

May God allow me to heal before the next segment where I need to run hard once more. Amen.

Sunday, September 14, 2025

In Sum...

Soon it'll be the mid of 2025-09; what do I have to show for it?

Maybe the multitude of mental scars, a mostly uncontrolled weight increase ``programme'', and a couple of gigs to come in the upcoming month that I am allegedly preparing.

(sigh)

Look, life's not bad---I am still alive and well enough to be bitching about things here. But life's not completely dandy either: I've been plagued with bouts of anxiety about many things that I have little control over. I also hurt my right third toe bad enough to have to buddy tape the bloody thing for the whole past week. It has gotten better, which makes me reduce the likelihood that I had actually broke the poor thing---not going to the doctor's to waste four hours to wait for a referral and X-ray to be told of something that is ultimately insignificant.

But let's just look back at the good stuff for the past week.

------

I went to the Bach Concertos Extravaganza played by Red Dot Baroque with GY on Sunday. Loved the playing, loved the programme---the German ambassador was present too due to how the event was ``also'' celebrating 60 years of diplomatic relations between Singapore and Germany.

It was the first time that I was watching/listening to J.S. Bach in concert, and I thoroughly enjoyed it. That toe injury? I got it while sitting wrongly after standing up to make way for other folks on the same row. The circumstances are too embarrassing to talk about, so I'm not going to.

GY had to bugger off immediately after the concert, but other than that, we had a great time.

------

I did some tidying up of my own stash of code/configuration scripts. Among those include:
  • Tweaking the update period of the NVENV re-coding tool of ffmpeg to stop spamming my screen too hard;
  • Adjusted the depth of the histograms of my tempo-estimator to make it easier to see;
  • Fixed the Python3.11.13 setup configuration to actually have a usable readline library;
  • Upgraded the support library (and build script) for the Ghetto FTP server (it's been waaaaay out of date, seeing that I kept it working for Python2);
  • Added a new script to yield the LAN IP addresses to deal with the new access-point specific router/DHCP;
  • Added a Ghetto uptime command using /proc/uptime to replace the missing one from Cygwin;
  • Reworked my bash prompt to also show the uptime using the new tool;
  • Wrote a new Unicode-aware Ghetto del command that allows bash in Cygwin to use the Windows Recycle Bin;
  • Updated the way some self-written tools are built/managed to simplify their set up; and
  • Updated my .bashrc to take into account all these new alternatives where necessary, as well as fixing up some other default behaviours.
That was definitely fun. I've learnt the deprecated way of handling UTF-8 conversion in vanilla C++ too (2025-09-16 edit: Changed to use codecvt_utf8_utf16 to handle Unicode strings that span both the BMP and SMP---using only codecvt_utf8 means breakage when an emoji like 🍔 shows up in the string):
#include <iostream>
#include <string>
#include <locale>
#include <codecvt>

std::wstring_convert<
  std::codecvt_utf8_utf16<wchar_t>, wchar_t> converter;
.
.
.
int main (int argc, char *argv[]) {
  for (int i = 1; i < argc; i++) {
    std::wstring s(converter.from_bytes(argv[i]));
    std::cout << converter.to_bytes(s) << std::endl;
  }
}
It's deprecated in the sense that std::codecvt_utf8 is basically slated for removal in C++26. What a bummer.

But for now, it will do what I want it to do, which is good enough.

------

The Lord of the Rings trilogy---it's nice to re-watch them again. I miss that adventure story feel, and the re-watch is a nice trip down nostalgia. There's also the start of Phase 3 of the Marvel Cinematic Universe, and that will take a while to go through.

Binge-watching films [at 1.5× speed] is a new past time/relaxation protocol that I am taking part in. Maybe it's because I'm currently reading too many heavy-weight books (between Fruits Basket, A Critical History of New Music in China, and HBR's 10 Must Reads Ultimate Boxed Set (14 Books), I'm looking at around 9.4k pages of stuff to read, and that's not counting the ESV study bible).

I recently got hold of The Complete Guide to the Flute and Piccolo (2nd Edition) by J. James Phelan and Lillian Burkart, one of the ``crown jewels'' of flute mechanics/acoustics theory. Nice book---I'm almost done with it, and am likely to just carry it along to finish up on my commute.

------

I've started back on Persona 5 Royal. I realised that past-MT has set up his team enough that we can immediately go into Sae's palace without having to do any more preparation work, which was cool. The flow is starting to return, and I am enjoying myself again.

I also ``completed'' Beltmatic, a factory-esque game that involved numbers (kind of like Factorio, or even shapez or shapez 2). I say ``completed'' because I was just referring to the Steam achievements, which provide a good enough measurement of progression. Like many of these games, one can go on into ``forever'' with no true end in sight.

But sometimes, the factory has reached its full amount of fun that it can have, and should be retired, and without even starting a new game.

I know of Silksong, but I'm not sure if I ever want to play it myself. I didn't complete Hollow Knight, the predecessor to this game, and from what I've heard, Silksong is just harder than the original game. Besides, I get to watch Tenma Maemi's playthrough the whole game, which I think is good enough.

And no, I don't watch it real-time---VOD, and at 3× speed.

Maybe I might get Silksong when I feel like I have the time to play it (and the money---it's getting a little tight with the focus on food that I have been doing, leading to that weight gain).

------

And I think that's about it for recall. Till the next update.

Thursday, June 26, 2025

Recovering from Missing Beyond Compare 5 UI

Just a quick note on how to resolve an oddity.

I used Beyond Compare 5 to compare two 2.8 GB files, and when I was done, I closed the application.

Then later on, when I tried opening the application again, it ran due to the process being seen in Task Manager, but the UI was nowhere to be found.

I tried rebooting Windows 11, didn't fix it.

I tried uninstalling and then reinstalling Beyond Compare 5, didn't fix it.

What helped with the recovery was this:
  1. Pull up a command line prompt from within where Beyond Compare 5 was installed.
  2. Execute:
    BCompare.exe /solo /edit
    This pulls up the text edit window of Beyond Compare 5.
  3. From the opened window, pull up a new session.
  4. Save the workspace (name it anything), and then close the application.
Subsequently, activating Beyond Compare 5 was like normal.

Why this happened in the first place? No idea---might be a corrupted state of the UI when it was dealing with the difference of two rather large files [in binary].

Why this could fix? No idea too---but most likely the built-in text editor is a different code path that bypasses that corrupted state processing that stopped the loading of the UI, which allowed the corrupted state to be fixed through the series of arcane steps.

Hopefully this is useful, but I doubt it. Unlike the era of the Neverwinter Nights 2 Texture Bug, modern incarnations of search engines are more like ad-generating machines with additional uncurated/unstantiated AI-generated stuff.

In other words, this is likely to be buried.

And that's the quick note.

Saturday, May 31, 2025

Big Badda Bang of Words

Ah... end of the week. Final-fucking-ly. The week has been long, for a variety of reasons that I will not go into, because it is (1) boring for most people; and (2) involves too any ``other people'' that it really isn't about me any more.

Instead, let's talk about some accumulated things that I had done.

Not too long ago, I learnt about some new HTTP headers needed for security, along with an online tool to test them. The idea behind these ``security headers'' is to provide server-centric instructions to the client browser to ``know'' what kinds of content (static or executable) are to be considered legitimate from the perspective of the server that the client is connecting to. This is the missing information link that is needed to prevent the class of exploits that starts with a man-in-the-middle (MITM) attack, which includes drive-by malware downloads, page hijacking to siphon off user input (and therefore information). It is an explicit white-list to the client on what the server knows as resources/actions that it needs that the client should pay attention to, ignoring/stopping any that do not follow that whitelist.

Intrigued, I tried setting it up on my personal domain. The HTTP headers were created in a no-brainer way, but the behaviours that they created... broke lots of things.

For starters, there is now a strict segregation of the presentation layer (i.e. the HTML and CSS stuff) from the controller layer (i.e. any executable code, often in the form of JavaScript). One can no longer use the on* family of attributes within the HTML tags to create callbacks for specific actions (notably in my case, the onClick, onChange, and onLoad actions).

That broke enough stuff that I had to rewrite my website to do that, and boy did that take a while.

Also, even in the presentation layer, there was a strict enforcement of splitting out the semi-structured layer from the styling layer (i.e. HTML files cannot have embedded CSS styles, no matter how small, nor when they were inserted (like in original HTML file, or as part of some DOM-tree shenanigans)). It wasn't difficult; it was more annoying than anything else.

But after all that effort, my website works well now, and you can verify the Security Headers with the link.

The eagle-eyed will notice that the new pages no longer have referrals to the CSS/HTML validation links. That's because one of the security headers basically blocks the passing of the forwarding page's URL to the forwarded to URL, which made such validation links impossible to operate in the client browser.

My chief constraint is that I have very little control over how to configure the website server program, so I had to do what I had to do just to keep the 'net gatekeepers happy. Like how I ended up creating a damn sitemap, and having to do up an entire toolchain that minifies and GZips individual pages, all because the damn gatekeeprs of the 'net these days state that all websites are clearly meant for machine-to-machine communication, so the sources of the pages themselves should be mangled for efficient machine-to-machine communication, as opposed to something that is human readable (and therefore learnable from).

Man, the ways of the 'net have changed drastically over the past 25 years.

------

I have the ESV Study Bible in hard copy for a few years now, and have wanted to grind through it slowly but surely as part of my own education on my faith. It's not my first time through the Bible (according to my own loose tracking, I've covered the Bible end-to-end two full times by now). But one of the biggest problems was that the book was an inch thick, and has terrible portability, despite it being the ``personal edition'' and having the general dimensions (not counting the thickness) of an A5 sheet of paper.

An e-book version would work wonders on the portability front.

Crossway has it. Unfortunately, it is terrible to use.

You see, unlike the deadtree version where the ESV text sits in the upper half of the page, and the extensive study notes sit as end notes in the bottom half, the official e-book version treats it like a hypertext document with oversized text, where the footnotes are replaced with links that jump to a completely different part of the binary file, and after a few such jumps, being lost becomes the regular state of things, made worse by being on an e-reader like the Kindle [Colorsoft].

In short, the official e-book sucks.

I had been patiently looking to see if there was a version of the ESV Study Bible that was just a straightforward digitisation of the printed version, with all the information where they are, without having to jump all over the place like a punch drunk monkey.

Let's just say my patience paid off and I got ahold of such a version. There was a problem with the images that made up each scanned page---there was a very strong unsaturated red tinge that made the text contrast terrible.

Ignoring lots of [necessary] intermediate steps, I managed to fix the contrast problem at the image level with the following ImageMagick miniscript/command:
find -type f -iname '*.jpg' \
  -exec magick {} -separate -contrast-stretch 0.5%x66% \
  -combine {}_out.jpg \;
So what this does is that it uses the find command to locate all the image files, and then apply the ``auto-leveller'' on each channel separately, allowing up to 0.5% of the pixels to go ``black'', and up to 66% of the pixels to go ``white''. The 66% is empirically determined through checking the output---the idea is that we want the ``background'' colour of the page to have its unsaturated red plus bleedthrough from the other side's text to ``go away'' (the actual paper is thin enough that there is some bleedthrough in real-life, which of course meant that the scan would yield the same problem, decreasing legibility).

I had tried ImageMagick's -auto-level option before, but it did nothing to the contrast. Using the alternative of
magick {} -colorspace Lab -channel 0 \
  -auto-level +channel -colorspace sRGB {}_out.jpg
brightened the contrast, but did not remove the unsaturated red tinge much. It was only after applying the final incantation I specified in the beginning that I saw results.

And the results were dramatic (I'm not showing them here for obvious reasons), and after running the images through an older version of KCC (I used 7.2.0 instead of whatever is there now because the 7.3.x series broke many things), I had something that worked wonderfully on Eirian-VI, my Kindle Colorsoft. In this case, I needed the colour ability of Eirian-VI since colour is used quite extensively as highlights, and for specific diagrams/illustrations within the ESV Study Bible to explain core concepts.

I said that I left out some necessary intermediate steps. They weren't the focus of this discovery, but were needed because magick could not work on the source file directly to generate the type of output needed. I used an updated version of pypdf that needed pillow, which demanded that one does not update one's Cygwin Python3 installation to 3.12, because it messes the hell out of the dependency availability from the mish-mash of libraries under the default 3.9 and newer 3.12.

------

The stupid thing I bought finally showed up yesterday. It was, as they say in Chinese, 又贵又重. Shipping was a bitch, and product delivery took a while.

But it finally arrived.

First impressions: yep, it is as it says on the box---a fucking heavy cup. To ensure that it could have the 10 kg mass, the cup's diameter was large enough to quality as a mug, but its depth was shallow enough that the total volume was still cup-sized. In essence, it was like a bowl with a really extended and heavy-af bassbase. I currently cannot lift it one-handed, and am not expected to do this any time soon. I can also see a litany of overuse injuries in the near future as my deltoids and parts of my pectorals get continually hurt from moving this even as they are healing from their own weakness.

It was as stupid as it gets, and I love it.

I also got the 0.5 lb stainless steel shotglasses (are they still considered shotglasses despite being made of not-glass?), originally three (one for me, two for CP/Elain), but they upped it to four when my order was delayed enough that they graciously upgraded it to their 4-for-3 promotion.

That shotglass(?) felt nice to hold and drink from. There was no ``metallic'' flavour that one might think something like this would have, but then again, after having eaten out of stainless steel plates and cutlery, there was never a real ``metallic'' flavour to begin with.

For both, I would suggest scrubbing the interior a little more thoroughly before using them as a matter of course.

------

I watch lots of VTubers, so many to the point that 8 regular hours a day cannot be enough. So I watch them at 2.5× speed, which is a speed that the observant will realise to be impossible from both the network bandwidth, and web-client viewer perspective.

The answer is yt-dlp. That's all I'll say about this part.

The other parts start with the statement that for the sake of my network, I don't usually need to watch things at 1080+p, for the reason that the video often runs on the vertically aligned screen.

This means that the maximum width of the video that I will be watching, tends to be limited by 1080 px horizontally.

Mathing it with the usual 16:9 ratio of today, this works out to something like 608 px vertically.

YouTube doesn't have anything at 608p, but they do have 480p, which is the resolution that I often watch my videos in. Automatically upscaling it in VLC media player has some blurriness, but throwing in small amount of sharpen filter, it works well enough.

That is, until the game that the VTuber is playing has lots of words (not a secret: am referring to Blue Prince). The encoding at 480p from YouTube tends not to do well with text, and it was getting a little... more frustrating to follow.

The magic is to recode it to 480p using better settings than whatever was used when YouTube was transcoding the source to the different bitrates.

The incantation used looks like:
ffmpeg -i inputfile \
  -vf "scale=-1:480" -c:v h264_nvenc -crf 23 \
  -c:a copy \
  outputfile_480p.mp4
The only reason why I thought this was viable was that the encoder could make use of the NVIDIA graphics card that Eileen-III had (RTX 4090). I didn't try to encode without the h264_nvenc option, seeing that using it meant that it still took time to re-encode the video part.

``Why not just use the source resolution/bit rate and downsample?''

Well... it's slow and doesn't do as good a job as re-encoding. There's also the side issue of avoiding the integrated graphics card [doing the decoding when I'm watching it] from grinding through too many pixels only to discard more than two thirds of them to fit into 1080×608, and end up with a blurry mess due to the lack of access to the kinds of advanced filters that re-encoding can provide.

------

The last thing to bitchtalk about is the trend of ``oh if you see em-dashes in a text, it is 100% AI generated''. Related to that is ``if the AI detector detects that a paragraph of text is AI generated, it is 100% correct''.

On item 1, that's just a lazy way of looking at things. I mean, come on---if you look at this blog, almost all my posts have em-dashes rendered in. I use them extensively, though to be fair, I don't actually type the emdash as is---I type it out LaTeX style as ---, and rely on my pretty-printer to render it as an em-dash.

Which segues into item 2. It seems that ``AI detectors'' these days seem better at estimating the quality of a piece of writing with respect to grammar and diction than to truly ``detect'' the use of [generative] AI.

What I am trying to get at is, just because ``you'' suck at writing doesn't mean that any piece of writing that doesn't suck is ``generative AI'' just because ``you'' cannot write well enough. And if life in the modern world is anything to live by, is that anyone who points fingers and claims that someone else is displaying the qualities consistent with some thing of meta-variable-X, it is more likely than not a projection of the accuser who actually is the thing of meta-variable-X.

And that's about it for this update. Till the next one.

Friday, April 04, 2025

Musician Earplugs

Response to a post on Flute Forum about visiting an ENT for hearing test & exam, and asking about suggestions/thoughts on earplugs:
Since you are going to the ENT, I suggest getting a referral to an audiologist to do a proper mould of your ear canal for your earplugs. At least in my part of the world, the person making those moulds for earplugs and the doctor are not the same people.

Consider getting one where you can change the flat-frequency response filters. I use the -25dB ones when playing piccolo and high dizi, and they work well. I think there's also -10dB and -15dB as well, but I've not used them personally.

Usually only the right ear needs the heavier protection, and that changeable filter set up means that you can tweak what you use on your left ear if you are finding it tough to hear through it with the same -25dB filters.

Speech is always a little harder to understand when people speak normally, because you are attenuating them by at least 10dB, roughly the same difference between whispering and talking normally (apparent loudness).

Hope these help!
That last part is something that I only realised recently, when Elicia (who plays the sheng) was trying to talk to me in a whisper when I had both ears shoved in with my -25dB musician ear plugs---I couldn't hear shit. Because a 25dB difference is akin to the difference between a whisper and a shouting match, and so when she was whispering, I definitely couldn't hear shit.

Interesting how it sometimes takes a little real-world experience and thinking in order to realise something.

Saturday, February 22, 2025

Science... Again?

In response to Acoustics Research is Insufficient by Jeff Dening on the flute forums:
My day job is tangential to research, and I appreciate the effort you've gone into trying to explain this so that it is easier to understand/appreciate by the community here. Thank you!

I think the central thesis can be summarised as "confusing the map for the territory".

Science provides a guide into the natural world, but as all guides go, they have specific assumptions (implicit and explicit), and are particularly narrow in what they test, and the definitions they use for certain things.

Science never delivers "truth" with the kind of absolute certainty that people yearn, yet they keep trying to make science say something it really doesn't.

Here was where I wanted to say that people with a wrong map will just shrug and then adapt to the territory they observe, but we've heard of people who just blindly follow their GPSr and drive off half-finished bridges, so... 🤷

That said, the stakes are a tad lower in music (bruised egos and busted wallets notwithstanding), but this phenomenon of misinterpretation of what science does and does not say is a real problem elsewhere in society.

The other thing that I would add is that I am certain that there are definitely very good, well-controlled science going on fo the acoustics of flute. However, it is the makers themselves who have that -- after all, to know the behaviour of a change in one of their parameters for their flute means that they can fine-tune and control the quality of their instruments (part of R&D). But good luck trying to get hold of that information -- it _is_ a trade secret after all.

Maybe having an article written by a respected member of the community might make it more palatable for folks to grok things.
To me, this is an actual problem. Science education back in my day had the following progression (from primary all the way to junior college):
  1. List of ``scientific'' facts;
  2. List of equations primarily centred around Netwonian Physics;
  3. Baby's first quantum mechanics theory equations (photoelectric effect);
  4. Special relativity (Lorentz factor corrections)(?).
Now, to be fair, I have a strong physics slant because after secondary school, I didn't touch chemistry nor biology as a whole. But even then, the kind of ``science'' that we learnt was still focused on remembering what was the orthodox (or ``right'') model/equation to use to solve the often classical physics-based problems.

Inequalities hardly play a role. Not as ``certain'' as the way regular equations can yield numbers (first time that an infinite number of solutions can appear). Field equations are a no-no---matrix and tensor math was not part of the syllabus.

But more importantly, to keep within what can be effectively ``taught'', the developmental process from one model to the next was not as heavily emphasised as the ability to read a story problem, pick the right set of equations, and run the algebra to the end.

While it looks like this is a sign of ``good'' education (everyone can cite the four kinematics equations [of classical physics]; huzzah!), I think that it is a central reason why we have this misinformation crisis that is still ongoing.

When science does not have the ``and a new model came up because they found that the existing one couldn't explain everything'' part emphasised, there is a tendency for people to doggedly believe that science is infallible, or more precisely, the scientific ``facts'' that they learnt back in school some twenty or more years ago was the most correct, while being unsystematically suspicious of all the ``new'' science that is showing up that contradicted their previous assumptions.

Spoiler alert: almost all new science must contradict some aspect of the previous assumptions as that is how the old models (and facts derived from said models) are shown to be incomplete (i.e. wrong outside of the original circumstances, but are starting to become important), or downright wrong (i.e. replication attempts failed, or when data fraud is detected).

Math education is a little less susceptible to that, because at the junior college level, proofs are introduced into the picture. And I don't mean the ``trigonometric proof'' style of pattern matching and transformation in between equations---I mean using an actual proof technique, like mathematical induction. But it still fails in some way because these things came about really late in the math pedagogy---most people operating in society are probably stuck with secondary school math (i.e. differential calculus) at the very most.

Tangents aside, all that unwavering faith that the science [``fact''] that one knows is troubling---that's not the mentality of someone who understands that science is merely the current best known approximation of reality, and is not the final word the way the Bible is for spiritual matters.

And that's the battlecry: ``Defund the ${scientific-foundation-of-the-week} because ${pet-peeve-of-the-week} contradicts ${older-scientific-"facts"} and is therefore wrong!''

Frankly, this is just one of those days where maybe having a benevolent dictator instead of giving people the voice is felt as the right thing to do.

Damn. The weekend barely started, and I'm already tired as hell.

Till the next update.

Saturday, February 08, 2025

Unbotched(?)

Ah... okay, let's start with the good news: Ma's machine is finally working. The updated bill of parts:
DescriptionPrice
Gigabyte B760M DS3H AX DDR4 + Core i5-14400 (μATX) bundleSGD 492
Seasonic PRIME GX-650, 650W 80+ GoldSGD 250
Samsung 990 EVO Plus NVMe M.2 SSD 1TBSGD 159
TotalSGD 901
In short, I hardly saved any money compared to what I previously spent to build the previous version. What I didn't save in money, I saved in some time with data migration. And the amount stated here didn't take into account the taxi fare, and the additional thumb drive that I had to get for Xubuntu installation because my old ones were broken.

So, what went wrong?

I think that m.2 slot with the ``thermal guard'' is borked. In a previous post, I talked about how I broke the NVMe drive that held the operating system of the previous machine. This time, I was smart enough to remove the stickers and what not before slotting it in. It all worked, that is, until I assembled it back together and put it into its stand.

In which case it did not work.

That was back in 2025-01-24, the same day I bought the new SSD.

Due to Chinese New Year nonsense, the machine had to be put away during the visitation season, and it is only today that I could bring myself to do something about it. I tried turning it on as is, hoping that it settled long enough to self-fix---no luck. I reopened everything up, and switched out the SSD to the other m.2 slot without the ``thermal guard'', and what do you know, the fucking thing worked.

Hallelujah!

There's one other oddity left though---the machine can handle cold boots. But throw in a reboot, and it gets stuck in POST.

Why is it so, I haven't the foggiest clue, and am honestly tired af to deal with that shit. I'm just happy that Ma's got a machine back where she can use to watch her streaming video, where the whole privacy situation is more controlled than the household ``smart TV''.

------

Grim Dawn has had quite a big mechanics update---there is a new innate ability to dash in the direction of facing via a key press (defaults to the spacebar with the keyboard+mouse control scheme), and the mana/health potions have been replaced with spells that have time-out instead.

Oh, and they have a new expansion planned too.

I just want to point out that Grim Dawn has been around since 2016, and they are probably rivalling Terraria (2011), and Minecraft (2011) for ``labour of love'' status.

The funny thing about Grim Dawn is that each time after the first playthrough that I look at Path of Exile or more recently at the early access of Path of Exile 2 and wonder if I want to get onto that bandwagon, I just turn back to Grim Dawn instead.

Now, prior to this, my guilty pleasure was Torchlight II. According to Steam, the last time I played it was back in 2018. I suppose I did play the crap out of the game, even buying it for folks too. No idea why I stopped---am going to load it up again to give it a go.

------

Well, apart from that, I must add that I have been having fun with Eirian-VI. Some important points that I learnt:
  1. Colour mode works only for native e-book formats (the one I used was .mobi);
  2. Comics purchased from Amazon that refused to be installable on the grayscale Kindles could be downloaded to the Colorsoft;
  3. PDFs, when converted by Calibre directly to .mobi, look like shit unless each page is rasterised;
  4. Use pdfcrop, then use -sDevice=pdfimage24 in Ghostscript before converting to .mobi via Calibre yields the best viewing result (metadata is still shit).
So with all these in mind, do I recommend the Kindle Colorsoft?

Sure, why not? The fast refresh rate, and generally improved responses are always a plus, as is the high resolution that is available. Colour availability is a bonus, and for the most part, shouldn't really be an issue. Most people do not follow my predilection of using PDFs for readables---they tend to use EPUB, and rely heavily on the Kindle ecosystem (i.e. using ``Send to Kindle'' to do the necessary conversions as opposed to man-handling stuff with Calibre). So for them, they are less likely to face the kind of issues that I am.

And that's about it for now. Till the next update.

Edit: So I found out why I stopped playing Torchlight II---I literally ran out of things to do. The gameplay was fun for its time, but eventually the strategic depth was just insufficient to sustain more than the 315+hrs that I had put in across the 4 different classes. Grim Dawn will have nearly 45 different classes that come from pairwise combinations of soon-to-be 10 masteries, and then there's the whole sub-field of Devotion.

Monday, January 20, 2025

Botch Up

Man... I really botched it. So I went to get the parts needed to rebuild Ma's computer, and here was what I got:
DescriptionPrice
Gigabyte B760M DS3H AX DDR4 + Core i5-14400 (μATX) bundleSGD 492
Seasonic PRIME GX-650, 650W 80+ GoldSGD 250
TotalSGD 742
So problem #1 was spending SGD 250 for a new PSU. Granted, this was supposed to last for 12 years compared to the 4 for the original, so it's sort of acceptable (which explains why I bought it).

What I really botched up was the installation of the NVMe drive (the re-used Seagate Barracuda 510 (256GB)).

I installed it into the mobo, and put on the heat spreader, being careful to remove the liner on the cooling pad, but forgot to remove all the bloody stickers on the chips on the drive itself.

So it all booted and worked for a glorious five to ten minutes, before having drive read fails due to the chip being scrambled from the heat.

🤦

Now, that just means that the boot drive is gone. We have a spinny rust left, and that had been mapped to /home in the original machine. So it's just a matter of adjusting the mount-points, and loading a new operating system into it. Easy peasy, right?

Except all my USB thumbdrives are so old that they cannot be reformatted properly by Rufus to create the necessary boot medium. There were write errors, and other bullshit.

🤦🤦

So I was just this close to finishing the build, but thanks to my initial botch up, it is snowballing away. To continue on the plan, I will need to get a new USB thumb drive (I should be doing this anyway), and depending on how I want to play it, maybe another m.2 NVMe SSD drive for boot (this is costing money, and I'm already close to hitting the original SGD 999 amount spent, despite reusing parts).

But I'm likely to do this not over tomorrow through Thursday, because I have plans™.

That's all [that I can write here] for today. Till the next update.

Friday, January 17, 2025

Junker Flute

In response to an anonymous participant on Flute Forum seeking affirmation for using a ``cheap piccolo off Amazon'' for one ensemble class while being a flute major:
Friend, do what you have to specific for your circumstance. I sure as hell won't judge you.

Just because almost everyone condemns "musical instruments off Amazon" here doesn't mean that you cannot buy from there and use it.

``Buy a second hand {insert-flute-brand-here}!'' is also another common call for action.

They aren't wrong, when looked from the perspective of longevity of use of the instrument.

But time is money. Looking for a second hand flute (or piccolo in your case) can take time, and a bit of luck, compared to the guaranteed delivery dates from Amazon. And sometimes, you just need it right now, and you also don't know if it is something you want to spend the extra effort for right in the beginning for commitment.

As long as you are well aware of what you are buying, and the limits of what these instruments can and cannot do, I don't think it matters. Just leave your ego at the door and enjoy the music making process.

If you are playing it often enough that the flaws are more obvious to you, and are hampering you actively, you will know that you definitely need to get a better instrument, and thus should spend that time/effort to get something better.

As some wise person on the 'net once said: ``I'll buy a cheap tool to start with, and if it breaks, it means that I use it often enough that I should get a better one.''

And for the record, I survived two years of marching band in University playing on a 200-dollar Amazon flute. I sat directly in front of the band director, and he has never complained about intonation nor dynamics from me.
Just a little back story---actually true on the bit on playing in the Kiltie Band out in CMU on a 200-dollar Amazon flute. I first bought a C-foot flute, and later on, a B-foot one. The C-foot one went with me to march into the snow and what-not, and it did surprisingly well, given its pedigree.

It's not a good flute in terms of maintenance for sure, with even Chara voicing out when she returned them to me after I loaned it to her to practise flute adjustments as junkers of little consequence (I have Azumi and Aurelia by then, so the Amazon flutes are effectively retired).

But between no flute and cheap ``junker'' flute, sometimes the ``junker'' flute is the better option. I won't say much about dizi, but for concert flutes, the dimensions have been well established for a century by now, and anyone with half a decent manufacturing process who can follow the schema can make a flute that plays... well like a flute.

Not like a good flute for sure, but definitely as a flute.

And I do not disagree with everyone else---junker flutes are not something one wants to hold on to as their ``forever flute'', but they can be a cheaper gamble than tossing three times more plus extra time to get a higher quality starter flute, at a moment in time where either one is desperate to have some flute, or when their commitment to a flute hasn't been confirmed.

That bit of leaving the ego, also true. Musicians are among the most egotistical people on the planet, and that's fine. And sometimes that ego gets in the way of their problem solving abilities. Knowing when to hold that ego, and when to drop it is something that everyone (including musicians) will need to learn at some point.

------

Anyway, now marks the start of ``i'm-forty-bitches'' week. Naturally, it begins with some messed up upper respiratory tract infection.

🥴

Balls.

Till the next update.

Saturday, December 07, 2024

See? This is Why You Should Save Your Work, No Matter How Temporary

See, the one time I didn't save an intermediate copy of my blog entry on Q10, was the one time Q10 decided to crash and take away the five hundred words.

Well anyway, I'll just speedrun the contents and skip the nuance.

I am/was down in the dumps; week's been long with having to deal with too many people; I hate myself but seeing that past-me gave present-me a chance to thrive, I will extend the good deed to future-me and not do anything utterly stupid; I think I'm a problem-solver type, and suspect that am not ``lovable'' since there isn't anything seemingly emotionally/relationally related to being a problem-solver; Love Hina is sad and isn't some taboo erotica that ought to be banned back when it was still in circulation.

Okay, and now on to something that wasn't wiped out in the crash.

I just got a carbon fibre instrument stand for The Big Flute. The difference was... it was 0.6 kg for the new stand versus 3.2 kg for the old one, all without feeling unstable as fuck even as the 4.6 kg mass of The Big Flute was resting on it. And that does not take into account the more compact for factor as well (tubes with some seemingly 3D-printed joint-blocks and neodymium magnets for holding things in place).

I had also sprung for a carbon fibre case for The Big Flute to replace the current wooden one. The mass difference there should be about 2.3 kg versus 5.7 kg. This means that the total mass of things that I need to lug around is now just 6.9 kg, versus 13.5 kg that I am currently doing for instrument + case + stand. It doesn't sound like much, especially considering that the new carbon fibre case + stand costs nearly a quarter of the MSRP of The Big Flute, but when the volume is taken into account, it is just that much more compact that it makes it worth the while.

Because with this new set up, I can move more easily, without ever feeling nor looking clunky. And this can open up new avenues, especially if something else pans out.

But the case isn't coming in till 2025-02 or so, and we'll just have to wait till then.

Meanwhile, I don't really have much else to talk about, so till the next update.

Monday, September 16, 2024

QCUE Pairing Issues Resolved?

That was... harrowing.

tl;dr: If QCUE isn't willing to pair via Bluetooth, even after factory resetting, then the only way out is to drain the batteries of the two earbuds completely, shove them one by one into the case to check for connectivity, before trying to pair again through the ``normal process'' of holding the back button with the case open till the blue-light blinks.

Context: I bought me some Bose QuietComfort Ultra Earbuds (QCUE) a few months back on a whim to replace the now-broken third pair of the Bose QuietComfort 20 noise cancelling in-ear headphones (QC20). The key difference was that the new QCUE were wireless, as compared to the QC20.

The reason why I said ``on a whim'' was because I already lug around a QuietComfort 35 Wireless Headphones II (QC35II) to replace the QC20, which is wireless and does its job well. Except for the fact that in SIN city, the high humidity and high temperature meant that wearing these over-the-ears headphones for long periods of time was... uncomfortable at best. I still use these for all the various teleconferencing meetings due to the excellent sound isolation (we used to call 'em ``Skyping'' back in the day), but very rarely use them for casual music listening on the go.

And thus, the QCUE is a thing now.

I recently switched phones to the Xiaomi 14 from my Xiaomi 12. Had I a choice, I wouldn't even bother, but since the replacement of the non-working screen of my Xiaomi 12 back in late 2024-06 (was it only less than 3 months ago?!), I knew that the days of my Xiaomi 12 was numbered. Thanks to the myriad of 2FA and other ``app-fication'', the stupid ``smartphone'' has become a piece of critical equipment. As for my Xiaomi 12, the rear-backing was starting to show signs of the glue [from the repair] failing, and I did not want to repeat the same scramble for a fix, this time from potentially greater failure.

And so I went to get that replacement.

``MT, you're long-winded--get to the point!''

I'm getting there. I migrated the information and apps from Xiaomi 12 to Xiaomi 14 (bye bye Geocache Calculator and Barcode Scanner, no thanks to Android 14 and beyond auto-blocking apps targeting old-enough versions of Android).

And then I tried to reconnect my QCUE. Which was what prompted the first statement.

I tried everything---clearing all the Bluetooth lists, resetting the QCUE, resetting the phone's network connections, factory resetting the QCUE, re-do all the steps a few more times.

It didn't work.

That is, until I saw this innocuous comment:
I got the same issue and got to fix it by draining the whole battery of the earbuds, waiting about half an hour more and then charging them again

---Tyras25
Well, that's the one thing I hadn't tried, and so I left out my QCUE for a day and change. It took much longer due to not having any existing connection to tap into to drain the power faster.

And when I finally found that both earbuds are completely drained of power (can tell because the welcome ``vrroomsh'' sound was missing when the earbud was applied to the ear), I pencilled the three contact points per earbud, and put each earbud one at a time into the case, to ensure that it was in good contact before putting in the next.

Then I applied the pairing process with my Xiaomi 14.

Whaddaya know. The pairing was successful!

I did the same for Eileen-III, same.

Now, I still need to verify that the QCUE can actually receive the sound signals, but I cannot do that just yet due to the earbuds being completely drained of power.

But having the pairing working is already a great win.

As a side note, there was also an unknown BT 600 device ID that was emitted by my QCUE---I wonder if this is significant in any way about why the pairing was jank.

And apart from the nugget that saved me, here's the rest of the thread which has other useful information. For how long Reddit will be around for such things to be in existence, is something that only time will tell.

Till the next update.