Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Formatting time



  • Please log in to reply
25 replies to this topic
Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

Basically, what I do is

1. Get the total number of MP3s. ( TotalMP3 or ArrayOfMP3.MaxIndex() )

2. Create a new array (ArrayOfRandom), and store in it the same values as the index like this

ArrayOfRandom[1]:=1
ArrayOfRandom[2]:=2
ArrayOfRandom[3]:=3

and so on, till TotalMP3.

3. Randomize this array by interchanging the values stored at a random index with another index, so that the new array is entirely random.

4. Now I can refer to any element in the array by an index (NowPlayingIndex), and it will be a random value lying between 1 to TotalMP3. Let this element be alpha.

5. Then I use it to find ArrayOfMP3[alpha], which will hence be random.

Thus, by changing NowPlayingIndex, I can go backward or forward in the list of songs stored in the array. Note that boundary conditions need to be applied while changing NowPlayingIndex.

 

What help do you need with your code? I didn't really understand.

Could you tell me why, and how, do you use GDIP.ahk?

 

Thanks for explaining usage of BASS_ChannelSeconds2Bytes


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

Yes now i see how you randomize the playlist! Thanks .

 

Sort, ArrayofMP3, U   

 

Does not seem to make any difference when i tried it out ?If i dragged some duplicate files on the gui they are not removed.

 

Arrays as objects are new for me i used to handle this with the "old" pseudoarrays by naming the var with indexes.

 

Use of Gdip:

 

It allows limitless control over the gui.Example you use progress control for volume.Using gdip you just draw a line directly on the gui with a lengt calculated from the volume.The gui is just like a painting  and everything is drawn as pixels on it.

 

It is fun you can take a look at Tic's examples/tutorial.

 

http://www.autohotke...topic32238.html


winXP  and ahk unicode


Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

I don't know why the sort command didn't work, the documentation says that is supposed to remove duplicates. Maybe I did something wrong?

Anyway, here is a  working function to accomplish that.

Spoiler

 

Related : MusicBee is a free music player that relies on bass.dll. It has an option to remove silence from the beginning and end of songs. Any idea how to do that? I mean gapless playback.

 

EDIT : GDIP.dll is very confusing, do you understand all of it? If i intend to use it with my GUI, the classic GUI commands will not help me, right?


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

Thanks i will study arrays some more but my impression is that only for multidimensional arrays it will pay off.I will leave the playlist as a variable containing the file paths and go from there for now :) .

You have to get used to using gdip it is not so difficult.I started 2 years ago with the examples from Tic and went from there.

You are right standard gui commands like add edit do not work you have to code them yourself.To get a feel here is a example that Tic posted  it shows using buttons and changing the look.

https://dl.dropboxus...tToGraphics.zip

 

There is a playlist editor/viewer made by Thanh00 using only gdip which i use for getting solutions.

 

http://i.imgur.com/tSwTwYO.jpg

 

 

As for your question for muting sound i would monitor the volume of left/right channel in the beginning and if it is under a certain value skip some seconds and the same in the last 10 seconds are so.

Using bass.ahk is must be quite easy to do ( in principle)  :)


winXP  and ahk unicode


Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

 

There is a playlist editor/viewer made by Thanh00 using only gdip which i use for getting solutions.

 

http://i.imgur.com/tSwTwYO.jpg

 

Could you link to that?


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

http://www.autohotke...lbum-cover-art/


winXP  and ahk unicode


Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

 

No complete source code there.

 

I updated my player, and switched to dropbox now. Here is a link if someone comes looking. Clickety click.

WARNING : Do not use the INI provided in the archive, delete it.


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

I updated my player

 

 

Could not find any difference  wink.png

 

No complete source code there.

 

 

The forum of broken links sad.png

 

I do not have the original anymore,i made some changes.


winXP  and ahk unicode


Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

I do not have the original anymore,i made some changes.

 

If you do not mind, can you give me that? I will just use it for understanding of the library.


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

Warning!   shocked.png  Can write data to the NFTS alternate datastreams of mp3 files if playlengts info's are stored.

 

https://dl.dropboxus...list_editor.zip


winXP  and ahk unicode


noname
  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

oMTbxHd.png    Your Gui created using gdip with basic functions.To move use standard Lmousebutton.

 

next and prev buttons are not functional only play/stop volume mute are coded.

 

https://dl.dropboxus...bass player.zip


winXP  and ahk unicode