Head-Fi.org › Forums › Equipment Forums › Computer Audio › MQn minimalist Wasapi WAV C++ memory player integrated with foobar2000
New Posts  All Forums:Forum Nav:

MQn minimalist Wasapi WAV C++ memory player integrated with foobar2000

post #1 of 42
Thread Starter 

Hi,

 

this seems to be an exciting time for computer audiophiles with a number of new players becoming available.

 

I have developed a minimalist Wasapi WAV player that has several innovations not seen in other players, it was born out of my frustrations with the sound quality of other players and the desire to understand why players with so called efficient code sounded so digital and also different to each other. My hunch was proven right (to my ears, anyway) that the other players made design compromises that introduced noise to the sound at critical sections and that by carefully checking and rechecking the sonic impact of every constituent part of the code/build and using optimisations for speed as much as possible the noise could be reduced to a minimum.

 

It is minimalist, there is no user interaction, it just loads a file into memory and renders it to the default audio device. It is gapless, but can only play files of the same bit depth/sample rate at a time.

 

It is WAV only at the moment, but I plan to modify the MQn.bat file so that sox can be used to convert FLAC etc to WAV before loading to memory.

 

Innovations are optimised render loop, page aligned memory, optimised memcpy, Visual Studio 2012 compile using the latest optimisation techniques, auto vectorisation, profile guided otimisation, use of Intel C++ libraries during build, each setting has been tested to ensure best sound quality, fixed period sizes to align with memory page size, each sample rate/bit depth combination has it's own render loop, use of goto in loop rather than for/while, static libraries, single core compile etc

 

It is free.

 

I use it on quite a revealing and neutral system NAD M51 dac, Linn Klout power amp and ATC SCM 20 speakers, so any weakness in players is apparent. I do use beyerdynamic headphones on my bedroom system.

 

I am posting this on head-fi.org because I feel that the community here are a bit more interested in sound quality than most and am interested in any feedback to see how it compares to other players, have already had good feedback from users in AA and CA.

 

it requires 64 bit win7/8 and an x64 intel cpu with as much ram as required. bit rates supported are 16 bit 44/48 and 24 in 32 bit container 44/48/88/96/176/192

 

there is no install, just download 3 files (mqn.exe, paste.exe and mqn.bat) into a directory eg c:\MQnPlayer, copy the required WAV files or folder to the clipboard and double click MQn.bat. the console will close automatically after play finishes or can be closed down manually to stop play.

 

it can be controlled via foobar2000, see MQnfoobar.txt in the download link

 

https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541

 

it doesn't seem to get on with the JPlay windows service or fidelizer, due to them setting the system timer to 0.5ms (introduces a digital sound), so stop them before using MQn

 

here is the text from the MQnreadme.txt file

 

MQn - Just good music is a minimalist WASAPI Wav memory player that is stripped back as far as possible to reduce noise.

Innovations are optimised render loop, page aligned memory, optimised memcpy, Visual Studio 2012 compile using the latest optimisation techniques, auto vectorisation, profile guided otimisation, use of Intel C++ libraries during build, each setting has been tested to ensure best sound quality, fixed period sizes to align with memory page size, each sample rate/bit depth combination has it's own render loop, use of goto in loop rather than for/while, static libraries, single core compile etc.

example render loop for 16/44 shown at bottom of this file.


requirements are x64 Intel cpu with x64 win 7 or x64 win 8 and as much ram as you need to load the music you are about to play.

It plays 16 bit 44/48 in 16 bit containers and 24 bit 44/48/88/96/176/192 in 32 bit containers.

To play music just highlight the wav files/folder required, right mouse click and select copy to load the filenames into the clipboard

then just double click on MQn.bat

Installation - there is no installation or registry modification

Just download the MQn.bat, paste.exe and the latest version of the MQn.exe that meets your needs (see below) to a directory eg c:\MQnPlayer
 

Why the different versions - each version has the release point for the data to the device buffer optimised for a particular device

There are 3 options - the normal method of loading the buffer is

1. MQn.exev3 - normal method

 buffer event triggered -> get next buffer from device -> load buffer -> release buffer, so release point is last thing that happens

2. MQn.exev1 - buffer preloaded from previous loop

 buffer event triggered -> release buffer -> get next buffer from device -> load buffer, so release point is first thing that happens

3. MQn.exev2 - buffer preloaded from previous loop

 buffer event triggered -> load buffer -> release buffer -> get next buffer from device, so release point is first thing that happens

Just try the different versions and use the one that works/sounds best

MQn.exev1 is for realtek laptop drivers/HDMI and some dacs

MQn.exev2 is for usb eg I use it for my MF Vlink 192 usb/spdif convertor

MQn.exev3 is a vanilla version and should work with everything, but sound very slightly compromised compared to v1 and v2

rename the one selected to MQn.exe

optimisation tip - right mouse click on MQn.exe and select properties, then select compatability and tick

 disable visual themes, disable desktop composition, disable display scaling on high DPI settings and rune as an administrator

 then click apply


example render loop

    loop1644:

    
        
        WaitForSingleObject(hNeedDataEvent, INFINITE);

        
        pAudioRenderClient->ReleaseBuffer(1024, 0);
        pAudioRenderClient->GetBuffer(1024, &pData);
        A_memcpy (pData, sound_buffer += 4096, 4096);
        
        

        
    goto loop1644;


Edited by sbgk - 3/31/13 at 2:59am
post #2 of 42
Thread Starter 

I have just release vx.6 which switches off the desktop window manager's use of MMCSS leading to a dramatic improvement in the amount of detail obtained and a fantastic 3d sound stage.

https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541
 

post #3 of 42
Thread Starter 

Just released MQn version x.14 with flac play capability

download from

https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541

version x.14 needs the MMCSS and DWM services to be disabled for best sound quality, there are instructions in the MQnMMCSSDisable Readme.txt file (requires a small registry edit)

Have also uploaded a method of playing flac files with MQn using sox to decode them to wav before playback start, there are instructions in the readme file in the MQnFlac.zip

version x.14 is a big step up from v x.6

1. I had implemented MMCSS the wrong way round so that it was affecting the sound quality, I experimented with the recommended way and finally came to the realisation that MMCSS was bad for sound quality, so v x.14 doesn't use MMCSS and it is recommended that MMCSS is disabled. MMCSS is there so that cpu intensive media apps are not affected by other system loads, MQn is not cpu intensive and is a constant load so doesn't need another process (MMCSS) switching threads and priorities in and out for what is a non existent problem (MMCSS is designed for a heavy periodic cpu load and then a period of no load).

2. I had set the priority of MQn too high so that it was affecting critical system processes and sound quality, v x.14 priority has been lowered to the best setting for sound quality.

3. Intel have updated their c++ libraries, the new ones provide quite a step up in sound quality.

the future - plan to have pause and track skip back/forward and a more comprehensive decode ability. The decoding is done in the MQn.bat file so if anyone wants to have a go at setting it up to handle other formats then feel free.
 

 

post #4 of 42

Looks like it's great for this particular version of Windows 8 here:

 

http://www.computeraudiophile.com/f11-software/iso-usb-key-installer-preconfigured-and-stripped-down-audiophile-version-windows-8-pro-including-jriver-and-foobar-14390/

 

I'm planning to get this (fanless) AMD 1GHz board with 4GB of RAM, is that good enough to run Windows 8 x64 with your player?

 

http://forum.pfsense.org/index.php?topic=59555.0

post #5 of 42

Thanks a lot for for the big effort. Now that it supports flac I will definitely try it.

post #6 of 42
Thread Starter 

have uploaded a version which allows control of mqn - version mqn.exev2.50 control

space bar to pause/resume, less than sign to skip track back, greater than sign to skip track forward, M to skip 5 seconds back and / to skip 5 seconds forward, it is not case sensitive.

Unfortunately there is a slight hardening of the sound due to the extra thread, but it shows what can be done. Am looking at other ways so that the sound is not affected.

Also uploaded a much improved version of mqn - version x.47, this version has the buffer set to 8192 for all resolutions and also stops the console and associated input/output/output streams. The impact on the sound quality is pretty breathtaking, perhaps one of the biggest improvements so far.

need to use mqnstop.bat to stop mqn version x.47 as it is no longer associated with the console, so just download mqnstop.batbak and rename it to mqnstop.bat and create a shortcut on the desktop.


https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541

I'm going to make a bold statement and say this is the best (free) windows player out there. If you have heard anything as sweet or detailed then please let me know, because I haven't.

It has taken a while and I have been guilty of hyperbole with previous versions, but this is the real deal, absolutely stunning.

I have posted a 2.50 and a 2.46 atom control version, but the sq is inferior, but it's there anyway.

post #7 of 42
Thread Starter 

Hi,

 

Mqn is mostly optimised for intel 64 bit, but I can do an amd build. If you find out which version works with your setup, then I'll build that version.

 

cheers
 

post #8 of 42
Thread Starter 

Hi,

 

Did you try it. If you are still interested I would recommend the latest version 47, the sound is the closest to a live performance I have heard and sweet sounding too.

 

cheers

post #9 of 42
Thread Starter 

https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541



new version, quite a major upgrade in sound quality, think this is the final version in terms of SQ.

to quote one tester who came from mpdpup

"I am thoroughly enjoying 2.79 I can tell you. So far ahead of anything
I have ever heard from my system."

"2.79 is just breathtaking. I could listen to 2.79 all night and it just encourages one to turn up the
volume (always a good sign). Astonishing detail which i could never have
believed Red Book could contain."

 

no one in head-fi want to try the life changing experience of listening to MQn ? It's only the most detailed, free flowing, rhythmical undigital music player you will ever hear. If I am wrong then your money back and you can tell me which player is better.

 

As a statement of how revolutionary MQn is I can reveal that my ideas have been attacked by 4 leading player developers who said they wouldn't work, the most vociferous attack being from the creator of JEI who said I was a hacker. So if they are attacking MQn then shouldn't you give it a try and see what they are afraid of.
 


Edited by sbgk - 5/21/13 at 1:59pm
post #10 of 42

Thanks a lot for the updated version and I'll definitely download that after work tonight.

 

Your approach is very much like the design of Altmann Tera-Player. Charles kept everything as simple as possible and managed to tune the SQ exactly the way he intended. The results were spectacular and many of us were impressed enough to pay for that relatively expensive DAP.

 

Conventional wisdom would simply dismiss what you have accomplished and tell you that good things are always complicated. No way to convince anyone who would be caught up in that particular way of thinking and IMHO life is easier when we decide to distance ourselves from such ideas.

 

Once again thank you so much for sharing your work freely with everyone instead of asking someone to pay almost 300 bucks for foobar2000 such as this particular one:

 

http://item.taobao.com/item.htm?id=19572280444

post #11 of 42

@sbgk

 

Could not run WAV's other than 16/44

On other formats (24/44, 24/96) cmd window shows up & disappear. 

Sound card accepts 32-bit data ('containers') no problem. 

 

- W7x64SP1Ult / c2d e8400 / 8gb ddr3

- Infrasonic Quartet 24/192

 

Thks,

Nik

post #12 of 42
Thread Starter 
Quote:
Originally Posted by nikd View Post

@sbgk

 

Could not run WAV's other than 16/44

On other formats (24/44, 24/96) cmd window shows up & disappear. 

Sound card accepts 32-bit data ('containers') no problem. 

 

- W7x64SP1Ult / c2d e8400 / 8gb ddr3

- Infrasonic Quartet 24/192

 

Thks,

Nik

 



Hi,

 

thanks for trying it, there is a 32 bit container version in the testing folder, can you see if that works ? It hasn't been updated for a while.

 

http://rapidshare.com/files/300120799/mqn.exe2.1432bitcontainer

 

there is also a wasapi test exe

 

http://rapidshare.com/files/506046217/WASAPI_test.exe

 

if you run that in a dos prompt it will output which formats the device can play

post #13 of 42
Thread Starter 

am finalising a version that allows control of MQn, it acts very much like lifting the needle on a turntable, ie the user makes a change and returns the player to best quality, other players use other threads or are constantly checking for user input, both of which affect the SQ.

 

it uses a mqncontrol.exe as well as mqn.exe

 

while mqn is playing music, the user can press a key and a separate console appears where the user can pause, fast forward\rewind and skip tracks forward/back.

 

what happens is that mqncontrol.exe changes the page protection of the mqn sound buffer to no access, this way the render loop doesn't need to check for user input and mqn doesn't need a separate thread to be constant;y running.

 

mqn immediately throws an exception as it cannot read the sound buffer

 

mqn has an exception filter which is called, this starts a menu thread and resets the page protection so the music can keep playing

 

the menu thread opens a new console and waits for user input

 

the user makes changes and presses x to exit the menu console/thread

 

the menu thread is stopped

 

mqn is returned to highest SQ state.

 

will be released next week

post #14 of 42
Thread Starter 

Think v 79 is a bit too balanced towards the bass, here is a version that is better balanced.

http://rapidshare.com/files/33945820....79%2013.05078

post #15 of 42
Thread Starter 

version x.82, been playing it for a few weeks and have failed to improve on it, so it's as good as non control mqn is going to get. The control version will have a smaller player.exe so may sound better.

really just tuned the memory settings, hard to believe there is one setting that affects treble and one bass, so was a matter of finding the optimum settings.

definately the last update before a control version release.

https://rapidshare.com/#users|45980080|0ae609ce616a35c8de7ac5fda4b6194c|11541

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Computer Audio
Head-Fi.org › Forums › Equipment Forums › Computer Audio › MQn minimalist Wasapi WAV C++ memory player integrated with foobar2000