• Announcements

Sign in to follow this  
Followers 0

KMP - Knight Media Player (Latest: beta .6)

40 posts in this topic

Posted (edited) · Report post

KMP focuses on what I view as the essentials of a media player. It has hotkeys and it is streamlined for efficiency in every way (or will be once I make a few more changes). It starts in less than a second and gives you instant access to all media files on your computer through an innovative design that removes the necessity of adding music to your library.

Some instructions:
  • To add music use the Add window... This will add music to you list window. Both these can be hidden/shown using the buttons the main GUI.
  • The list window is where you play/delete songs
  • Your "Now Playing" list is meant to be versatile, if you get bored of an artist or album simply clear the playlist and load what you want.
  • You can customize many features, view the options!
I know of a few bugs, but if you don't find them then I won't fix them. No, jk, I'm working on them but most of them are small and you probably won't run into them (I think...)

Without further rambling, download here and let me know what you think: DOWNLOAD HERE

I will only resource the main loop of this code as of now.
I'm really quite proud of it, it's very efficient and I think more people should make there main loops like it:
While 1
	Sleep(200)
WEnd
EVERYTHING is run off of events... 99% this program is it just sitting there... If you're playing a song it has a timer to update your seek status...

I'll be working on video support in the very near future, which is why there's a button that doesn't do anything on the GUI. Edited by Achilles

Share this post


Link to post
Share on other sites



Posted (edited) · Report post

OUTDATED, I'll post new ones somtime.

Main window
Posted Image


Options window
Posted Image Edited by Achilles

Share this post


Link to post
Share on other sites

Posted · Report post

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.
2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."
3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.
4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.

Share this post


Link to post
Share on other sites

Posted · Report post

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.
2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."
3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.
4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.

Yeah, I try to play a song and get: "Error: Array variable subscript badly formatted.". That's all I have tried so far...

Share this post


Link to post
Share on other sites

Posted · Report post

Most things about this is really good, like the small cpu-usage, all the options etc.... If it only worked ;)

1. I tried selecting a couple of mp3's and pressed on "add music" and it looked like something happened but nothing were in the "now playing"-list.
2. It also locks up when I try to add 1 song. "Error: Array variable subscript badly formatted."
3. Also it doesn't show any songs in the right listview when started, I must back one folder and then go back to "min musik" (my music) for anything to show.
4. It flickers when the "transparent when not active" is on and it loses focus.

There is probably more things but frankly, I got bored really quick when it wasn't possible to actually play something.


same here.

couldn't get it to play anything at all.

Additionally to the problems posted before, on Win2K clicking the options button caused a fatal error.
After that, the second thing I noticed is #3 from the quoted post.
Finally the mp3s list up in the second list but no way to add them to the now playing list or play it without adding to that list.
Either it crashes or simply doesn't add anything, and when clicking on play it crashes all the times. - Unfortuantely!

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though.. Edited by Achilles

Share this post


Link to post
Share on other sites

Posted · Report post

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though..

Vista Ultimate SP1 32-BIT

Share this post


Link to post
Share on other sites

Posted · Report post

Hmm, I don't have time to look at this now (which is why I released it without testing it much) but could you guys tell me what OS you're using?

EDIT: I just tried deleting all settings and adding music and it worked fine for me... I have Vista though..

Windows XP Home SP3 (Swedish), btw where are the settings saved? I didn't see any ini or something

Share this post


Link to post
Share on other sites

Posted · Report post

Alright, that's weird that it's not working. I'll do some work on it in a few hours... I'll test it on my laptop and my brothers XP computer before I release a new version.


@AdmiralAlex: @TempDir & '\KMP is the default...

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Are you using this as a "portable" media player? If not then isn't @TempDir is a little strange place for storing settings? AFAIK that folder get cleaned automatically by windows (and other "cleaners") so you could easely lose your settings.

Most "normal" applications save their settings either in their own folder (@ScriptDir) or in "Application Data", so I think it would be more logical to use @AppDataCommonDir or @AppDataDir. Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Posted · Report post

Been hanging out for this to see what you did. Looks great! ;)

I'll get it and test it fully when I'm home from school.

Cheers,

Brett

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Are you using this as a "portable" media player? If not then isn't @TempDir is a little strange place for storing settings? AFAIK that folder get cleaned automatically by windows (and other "cleaners") so you could easely lose your settings.

Most "normal" applications save their settings either in their own folder (@ScriptDir) or in "Application Data", so I think it would be more logical to use @AppDataCommonDir or @AppDataDir.

Yeah, it's meant to be portable... No installation or extra files other than the .exe which creates a two settings files. But you can change that in settings... Just choose whatever directory you want and your data is stored there. The only value stored in the registry is the location where the rest of the data is stored. I might change it to @AppDataDir though...

And this "It's not working" thing like some sort of joke??? I just tried this on a 32 vista system and it work fine... Ugh, it's weird. Can you guys describe what exactly you do? Is just when you double click an item to play it?

Edit: Sorry, I didn't have time earlier to read all your first post AdmiralAlex, I'll see if your description can help me find the problem.

Edit2: Yeah, that helped, I'm actually getting that error too... This program has undergone two major change sessions from what it originally started out as so I don't think I got everything coordinated from the last bunch of changes I made. I'll fix that post haste.

Edit3: Wow, I really should of checked this more. I found lots more bugs but there all small and easy to fix. I used to have everything stored on the list and would hide the columns but I changed to an array which is way easier. However, I didn't think of all the ramifications so now I'm replacing a bunch of _GUICtrlListView_FindInText functions... Edited by Achilles

Share this post


Link to post
Share on other sites

Posted · Report post

Updated! Lots of those little bugs should be fixed and running fine... I hope. Let me know if they aren't. Try going to options and clicking the "Startup" item in the list and updating from there.. It worked for me but I don't know if it will work for everyone... I'll definitely be making that look better sometime soon.

Share this post


Link to post
Share on other sites

Posted · Report post

You seems to have fixed one bug only to have a few else come forward. The listviews are still buggy and nothing is added to the lower listview and it's still impossible to play anything! ;)

Do this actually work for you? :D

Share this post


Link to post
Share on other sites

Posted · Report post

You seems to have fixed one bug only to have a few else come forward. The listviews are still buggy and nothing is added to the lower listview and it's still impossible to play anything! ;)

Do this actually work for you? :D

;) Yes! Everything works fine for me... I'm guessing this has something to do with the problem:

Windows XP Home SP3 (Swedish)

But unfortunately I'm packing up to leave now and won't have time for much programming for awhile...

Share this post


Link to post
Share on other sites

Posted · Report post

It can't be that easy, Alienware said in post 4 he had the same problem and he has Vista Ultimate.... ;)
I also tested it on another computer running WindowsXP Pro SP3 and it didn't work either.

Share this post


Link to post
Share on other sites

Posted · Report post

It can't be that easy, Alienware said in post 4 he had the same problem and he has Vista Ultimate.... ;)
I also tested it on another computer running WindowsXP Pro SP3 and it didn't work either.

I just deleted all settings on my computer and the problem you mentioned in your first post is fixed. What exactly happens when you try to add music now?

@Alienware (or anyone with Vista): Can you see if this is working for Vista?

Share this post


Link to post
Share on other sites

Posted · Report post

When I select a bunch/one song and press add it disappears from the listview in upper-right but nothing happens on the lower one. And when I then press play the famous "Error: Array variable subscript badly formatted." come

Share this post


Link to post
Share on other sites

Posted · Report post

When I select a bunch/one song and press add it disappears from the listview in upper-right but nothing happens on the lower one. And when I then press play the famous "Error: Array variable subscript badly formatted." come

If you go under options and Import, if you turn on the option of displaying songs that couldn't be added, are your songs on that list? If they're not on that list then let me know if this function is working for your mp3 files:
Func _GetExtProperty($sPath)
	Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty

	$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
	$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
	$oShellApp = ObjCreate("shell.application")
	$oDir = $oShellApp.NameSpace ($sDir)
	$oFile = $oDir.Parsename ($sFile)

	Local $aProperty[10]
	$aProperty[0] = $oDir.GetDetailsOf ($oFile, 0); File Name
	$aProperty[1] = $oDir.GetDetailsOf ($oFile, 1); File Size
	$aProperty[2] = $oDir.GetDetailsOf ($oFile, 2); File Type
	$aProperty[3] = $oDir.GetDetailsOf ($oFile, 13); Artist
	$aProperty[4] = $oDir.GetDetailsOf ($oFile, 14); Album
	$aProperty[5] = $oDir.GetDetailsOf ($oFile, 15); Year
	$aProperty[6] = $oDir.GetDetailsOf ($oFile, 16); Genre
	$aProperty[7] = $oDir.GetDetailsOf ($oFile, 21); Title
	$aProperty[8] = $oDir.GetDetailsOf ($oFile, 26); Track Number
	$aProperty[9] = $oDir.GetDetailsOf ($oFile, 27);Duration
	
	Return $aProperty
EndFunc  ;==>_GetExtProperty

I programmed this so that the play button should be disabled if the Now Playing list is empty...

Share this post


Link to post
Share on other sites

Posted · Report post

If you go under options and Import, if you turn on the option of displaying songs that couldn't be added, are your songs on that list?

I turned that on but I saw no difference, it didn't seem to do anything.

If they're not on that list then let me know if this function is working for your mp3 files:

Func _GetExtProperty($sPath)
	Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty

	$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
	$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
	$oShellApp = ObjCreate("shell.application")
	$oDir = $oShellApp.NameSpace ($sDir)
	$oFile = $oDir.Parsename ($sFile)

	Local $aProperty[10]
	$aProperty[0] = $oDir.GetDetailsOf ($oFile, 0); File Name
	$aProperty[1] = $oDir.GetDetailsOf ($oFile, 1); File Size
	$aProperty[2] = $oDir.GetDetailsOf ($oFile, 2); File Type
	$aProperty[3] = $oDir.GetDetailsOf ($oFile, 13); Artist
	$aProperty[4] = $oDir.GetDetailsOf ($oFile, 14); Album
	$aProperty[5] = $oDir.GetDetailsOf ($oFile, 15); Year
	$aProperty[6] = $oDir.GetDetailsOf ($oFile, 16); Genre
	$aProperty[7] = $oDir.GetDetailsOf ($oFile, 21); Title
	$aProperty[8] = $oDir.GetDetailsOf ($oFile, 26); Track Number
	$aProperty[9] = $oDir.GetDetailsOf ($oFile, 27);Duration
	
	Return $aProperty
EndFunc ;==>_GetExtProperty

I programmed this so that the play button should be disabled if the Now Playing list is empty...

Those values are way off, the artist name was at $aProperty[6] and etc, it looks like those are for Vista which has moved things around quite a bit. See THIS and THAT for values for 2000/xp

Share this post


Link to post
Share on other sites

Posted · Report post

Well, I don't know if this is ready...

KMP focuses on what I view as the essentials of a media player. It has hotkeys and it is streamlined for efficiency in every way (or will be once I make a few more changes). It starts in less than a second and gives you instant access to all media files on your computer through an innovative design that removes the necessity of adding music to your library.

Some instructions:

  • The top left listbox starts as your default music directory. You can double click any item to see what folders are in there. Each time you click an item on this list it will automatically update the listbox right next to with all .mp3 files inside of the given directory.
  • The next listbox, as stated above, contains the actual .mp3 files. Double click a single file or use the two buttons below the listbox to add music onto your "Now Playing" list.
  • Your "Now Playing" list is meant to be versatile, if you get bored of an artist or album simply clear the playlist and load what you want.
  • You can customize many features, view the options! The default color scheme is hideous compared to what you could make it!
I know of a few bugs, but if you don't find them then I won't fix them. No, jk, I'm working on them but most of them are small and you probably won't run into them (I think...)

Automatic updating is working (I hope) in a cheap way I threw together in 2 minutes so I'll make that better soon.

Without further rambling, download here and let me know what you think: DOWNLOAD HERE

I will only resource the main loop of this code as of now.
I'm really quite proud of it, it's very efficient and I think more people should make there main loops like it:
While 1
	Sleep(200)
WEnd
EVERYTHING is run off of events... 99% this program is it just sitting there... If you're playing a song it has a timer to update your seek status...


It works now!

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Oh.. Thanks both of you. Since that's small I'll try to fix that quick sometime soon.

Edit: Ok, that's fixed (I can't test but I used the link you gave me...), KMP is still .5 though Edited by Achilles

Share this post


Link to post
Share on other sites

Posted · Report post

Oh.. Thanks both of you. Since that's small I'll try to fix that quick sometime soon.

Edit: Ok, that's fixed (I can't test but I used the link you gave me...), KMP is still .5 though

Did you upload the newest one? cause i redownloaded and it still doesn't work.

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Did you upload the newest one? cause i redownloaded and it still doesn't work.

Hmm, I think I might of actually deleted the include file that had the changes in it and then compiled the older one by accident. All I changed was this:
Func _GetExtProperty($sPath)
	Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty

	$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
	$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
	$oShellApp = ObjCreate("shell.application")
	$oDir = $oShellApp.NameSpace ($sDir)
	$oFile = $oDir.Parsename ($sFile)

	Local $aProperty[10]
	$aProperty[0] = $oDir.GetDetailsOf ($oFile, 0); File Name
	$aProperty[1] = $oDir.GetDetailsOf ($oFile, 1); File Size
	$aProperty[2] = $oDir.GetDetailsOf ($oFile, 2); File Type
	If @OSVersion = 'Win_Vista' then 
		$aProperty[3] = $oDir.GetDetailsOf ($oFile, 13); Artist
		$aProperty[4] = $oDir.GetDetailsOf ($oFile, 14); Album
		$aProperty[5] = $oDir.GetDetailsOf ($oFile, 15); Year
		$aProperty[6] = $oDir.GetDetailsOf ($oFile, 16); Genre
		$aProperty[7] = $oDir.GetDetailsOf ($oFile, 21); Title
		$aProperty[8] = $oDir.GetDetailsOf ($oFile, 26); Track Number
		$aProperty[9] = _Trim($oDir.GetDetailsOf ($oFile, 27));Duration
	Else 
		$aProperty[3] = $oDir.GetDetailsOf ($oFile, 16); Artist
		$aProperty[4] = $oDir.GetDetailsOf ($oFile, 17); Album
		$aProperty[5] = $oDir.GetDetailsOf ($oFile, 18); Year
		$aProperty[6] = $oDir.GetDetailsOf ($oFile, 20); Genre
		$aProperty[7] = $oDir.GetDetailsOf ($oFile, 10); Title
		$aProperty[8] = $oDir.GetDetailsOf ($oFile, 19); Track Number
		$aProperty[9] = _Trim($oDir.GetDetailsOf ($oFile, 21));Duration		
	EndIf
		
		
	Return $aProperty
EndFunc;==>_GetExtProperty
Does this work for XP?

Edit: If this works I'll upload it again... Edited by Achilles

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

I never heard of _Trim() so I commented that out and then all the names seemed to be at the right places. Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.