New Music Engine (1 Viewer)

Status
Not open for further replies.

Smirnuff

Portal Pro
December 7, 2004
630
3
United Kingdom
Steve I think you've made an excellent choice going with Bass, I love the new music engine. No codecs to install, cross-fading etc all make for a much better music portion of MP.

I've always made a one line mod to the previous code to allow playback through a second sound card, for those who've done similar and want to do the same with the new engine place the following before the call to Bass.BASS_Init in MediaPortal.Player.BassAudioEngine:

Code:
                int device = -1;

                for(int index = 0; index <= Bass.BASS_GetDeviceCount(); index++)
                {
                    string description = Bass.BASS_GetDeviceDescription(index);

                    Log.Write("Device: {0},'{1}'", index, description);

                    if (string.Compare(description, "Sonica", true) == 0)
                    {
                        device = index;
                        break;
                    }
                }

Then change

Code:
                if (Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT | BASSInit.BASS_DEVICE_LATENCY, 0, null))
                {
                                 ...

to

Code:
                if (Bass.BASS_Init(device, 44100, BASSInit.BASS_DEVICE_DEFAULT | BASSInit.BASS_DEVICE_LATENCY, 0, null))
                {
                                 ...

finally run the code, check the log file for the index of the device you want to use and replace 'Sonica' above with the correct description, recompile and you'll be all set.

Note: The above is for people who don't mind fiddling with the code only, don't bug Steve about it or expect to get control over volume (I'm more than happy to control mine via my amp's remote) etc.

Looking forward to seeing what other nice things Steve has planned for us :).
 

orencha

Portal Pro
February 2, 2005
66
14
Netanya
Home Country
Israel Israel
Steve,
I'm playing with the SVN for 2 days now, and you just made a great job with the music engine!

Two comments:

About the crossfade:
I suggest two seperate configuration bars, one for "fade-in time (seconds)" and one for "fade-out time (seconds)".

Why? because most of the songs (at least those I listen to...) are already fading out natively. Starting the second song, with little or no fade-in at all, while the first song still fades out, sounds smoother... That's what I do today with WinAmp.

About the ReplayGain support I mentioned before, I think you already have almost everything needed to support RG in place:
1. You already have a (great) tag reader; you just need to look for (in tags) for RG tags (and put them in the "song" table in Music DB). and, of course... put the new tag reader in the SVN ;-)
2. You already control the volume (gain) of songs and even do crossfading... So you just need to connect 1+2 together (with simple DB to scale/percentage calculation) - and here's your ReplayGain support ;-)

Please note, that your code DOES NOT need to calculate ReplayGain values; just apply a given gain (read from tags). Users can use other applications (such as Foobar2000) for ReplayGain calculations & tagging.

Thanks again!
 

ghackett

Portal Member
May 9, 2005
30
0
NYC
This may be a dumb question, but I'm still using MP 0.1.3.0 and as soon as my new HDTV comes in this week (STOKED) I'm planning to upgrade to 0.2. I was going to go to 0.2.0.4, but this seems like such a huge improvement (over 0.1.3.0 at least) that I'm considering going to a SVN build instead. So I guess I'm asking is it worth it? Is everything else pretty stable in the SVN builds? Also, how does this new music engine work with a really big library (90 gigs organized by itunes but no DRM). I never used the MP music engine before because it was just too slow, but this looks really promising. I guess that last one is my biggest question, has anybody tested this with a very big music library?
 

zag2me

Portal Pro
April 11, 2006
216
68
Home Country
England England
Replaygain is the devil!! :)

Please make it an option, and not enabled by default :) if it ever does get into the code.
 

fathead

Portal Pro
March 17, 2005
209
0
Steve I'm getting a few odd things happen which I guess is to do with the tag engine. I was listening to Wu Tang or something earlier & had a number of tracks come up saying "tagged as Rap" from bands like cold play & Thin Lizzy! Any idea why this might be?

Also when these tracks come up & you click them, any chance you could have an on screen prompt or a confirmation to add to playlist - I clicked away on the same song 15 or so times before realising what is was doing. In addition to this point, could you somehow pull up a pop up if someone adds the same track twice in a playlist?
 

zombiepig

Portal Pro
March 21, 2005
408
0
Melb, Aus
Home Country
About the ReplayGain support I mentioned before, I think you already have almost everything needed to support RG in place:
1. You already have a (great) tag reader; you just need to look for (in tags) for RG tags (and put them in the "song" table in Music DB). and, of course... put the new tag reader in the SVN ;-)
2. You already control the volume (gain) of songs and even do crossfading... So you just need to connect 1+2 together (with simple DB to scale/percentage calculation) - and here's your ReplayGain support ;-)

and
3. a slider to control the volume of songs which have no associated replaygain values ;)
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
zombiepig: Is that really necessary? You can still control overall volume in the regular way. You are going to have trouble with a mix of replaygain tagged and non-replaygain tagged files whatever you do, wouldn't it be better to just support replay-gain for the files that were tagged and leave it the same as it is for files that are not replaygain tagged? Then you don't clutter the interface with controls that don't add much value. This has the advantage of replaygain support being transparent to the user, if they don't use it they don't need to think about it at all.
 

zombiepig

Portal Pro
March 21, 2005
408
0
Melb, Aus
Home Country
actually it is... because in almost all cases (ok, in contemporary music!) replaygain will cause the music to be played back at a lower volume.
with foobar for instance, if you don't drop down the 'preamp for files without replaygain info', all rg'ed files are much softer then non-rg'ed files (albeit at the same volume as other rg'ed files!). you need to pull down the preamp for non rg'ed files so they sound the same volume as the properly rged ones.

phew.... that was a really messy explanation :rolleyes:

(technically there's also a number 4 thing to do as well, that's to check if the track corrected with rg will clip, and if so, either limit the track preamping to prevent clipping, or apply some sort of compressor/limiter. but you could avoid clipping anyway just by yanking the 'output level' control down a bit (like steve's already done!))
 

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
Yes, I understood that replaygain will most likely make music softer, but if someone is using replaygain with their files, why would only a fraction of them be tagged? And if they are not using replaygain with some of their files, why would they be surprised when the non replaygain-tagged files are louder?

I guess you are talking about just putting a slider in the replaygain configuration in the configuration application, which is not too bad I guess. But your files that are not replaygain tagged are going to be all over the place volume wise anyway, even with the new volume slider (which is the reason you want replaygain support in the first place).

It is not a big deal to me, because I wouldn't use replaygain anyway. I am just concerned about option bloat in MediaPortal, as many people find it prohibitively difficult to set up already.
 

zombiepig

Portal Pro
March 21, 2005
408
0
Melb, Aus
Home Country
I am just concerned about option bloat in MediaPortal, as many people find it prohibitively difficult to set up already.

couldn't that be avoided by hiding away most of the advanced options? like, have a checkbox 'enable replaygain', with a button next to it 'advanced settings', and hide all the extra guff in there? :D
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom