Author Topic: How To  (Read 9528 times)

jbdev001

  • Newbie
  • *
  • Posts: 7
Hi I'm almost finished developing my first plugin for the community. I just need a couple pointers on:
1.) How to read an audio file's metadata (e.g. BPM/Tempo)
2.) How to set the Player Playback rate (kind of like the built-in Player features to Increase/Decrease Tempo)

I've tried to find documentation, answers in the forums, and looking at other plugins, but I'm coming up short.

I see MusicBeeInterface.cs > Plugin > MetaDataType but not sure what to do with this. I'm using C#.

Huge thanks to anybody that can help.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34405
take a look at one of the open source plugins such as the tag tools plugin.
To retrieve a tag value use the Library_GetFileTag() function using MetadataType.BeatsPerMin and Tempo
There is no way to get the player playback rate

jbdev001

  • Newbie
  • *
  • Posts: 7
Thanks, I'll look into that. Can you set the Player playback rate (much like the built-in features to Increase/Decrease Tempo)?
If not, I don't think I'll be able to finish my plugin  :'(


Here's what I have so far - you can probably guess what I'm trying to do:
Last Edit: January 09, 2020, 06:50:06 PM by jbdev001

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34405
no, you cant set the playback rate

sveakul

  • Sr. Member
  • ****
  • Posts: 2493
no, you cant set the playback rate

Steven, is that on the way though with 3.4 along with pitch?  Your post here refers to "sample rate" and not sure what you meant: https://getmusicbee.com/forum/index.php?topic=26270.msg164439#msg164439

jbdev001

  • Newbie
  • *
  • Posts: 7
Steven, is that on the way though with 3.4 along with pitch?  Your post here refers to "sample rate" and not sure what you meant: https://getmusicbee.com/forum/index.php?topic=26270.msg164439#msg164439

I second this. Would it be easy to expose those to the API (since modifying the tempo/BPM is already in use by stock MusicBee)?

jbdev001

  • Newbie
  • *
  • Posts: 7
Any updates on exposing playback rate to the API?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34405
Any updates on exposing playback rate to the API?
No near term plans to do this