INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Lots of information missing for developers  (Read 5263 times)

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Lots of information missing for developers
« on: April 07, 2007, 07:46:19 am »

Hi,

I've been struggling with the development of a Plugin in C# for 2 days now and find that a lot of information is missing in the documentation. Just thanks to the private work of Mr. ChriZ and some ingenuity of myself I was able to get it working in C#. I'll give a few samples of what I've been looking for:

- Found the GetSkinInfo function but don't know which parameters I can use. The example only gives me 2. GetSkinInfo("Tree", "TextColor"); GetSkinInfo("StatusBar", "BackColor");
- How can I get/set the current 'Preset' for the Equalizer?
- Can I add new 'Presets' programmatically?
- The 'SkinWindow' function doesn't skin my plugins window. Have set some colors, using the the getSkinInfo() function, myself for now. Why doesn't it or even better when/how does it work?
- Added a Timer to the plugin to poll for changes in the Equalizer and skins. Is that the way to go? It works but event-driven would be better.

When I continue programming more question will arise. Interact is a good place to get info but it takes a lot of time.

Dear JRiver people. If you want to encourage developers to program new tools for MC then more accurate documentation is needed.

Paul.

Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #1 on: April 07, 2007, 08:05:26 am »

Hi Paul,

Yes, the docs in the devzone aren't the greatest, but we're working on them. They are in the wiki now:
http://wiki.jrmediacenter.com/index.php/DevZone
so please help by adding there when you can.

I'll check on your items on monday, add the info too.

Thanks,

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #2 on: April 07, 2007, 01:07:42 pm »

Hi John,

Thanks for replying. Motivated people also work at the weekend. You must be very motivated. I've just contributed some of my C# code in the Wiki. Very nice Wiki. I recognize the Wikepedia layout.

Paul.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #3 on: April 07, 2007, 01:49:33 pm »

Looks great! Thanks a lot -- j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Lots of information missing for developers
« Reply #4 on: April 09, 2007, 06:45:00 am »

How do I create a new wiki page?
I've searched all over the place.
I can edit pages but can't see how to create a page.

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #5 on: April 09, 2007, 09:51:49 am »

To create the page 'Mr ChriZ's Page', edit the page you want to link to it, and put in [[Mr ChriZ's Page]]. After you save that page, the link will show up red, meaning it hasn't been created yet. Click on the red link and it will let you create it.

Thanks...

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Lots of information missing for developers
« Reply #6 on: April 09, 2007, 12:52:03 pm »

Ah!  I See, I'll do what I can to flesh out some of the automation stuff in that case,
with examples as I use them.

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #7 on: April 09, 2007, 03:10:12 pm »

- Found the GetSkinInfo function but don't know which parameters I can use. The example only gives me 2. GetSkinInfo("Tree", "TextColor"); GetSkinInfo("StatusBar", "BackColor");

I updated the docs (http://wiki.jrmediacenter.com/index.php/MJAutomation#number_GetSkinInfo.28string_strItem.2C_string_strAttribute.29)

The answer is:

http://wiki.jrmediacenter.com/index.php/MEGAMorphis

Quote
- How can I get/set the current 'Preset' for the Equalizer?
- Can I add new 'Presets' programmatically?

Did you see:
http://wiki.jrmediacenter.com/index.php/MJMixerAutomation
Was it not helpful? (or perhaps better phrased - was it too difficult to find?)

Quote
- The 'SkinWindow' function doesn't skin my plugins window. Have set some colors, using the the getSkinInfo() function, myself for now. Why doesn't it or even better when/how does it work?

See above...

Quote
- Added a Timer to the plugin to poll for changes in the Equalizer and skins. Is that the way to go? It works but event-driven would be better.

We don't do a lot of events yet, they are a recent addition to the SDK. If you could list the top few events you'd like, I'll try to get them implemented in a day or two.


Thanks again for you help and input...

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #8 on: April 10, 2007, 03:02:23 pm »

Hi John,

I updated the docs (http://wiki.jrmediacenter.com/index.php/MJAutomation#number_GetSkinInfo.28string_strItem.2C_string_strAttribute.29)

The answer is:

http://wiki.jrmediacenter.com/index.php/MEGAMorphis

Already found the MEGAMorphis but probably didn't use it correctly. Will give another try. My try on subclassing has not been very successfull so far (MC crashes like hell). I'll keep at it. Today had a better idea (why didn't I think of this before type of idea). Will let you know if that succeeds.


Did you see:
http://wiki.jrmediacenter.com/index.php/MJMixerAutomation
Was it not helpful? (or perhaps better phrased - was it too difficult to find?)


You didn't quite catch my drift here. I did find it quite easely but that's not the functionality I need. I've seen other plugins doing it but I don't know how they do it. I plan to build a nicer version of the already present plugin that automatically sets the Equalizer to a preset. Also I would like the plugin to be able to create new presets or maybe I'll leave that to the original (still in the process of thinking that one through). What I would like to do is get/set the named presets (i.e. 'Rock', 'Jazz', etc...) with the MixerAutomation functions I can't do that.

See above...


You didn't catch it here too. Skinning is done for all the MC Windows. How does the skinning for f.i. the TIVO Server work. It doesn't skin my plugin. I'm now setting colors myself (the 'why didn't I think of that before idea' from above). I'm using the 'void SkinWindow(number nWindowHandle, boolean bSkin)' function to have my plugin skinned but that doesn't do the trick. I probably need to do something else to get it working (or maybe it doesn't work for .NET plugins yet).

We don't do a lot of events yet, they are a recent addition to the SDK. If you could list the top few events you'd like, I'll try to get them implemented in a day or two.

Events I can think of are:
- New skin selected (not needed when my plugin is skinned automatically)
- Volume up/down
- Equalizer changed

I possibly will think up a few more when I start programming again!

Thanks for all the info so far...

Paul.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #9 on: April 11, 2007, 01:25:54 pm »

Already found the MEGAMorphis but probably didn't use it correctly. Will give another try. My try on subclassing has not been very successfull so far (MC crashes like hell). I'll keep at it. Today had a better idea (why didn't I think of this before type of idea). Will let you know if that succeeds.

I've updated the docs to be clearer about what to pass. Take a look now and see if it is better:

http://wiki.jrmediacenter.com/index.php/MEGAMorphis#Skin_Items

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #10 on: April 11, 2007, 01:40:52 pm »

You didn't quite catch my drift here. I did find it quite easely but that's not the functionality I need. I've seen other plugins doing it but I don't know how they do it. I plan to build a nicer version of the already present plugin that automatically sets the Equalizer to a preset. Also I would like the plugin to be able to create new presets or maybe I'll leave that to the original (still in the process of thinking that one through). What I would like to do is get/set the named presets (i.e. 'Rock', 'Jazz', etc...) with the MixerAutomation functions I can't do that.

I double checked - the wiki docs are up to date w/r/t the MixerAutomation functions. There are none for getting named presets. I'd guess what other plugins do here is use hard coded values for the presets (set a preset, use Automation to read the values for the bands, then hard code those values into the program). Sorry....

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #11 on: April 11, 2007, 01:52:38 pm »

You didn't catch it here too. Skinning is done for all the MC Windows. How does the skinning for f.i. the TIVO Server work. It doesn't skin my plugin. I'm now setting colors myself (the 'why didn't I think of that before idea' from above). I'm using the 'void SkinWindow(number nWindowHandle, boolean bSkin)' function to have my plugin skinned but that doesn't do the trick. I probably need to do something else to get it working (or maybe it doesn't work for .NET plugins yet).

We don't do well with .NET, VB or C# and skinning. The problem is that .NET is it's own skinning engine. We could try to do better in this area, but that makes the skins themselves much more complicated. For now, doing it with colors is best.

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #12 on: April 11, 2007, 02:43:07 pm »

Events I can think of are:
- Volume up/down
- Equalizer changed

These two are already done, they just weren't in the docs. I've updated them:

http://wiki.jrmediacenter.com/index.php/Media_Center_Automation#Event_Handling

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #13 on: April 11, 2007, 02:47:08 pm »

I've updated the docs to be clearer about what to pass. Take a look now and see if it is better:

http://wiki.jrmediacenter.com/index.php/MEGAMorphis#Skin_Items

j


I'll take a look at this at the weekend.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #14 on: April 11, 2007, 02:50:04 pm »

I double checked - the wiki docs are up to date w/r/t the MixerAutomation functions. There are none for getting named presets. I'd guess what other plugins do here is use hard coded values for the presets (set a preset, use Automation to read the values for the bands, then hard code those values into the program). Sorry....

j


Yep, I think so too (the hardcode part). If you don't provide me with that possibility it's going to be hard to make it work very friendly. So if possible could implement something here?
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #15 on: April 11, 2007, 02:51:30 pm »

We don't do well with .NET, VB or C# and skinning. The problem is that .NET is it's own skinning engine. We could try to do better in this area, but that makes the skins themselves much more complicated. For now, doing it with colors is best.

j


Working with the SkinInfo() function getting colors myself work fine for the moment. As soon as I've finished the plugin I'll donate it (and the source).
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #16 on: April 11, 2007, 02:52:48 pm »

Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #17 on: April 11, 2007, 03:48:15 pm »

Events I can think of are:
- New skin selected (not needed when my plugin is skinned automatically)

Added in 12.0.211 or higher. See event docs for details

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Lots of information missing for developers
« Reply #18 on: April 11, 2007, 03:53:43 pm »

Yep, I think so too (the hardcode part). If you don't provide me with that possibility it's going to be hard to make it work very friendly. So if possible could implement something here?

I'm confused: I think you already have the tools you need to do this.

Write a little plugin that uses GetEQBand() to report the current settings. In MC, set the eq to one of the presets, then use the plugin to get the values for each band. Do this for all presets you want to use.

Now, in the real plugin, provide a button or whatever that says "Rock Preset", and when this button is clicked, use SetEQBand and the values from before to set the EQ.

Am I missing something?

j

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #19 on: April 14, 2007, 01:58:52 am »

Added in 12.0.211 or higher. See event docs for details

j


John, where can I find this Version. The latetst I can find in the download directory is 12.0.207.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #20 on: April 14, 2007, 02:18:05 am »

I'm confused: I think you already have the tools you need to do this.

Write a little plugin that uses GetEQBand() to report the current settings. In MC, set the eq to one of the presets, then use the plugin to get the values for each band. Do this for all presets you want to use.

Now, in the real plugin, provide a button or whatever that says "Rock Preset", and when this button is clicked, use SetEQBand and the values from before to set the EQ.

Am I missing something?

j


Yep, your missing the point (or am I missing it). If I could get/set all the preset names that are already there (and add new ones) I could loop over all the presets that are already in MC. Getting the EQband info (i.e. Name and Bandinfo) without setting a preset would be nice too. In fact I could f.i. create a drop-down-list or combobox listing all the names. Like the other AutoEQ plugin I would like to assign presets to Music playing automatically. The way you describe it I understand I need to hardcode the names that are normally there and collect the EQ-band manually which is not very friendly.

Paul.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #21 on: April 14, 2007, 02:19:00 am »

Super!!

They don't seem to work. Posted a seperate thread for that!
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Lots of information missing for developers
« Reply #22 on: April 14, 2007, 03:27:22 am »

John, where can I find this Version. The latetst I can find in the download directory is 12.0.207.

Mr ChriZ already passed me a link to version 12.0.213.
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Lots of information missing for developers
« Reply #23 on: April 14, 2007, 09:04:35 am »

I would find a playposition event usefull allthough I appreciate it might be a bit heavy because it would have to fire every second for each zone that is playing.

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612
Re: Lots of information missing for developers
« Reply #24 on: April 14, 2007, 09:07:55 am »

I can't see volume up/down firing. Are the changes made to MC itself or do I need to keep reimporting the tlb whenever changes are made?

Thanks
Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk
Pages: [1]   Go Up