Categories
open source

Your music library and MusicBrainz Picard

With all the steaming services available why have your own digital music library? The reason for this is two-fold. First streaming services like Spotify or Deezer have a constant changing library of music as a consequence of the agreements that they make with rights holders. This means that music in your playlist can suddenly disappear (or being greyed out) or, what happened to me, explicit songs are being replaced by clean ones. The latter can cripple them to a point that they aren’t listenable any more. What the examples demonstrate is that eventually you have limited control over the music of these services. Secondly the service itself can change e.g the app that you’re relying on disappears as happens with the Spotify app on my Squeezebox network music player.

Alternatively you can build your own digital music library e.g from your CD collection. This is called ripping and is done with software such as the free and open source Asunder. Asunder creates nice digital music files in the audio coding format that you desire. It can even add metadata to the file by checking an external music database. The process of adding or changing metadata is called tagging. The result of this process is often incomplete and results to gaps in the music collection. This is where MusicBrainz Picard comes in. It’s a tag editor that can fill all these gaps and it’s pretty good at it.

To work with MusicBrainz Picard open a music file, a folder with music files or even multiple folders with music files. MusicBrainz either gets the missing metadata by comparing it with it’s own. If that fails MusicBrainz Picard can get the correct metadata with acoustic fingerprinting. This compares part of a song with their huge online database of MusicBrainz to find the right song and add the correct metadata. After everything is done just save the info to the music files and your done.

Another powerful option of Picard is to organize your all your digital music file. To do this just select all the music and drag it into Picard. This video https://invidious.snopyta.org/watch?v=02fWYIur42g demonstrates just how powerful this option is (alternatively you can also watch the video here: https://www.youtube.com/watch?v=02fWYIur42g).

MusicBrainz Picard and the MusicBrainz database are projects of the MetaBrainz Foundation. MetaBrainz Foundation has a philosophy of free, open access of data. It has been set up to build community maintained databases and make them available in the public domain or under Creative Commons licenses. Most contributions come from volunteers so users are encouraged either to donate or contribute to the data gathering process.

Categories
3D modeling 3d printing open source programming

OpenSCAD parametric hook

Writing a script for a simple hook in OpenSCAD is easy but I wanted to do something more and make a parametric hook. With parametric I mean that a user can easily adjust the script by changing some variables to make your own hook.

To make it even easier the script makes use of the Customizer of OpenSCAD. This means that users don’t have to tinker with the code but can adjust the values of the variables with a easy to use panel on the right side of the GUI of OpenSCAD called the Customizer. (If you don’t see the Customizer in OpenSCAD go to the menu bar and click on Windows and then Customizer).

Aside from changing the dimensions I also added the possibility to add a fillet or a chamfer to the hook. And I added the option to change the radius of the hook and the diameter of the screw holes.

If you’re interested here is an explanation of some parts of the code. The fillet of the cube shaped parts of the hook is created with the fillet module. Within this module I simply intersect a cylinder with radius r1 and a cube of the desired length l.

module fillet(l,r1) {
    intersection() {
        cube([l,l,l]);
        cylinder(h=l, r=r1, $fn=50);
    }
}

In the module roundedCube the thus created fillet pieces are positioned in a such a way that the hull command shapes them to the desired filleted cube.

module roundedCube(l,w,h,r1) {
    d = 2 * r1;
    translate([r1,r1,0])
    hull() {
        rotate([0,0,180]) fillet(l,r1);
        translate([0,w-d,0]) rotate([0,0,90]) fillet(l,r1);
        translate([h-d,0,0]) rotate([0,0,270]) fillet(l,r1);
        translate([h-d,w-d,0]) rotate([0,0,0]) fillet(l,r1);
    }
}

I published the OpenSCAD script (.scad) and some example hooks (.stl) on Prusaprinters. You can download it here: https://www.prusaprinters.org/prints/91734-parametric-hook-with-source-file

Categories
3D modeling 3d printing open source

Solvespace: involute gear

We first need to create a involute of a circle in Solvespace to get a better understanding of an involute gear. This video will be followed by another where we create an involute gear and a third where we adjust the gear in Solvespace.

I’ve used version 2.3 in this video but v3.0 should work fine too for this tutorial. This is a series in progress. I will at least make one more video to demonstrate how one gear drives another in Solvespace.

First video tutorial: Involute of a Circle in Solvespace. Before creating an involute gear we first need to understand how to create an involute of a circle.

Involute of a Circle in Solvespace video tutorial

Second video tutorial: To create an involute gear we only need three parameters, the module which determines the length of the teeth, the number of teeth and the pressure angle. With these parameters we can determine the Pitch Circle, Addendum Circle or Top Circle, Dedendum Circle or Root Circle and the Base Circle. With these circles and the pressure angle the shape of the teeth can easily be created in Solvespace.

Create a Involute Gear in Solvespace video tutorial

Third video tutorial: This is the third video in a series about creating an involute gear in Solvespace. If we want to adjust the module, number of teeth or pressure angle of an existing gear in Solvespace we don’t have to start from scratch. We can take an existing gear and change one of the three parameters. This will save us a lot of time. However this change must be done following a procedure that I’ll demonstrate. Other wise Solvespace will give us the error message ‘unsolved constraint’.

Change a Involute Gear in Solvespace video tutorial

Solvespace is an open source, parametric, 3D CAD program that is lightweight and easy to use. It is available for GNU/Linux, OSX and Windows. In Solvespace the user applies geometrical constraints to a sketch and the program’s solver calculates the result (comparable to the FreeCAD part design workbench).

Solvespace is open source (GPLv3 license) and is available for Window, OSX and Linux. Originally developed by Jonathan Westhues and currently maintained by Paul Kahler and others. It can be downloaded here: http://solvespace.com/download.pl

The idea for this video comes from the JustThinkering channel on YT who made a video Involute Gears in Solvespace (https://www.youtube.com/watch?v=i6tDWJsNsok).

Categories
3D modeling open source programming

OpenSCAD: Polygon and polyhedron

OpenSCAD allows the user to create complex shapes with the polygon function for 2D and polyhedron for 3D. Polygon and polyhedron both accept a list of 2D and 3D coordinates (points) respectively as parameters. A functions can generate a list of points eliminating the need to manually created these lists. This property can be used to create shapes that are impossible with the 2D and 3D shapes that are build-in in OpenSCAD. In this blog post I’ll show how to create functions for some simple 2D shapes and explain how to manipulate the functions make more complex shapes with them.

Shapes created with functions and polygon in OpenSCAD

Creating a 2D shape

To create a circle with a radius of 20 in OpenSCAD we just have to type

circle(20);

However OpenSCAD doesn’t allow us to reshape this build-in function to for instance an ellipse. Alternatively we can write a function that generates a list of points needed for a circle and then use polygon with the points as parameter to draw the circle. The function uses the trigonometric formulas, x = r cos φ and y = sin φ, to convert polar coordinates to Cartesian coordinates.

function circle(radius) = [for (phi = [1 : 1 : 360]) [radius * cos(phi), radius * sin(phi)]];
polygon(circle(20));

When F5 is pressed a circle is drawn however the x,y coordinates of this circle are available to us. By adding echo(circle(20)); to our script the list of points is printed in the console. The circle function can easily be altered thus gaining a new shape. An example is shown below.

function circle(radius) = [for (phi = [0 : 1 : 720]) [radius * cos(phi/2), radius * sin(phi)]];
color("red") polygon(circle(20));
Shape create with x = r cos(φ/2) and y = r sin(φ)

Now let’s take a look at the syntax of the function. Every function generates a value and in this case it is a list of points. In OpenSCAD a list of points in a two-dimensional space is represented by [[x1,y1],[x2,y2],[x3,y3],…] where all x’s and y’s are numbers. In this case of the circle function the point are generated in a for loop. The loop begin at 0 and ends at 720 with a step of 1. The radius * cos(phi/2) and radius * sin(phi) calculate each x,y coordinate for every given phi.

The ellipse, a generalization of the circle, can now easily be created by slightly changing our function.

function ellipse(r1, r2) = [for (theta = [0 : 1 : 360]) [r1 * cos(theta), r2 * sin(theta) ]];
color("cyan") polygon(ellipse(120,80));

a second parameter is added. r1 is the radius in the x-direction and r2 is the radius in the y-direction. If r1 is equal to r2 a circle is drawn.

Ellipse created with the code above

Conclusion

OpenSCAD allows the user to create complex 2D shapes using functions that generate lists of points This list is used as the argument in the polygon function of OpenSCAD. Every shape can be generated as long as the mathematical expressions are known and can be translated to OpenSCAD script. This opens up a world of possibilities.  The same is true for 3D shapes but instead of polygon the polyhedron function of OpenSCAD should be used. This however is a topic for a future blog entry.

Caveat: List comprehensions as shown in the functions of this  article are only possible with OpenSCAD v2015.03 and above.

OpenSCAD is open source (GPLv2 license) and is well maintained by Marius Kintel et al. Besides the stable releases for Windows, OSX and Linux, development snapshots are available. I recommend using these development snapshots since they have all the latest features. 

A special thanks to Xavier Faraudo who explained the advantages of functions in OpenSCAD to me.

Click here to watch the video if the video below doesn’t play: https://peertube.linuxrocks.online/w/7NfsT6STabJ341ViP1eoMR

Categories
3D modeling open source social

I’m leaving YouTube

Last May I received a new Terms of Service request from YouTube. In this request I had to grant YouTube the right to monetize my videos. In other words when I agree, YouTube can insert ads in the videos. This is the final straw for me with YouTube and Google.

Click here if the the video doesn’t run in your browser: https://peertube.linuxrocks.online/w/egFYuCEYwTCGNLiA58v7F7

I’ve created this YouTube channel with tutorials about open source 3D CAD programs and never had any intention to monetize the channel. So I definitely don’t want YT to monetize it for me.

My goal has been to inspire people to use open source software instead of proprietary software and judging by the number of views and reactions I’ve been mildly successful with that. I had over 200.000 views with my tutorials and more than 1100 subscribers. Not much for YouTube of course but keep in mind that the channel was about open source 3D CAD. Very much a niche market

I’ve put up with all YouTube’s privacy invading policy and data mining because of the popularity of YouTube. YouTube has a near monopoly when it comes to video sharing and has a huge worldwide audience. So to reach my audience with my video tutorials it made sense to use YouTube.

However where does one draw the line. I’ve created the video tutorials believe it or not with a lot a sweat and blood. And it’s important that I keep sovereignty over these videos. So whether ads will be part of the video is up to me and not YouTube. This leaves me no other alternative than to delete all my videos (except this one).

Luckily I’ve already had found an alternative home for my tutorials. It’s called PeerTube. PeerTube is video sharing software but contrary to YouTube, it is open source. In addition it’s also decentralized and federated.

This means that anyone can create a PeerTube server and host videos. These servers can connect to each other and share the videos between them (federation). As a result there is no single owner of the network. If the server that I joined fails or I don’t like the policy on that server I can either upload my videos to another server or even start my own.

I already have some content on PeerTube and I’ll upload new videos to PeerTube. However it’s unlikely that I’ll upload my older videos to it. I figure that they are less relevant anyway. I’ll put a link in the description to the new home of my videos and I hope to see you there.

I hope to see you on PeerTube and keep using open source software.

Here is a link to the new home of my 3D CAD videos: https://peertube.linuxrocks.online/video-channels/homehack/videos

If your interested in the network protocol behind PeerTube and other decentralized services here is link to a post that I wrote about it: https://homehack.nl/activitypub-the-secret-weapon-of-the-fediverse/

Lastly a link to a post that I wrote about the other problems that I had with YouTube: https://homehack.nl/activitypub-the-secret-weapon-of-the-fediverse/

Categories
open source social

The Movim social network

It’s more than two years ago that I started using the social network #Movim after a tip from an acquaintance. I had left G+ and never wanted to use a centralized social media platform again. I tried the Fediverse (Mastodon and Friendica), Diaspora and Movim but eventually I kept using Movim and Mastodon. The secret of Movim is tranquillity. After logging in for the first time the news stream is empty, much like Diaspora, and it only gets filled with post from people that you follow, communities that you subscribe to and rss feeds. This in combination with an easy to use chat option that gives access to whole #XMPP network makes Movim very powerful.

It’s also incredibly easy to create a community in Movim, although I think community isn’t the most appropriate description here. It’s more a blog from one or more persons where other users can subscribe to, like and comment in a linear fashion.

I recently introduced my wife to Movim and the first thing that surprised her is that, contrary to FB, the news stream contained articles worth reading instead of ads and other bs. She also liked the fact that she could use any XMPP-client for chat. Time will tell if she’ll keep using it but her initial enthusiasm was very encouraging.

Although, I’m pretty psyched about Movim I would like to see some features. First, coming back to the tranquillity, when in the news stream on the right side five posts of other Movim users appear. I suppose that this is meant for discovery and that’s great but in some of the posts I’m less interested but I can’t block or hide these posts.

Also there is no way to block or hide a person entirely. This may become a problem since Movim appears to be becoming more and more popular and with that the interaction between people grows exponentially.

Currently I’m lazily using the European server of Movim but I (or anyone else) can deploy a self-hosted instance and I’m tempted to experiment with that. I’ll probably get back to that.

Finally, I want to thank Timothée Jaussoin and other contributors for developing Movim and making it available to all of us. It’s awesome. And if you read this please consider donating to the Movim project.

Link to my initial thoughts about Movim: https://homehack.nl/movim-floss-alternative-for-hangouts/

Categories
open source social

Freedom in the Cloud (eleven years later)

I watched the famous speech ‘Freedom in the Cloud’ of Eben Moglen in 2010 at the ISOC-NY. Again if I might add. That speech had a great influence on me. It was the first time that I realised that client-server infrastructure of the internet is a huge problem. This very infrastructure ensured that all the data were aggregated and used (or abused) by the ones that owned the servers. At the same time the clients were being deprived of power. And that with the accumulation of servers in a data centre and he virtualisation of the servers (cloud) these owners were getting even more powerful.

I wasn’t the only one that was influenced by this speech of Eben. It also marked the beginning of the development of Diaspora social network. As it happens some of the initial developers of Diaspora were present at that Friday night at ISOC-NY and it inspired them to build the Diaspora software.

A lot has changed the last eleven years, and I will get to that, but what hasn’t changed is the client-server infrastructure, the source of evil. If anything the power of ones that own the servers like Facebook, Amazon, Google, Apple and even Twitter has increased greatly in the last 10 years. And as a consequence the ones working on the client side have become even more powerless. Snowden (2013) and Cambridge Analytica (2016) are just a few examples that demonstrate that this abuse of the ‘architecture of the catastrophe’ took directions that we couldn’t have envisioned.

On the plus side since 2010 a lot of developments have started to halt this catastrophe. Some were more successful than other but it’s undeniable that if someone is looking for a free (as in freedom) alternative right now a lot more options are available than 10 years ago. Also these options seem to be sustainable and rather successful. The Fediverse with Mastodon, Pleroma, PeerTube, Funkwhale, Pixelfed, Lemmy and others have made great progress since the introduction of the ActivityPub protocol. XMPP has made great progress with the introduction of advanced clients like Conversations, Movim and Gajim.

The Freedombox hasn’t lived up to it’s expectations though. The development of Freedombox was initiated by Eben and allows to set up a simple private server in your home. The last time I checked even Diaspora was not supported by Freedombox making social networking with it impossible. Luckily other initiatives have taken flight such as Yunohost. They make it easy to self-host a server and install software for blog, chat, social networking, online storage and file sharing. Yunohost and others bring the dream of Eben closer of a peer-to-peer network instead of a client-server network.

Another noteworthy development is Scuttlebutt, a client-based peer-to-peer application for encrypted social network. Just install the app on your PC or phone (Manyverse) and communicate directly with others that installed the app.

Or Briar, a client for messaging that uses Bluetooth, WiFi and the Tor network to communicate. The need to host your own server has been replaced by simply installing an app that doesn’t rely on a central server. Even if the internet is down the information keeps flowing over WiFi and Bluetooth.

Although we still live in the catastrophe that Eben spoke about eleven years ago there are more possibilities to escape and it appears that more and more people are discovering this. With every scandal, every update of the term of service a wave of new users appears on the networks that I mentioned above and that’s something to be grateful about but it should also motivate us to keep fighting for a free (as in freedom) internet.

Categories
Linux open source PC

Linux on a 17 year old laptop

My laptop is a Thinkpad T40 from 2003 with 1GB of RAM and a 30GB HDD (Yes, you can laugh now). I bought it second hand many years ago, it had Windows installed and it was slow as molasses. It was also a time that I got interested in FLOSS. So I looked for a suitable Linux distro and I found Puppy Linux (Slacko and later the TahrPup release). It turned my unusable laptop into a fast and very capable computer. I’ll never forget the amazement when I booted Puppy for the first time and saw how fast it was.

I’m not much of a distro hopper but last year I switched to AntiX because I felt that development of Puppy had slowed down. AntiX does more or less the same as Puppy in that it brings life to an old computer. Both are very lightweight but at this moment I find AntiX definitely more polished with JWM, FluxBox and IceWM as window managers to choose from.

Both Puppy and AntiX contain, as do most of the other Linux Distros, proprietary bits and pieces (e.g drivers and it’s possible to install proprietary programs from the Snap store or PPM) but are mostly FLOSS and are available thanks to many volunteers that dedicate so much of their time to these operating systems. So I think it’s fair to contribute back e.g by donating to the developers that make this possible.

Link to the Antix website.

Link to the Puppy Linux website.

Categories
open source social

Lemmy, the federated alternative of Reddit

I’ve got a confession to make. Since I left Google+ and Reddit two years ago I always missed the community approach of both social networks. Don’t get me wrong I love XMPP (or Movim, which is based on XMPP, in my case) and Mastodon, the Twitter alternative. I love their ease of use and the possibilities to communicate without a large tech company preying on my data. I love the ease to set up a chatroom or a microblog in Movim. And I love that they are federated. However both on Movim and Mastodon it’s hard for me to have a structured conversation about one single topic (e.g. cycling or 3dprinting). It’s for that reason that lately I’ve spend time on Lemmy.

Lemmy is easiest described as a federated Reddit alternative. This means that with Lemmy members can send text posts, links and images that can be up- or down voted by other members. Lemmy already consists of tens of instances and thousands of communities. Communities (the equivalent of subreddits) are the cornerstones of Lemmy. Popular topics like Linux, open source and privacy already have their own community. If a community doesn’t exist the user can easily create one. Just click Create Community, fill in a form and press Create and you’re done. Every post has to be posted in one of the communities. A huge advantage is that posts don’t get buried by hundreds of other posts in the timeline. As a consequences discussion threads are easy to follow.

The UI of Lemmy is minimalistic but very effective. The user is presented with a list of comments that are ordered by popularity. The comments can easily be filtered e.g to only show the new comments. Via a menu selection all the communities are shown and can be searched. Overall search is very well implemented. I use it a lot to learn about topics of interest to me that were discussed earlier.

Lemmy comes with a built in slur filter which I believe is a very good idea if you want to have civil discussions. Perhaps not everyone does agree with this filter but Lemmy is free and open source software so one can always create his own fork.

I’m currently on lemmy.ml which appears to be the most general purpose and the largest server in terms of subscribers but you can run your own server if you want to. The number of instances of Lemmy is growing (currently 29) and so are the number of users but only time will tell what portion of users remain active.

Besides the slur filter mentioned above the lemmy.ml instance comes with a Code of Conduct that is enforced by a team of moderators. Again a good idea for the above mentioned civil discussion. It’s worth mentioning that the moderators keep a public Modlog where one can keep track of all the actions taken by the moderators. A gesture of transparency that I haven’t seen on any social platform.

Speaking of discussion, although Lemmy is still pretty small in size, the discussions are excellent. Most of the times the comments are to the point, well informed and criticism is constructive. This makes Lemmy a vibrant community even though it’s relatively small.

The beauty is that Movim, Mastodon and Lemmy (and all other federated social networks) serve different purposes so I don’t have to choose. They can co-exist and enable people to optimize their online social needs all with free and open source software and all federated.

EDIT: This post was rewritten on 17th August of 2021 to include my experience with Lemmy over the last half year.

Categories
open source social

The exciting roadmap of PeerTube version 3.

PeerTube, which is free and open source software, is a much needed decentralized alternative to the behemoth YouTube. In fact thanks to the ActivityPub (AP) protocol PeerTube federates with other AP social networks such as Mastodon.

Sepia, Peertube’s mascot

Framasoft the non-profit organisation behind PeerTube (and other free software) has started a fundraiser for version 3 of PeerTube. They published a roadmap accompanied by a progressive fundraiser over a period of 6 month. The current roadmap looks very promising and is divided into four main steps. Each of these steps can be fulfilled if a specific financial target has been reached. New features and improvements are among others: global search through the Fediverse, moderation improvements and features, playlists and finally live streaming.

Global search within PeerTube is a much needed feature to enable the user to find videos that are outside the instance-bubble. The PeerTube instance that I’m using (linuxrocks) only federates with a couple of other instances making it difficult for my videos to be found while I can’t find much when searching for content.

Moderation. An online video sharing platform isn’t without problems like copyright violations or not safe for work material. PeerTube already has some moderation tools like a report tool but more tools certainly won’t hurt and the roadmap show a long list of new moderation tools.

Playlists. e.g allow clips of the same video in a playlist thus making this a remix tool.

Live streaming is already big and according to market research it will grow rapidly in the coming years. For PeerTube to keep up this is therefore a necessary feature.

At the moment of this writing over half of the required amount of funds and two of the four main steps in the roadmap has been reached but Framasoft will surely appreciate more donations to be able to fulfil the complete roadmap. So either contribute financially or at least share the news!