Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Mayibongwe

Pages: 12 3
1
Plugins / Crossfade Toggle (hotkey)
« on: June 11, 2024, 09:06:32 PM »
Download it from the add-on link here

In the future, I will convert this plugin to a generalized hotkey provider, as and when the requests come up.
The crossfade hotkey was requested a while back - I found this link from a recent wishlist request from another separate topic which I haven't linked here.

Maybe I'm missing something, but I couldn't find the Toggle Crossfade hotkey in the list.




The entire code for anyone interested in taking a peak.
Code
using System;

namespace MusicBeePlugin
{
    public partial class Plugin
    {
        private MusicBeeApiInterface mbApiInterface;
        private PluginInfo about = new PluginInfo();

        public PluginInfo Initialise(IntPtr apiInterfacePtr)
        {
            mbApiInterface = new MusicBeeApiInterface();
            mbApiInterface.Initialise(apiInterfacePtr);
            about.PluginInfoVersion = PluginInfoVersion;
            about.Name = "Crossfade Hotkey Toggle";
            about.Description = "Toggles the on and off state of the crossfade sound effect";
            about.Author = "Mayibongwe";
            about.TargetApplication = "";
            about.Type = PluginType.General;
            about.VersionMajor = 1;
            about.VersionMinor = 0;
            about.Revision = 0;
            about.MinInterfaceVersion = MinInterfaceVersion;
            about.MinApiRevision = MinApiRevision;
            about.ReceiveNotifications = ReceiveNotificationFlags.StartupOnly;
            about.ConfigurationPanelHeight = -1;

            return about;
        }

        public void ReceiveNotification(string sourceFileUrl, NotificationType type)
        {
            switch (type)
            {
                case NotificationType.PluginStartup:
                mbApiInterface.MB_AddMenuItem(null, "Player: Toggle Crossfade On/Off", hotkeyHandler);
                break;
            }
        }

        public void hotkeyHandler(object sender, EventArgs e)
        {
            bool isCrossfadeOn = mbApiInterface.Player_GetCrossfade();
            switch (isCrossfadeOn)
            {
               case true:
               mbApiInterface.Player_SetCrossfade(false);
               break;

               case false:
               mbApiInterface.Player_SetCrossfade(true);
               break;
            }
        }

        public bool Configure(IntPtr panelHandle)
        {
            return false;
        }
    }
}

2
Plugins / Volume Lock
« on: June 09, 2024, 02:14:45 AM »
Download it from the add-on link here

Any way/chance of locking the volume control?
Could it be done as a plugin?
Above is the link to the thread that made me give this a go just to see if it'd be possible.
Looks to be working just fine in my brief testing.


3
MusicBee API / Deriving The Skin Icons of a MusicBee Form
« on: June 06, 2024, 06:22:25 PM »
I'm in the process of creating a basic settings form that'll be accessible through the 'configure' button in the preferences.

If I wanted that form to mirror the current skin's border images and button icons (close, minimize, etc):
Would it technically be possible for me to backtrack to the Preferences parent form via the control that the configure function provides, in order to retrieve the icons myself?

I could give it a go ofc, but I figured asking here would save me some time in case the attributes of that parent form are internally protected anyway,
or if it's outright impossible to backtrack that far (I'm new to forms - so it'd take a bit of researching and experimenting).

If we indeed cannot get to those icons ourselves, how about introducing one of these alternatives:

1. New API calls to retrieve each of those icons.

2. Which I think is the best solution
Providing access to a standard MusicBee form which already follows the skin buttons and borders.

Edit: one like this (just without the contents of that inner rectangle).

4
Developers' Area / Add-on Icon [Bookmarked]
« on: May 04, 2024, 07:28:23 PM »
I think it would be an injustice not to have this icon on a skin or something.
Where'd you dig it up, Tony?



A Very Very Happy MusicBee user, i wish i found it a lifetime ago....  8)

5
Beyond MusicBee / Bit of a Funny Read To Make Up Your Friday
« on: March 08, 2024, 05:32:52 AM »
In the previous MusicBee version it worked perfectly. I wonder if I'm the only one with this problem.  :'(
you are the only person who has reported this so my guess is you have installed and are running the new musicbee version from a different location
I'm running MusicBee from Mozambique, is there something I can do to resolve this issue?
location on your computer ie. you have two installed instances of musicbee

6
General Discussions / Usage of Multivalue Tags | <Artist> <Composer>
« on: January 27, 2024, 12:39:28 PM »
Here's my argumentation for having a dedicated Album Artists tag:
https://getmusicbee.com/forum/index.php?topic=29851.msg166102#msg166102
While chewing on the concept of album artists, I got heavily distracted by your use of <artists: artist>.
I've created a new topic here instead of responding in either of those threads because I don't wanna pollute/derail what they were intended for.



Is the above screenshot from your linked thread currently how you have these artists tagged?
If I was replying to a new forum member, I would even be bold enough to say that they're using <artist> incorrectly,
but seeing as I am addressing somebody more knowledgeable and experienced than me, I'm thinking there's something I'm missing here.

Why has <artist> (a multivalue tag) been tagged with Aretha Franklin & George Michael?
Your very reason for creating the custom tag <artists [credited]> (splitting up the two artists above) is what <artist> itself is designed for.

There's also an artist tag for Patti LaBelle feat. Michael McDonald? I'm perplexed...

Wanna hear your feedback on this before going back to the composers thread.

7
General Discussions / 2023 - Compliments / Reviews / Observations
« on: December 15, 2023, 06:43:14 PM »
It's that time of the year people!🎉
https://getmusicbee.com/forum/index.php?topic=11596.0

Two weeks left before we say goodbye to 2023 and this is a massive thank you to Steven for the ongoing commitment that he's injected into this precious project throughout the years.
The turnaround times for a one-man show continue to amaze! How's that for service?💯

Although the forum does not appear to have been graced with a lot of new members this year, MusicBee continues to grow onward and upward💪
The optimist in me thinks that can only mean our moderators have been hard at work getting rid of fake accounts. Way to go guys - phred, zak, psychoadept!


8
General Discussions / Translated Error Logs
« on: November 03, 2023, 06:53:15 PM »
Saw an error report here that encouraged me to finally raise this question I've always had: https://getmusicbee.com/forum/index.php?topic=40177.msg217499#msg217499

More often than not, the only people who can dissect a MB error log are Steven and a handful of other seasoned (English speaking) users.
Which begs the question, is it really wise to translate the error log when other languages are selected in the MB preferences, since:

As far as I've noticed, the reporting user simply dumps the error log in that translated state and I would guess,
Steven and the other aforementioned forum members would then have to take the time to translate the log back into English? (or is this assumption incorrect?)

Just a thought...

9
TheaterMode / Theater Modes / What Are They? / How Do They Work?
« on: August 10, 2023, 11:04:01 PM »
The Theater Mode plugin - a gem designed and maintained by MusicBee's one and only developer, Steven.

This post is long overdue - been thinking about doing this for the past year or so.
I'd like to thank karbock, and hiccup I believe, for their recent write-ups in the Tips and Tricks board that have motivated me into finally getting this done.


So, Theater Modes (TM's)...what are they?

These are custom views or layouts that are meant to extend the visual aspect of the MusicBee listening experience.
Simply put, they allow users to redesign MusicBee's graphical user interface to their liking.
As I've said in the past, listening to soundtracks has never been this beautiful.


Embedded vs Full-screen

These are the types of TM's that we have and the main difference between them lies in the screen area that MusicBee allocates for each.


Embedded Theater Modes
  • MusicBee reserves only the main panel for use. i.e everywhere but the title & tabs bar and the player controls.
  • They are accessible from the Now Playing tab, Compact Player, as well as the Now Playing Bar which can be docked in either the Main or Bottom Panel.
  • They are located in .../MusicBee/Plugins/TheaterMode.Embedded



Full-screen Theater Modes
  • As the name suggests, they occupy every inch of the screen.
  • They can be activated by means of a hotkey or the drop-down menu in View > Theater Mode.
  • They are located in .../MusicBee/Plugins/TheaterMode.List



Normal Theater Modes
  • They are more or less the same as full-screens.
  • These are set to occupy all of MusicBee's main window with the exception of the Title Bar.



Built-In vs Custom

Every MusicBee install comes bundled with a couple of built-in and user-created TM's.


Built-In Theater Modes
  • These are hardcoded into MusicBee and cannot be edited by any means other than the options provided in the panel configuration settings.
  • At the time of writing, we only have three built-in TM's - Artist Picture, Album Color Mix, and Large Album.

Custom Theater Modes
  • These are user-created and will show up in the list of TM's once placed in the appropriate folders mentioned hereinabove.
  • The files need to be saved with an .xml extension in order to be recognized by MusicBee.
  • Most of your code will comprise of items called <elements> and <attributes>, which are basically series of keywords used to command MusicBee into taking various actions.
  • Attributes are used to define the structure of the elements.
  • There is a specific syntax that is required during the definition of these elements and attributes - refer to the posts below.

10
Plugins / Library Quiz
« on: November 05, 2022, 02:00:53 PM »
Download the plugin from the add-on link here.
NB: Only works with MusicBee 3.5.8338 and later versions.

I came across this thread some time ago and also thought this would be an interesting and fun thing to have in MusicBee.
Probably not exactly what is described there, but it's close.
All comments are welcome. Let the games begin!

Installation

- Download the mb_LibraryQuiz zip file.
- Then locate and select it from MusicBee > Edit > Preferences > Plugins > Add Plugin
- Lastly, dock the "Library Quiz" element to any panel of your choosing in View -> Arrange Panels...

How It Works

- The plugin will pick a random track from your library.
- Then you'll have to type in whatever values you think correspond with the track tags.
- Your answer will only be evaluated once the field is out of focus i.e when you move on to the next field or click anywhere outside the current field.
- After evaluation, the correct answer will get displayed on that specific field and the scores will get incremented accordingly (1 point for each correct answer).
- Clicking on the track's correct album cover will also earn you a point.
- The round artist picture does not do anything; it's only there to jog your memory.
- You are free to make an attempt on any or all of the 6 fields - you won't get penalized for leaving a field unanswered.
- Click on the track title when you're ready to move on to the next round.

Customization

- The colours used by the plugin are that of the current skin.
- If you're not entirely happy with some of them, you can override them from this folder ...MusicBee\AppData\mb_LibraryQuiz\Skins


11
MusicBee API / Enhancement To Existing Artwork API Calls
« on: October 27, 2022, 11:00:18 PM »
Currently, it appears that artwork retrieval functions return a null whenever there isn't any artwork linked to a track file.

Instead of returning nothing, would it be possible to return the "No Artwork" image that is provided by skins?
And in case of artist pictures, returning the "Unknown Artist" image instead?

12
MusicBee API / Set Panel Scrollable Area
« on: October 27, 2022, 10:43:38 PM »
I know it's in the name but can I get clarity on what SetPanelScrollableArea is supposed to do?
Like what should I expect MusicBee to do when I've defined the following?

Code
mbApi.MB_SetPanelScrollableArea(panel, new Size(100, 200), true);
I've been working on a quiz plugin for the past few weeks that's near-ready.
I just need to get some scrolling to take place in there if ever the panel size is too small.
Can I rely on that function to get me the scrollbar that's showing up in the 'Upcoming Tracks' panel below or do I just have to add my own scroll control.


13
Bug Reports / Apparent Conflict Between Lyric Plugins
« on: October 02, 2022, 01:30:22 PM »
Hello Steven.
Coming from: https://getmusicbee.com/forum/index.php?topic=36952.msg204965#msg204965

It appears that when providers from different lyric plugins are auto-loaded by MusicBee (during plugin activation), there is some cross-association that happens between the plugins.

Scenario:
- I have opened MusicBee with both LyricsReloaded and NeteaseLyrics disabled.
- I then go into Preferences and enable each of them.
- Having done that, MusicBee will automatically load all the different providers that each plugin has to offer.
- After running a lyrics search for a particular track, I then go on to examine the Reloaded log file.
- In it, will be this entry that indicates MusicBee has somehow associated Netease Lyrics (as a provider) with the Reloaded plugin:

Code
02-10-2022 01:11:14 [DEBUG] Lyrics request: Julie Bergan - All Hours - All Hours - Single - Netease Cloud Music(网易云音乐)
02-10-2022 01:11:14 [WARN] The provider Netease Cloud Music(网易云音乐) was not found!
In my testing, I have tried enabling all these lyrics plugins at the same time (Reloaded, Netease, Beenius, Petit), and the conclusion is the same:
For some reason, MusicBee is associating those other providers with Reloaded according to its log file.

These other plugins do not seem to have log files, so there's no way I can verify whether they also get associated with Reloaded providers or not.
And while this doesn't seem to affect the Reloaded providers on my system, it seems to affect them for other users.
Maybe there is more to it than MusicBee just trying to run a lyrics search, from another plugin's provider, on another plugin.

Just thought I'd report this and you'd have a look.

14
Plugins / LyricsReloaded (Latest)
« on: July 30, 2022, 04:34:00 PM »
Download the new plugin version from the add-on link here.

What started out last weekend as a quest to learn the general workings of regular expressions has somehow led to me finding my way around the Lyrics Reloaded plugin. I am not really someone who knows what they're doing, but I figured since I could make sense of some of the code, I might as well make one or two enhancements...and that is exactly what I have done. I have received permission from frankz - the forum hero member who revived the then-abandoned plugin and kept it alive ever since - to publish my version of this plugin and essentially take over the responsibilities associated with it and its userbase.

Changes:

-   The plugin appears to have originally been designed to make use of three lyrics loaders or retrieval methods (static, search and API)
    But only one was ever implemented from what I can tell - the static loader which requires websites to have straightforward, predictable URLs.
    Users can now make use of a search loader which is capable of retrieving lyrics from URLs with unique IDs for every track.

-   The log file has now been programmed to reset every ten MusicBee sessions (startups, to be precise) in order to keep its length at a reasonable range.

-   Genius, Musixmatch and Deezer have been added as built-in providers.  

-    Added a non-UI setting that allows you to either enable or disable the line that shows where retrieved lyrics are from.
     There's also another setting to accompany it that allows you to position the displayed source at the top or bottom.

Credits:

-   @quick_wango (created this invaluable plugin)
-   @frankz (resuscitated the plugin)
-   @Steven (no MusicBee, no plugin)
-   Every other MusicBee user who contributed towards this project (such as providing regex fixes, etc.)

How to use the new loader:

The search loader functions more or less the same as the static loader. The difference lies in the definition of the config section.

identity url           refers to the site address where the song search is conducted.
identity pattern   refers to the pattern that extracts the unique ID for the song (if it exists).
lyrics url               refers to the previous url's homepage which will be auto-concatenated with the unique ID previously extracted.
lyrics pattern       refers to the pattern that extracts the lyric content.

Example:
Code
name: Lyrics Freak
loader: search

variables:
    artist:
        type: artist
        filters:
        - lowercase

    title:
        type: title
        filters: artist
        
config:
    identity url: "https://www.lyricsfreak.com/search.php?q={artist}+{title}"
    identity pattern: ['[^a]\shref="(?<identity>.*?)"', 's']
    lyrics url: "https://www.lyricsfreak.com"
    lyrics pattern: ['data-title=".*">(?<lyrics>.*)<div class="lf-marker\s', 's']
    
post-filters:
- strip_html
- utf8_encode
- entity_decode
- [regex, '\[.*?\].*?(\w)', '$1', s]
- [regex, '\(feat\..*?\)', '', s]
- [regex, '.*?(\w.*)', '$1', s]
- trim

15
Questions / Keep Tracks In Sequence When Shuffling (Setting)
« on: July 21, 2022, 12:12:47 PM »
I almost wrote a bug report thinking that this setting was not working.
I ended up, by chance, realizing that it is reserved for album tracks only. Is there a reason behind this restriction?
All along, my expectation of this setting was that it would allow me to link ANY files together when in shuffle mode.

I've got a lot of song covers and remixes which I usually discover from Soundcloud and I'd like to keep them in sequence with their original counterparts, but I can't find a way to do so.
There are also scenarios where I just want to link totally unrelated tracks, simply because I've always enjoyed them more when they're in sequence.

So is there any way I can do this right now or I would just have to try the wishlist board? (to have the restriction on this setting removed)

Pages: 12 3