PDA

View Full Version : Mart Mix Player Project



martin
29-06-2009, 20:54
This topic is dedicated to my ThinBasic project "Mart Mix Player". It's far from finished (it's going to be a large script), but when I have my first (pre)release ready I will post it here. For now I will describe the Mart Mix Player project. I invite you to suggest ideas, requests and features here.

What is Mart Mix Player and what can you do with this software?
Mart Mix Player is going to be a freeware mood player. It can play music files (wav, mp3, and some other formats) based on your current mood. You can create playlists based on period (of release), tempo (bpm), genre etc. and it can even filter christmas songs, instrumental versions, remixes and so on. You can also schedule moods, so you can wake up with relaxing songs or you can set different moods on different times for your non stop online radio station.
Further it will have an "evolution" feature. In evolution mode you can set a range of years or tempo's and play moods in ascending or descending order by period (great to hear the progress in music) or by tempo (great for fitness!).
And that's not all! When it plays a song, it shows also recommendations of simulair songs (click on it and it will play). It will show sleeves and probably also lyrics (not sure yet).

I have many more ideas that I will tell later in this topic. If you have any, don't hestitate to post it here.

Maybe the coolest thing about this player is that it can recognize your music files by matching the filenames and tags with the Discogs database. With the information of Discogs the software can identify genres, release year, sleeve and other important information. This will be done automaticly in the background. I have seen other software that can do this, but none of them does the job automaticly. Also simulair software needs an API key. Mart Mix Player don't! This means the user don't need to register at Discogs and doesn't have limits for searching on Discogs (with an API key you can search only 5000 songs per day).

Soon I will post here a test script for the database (this script is almost finished). With this script you can match your songs with Discogs. I'm very curious if other users have the same good results of the song-identifying-process as I have.

My goal is to make the software as fast as possible and it should run on various Windows versions. That's why I have choosen for ThinBasic in combination with an ODBC database. I will also code a virtual listview, which will make browsing the database faster.

Last but not least I must thank Eros for learning me ThinBasic and for always answering my questions and always fullfill my requests!

Okay talked enough now, soon more about this project :-)

Martin

EDIT: In this post you will find attached the latest (test!)version of Mart Mix Player

Petr Schreiber
29-06-2009, 21:46
Hey Martin,

I will be happy to test this once done. I always wanted smart way to browse my music files, this sound very promising.
I keep my fingers crossed!


Petr

Michael Hartlef
30-06-2009, 07:31
Hi Martin,

nice project. I will test the player on my emulation too.

Michael

martin
07-08-2009, 15:18
Hi guys,

As promissed, here's a first demo of my player. Please note that the script is far from finished!! I only would like to ask if you want to test the DATABASE Tab! Please add some music files by pressing the ADD MUSIC button and then wait until the program has analyzed and recognized some files (depending on your internet connection this takes about 30 seconds per song). I am very curious if you like the analyzing-results. The results will be even better in a next version because then it will also match id3 tags with Discogs Database (at this moment, only filenames are matched)

As I said the program is not finished, some buttons (PLAY, FIND) are not working yet. The other TABS (PLAYER / HELP / MOOD) are not ready yet, do not use them. The database displays no BPM info yet and the information in the PLAYER Tab is wrong, I only displayed some sleeves and information because i'm working on the form-design. It's all still under construction.

I posted a ZIP and a RAR file, both are the same.

I am looking forward to your (positive or negative) feedback.

Thanks,

Martin

Petr Schreiber
07-08-2009, 21:43
Hi Martin,

thanks for sharing, the interface of the program is very well thought!
I like how the help is done, always available to user. Maybe only problem I have with help page is that when I clicked CNN, I did not know how to get back to help for a while, some button would be appreciated to help me with this.

The database tab is well done, but I am afraid it wasn't able to recognize any of my MP3s, although info on the artists is present at discogs.
Or maybe it too long? How does it work - once single item in the list is analysed it adds artist, or it waits till everything is processed?


Thanks!,
Petr

martin
08-08-2009, 08:20
Hi Petr,

Thanks for testing!
The CNN link in the help file is just an example, this will be replaced later with my own documentation. You are right about the missing navigation buttons, I will add them.

I am a little bit sad that the discogs mp3 analyzing process doesn't seem to work good. At my pc everything goes fine, maybe because i have a very fast internet connection. A friend of mine tested the program as well and he has the same problem as you: nothing happens.

This is what should happen:
- Add music files to the database with ADD MUSIC button
- Then you will see in the first listview column at each file the word: "[Waiting...]"
- Below the listview you will see a message "Analyzing songs" (current filename)
- in the background the program tries to match each file with Discogs. This is a pretty complicated procces. The program analyzes max. 20 search results, give points to each result and identifies the best result as match. So if a file has been analyzed after +/- 30 seconds the word: "[Waiting...]" dissapears.
- If there was a match on discogs, the listview will be updated with the found information (artist, title, year, genre etc).
- The program will start analyzing the next song in the listview

Petr, if you don't mind, can I send you the source code in a private message? If you like maybe you can look at it if you have some time. I am sure some code can be done better.....

Martin

martin
08-08-2009, 09:51
I just discovered that I forgot to bundle background.tbasic, and in the source code I made a mistake in OS_ShellExecute. That's why it doesn't work, my mistake!

Here are the improved files (RAR and ZIP)
Can you please re-download and try again Petr?

Strange enough the background app. doesn't terminate when MartMixPlayer is closed. This works fine in the sourcecode but not in the EXE. :?

do
if left$(ClipBoard_GetText,14)="MMpLAYERurl - " then
t=inet_urlgetstring(mid$(ClipBoard_GetText,15))
t=acode$(UTF8ToWideChar$(t))
t="MMpLAYERout - " & t
ClipBoard_setText t
elseif clipboard_gettext = "MMpLAYERend - " then
exit do
end if

if Win_Get(vensters, %WIN_GET_HWND, "Mart Mix Player")=0 then exit do 'mart mix player has been closed--> terminate this script!

doevents
loop

THANKS,

Martin

Michael Hartlef
08-08-2009, 10:54
Hi martin,

for sure it looks like an interesting project. I get the same results as Petr, the songs are not recognized.

Here is a suggestion if you like:

When you scan a folder to add songs, an option to not include subfolders would be nice. Also that you can cancel the scanning process.

Petr Schreiber
08-08-2009, 10:59
Hi Martin,

thanks for the update, now I can see program analysing! It takes some tens of seconds.
If you wish, please send me the sources, I can check the code. It already seems to work nicely!
I am not sure how fast I will be able to give you feedback during the weekend, due to my presence nearby PC


Petr

martin
08-08-2009, 11:05
Hi Martin,

thanks for the update, now I can see program analysing! It takes some tens of seconds.
If you wish, please send me the sources, I can check the code. It already seems to work nicely!
I am not sure how fast I will be able to give you feedback during the weekend, due to my presence nearby PC


Petr


Good morning Petr,
I still made a mistake: shellexecute should be replaced with os_shell. But it seems to works anyway and that's great :-)
I will send you my script soon, please take your time with feedback.

Does the program identify your music files correctly? And does it recognize a lot of files or are the results bad?

Many thanks in advance and I wish you and all forum members a happy weekend!

Martin

martin
08-08-2009, 11:12
Hi martin,

for sure it looks like an interesting project. I get the same results as Petr, the songs are not recognized.

Here is a suggestion if you like:

When you scan a folder to add songs, an option to not include subfolders would be nice. Also that you can cancel the scanning process.


Ciao Michael, have you also tried the new zip/rar files I posted above? Thanks for your suggestions, I will consider them!

Martin

Michael Hartlef
08-08-2009, 11:38
Yes, I downloaded the latest ones today.

martin
08-08-2009, 11:44
Yes, I downloaded the latest ones today.


Okay, this seems not to be my lucky day, I noticed "background.exe" is sometimes loaded and sometimes not, i try to figure out why and will solve the problem.

ErosOlmi
21-08-2009, 10:57
Hi Martin,

this seems a great project. Thanks for sharing.
I hope to be able to develop your requests in TBASS module soon.

I just noticed one important problem: Player seems to open a lot of connections to http://www.discogs.com/ but connections seems never closed. My firewall shows hundred of them.

Ciao
Eros

martin
21-08-2009, 12:17
Hi Eros,

I'm glad you're back! :-) I hope you had a nice holiday.
I'm not sure how I coded the downloading in my previous version so I invite you to try my latest version which only uses the INET inet_urlgetstring. Hopefully no unclosed connections anymore :roll:
B.t.w. I replaced all ODBC code with FILE_PUTR/FILE_GETR code, script seems to be stable now! It's possible to use the FIND buttons now and also I added an analyze status (in percents) so you can see how much you have to wait until a song is completely analyzed.

I'm looking forward to the next version of ThinBasic with the new BASS_FX functions. This will be really cool. For now maybe I can ask you a favour, if possible can you send me the new beta version with Scrollbar control, so I can develop a virtual listview (to make loading a big database fast).

Also I want to ask everybody who tries this script, to let me know if you like the analyzed results (I improved this a little). Does the program recognize your songs good enough and what could be better. I am looking for a way to make the analyzing process faster but for now I don't know how. If the analyzing results are good enough I will continue finish this program. If the results are bad, I will try to find a better way to do the analyzing job.

THANKS IN ADVANCE!

Martin
http://img36.imageshack.us/img36/7316/databaseanalyzing.jpg

EDIT: See the first post of this topic to get the files http://community.thinbasic.com/index.php?topic=2773.msg20976#msg20976

ErosOlmi
21-08-2009, 12:28
Ciao Martin.
Holidays were fine, thanks.

I will download new version and test again in afternoon and let you know.
Maybe better to keep just one version of your application possibly always attached in the first post so people can easily find it. Attaching many different versions can confuse people (old people like me :D )

On scrollbars, sorry but you have to wait a little because when I stopped development before holidays I was in the middle of a change in Core that must be finished before releasing a new version. But very few days I hope. But maybe I will be able to publish just thinBasic_UI.DLL module with Scrollbars. I will see if I can and let you know in few hours.

Eros

Petr Schreiber
21-08-2009, 12:48
Hi Martin,

new version is much better!
The information I get is correct so far, no bad classification occurred.

There is only one problem:
- I click "add music"
- it starts to analyse, I wait till half of files from the begining are analysed
- if I click header of "[Status] filename" after some time, it is correctly sorted, but it causes program to analyze from beginning, which means it sometimes analyses already analyzed files


Thanks,
Petr

martin
21-08-2009, 12:52
Maybe better to keep just one version of your application possibly always attached in the first post so people can easily find it. Attaching many different versions can confuse people (old people like me :D )
You are right, I just changed this. BTW I'm just 4 years younger then you ;)


On scrollbars, sorry but you have to wait a little because when I stopped development before holidays I was in the middle of a change in Core that must be finished before releasing a new version. But very few days I hope. But maybe I will be able to publish just thinBasic_UI.DLL module with Scrollbars. I will see if I can and let you know in few hours.
Updated DLL would be great ofcourse. But please don't hurry, I understood it's very hot in Italy now, so publishing this after this weekend would be very fast too :)

Martin

martin
21-08-2009, 13:17
- if I click header of "[Status] filename" after some time, it is correctly sorted, but it causes program to analyze from beginning, which means it sometimes analyses already analyzed files


Hi Petr,

Thanks for testing! The problem you mention sounds strange to me. When you sort the filename-header the program continues analyzing the current song. Then it goes back to the top of the listview and search the first filename with status "waiting" and then start to analyze it. I tested this again, and without any problems. Are you really sure the program analyzed the same song twice?

I just found another error, DELETE button doesn't work when songs are analyzed. If the analyzing of all files is done, then it works ok. I will fix this.

Bye bye,

Martin

Petr Schreiber
21-08-2009, 13:41
Hi Matrin,

on my PC, when I click twice to "[Status] filename" during analyzing, it sets all files to [WAITING] state again.


Thanks,
Petr

martin
21-08-2009, 13:47
Hi Matrin,

on my PC, when I click twice to "[Status] filename" during analyzing, it sets all files to [WAITING] state again.


Thanks,
Petr


Aaaaaaaaaaah now I see the problem, I will fix it Petr! :oops:

martin
19-09-2009, 12:50
Just a small note to let you all know that I am still working on this project although i am a little bit quiet for a while. I am very busy with other things in my life, but i use every bit of time I have left for this project.

However, in the last weeks I improved the database with virtual listview, and also I created the things Michael suggested in this topic. Everything is working fine now. I am working now on a faster song recognizing system (especially for albums), which will be ready soon. Then I will focus on the mood options and the player ofcourse.

My plan is to make first a very stable version of this player but graphical ugly. Most important is that everything works 100% fine. Later i can try to pimp the gui, maybe with TBGL (which i still need to learn). Pffffffff still enough to do, it will take some more months I'm affraid :roll: but what a great fun i have developing such a program. :)

Petr Schreiber
19-09-2009, 13:05
That is very good news!

I have already one suggestion for player component - checkbox "Shut down PC after playing".
Sometimes it I let PC play before going to sleep, but waking up to turn PC off once all songs are played is very inconvenient.

ThinBASIC already provides PC_ShutDown, so it would be just question of detecting reach of the end of playlist and it could silently shut down the computer.

I will be happy to assist you with the TBGL part once you'll have time for it!

martin
20-09-2009, 08:49
Good idea Petr, I wanted to make a timer anyway, and a shutdown option will be a nice addition.

martin
06-10-2009, 15:37
Damn, the discogs layout has been changed, looks very nice but my song-recognizing-code does not work correctly anymore :unguee: :unguee: I guess it it will be a lot of work to change my code. Maybe it was better if I used their API instead of analyzing html code but I hate the limit of 5000 api-requests per day. I think I will freeze this project for a while, too many things are going on in my life now. Hopefully I can continue this winter.

Martin

Petr Schreiber
06-10-2009, 20:37
Hi Martin,

I am sorry to hear that they changed format.
But I think your program can still do pretty good analysis based on ID tag examination.

If you are busy, I understand, but for future, I would really appreciate your updates on the project :)

martin
07-10-2009, 08:44
Hi Petr, i WILL continue, it would be a sin to give up, because I was already pretty far. But for now I am a little dissapointed and also very busy. But I will come back with an update soon or later.

Thanks for your support!

Martin

martin
28-10-2009, 18:20
Okay, got it working again. Also I made the analyzing process of albums very fast (1 second per song). Still have not much time, but I'm happy that I fixed the problems with the new discogs layout. I will continue a.s.a.p.

Petr Schreiber
28-10-2009, 19:23
Good!

Thanks for keeping us updated Martin!