Mastering absolute/relative file path conversions in Pascal in a cross-platform way

In this post, I'll discuss how to handle file paths in Pascal in a cross-platform manner. I have newly written the following functions, because I often encountered problems with the Delphi and FreePascal own appropriate functions in terms of cross-platform difficulties. So I reinvented the wheel out of necessity, but for the cross-platform special case, where each build variant must also support the each other path convention. Specifically, I'll focus on converting between relative and absolute paths, expanding relative paths, including handling UNC paths and so on. I'll also provide an in-depth analysis of each function, detailing the logic and edge cases they handle. So, let's get started.

IsPathSeparator

The IsPathSeparator function checks if a character is a path separator. It considers '/' and '\' as path separators. This fundamental function forms the basis for parsing the paths in the following functions, and is crucial for ensuring cross-platform compatibility. It's implemented as a function rather … (read more)

Vulkan memory management in PasVulkan

Memory management in Vulkan is a complex and intricate process that gives developers control over how graphics memory is allocated and used. The primary principle of Vulkan’s memory management is that it offers a lower-level interface to the GPU than APIs like OpenGL, entrusting developers with the responsibility of managing memory allocations themselves. This can lead to more efficient use of memory and enhanced performance, but it also necessitates a deeper understanding of how the GPU operates and the optimal way to manage its resources.

In Vulkan, memory is organized in a hierarchy that includes heaps, memory types, and memory property flags. Heaps are fixed-size memory resources exposed by the device, and each heap can support different memory types. When creating a resource like a buffer, Vulkan provides information about which memory types are compatible with that resource. Depending on the resource’s usage flags, the developer must select the right memory type and, based on that type, the … (read more)

Why Object Pascal is More Than Meets the Eye: Exploring the Power and Versatility of Delphi and FreePascal

1. About Object Pascal

If you aren't familiar with Object Pascal, you might not know that it's been around for decades - and it's still going strong. Object Pascal is a programming language evolved from Pascal that has been used to create a variety of software applications, including desktop and mobile apps, as well as games. Despite its capabilities, many developers and programmers tend to regard Object Pascal as an inferior language, and it is often the subject of jokes and ridicule.

2. Reasons why Object Pascal is seen as inferior

One of the main reasons that Object Pascal is seen as inferior is that it is not as widely used as other languages, such as C, C++, Rust and so on. This lack of popularity can make it difficult for developers to find resources and support when working with Object Pascal, which can be frustrating and time-consuming.

Another reason that Object Pascal is often criticized is that it is associated with older, legacy systems. Many developers view Object Pascal as a "dated" language that … (read more)

Approaches for timing in digital audio workstations (DAWs)

Today I want to write something about my still not released Digital Audio Workstation (DAW), namely about the timing within such a Digital Audio Workstation (DAW). 

Two approaches for timing in digital audio workstations (DAWs), at least as I have implemented them myself, are "MIDI-Time-Interval-per-Sample" and "Sample-Interval-per-MIDI-Time". 

The first "MIDI-Time-Interval-per-Sample" approach uses a 32.32bit fixed-point (with 64.64bit precalculations of some constants) value to represent the interval of MIDI time units per sample. It tracks the accumulated MIDI time by adding this interval to an accumulator for each sample processed. When the accumulator reaches a certain threshold, a MIDI event is processed and the accumulator is updated. With this approach it is also possible to determine a fractitional portion of the MIDI time unit, which can then be used for even more precise automation interpolation, for example.

The second "Sample-Interval-per-MIDI-Time" approach uses also a 32.32bit fixed-point … (read more)

Mistaken my identity on Twitter and the resulting harassment outside Twitter

To those who actually want to follow @coder.sara on Instagram and/ior Twitter. I am not he/she, Twitter seems to misinterpret @coder.sara as @coder . So for the clarification: I have nothing to do with this crytocurrency scammer and nothing to do with crytocurrency in general as I myself am very critical of these. Twitter should fix the handle-parsing, so it doesn't interfere with points/dots (@coder.sara <=> @coder ). 

As a result, among others, a female person from Italy (according to her Twitter profile) contacted me by email, where she found the email maybe by reverse searching my Twitter handle. She seem to have lost money at a crypto scam. At least she is now insulting and threatening me (though I'm the wrong person and not the scammer), even still after I tried to enlighten her about the identity confusion due to Twitter's incompetence. But no chance, she apparently wants to report me at the police now. For my part, my own report has already been filed. 

I had really tried to clarify her friendly, but … (read more)

The problems with the Intel Iris Xe (i)GPU archiecture in connection with USB-C and Thunderbolt docking stations.

I bought a new notebook (a gaming Asus TUF Dash F15 notebook, which I want to use as a workstation notebook), which also has an Intel Iris Xe iGPU (alongside an NVIDIA Geforce RTX3070). And that has exactly the same problems as my Samsung Galaxy Book Pro (also with Iris Xe iGPU) with USB-C and Thunderbolt docks with external monitors, with random dropouts and display timing mismatch problem. So there seems to be a general problem with the new Intel Iris Xe GPU architecture regarding the DisplayPort protocol over USB-C and Thunderbolt. Because I have six different USB-C and Thunderbolt docks, and with all of them the problems occur with these two different notebooks, each with an Intel Iris Xe (i)GPU. And of course, I've also tested through different cables and as well as different monitors, with absolutely no improvement. 

My new Samsung Galaxy Book Pro 13

I now have a Samsung Galaxy Book Pro 13 which weights only 868 grams. Unfortunately it‘s only the variant with the i5 and soldered 8GB RAM, because the variant with the i7 and 16GB RAM is no longer available and even nowhere in stock in the German DACH area. But I have already planned a BGA soldering upgrade to 16GB or even 32GB RAM by an expert in the field, where I am currently looking for someone who can do this for me. That means desoldering the old LPDDR4X RAM chips and soldering the new LPDDR4X RAM chips. Unfortunately BGA soldering is only possible with a professional infrared soldering device and the required skills to handle the soldering on the small scale of the chips. 

At the very least, the Samsung Galaxy Book with the i5-1135G7 beats my Thinkpad T480 with the i5 8250u and 32GB of RAM hands down in plain CPU performance, for the simple reason that the Samsung notebook simply throttles less often, if at all, whereas the Thinkpad T480 throttles frequently, if not almost always, and that's … (read more)

PasVulkan GLTF 2.0 support progress showcase with a sample with just one draw call per frame.

Here is a small PasVulkan GLTF 2.0 support progress showcase with a sample model case, which can draw with just one Vulkan CmdDrawIndexed call per frame, although that there are several animated nodes.  



My GLTF implementation at my PasVulkan framework tries to combine everything material-wise and primitive-topology-wise so that the GPU itself can do everything necessary animation-wise (joints and morph target vertices) in one go per material/primitive-topology-group. And in my GLTF implementation, there is no real hard limit on the number of joints and morph target vertices. 

For this purpose, each vertex points to respectively two special packed linked lists (one for joints in four-packed-pairs and for morph target vertices), which are stored in Vulkan storage buffers.  Each vertex is otherwise only 64 bytes in size, even though it contains position, the complete tangent-bitangent-normal space, two texture coordinates, color value, node index, linked list pointers, flags, etc.

And next to it there is also … (read more)

A brief insight in my my singable Text-To-Speech engine

(Hint: Here in this text is the word phone the phonetic phone, and not a phone device. And please do not confuse a phonetic phone with a phonetic phoneme, which is indeed something similar to a phonetic phone)
 
Today I'm going to tell you about my singable Text-To-Speech engine, which I also integrated into my own DAW. For simplicity's sake, I will primarily explain how MIDI events become the phone information data including f0 fundamental frequency envelopes, which my implementation of the MBROLA algorithm can process directly without re-parsing. And since a company is interested in my technology, where the DAW, which is quite well known, is also implemented in Object Pascal, I will not provide a code snippet this time. Let's start with the explanation of the procedure.

The first step is to extract all lyric text MIDI events from the remaining MIDI events and put them into a separate array, where each lyric text item has three fields, a text UTF8 string, a start time position 64-bit integer and an end time … (read more)

Interval-tree-less interval search on sorted array of linked MIDI events

Today I will tell you a trick to search an linear pre-sorted array of matching linked MIDI events with an interval without using an interval tree.

Each NoteOn MIDI event has a link pointer to its next NoteOff MIDI event, and each NoteOff MIDI event has a link pointer to its previous NoteOn MIDI event. This is important, because we'll stepping back in time while the search on the base on this interlink-information.

First we'll start at the interval start time with a help of a simple binary search, traverse the array until we'll either hit the interval end time or find a interlink-connection-information for stepping back in the time as new interval start time for a new second iteration (only a single next one!) for to get the full requested interval range.

This is now described here in a very simplified way, but as code it would look like this:  https://gist.github.com/BeRo1985/3c50be6480c77dfb320c23f4d88d2f10

The piano roll editor in my DAW project is based on this interval-tree-less interval search of MIDI … (read more)