Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Wednesday, November 19, 2014

"Learn IT, Girl!" mentorship program just started!

This week is official beginning of "Learn IT, Girl!" program [1]. It's international program for woman, started by a few girls from Poland and Romania, invented at the Google Anita Borg Scholarship [2] retreat in 2014. A main aim is to learn by women particular programming language. Every scholar is guided by her own mentor, who helps her. Girls learn language by doing selected earlier project (which must be open-source project ofc).

I take a part in this program as a mentor, and my my mentee is Corina Teodorescu. She's from Romania and studies Marketing. Corina has decided to learn C#, and she's going to write an mobile app for phones with Android OS. Because of a lot really great ideas, she doesn't finally choose her project. She's choosing between RSS reader and application for downloading/uploading/hash-tagging images - she didn't make a decision, but I think, both are quite useful, and Corina can learn a lot by making one of them(what's the most important during this program :)

Program takes 3 months, and I believe, that would be great time for Corina and for me as well. I hope, Corina will learn a lot, and I'm going to improve my teaching skills too. We will have fun for sure :)

 Wish me and Corina luck!

Learn IT, Girl!


Links
[1] https://sites.google.com/site/learnitgirl/
[2] http://www.google.com/anitaborg/

Monday, June 30, 2014

GSoC Report #2

Previously I wrote about an application, which allows you to find metadata tags using audio file fingerprint. This application was written in C#, and required some minor fixes.

Rewriting standalone application in F#
So that's what I've done during last week; I fixed minor bugs (e.g. some fields in JSON file were optional), and the most important: rewrote application in F#. From now on, I'm not writing in C# during GSoC no more :)

Implemented AcoustID in a Banshee's plugin
Afterwards, I've finally implemented AcoustID support in Banshee! Now you can get any audio file form your disk, and find metadata of it. For now my plug-in supports only finding track Artist and Title fields, but I hope, the rest of them will be done and available in the nearest future.

Plugin based on fingerprints in Metadata Fixer

Caching AcoustID results
Fingerprint computation is a long process (approximately 5 seconds per file), so calculated fingerprints are stored in a cache directory. It allows to use results in the future.
Fingerprints are saved in a files, where filename is a hash of track URI and size of file.

Computing fingerprints in a background
Moreover, I also started to implement mechanism, which computes fingerprints in a background, so user don't have to waste his time on a waiting for fingerprints. It's working now, but I didn't test it too much, and probably it requires still a lot of work.

Empty album's names fixer improvements
However, I improved a little MetadataFixer plugin by adding another column to a main view: Track Info. It was useful in my plugin, and might be also used in the future. Plugin's author can decide, whether this column should be available (by overriding specific method), and what should be there displayed (e.g. file URI or track title).

Track Info column in Metadata Fixer plugin

Saturday, June 21, 2014

GSoC Report #1 (slightly delayed)

At first, I have to explain my little delay of progress report - I started my work a little bit later (that's because of exams on my university), and that's why I'm writing my progress report now (I promise, I will publish my further report in the nearest two weeks:)

Last time I spent a lot of time on a  learning F# language. My mentor, AndrĂ©s G. Aragoneses, proposed me to write my task in this language (at the beginning it was to be a C# ). I'd never written anything using this language, so I started to read everything what I noticed in the internet about it. The most interesting articles I can be found at the end of post.
Because I even after reading a lot of articles I wasn't so experienced in F# (I'm still not ;), I started to write in C#, and then I rewrote my code to F#.

Empty album's names fixer
My first subtask was add new function to  Metadata Fixer plugin. Pluggin allowed to find and fix duplicated artists, albums and genres in loaded files. I implemented one more option: finding tracks, which has empty album's names, and setting this field to "God's Album". Screenshot of plugin and results is shown below:

Input track list, with empty album's names


Tracks with empty album's field, found by plugin


Fixed album's names

After that, I improved it a little, by finding real album's name in MusicBrainz [1] service.
Album's names found in MusicBrainz

Meanwhile I fixed bug [2], which totally prevented to use Metadata Fixer in the newest Banshee version.

Working with AcoustID
Now I'm trying to use AcoustID [3] - it's an Open Source project, which allows to read fingerprints from audiofile. Fingerprint may be used for finding more informations about track (e.g. track name, artist, release etc.).
For now, I wrote an application, which takes audiofile as an argument, reads fingerprints, and display some informations about this file.
Sample usage:
loganek@loganek-cmp ~$ ./ChromaPrintTest.exe ~/unknown.mp3
Track ID: 370f8c7a-ae8d-4ac4-9c41-f731929580e7
=========================
Recording ID: cfe8e73c-09c1-4c86-a86c-d31da7448a08
Title: Ten sen
Artists:
     * Varius Manx (ID: 04f19c9f-f9c3-4645-bb26-7f7211ae7b6f)
Release Groups:
     * Najlepsze z dobrych (Type: Album, ID: c6ac2258-16c4-3362-8396-08c5fa49456d)
     * Ego (Type: Album, ID: 322c5fec-d0bf-37ba-82a9-c1d1b93608c3)

loganek@loganek-cmp ~$
Fingerprints are calculated from decoded stream, so we can use this application for every audio format, which is supported by GStreamer installed on your system.

Commits
For my commits, follow the link [4]

F# tutorials
Links