Old 9th July 2008, 10:10   #1
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Sub tune handling for C64 music files

Hi!

I'm currently developing a WinAmp input plugin for the HardSID 4U device (http://www.hardsid.com).
The plugin works great, but there is a small problem:
C64 music files (.sid files) are sometimes containing multiple tunes. Let's say a .sid file contains tunes from #1..#4.
What would be the proper way of handling this situation in an input plugin?


Problem #1: Where/how should a user select a subtune within a tune? (it must be very handy, just like stop/start/prev/next/etc... on the main window)

Problem #2: The same tune must be addable to the playlist with different subtunes. So, when the playlist starts playing the actual item, my plugin will start playing the proper subtune from the .sid file. How to handle/implement this?

Any suggestions are welcome.

Regards,
Téli Sándor, Hard Software
need4sid is offline   Reply With Quote
Old 9th July 2008, 23:09   #2
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,341
Some of the old SID plugins are using the progress slider to switch between the tracks. Other plugins added a seperate window, where the user can switch between the different tracks in a sid file.

You may take a look at SidAmp2:

http://www.winamp.com/plugins/details/144643
Koopa is offline   Reply With Quote
Old 10th July 2008, 11:36   #3
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Quote:
Originally posted by Koopatrooper
Some of the old SID plugins are using the progress slider to switch between the tracks. Other plugins added a seperate window, where the user can switch between the different tracks in a sid file.

You may take a look at SidAmp2:

http://www.winamp.com/plugins/details/144643
Thanks for your reply.
Well, I've thought about the slider too, but I'd like to implement seeking too.

The separate window seems to be the only way so far, but it isn't a handy/nice solution at all.

I wish WinAmp had some spare controls that could be activated and every skin designer implemented skins for those initially hidden controls too. Aren't there such spare controls I don't know of?
need4sid is offline   Reply With Quote
Old 10th July 2008, 11:41   #4
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,341
Seeking is possible? I thought it wasn't because of a limitation in the file format.

Well, the only idea I have, would be Global Hotkeys, so you could define them for jumping to another track.

But a seperate window would be ok too, as long as you implement skinning support, using the gen.bmp file in classic skins and via a normal window in modern skins.

The gen.bmp is part of classic skins since Winamp 2.9x the media library and several 3rd party plugins are using it, like e.g. AlbumList.
Koopa is offline   Reply With Quote
Old 10th July 2008, 11:51   #5
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Thanks for the ideas, I'll think about them!

Quote:
Seeking is possible? I thought it wasn't because of a limitation in the file format.
You know it right, this is a file format limitation, as SID files are C64 programs, not audio files.

Anyway, the HardSID project was/is full of unbreakable limits that we broke
So, if I'll have enough inspiration, there will be seeking, even if it wasn't possible
need4sid is offline   Reply With Quote
Old 10th July 2008, 14:29   #6
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Anyway, this all doesn't solve the problem of adding tunes to the playlist that will play the proper subtune.
For example, what if I want to add Turrican II. Final Fight song #1 and song #2 to the same playlist?

Do you know about any solution or about any plugin that implements this?
need4sid is offline   Reply With Quote
Old 11th July 2008, 10:35   #7
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,341
You may want to take a look at in_zip, how it handles multiple files in a file.

http://nunzioweb.com/daz/files/in_zip_v0_6_8_5.exe

But I doubt that this is exactly what your are looking for.

Seeking with sid files would be awesome, I'm looking forward to your project.

I'm a classic game music fan for many years now, so I'm always happy, if someone works on a project like this.
Koopa is offline   Reply With Quote
Old 11th July 2008, 13:15   #8
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Quote:
Originally posted by Koopatrooper
You may want to take a look at in_zip, how it handles multiple files in a file.
What an interesting concept!
Thanks for pointing this out!

Quote:
Originally posted by Koopatrooper
I'm a classic game music fan for many years now, so I'm always happy, if someone works on a project like this.
We're working on those things since 1998 in our spare-time. We're addicts too
need4sid is offline   Reply With Quote
Old 11th July 2008, 13:26   #9
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
This interesting in_zip plugin expands the archive contents when you press play on the main archive file.

I'd prefer to do a more sophisticated solution.
Something like:
- expandable playlist item (a [+] before the item, like in Windows Explorer's directory tree)
or
- expand the files when the main file is added to the playlist

Is there any way to create a group item in the playlist OR to get notified (in my input plugin's code) when a file has been added to the playlist?
need4sid is offline   Reply With Quote
Old 13th July 2008, 10:53   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
plLoadex (or something like that) is in the current sdk offered which will allow you to effectively treat a file as a playlist which is more of what you're looking for. in_zip was designed well before that api ever appeared and as i've no time i've never updated it to use that (which is more preferable over some of the hackish ways i tried to have a zip auto-expanded on addition inbetween dealing with winamp bugs in earlier versions).

there is no way to have an expand/collapse button in the playlist - nearest would be to have some action which will manually add/remove the items from the playlist editor but that's just more pain + hacks to do that.

subclass the main window and IPC_PLAYLISTMODIFIED (or something to that extent) will be sent to the main window though that is fired for _any_ playlist change and provides little to no detail on what's happened (have to check other message actions to get an idea of what has caused that to be fired). welcome to the hackish world of winamp plugins

-daz
DrO is offline   Reply With Quote
Old 14th July 2008, 08:38   #11
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Quote:
Originally posted by DrO
plLoadex (or something like that) is in the current sdk offered which will allow you to effectively treat a file as a playlist which is more of what you're looking for.
Thanks for the info!

I've tried (and looked into) the plLoadEx example.
I need to interpret *some* .sid files as playlists and *most* of the .sid files as playable tunes.
It is like if your example .simple files were also playable files and you had an in_simple.dll plugin to play those files.
How can I achieve this? (I'll have both an input plugin and a w5s file for the same extension)

Another question:
Since the sub-tunes are not separate files, I don't know what to extract into the playlist with the w5s.
I still see only one solution. Your original one with in_zip:
sid://filename,0
sid://filename,1
etc...

Is there any other solution if I choose the w5s+input.dll combination?

Regards,
Téli Sándor, Hard Software
need4sid is offline   Reply With Quote
Old 17th July 2008, 19:56   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
you can implement the playlist loading api in a in_* but you need to call an api from wa_ipc.h for the wasabi service (302x something i think it is - am not able to check for certain) and you can then have the plLoadEx code in the in_* without the mess of an external w5s (as in_wm does for asx playlists).

when you've got the file and it's being queried, you can determine how to process the file ie to expand or just have the single entry (though you'll have to play around since i've no code/dev means on this box)

-daz
DrO is offline   Reply With Quote
Old 19th July 2008, 12:31   #13
need4sid
Junior Member
 
Join Date: Jul 2008
Posts: 27
Quote:
Originally posted by DrO
you can implement the playlist loading api in a in_* but you need to call an api from wa_ipc.h for the wasabi service (302x something i think it is - am not able to check for certain) and you can then have the plLoadEx code in the in_* without the mess of an external w5s (as in_wm does for asx playlists).

when you've got the file and it's being queried, you can determine how to process the file ie to expand or just have the single entry (though you'll have to play around since i've no code/dev means on this box)

-daz
Thank you.

I'm currently extracting sid://asdasdas.sid,x entries, just like you did in your in_zip plugin.
Since there are no separate files for C64 subtunes, I can't extact aaaa.sid, bbbb.sid, cccc.sid into the playlist, as subtunes.
I think this is still the only thing I can do. Is that right? ..or is there any 'metadata' I can add into the playlist, then reuse it? So, I could add multitune.sid four times, but with different metadata entries and my input plugin could check it on play() and getfileinfo(), etc...
need4sid is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump