#all [RSS]
#tech #art #linux #personal #media

30.03.2023

Journey Fanart

#art

It's a fan artwork of travellers surfing on carpets (real lore) from the game Journey!

Now, this artwork is the most thought-out and the most finished one I've ever really done, as I usually end up cutting the scope of an artwork a lot. I felt both the most dissatisfied and the most happy about it. The initial sketch is like, uh, 2 years old? Yeah. I definitely was way too particular with how I drew it. While working on it very sparringly, the finish line felt to move further and further away until one evening I just sat and decided to finish it - "Whatever I end up with is final".

journey fanart

A lot of artistic choices I made here lead me to an idea of making...

...The Cutout Thingy

Look at this! I made a layered paper cutout thing. Horribly jagged edges and very desaturated print, but it exists! I will say one thing only, and it is that making this one was very theraputic and enjoyable. Honestly I wanna do more IRL stuff.

journey fanart cutout

I had some other thoughts, but, maybe next time.

10.04.2022

Speech to text diary scripts

#tech #linux

First of all, this blog post is about a somewhat specific problem. Despite this, I think it is quite useful to most readers looking for some Linux knowledge as the tools I used are very general. Let's start with the explanation of

The problem

Sometimes I have good ideas when I'm outside. Sometimes I really wanna preserve these ideas, but it's very inconvenient to use phone keyboards, especially on the move. One solution is recording my voice. But then, I would want to transfer those recordings to my computer for future reference. But what if I also want to read the text version of those voice recordings? Let's handle these problems one at a time.

Syncing files

Syncthing

Syncthing is an open source cross-platform program that can sync folders accross multiple devices. It's perfect for this problem, as it allows for P2P syncing (for example from a phone to a computer).
It's very easy to set up aswell, you download it on both devices, open a browser (Synthing has a web frontend) tab on 127.0.0.1:8384 and scan the ID QR with your phones camera. Then share whatever is the folder that has your audio recordings.

If your init system is systemd, to start synthing (and enable autostart at boot) you can run (where USER is your linux user): systemctl enable syncthing@USER.service --now Synthing has configuration options for encryption and file filtering. If you want more robust syncing, you could also host a Syncthing instance on a server.

Speech to text

To convert my speech to text I use the SpeechRecognition python package: pip install SpeechRecognition It supports many speech recognition options, including offline ones. It's also really easy to use, check my script.

Options (present in my script as comments):

There are also other online and offline options. (SpeechRecognition documentation)

Storing recorings in notes

Vimwiki

I use vimwiki vimwiki (a (neo)vim plugin) that makes managing markdown files in a wiki-like manner extremely easy. Vimwiki also has a diary option. To store the recording path and text in my notes, I wrote a few scripts.

The speech-to-diary.sh script calls the speech recognition script on a selected file, appends transcription to a vimwiki diary and (optionally) moves the voice recording to the vimwiki folder. it has a bunch of flags, you can get a help message by running: ./speech-to-diary.sh -h

The text that it puts looks like this: 20220328_162342.m4a 16:24:05
Whatever speech recognition returned
/home/tea/vimwiki/diary/resources/20220328_162342.wav
I have a vim shortcut that plays an audio file under the cursor so that I can also listen to it if the transcription is not accurate enough.

If you don't use vim or vimwiki, you can just change the last line of the script to save the text to a file of your choosing.

Tying it all together

Actual Linux knowledge

Now, we need a way to react to new files appearing in the syncing directory. For that, we can use the linux inotify interface, that waits for changes in files. For syncthing, the following command works: inotifywait -c -r -m -e attrib $PATH_TO_WATCH You can also see it used in a script. Be sure to read the readme on the repo for some additional information on setting up a systemd service (if you don't know how).

Now, if you autostart syncthing and the watchscript at system boot, it will process all new audio files.

13.03.2022

Simple video editing with MPV

#tech #linux

MPV is one of my favorite open source projects. It's a simple-looking video player with an enormous amount of features while also being highly extensible through the lua programming language.

MPV-splice Script

MPV-splice is a script that allows you to use MPV as a video editor. You set the start and end timings for fragments, and then the script cuts the video and concatenates the fragments.

I made a fork of it to extend it's abilities.

Another useful script I forked is 8mb, which compresses your video to 8mb, changing it's FPS and resolution to appropriate values.

06.03.2022

Hyper Light Drifters magnificent sound

#personal #media

I first played Hyper Light Drifter 4 years ago, it quickly became one of my favorite games. Recently, during some stressful times, I decided to listen to it's soundtrack again. At the end, I cried. screenshot

Hyper Light Drifter

The game is set in a post-apocalyptic world, where nature has overtaken most structures and the survivors have either gone mad and murderous or gone into hiding trying preserve what's little left of the old world. It hits every point for me: great exploration, hard but fair challenge and combat, simple but fun mechanics, awe-inspiring art and animation. And of course its dialogue-less story.

Echoes of the dead world

What really made this game so special for me though in its music and sound design. Composed by the great Disasterpeace, the music stands on it's own unlike anything I've ever heard. The uniqueness and the impressionistic style of it perfectly intertwines with the cryptic and beautiful world of Hyper Light Drifter.

The music captures the feeling of every space you encounter - be it vast underground catacombs or a calm forest growing on the remains of giant war machines, the echoes of which you can hear in the distance - transitioning seemlessly from one area to another. The game also knows when to use silence, leaving you with the ambience of the area.

Replaying the game I noticed so many new details, nearly every area has some effect on the soundtrack, you can hear the crackling of thousand year old trees and the slight buzz of ancient technologies.
And this guy playing his guitar :)

My favorite track is titled "Panacea", the feelings it envokes in me is unmatched by any other music-piece. It perfectly captured my melancholic mood. It let me cry out all of my frustrations and I'm grateful for that.

I don't like spoilers. And this post was as spoiler-free as I could get it. I didn't show any big encounters, any big reveals. But I hope you will look more into this game and listen to every little detail on your playthrough!

20.02.2022

Music Playing: Local & Remote

#tech #linux

The most basic way to play music is using some website. Most people prefer Spotify, but I never liked it.

For the longest time I've been using Soundcloud, it has most music I like, especially the quirky electronic type. It also allows you to upload songs without any additional setup. But, of course, there are songs that are not on there. The worst part is that some more main-stream artists have their songs region-locked or only available with soundcloud premium.

Local Music Library

A year back I decided to begin storing my music locally. This approach ensures that I have access to all my favorite music, in best quality, offline, forever.

It is honestly really freeing and opened a bunch of possibilities for me.

DeaDBeeF Music Player

I first settled on DeaDBeeF, as it's highly customisable, extensible and actively developed.

Configuring takes some time to get used to. You have to enable 'design mode' in the 'View' submenu to start adding and removing panes. It allows you to use a lot of GTK3 (UI library) widgets to structure your window however you like. You can find my config in the GitHub repo linked below.

I especially like the visualization plugins that I found. On Arch-based systems it is extremely easy to install plugins: yay -S deadbeef-plugin-spectrogram-gtk3-git \
deadbeef-plugin-musical-spectrum-gtk3-git \
deadbeef-plugin-rating \
deadbeef-plugin-waveform-gtk3-git
Some plugins are configured through settings, others through the right-click menu.

There are 2 main problems with DeaDBeeF for me:

Both of these features are in plans so at some point in the future I hope we'll get them.

MPD Music Server

Recently I started using MPD. It's a bit technical.

It might sound scary at first but all you need to do to set it up is create 1 config file and run the server. There are a lot of clients that allow you to connect to an MPD server with relatively conventional interfaces. I am currently using Cantata, as it's the most feature rich one I could find.

The great thing about MPD is that you can connect as many clients as you want and they all will be synchronized with each other. There are clients for scrobbling your music to last.fm (with mpdas), setting your discord 'rich presense' and controlling playback with media keys or a notification (with mpdris2). It's the most modular music playing experience and I love it. My config looks like this: music_directory "~/Music"
db_file "~/.config/mpd/database"
playlist_directory "~/.config/mpd/playlists"
sticker_file "~/.config/mpd/sticker.sql"
log_file "syslog"
auto_update "yes"
restore_paused "yes"

audio_output {
type "pulse"
name "pulse audio"
}

audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "22050:16:2"
}
'sticker_file' allows for custom music ratings (supported by Cantata), 'fifo' audio output allows for latency-less audio visualization with Glava.

To install everything I mentioned on Arch you would run: yay -S mpd mpd-discord-rpc-git mpdas mpdris2 cantata

Remote Music Library

But what if I want to play my music on a device where I don't have my audio library?

MPD Does it All

You can create an http output by putting the following lines in your config: audio_output {
type "httpd"
name "My HTTP Stream"
encoder "lame"
port "8000"
bitrate "192"
format "44100:16:1"
max_clients "0" # 0=no limit
}
I host an MPD instance on my server and can control playback with any client. On my phone I use MPDroid (which can also stream the aduio). To stream audio on desktop you have to connect to the specified port through a music player that can play http streams, like mpv, or a web browser. MPD clients, such as Cantata, can also play http audio streams. The delay is a little annoying. There is a setup that allows for 0 delay playback ( with local mpd using a remote music library) I saw here: www.joram.io/blog/android-streaming-mpd/

But I want my recommendations!

MPD :)

There is a client that automatically queues new songs based on last.fm recommendations.

06.02.2022

Updating the Website

#tech

Incomprehensible and unstructured jumble of code scattered across a range of highly specific tools that is one typo away from crumbling into ruins. This is how I would describe

My static-site generator

To write a new article, I go to my blog-post directory, open a new file with vim and use a snippet (powered by UltiSnips) that inputs an html template with todays date, it also uses some python to automatically set ids to article titles.
After that I am free to use any html I please inside the article body. When I'm done, I set a flag (an html comment) to indicate to my site generator that the article should be published/updated/deleted.

Yep, it's all plaintext. I don't know what will happen if I mess up any of it.
This is how I roll.

The site-generator itself is written in python and just parses the file for the fields I mentioned and then compiles all blog-posts into html pages. It's NOT recommended for use yet but you can check it out. What I would recommend is Luke Smith's lb.

So what's new?

New and fresh additions to the site:

I also rewrote a lot of the code to make future changes easier.

What's in plans?

I didn't have enough time to implement everything, in the future you can expect:

30.01.2022 [upd 06.02.2022]

Small GUI to Make Weird Designs

#tech #art

Hello! First week already proved challenging. Unfortunately I fell ill which also made it more difficult to finish something meaningful in time, but I have some results.

The Idea

I really like art based around very simple concepts. An example of such a concept is pixel art. The idea of pixel art is about as simple as it gets - you draw with little squares. So, I was doodling around trying to come up with something similar that looks cool. sketch I came up with a modification of pixel art, with non-parallel lines and variable line width. I tried recreating it in inkscape, but quickly encountered multiple problems, like differently angled lines being at different distances from each other and the ends of lines looking off.

How to GUI

In the end I just decided to write my own program to make this kind of designs. Only experience writing GUI I had was using QT (C++); it was painful. I decided instead to use Godot, as using a python-like language with dynamically typed variables seemed like a much better idea for a GUI.

I had a few ideas I wanted to implement in my Goo-e: shortcuts that the user can set/unset just by right-clicking the element instead of going into settings menu and searching for it there (I prototyped it but didn't yet use). Another idea was giving the user to ability to save any value as default (again, by right-clicking), for now I implemented it with a button next to a value.

How do I optimize this ;-;

program screenshot As you can see the UI is incredibly bare-bones. Main features are there: you can pan, zoom, draw and erase lines on a grid. Changing the angle of the grid is incredibly laggy as the code has to update a huge amount of individual nodes (objects). I will probably completely rewrite the entire program at some point.

Was it worth it?

Writing an entire program just to make this very specific type of designs might seems silly, especially considering how I realised that this effect can be achieved just by applying a simple image transform on a picture made using a normal square grid.

Regardless, the experience is valuable. I felt good programming, abusing the hell out of Godot's signal system and other features that make my life just a little bit easier. And damn does it feel good accomplishing something at the end of the week and posting about it here. Here is something I doodled in the program: see if you can figure out what it says, each letter is made out of 1 line. pic That's it for this week! Let's see what lies ahead :)

23.01.2022

Weekly Blog Posts

#personal

Hello. I've decided that I need to make weekly posts. And not just weekly posts, I need to have meaningful weekly posts, about projects. I think this would motivate me to make plans and deliver on them. And to make sure that I don't skip a week, I will donate 1000 rubles for every week skipped to a charity of my choosing.
And well, since I just came up with this idea and didn't have a week to prepare, I will share some random abstract pixel art I made recently: pixel art

Update

Hi. I clrealy failed and realized this is impossible for me. I made 2 donations to local charities.

31.07.2021

15 Day Challenge: Drawing

#art #personal

Me and my friend PizzArt decided to do 15 day long art challenges. It is definitely a great way to make yourself learn something new. You are motivated by 2 powerful things: deadlines - 1 piece everyday, responsibility - your friend is expecting you, so you can't skip a day for silly reasons. Compilation of 4 hand-drawn images

4 of the images were drawn with pen and pencil, everything else was drawn digitally in Krita (would recommend for painting). I used filter and concept art brush packs from Krita's website. You can download the images and project files below if you want. As you can see, the reference photos are also included. Compilation of digital drawings Check out PizzArt's drawings on his blog.

26.07.2021

Website Artwork

#art

This was the first time I ever used Inkscape. Surpisingly easy to use, the interface also looks nice. Great open-source program! This post will (hopefully) be updated in the future. Screenshot of Inkscape