Blog

Here you can find every blog post in 2019, with full content.

Creating instrumentals with spleeter (and some more stuff)

[linkstandalone]

Hello everybody
Today I found out about spleeter by Deezer and oh. my. GOD.
I am in LOVE with this tool.
So today we're gonna look at how you can create instrumentals of your favourite music using spleeter, let's go!

Installation

First of all, install spleeter.
You can do this by simply typing pip install spleeter into your terminal and then hitting enter. (You'll need to have Python 3.6/3.7 installed). Then you're ready to rock!

Downloading some music

Now we need some music with vocals that we want an instrumental of.
In this example, we're gonna grab our music from YouTube, so go ahead and install youtube-dl using pip install youtube-dl.
Then, type youtube-dl [link to youtube video] and hit enter. This will download your video.
As an extra step, we'll convert the video file to an audio file.
This step is completely optinal and can be omitted as spleeter can handle mp4 and webm files just fine, but I like to do it that way.
Just type ffmpeg -i video.mp4 -f ogg -ab 192000 -vn audio.ogg (You'll need to change the filenames, at least the one of the video) into your terminal (as always, you'll need to have ffmpeg installed) and hit that enter key. Done!

Actually separating the audio

Now we're getting to the AI stuff!
To separate your music into vocal and accompaniment tracks, just type spleeter separate -i audio.ogg -o audio_output -p spleeter:2stems and wait a bit!
If you want more stems, just change the number at spleeter:2stems to either 2, 4 or 5.

Mo, 09 Dez 2019 19:52:59 +0100

A great privacy policy

[linkstandalone]

Before I start: This is not legal advice and this should not be taken as such. I am not responsible for any illegal actions executed after this post.
That being said: Let's start.
Privacy Policies. When the GDPR was taken into action, everyone was really scared of having to pay millions for a minor violation in theirs.
Now that the GDPR is almost no topic of conversation anymore, I wanted to talk about how you should, in the best case, go about collecting user data.
I really only have one thing to say when it comes to that, which is: Just don't
Yes, that's right. Don't collect user data.
First of all: When something goes wrong, the best source to get to know about that is either regularily testing your stuff or letting the users submit bug reports.
When it comes to "Improving our Service", collected user data doen't really help much.
So, let's be honest: The only reason all those website collect data is money.
It's no new thing, nothing to be shocked about. Even if you just spend a bit online (if that's the case, I really wonder how you got here btw) you should know that.
But why? If you want to earn money, there's so many other options:

And the best thing about that is, that you can write "We do not collect any user-related personal information" in your privacy policy. This will earn you so much reputation.
I don't get why so many companies with bad reputation don't use this to better it, even if it's obvious that the reason is, of course, the money.
So: Do good, don't collect user data.

Di, 03 Dez 2019 14:30:37 +0100

EVP: More CSS differences between browsers

[linkstandalone]

When dealing with things like user-provided videos in HTML, you should always keep in mind that the users probably want to see the whole video, without anything getting cut off anywhere.
When working on the EVP, I again ran into some CSS problems that occured on Chrome and Safari, but not on Firefox and Edge.
What I'm talking about is a slight issue, but it breaks the rule mentioned at the beginning of the text.
In my main.css-file, I've declared both a max-width as well as a max-height of 60%, thinking it would probably cover all aspect ratios on all devices.
And on Firefox and Edge it did.
But again, not on Chrome and Safari, it didn't even work with standard 16:9 videos, there was always something cut off at the bottom.
In the end, all I had to do was to remove the max-height, which probably was a good desicion even if the problem didn't exist, because now it covers even the weirdest aspect rations pretty well.
Anyways, that's all for this blog entry.
The EVP will hopefully be released somewhere in the future, but that is a thing for another blog post.

Mo, 02 Dez 2019 20:34:32 +0100

EVP: About CSS differences between browsers

[linkstandalone]

So, I am currently working on a small project called the EVP, which is short for Experimental Video Platform
The program itself as well as the server side stuff is all working perfectly fine, but there was a slight issue on Google Chrome and Safari:
The preview images on the main page wouldn't align properly.
On Firefox and Edge, the images aligned correctly, but on Chrome and Safari they were crushed into each other, every frame only having half the space they should have.
Of course, this was very weird and confusing. How could such a thing happen?
So I downloaded Google Chrome, messed around a bit with the CSS and *bang*:
The problem was caused by the following CSS rule: grid-template-rows: 20% 20% 20% 20%;.
Simply removing it fixed the problem.
That doesn't seem too weird, but somehow grid-template-columns: 18% 18% 18% 18% 18%; didn't break anything.
As I said: CSS and Cross-Browser-Compatibility can be really weird sometimes.

Mo, 02 Dez 2019 18:03:57 +0100

First post

[linkstandalone]

Okay, so this is the first post on this blog.
So, have a little FAQ about this blog:
This blog is generated by lb.
I will be writing posts here pretty often, at least I will try to do so.
This blog also has an RSS feed, just so you know.

That's all I wanted to say today.

Mo, 02 Dez 2019 17:33:28 +0100