Skip to content

Instantly share code, notes, and snippets.

@SteveALee

SteveALee/README.md

Last active Jan 6, 2021
Embed
What would you like to do?
Build audacity with ASIO support on Windows

Build your own Audacity with ASIO driver support

The Audacity program is the "go to" solution for many audio recording and editing tasks. However, unlike many more advanced DAWs, it doesn't support Windows ASIO drivers "out of the box". Fortunately, Audiacity's standard MME support is fine for most uses. That said, common reasons for needing ASIO are using digital audio or music equipment that only comes with ASIO drivers, such as Behringer mixers (which actually use the ASIO4ALL ASIO <> WDM bridging driver). Another common reason is to take advantage of the low latency or multiple channels supported by ASIO.

While it is possible to build your own Audacity with ASIO support this usually requires considerable technical skills.

To reduce this requirement, the instructions provided here make it easy to build your own version of Audacity with ASIO support on a Windows PC. The instructions for the few manual steps should be straight forward to follow, and use a command script that does all the work for you.

NB. If you do use this to build Audacity with ASIO support you must not redistribute it due to the ASIO SDK licensing terms - see below.

Unfortunately, it turns out the Audacity ASIO build has limited multi channel support. For example, the peak meters always show channels 1 & 2 and to record channels 3 & 4 requires recording 1, 2, 3 & 4. So While Audacity still works really well for simple recording tasks, you might want to eventually switch to a full DAW with AISO support. I'll probably use Reaper.

Here's a brief blog post explaining why I needed ASIO and it includes a screen shot.

I also discovered my McMillen K-Mix digital interface mixer facilities alow routing of inputs 3 & 4 to the mian outputs on 1 and 2 so can use the default MME Audacity build after all. For playback from PC, I found the HiFi Driver and ASIO Bridge from VB Audio lets me re-route PC audio out to channels 3 & 4 on the K-Mix, Leaving Channels 1 & 2 free for instruments and Mics.

Licensing

The reason for Audacity's lack of ASIO support is licensing not technical. Steinberg do not alow the ASIO SDK to be redistributed (as required by open source projects) and anyway, In adition, Audacity is GPL licensed and so is incompatible with the SDK licence.

Detailed instructions

Update This video by @Renamesk walks you through the process.

  • make a new folder C:\projects
  • click on the 'raw' button at the top of the script (below) in this Gist.
  • use the browser Save As feature to save the script as \projects\build-audacity.cmd
  • install the following (the script prompts if you have not done so when it runs):
  • open a new Windows cmd terminal, even if you had one open earlier (Windows + R keys and then type cmd)
  • type cd \projects and enter key
  • run build script by typing build-audacity.cmd and enter.
  • come back later - it will take at least 10 minutes (all the yellow warnings can be ignored)
  • run the new version of Audacity at the location printed out at the end of the build

If you have any ASIO drivers installed you should find ASIO is now available in the the Audacity driver selection combo box.

@echo off
rem See https://wiki.audacityteam.org/wiki/Building_On_Windows
rem Build audacity with ASIO support on Windows
rem
rem MIT licence
rem steve@opendirective.com
set AUDACITY_REL=2.4.1
set PROJROOT=C:\projects
set WXWIN=%PROJROOT%\wxWidgets
set AUDACITY=%PROJROOT%\audacity
set ASIOSDK_DIR=%PROJROOT%\asiosdk
set AUDACITY_BUILD=%AUDACITY%\win
if (%AUDACITY_REL%) == (2.4.1) set EXEDIR=%AUDACITY_BUILD%\Release
if not (%AUDACITY_REL%) == (2.4.1) set EXEDIR=%AUDACITY_BUILD%\bin\Release
set CMAKE="C:\Program Files\cmake\bin\cmake.exe"
if /I not (%~dp0) == (%PROJROOT%\) (
echo Error: This script must be run in %PROJROOT%
if not exist %PROJROOT% (
echo Create %PROJROOT
goto exit
) ELSE (
echo cd to %PROJROOT%
goto exit
)
)
Rem Clean if requested
if /I (%1) == (clean) echo Cleaning && rmdir /s/q %WXWIN% %AUDACITY% 2> :null
rem Check tools are installed
if not exist "C:\Program Files\git\cmd\git.exe" echo Error: Install Git for Windows. Choose the option "Git from the command line" && goto exit /b
if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" echo Error: Install Visual Studio 2017 && goto exit /b
if not (%AUDACITY_REL%) == (2.4.1) if not exist %CMAKE% echo Cmake does not appear to be installed && goto exit /b
if not exist %ASIOSDK_DIR%\readme.txt echo Error: Get ASIO SDK from http://www.steinberg.net/en/company/developers.html and unzip it to %ASIOSDK_DIR% && echo NB: Rename folder to remove version && goto exit
if not (%VisualStudioVersion%)==(15.0) call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
echo.
echo Building Audacity %AUDACITY_REL% with ASIO support
echo.
rem Get source code
git clone --depth 1 --recurse-submodules https://github.com/audacity/wxWidgets/
if ERRORLEVEL 1 echo Error: cannot checkout. Perhaps delete %WXWIN% && goto exit
if not exist %WXWIN%\wx-config.in echo Something is wrong with %WXWIN% files && goto exit
git clone -b Audacity-%AUDACITY_REL% --depth 1 https://github.com/audacity/audacity/
if ERRORLEVEL 1 echo Error: cannot checkout. Perhaps delete %AUDACITY% && goto exit
if not exist %AUDACITY%\CMakeLists.txt echo Something is wrong with %AUDACITY% files && goto exit
Rem Build
cd %WXWIN%\build\msw
rem The following is mentioned in the docs but seems irrelevent for MSVC
copy %WXWIN%\include\wx\msw\setup0.h %WXWIN%\include\wx\msw\setup.h
nmake /f makefile.vc BUILD=release SHARED=1
if ERRORLEVEL 1 echo Error: cannot build wxWidgets && goto exit
cd %AUDACITY%%
if not (%AUDACITY_REL%) == (2.4.1) %CMAKE% -S . -B %AUDACITY_BUILD% && if ERRORLEVEL 1 echo Error: Cannot create Audacity buildfiles && goto exit
cd %AUDACITY_BUILD%
msbuild audacity.sln -t:Audacity -p:configuration=Release
if ERRORLEVEL 1 echo Error: cannot build Audacity && goto exit
:zzzz
rem install wx dlls
if (%AUDACITY_REL%) == (2.4.1) copy /Y %WXWIN%\lib\vc_dll\wx*_custom.dll %EXEDIR%
if (%AUDACITY_REL%) == (2.4.1) if ERRORLEVEL 1 echo Error: cannot copy dlls && goto exit
cd %PROJROOT%
rem All done
echo.
echo Build successfull
echo.
echo Congratulations!
echo Your new audacity with ASIO support will now launch.
echo In future just run the audacity.exe. No need to install.
echo.
echo %EXEDIR%\audacity.exe
echo.
start %EXEDIR%\audacity.exe
:exit
cd %PROJROOT%
@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 11, 2020

Thank you for making this script publicly available for all of us. Will try to check it this works for me soon. Thanks!

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 15, 2020

Any news on whether this works? Also should I drop this in Git Bash or Git CMD? I'm sorry, I'm really only here because I bought a Behringer setup and need to use ASIO4ALL with it, but I have no coding experience whatsoever. This code looks like it does it for me, but I have no idea how to make use of it.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 15, 2020

@victorwestmann - good luck!

@Renamesk - sorry about that, there's a lot of detailed dev experience taken for granted in that file an I can't spare time right now for full details. While you need git for windows to provide git you run the clone commands and script in windows cmd / terminal not git for windows bash (the end of the filename is 'cmd '). Git Bash will complain about the file paths like C:\projects. The rough steps are:

  • install Visual Studio 2017
  • open a windows cmd terminal
  • mkdir and cd to C:\projects
  • run the git clone commands manually (I guess they could be added to the script but I left it flexible)
  • Unzip ASIO to C:\projects\ASIOSDK
  • save the script as build-audacity.cmd and run it

Hope that works for you!

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 15, 2020

Hey Steve! Thanks for the direction! I think it almost worked. If you can spare the time would love to know how I screwed up, but if you're too busy I totally get it. I'm already grateful for the guidance you've given me!

I followed your directions to a tee. I was unsure of how to save a script so I just copy pasted the whole thing into windows cmd. Magic started happening. Lots of things that I truly do not understand and don't know enough to even understand what I don't understand. I will say, though, that right at the end of it, I received a thing saying MSBUILD : error MSB1009: Project file does not exist.
Switch: audacity.sln

I have no idea what this means, but it seems to be a notification of me screwing up.

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 16, 2020

Thank you for trying it out @Renamesk. As soon as you succeed please let us all of your detailed steps and if you can collaborate to make the step-by-step guide we have even better. Thanks.

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 16, 2020

@victorwestmann I will!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

@Renamesk so close!!! :)

so that script is desiged to be run from a file. While most of it will run directly in the cmd window I seem to recall there are a few things that work differently in a file compared to at the command line.

So I suggest you:

  • click on the raw button at the top of the script in this Gist.
  • use the browser Save As feature to save in C:\projects
  • run by typing build-audacity.cmd into the cmd window (when current dirctory is C:\projects

Note: the filename should automatically be set to build-audacity.cmd when you save but you might need to alter it if not.

While that error is almost certaily due to the different handling, do ensure C:\projects\audacity\win\audacity.sln exists after you unzip audacity

Hope that helps

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 16, 2020

Yes! Progress!

Did all of the above. I'm about to move forward but for some reason I only have aduacity.dox after unzipping audacity, which is weird because I entered the gitclone script exactly like it says on the build text

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

if you used git clone all the code should be there and there's no need to unzip anyhting (they are 2 different ways to get the code). So I'm a bit confused. Unless clone put a zip file on you disc too (which you can ignore)

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 16, 2020

confused audacity pic 1
confused audacity pic 2

I'm also fairly confused...think it might be due to the new version of audacity that just got released a couple weeks ago?

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 16, 2020

Please buddy, for the sake of all of us newbies out there, as soon as you manage to make this work, could you kindly make a video for all of us?
This is an amazing piece of open source/free software that can record your screen on a Windows machine. https://github.com/MathewSachin/Captura I will follow your instructions to make sure it is working fine, of course. If this is too much I can try to make the video as well.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

Oh, my bad. The audacity.sln is at C:\projects\audacity\win\audacity.sln
Did it run ok?

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

@victorwestmann will put it on the list of things to do :)

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 16, 2020

I don't want to give anyone more work to do. It is just that... Audacity is such a great application, so powerful and capable... that the more people know how to compile the more people will tweak it, hence it will be improved at a faster pace. :-)

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 16, 2020

Huzzah! I was going to say I'd be happy to handle making a video if I can get this working, BUT if you want to do it Steve, you more than deserve to do whatever you like, sir! Thanks for the continued guru-ship.

so C:\projects\audacity\win looks like this the picture below, which is confusing, because I deleted any previous audacities I'd downloaded to my pc and just did the gitclone as instructed
confused audacity pic 3

Also, no, for some reason it won't run?

I did as you said and have included three pictures below: What I do in the command prompt, where the script file is located (because I think I did it right), and what is in the script file, just in case I somehow screwed up while saving as (although I hope not)
confusion continued
confuze
more confusion

I agree with you @victorwestmann ! I think it's important for people to be able to access good free software easily without coding knowledge and would be happy to make a video for it :)

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 16, 2020

It seems that your file was not accepted as a valid .cmd file. Can you try making it a .bat? No idea if it will work... but we can try! Fingers crossed.
Also, please, correct me if I am wrong, but when you saved the file as .CMD (or as a .BAT) did you go to (using Notepad): File > Save As... > Save as type: All Types?

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

For now I added Detailed instructions to the gist. I'm afraid more detailed newbie instructions are beyond my free time right now.

The .sln is there for me when I clone using git clone git@github.com:audacity/audacity.git It takes a LONG time so did you interrupt it? you'll see somhting like this when done

$ git clone https://github.com/audacity/audacity/
Cloning into 'audacity'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 109702 (delta 0), reused 1 (delta 0), pack-reused 109697
Receiving objects: 100% (109702/109702), 193.20 MiB | 3.83 MiB/s, done.
Resolving deltas: 100% (84811/84811), done.
Updating files: 100% (8208/8208), done.

`git clone git@github.com:audacity/audacity.git

also in your command prompt do a dir to see what files are there. Try saving from notepad to the right folder? Notepad might add a .txt to the end and you need t oremove it form the Save dialog? Or try the Raw save as method I mention

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

@victorwestmann @Renamesk I updated the script and instructions at the top of this gist. I now does everything or prompts you to do things it can't do.

Let me know how it goes.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 16, 2020

@victorwestmann PS thanks forthe linkto Captura - that's going to be useful. I think the free fork of Camtasia that I used years ago went AWOL

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 17, 2020

Hey folks!

I think I did it and that the script works.

Does this look right, Steve? Victor?
Confusion solved

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 17, 2020

Wahoo! It looks good. the main thing is the new ASIO options above the waveform area.

Was that using the new script?

Did you manage to record anything yet?

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 17, 2020

It was! I can give you a play by play if you still want to make the video!

I did! I haven't saved anything because I'm VERY new to sound design and I'm trying to figure out how to get the room tone out of my recordings BUT I am capable of recording! I can send you a sample recording if that would be helpful too!

Mainly, I want to thank you for making this possible. Without you having written this and being here for me testing it, I wouldn't have come this far!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 17, 2020

That's great!

Happy to listen if it helps you get over stage fright - I'm still battling that as I'm an late bass guitar learner. :)

trying to figure out how to get the room tone out of my recordings

Lots of rugs and egg boxs on the walls is traditional :)

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 17, 2020

Is that Behringer digital mixer you have? I've used a X32. Crazy value for money!

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 17, 2020

All good on that end--I trained at Tisch in Drama, so I've got a hang on that aspect of performing. Was just offering in case it would be helpful for your video making process. I believe what you've done here is important, so the world needs a video explanation!

Appreciate the offer though! If there's an service a Drama/Psych major/ off bway actor can lend you, let me know! I'd be more than happy to help out somehow!

To the grocery store!

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 17, 2020

It is! I'm using the Xenyx 302 USB that came with the podcastudio 2 bundle, though I'm trying to record music rather than a podcast xD this package just looked to be the best value for what I was looking for

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 17, 2020

Looks like great value for money!

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 17, 2020

@Renamesk wow! this is awesome news! If you could record the step by step, with all the possible details, that would be GOLD and would enable myself (as well as other people joining the project) to experiment tweaking UX/UI but now in the level of the code. Enough of posting awesome visuals that will never be able to be implemented in the project. Now we will be able to tweak UX/UI with the source code! This will unlock a lot of cool things. Thank you for this! @SteveALee thank you for all your help!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 17, 2020

That would be great - then someone could send a link to the Audacity project for inclusion somewhere.

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 17, 2020

Yes. This would be a huge milestone in the project organization, at least in what concerns developing/compiling for Windows audience/users.
Feel free to use https://github.com/MathewSachin/Captura if you are on Windows (or any other software you like/wish). As soon as we have the video we can upload to a youtube account and do what @SteveALee mentioned. That would be great achievement! As soon as the video is done I will follow it step by step. 😎😀

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 17, 2020

Hell yeah! You're handling the video, right Steve?

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 18, 2020

Was hoping you might. I've used my free time for this up on this with the script changes :)

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 18, 2020

Come on guys! We are so close to solving this. Soooo close! Please @Renamesk! 😃😅

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 18, 2020

Don’t worry y’all. I’m on it. Expect a video tomorrow or the next day.

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 18, 2020

You rule buddy! If we could make this also a reality for the macOS and Linux platform, with other people making it, of course, it would be a huge benefit for all of the volunteers. Do you guys know how we can summon other volunteers to help us with that? Do we know if the Audacity project has an youtube channel?

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 29, 2020

Are we still doing this or was it just a dream? ;-)

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 29, 2020

Happy to hand over to you guys. :)

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 29, 2020

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 29, 2020

eek, Good to hear it was 'nearly', I guess.
Completely off topic, I recently did my 1st ever video voiceover :) Alos with the new Alan Bennet Talking Heads my wife and I were wonder what the difference is between a monologue and a soliloquy?

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jun 29, 2020

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jun 29, 2020

Oh my god Renamesk, I am so sorry to heat that. Glad it all worked out for the best in the end. Thank you for doing this. This will be a game changer for myself and a whole lot of other people as well.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jun 30, 2020

@Renamesk, brilliant, thank you.

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jul 10, 2020

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Jul 10, 2020

@Renamesk

This comment has been minimized.

Copy link

@Renamesk Renamesk commented Jul 11, 2020

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jul 11, 2020

Excellent job! Entertaining too. Love your desktops. I duely sent it to the twittersphere.

@rob867

This comment has been minimized.

Copy link

@rob867 rob867 commented Sep 30, 2020

Hi, I am a total amateur, but trying to get an ASIO hardware box to work in audacity as an input device, so this seems to be what I need.

I installed visual studio and tried to install git hub, but got a bit spooked by the setup of that app. Then I figured that maybe the script would just install it for me, but no. When I ran it it said:

C:\projects>build-audacity.cmd
Error: Install Git for Windows. Choose the option "Git from the command line"

Building Audacity 2.4.1.

'git' is not recognized as an internal or external command,
operable program or batch file.
Error: cannot checkout. Perhaps delete C:\projects\wxWidgets

C:\projects>

Is there a simple step I missed?

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Sep 30, 2020

hi @rob867

My apologies, it seems the instructions were not as clear as they could have been. The script just prompts you if the tools are missing.

You'll need to install some tools used by the script before running it. I updated Detailed instruction to include that step first and added links to download the tools.

Hopefully that will get you going. Don't get spooked, the 3 tools are safe.

@rob867

This comment has been minimized.

Copy link

@rob867 rob867 commented Sep 30, 2020

Thanks for that Steve. I have installed the two packages and placed the SDK in the projects folder like you said, but I still get an error:

'git' is not recognized as an internal or external command,
operable program or batch file.
Error: cannot checkout. Perhaps delete C:\projects\wxWidgets

I noticed a bunch of options when I installed the Git application, but just went with the recommended as I didn't understand the options. Is it possibly one of the options I need to select differently?

Options pre-selected are:

  1. Use VIM as git default editor
  2. Use Git from the command line and also from 3rd party software (alternatives are "from Git Bash only" or "Git and optional Unix tools from the command prompt")
  3. Use the OpenSSL library (alternative is "Use the native Windows Secure Channel library)
  4. Line ending...Checkout Windows-style, commit Unix-style line endings (alternatives are "Checkout as-is, commit Unix-style line endings" or "Checkout as-is, commit as-is")
  5. Terminal emulator: Use Windows' default console window (alternative is "Use MinTTY")
  6. "git pull default": Default (fast forward or merge) (alternatives are "Rebase" or "only ever fast forward")
  7. Credential helper: Git Credential Manager (alternatives are "None" or "Git Credential Manager Core")
  8. Enable file system caching (alternative is "Enable symbolic links")
  9. Bleeding edge option: "enable experimental support for pseudo consoles" (UNSELECTED)

Could it be as a result of one of those being the wrong choice?

Thanks in advance!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Sep 30, 2020

@rob867

Could it be as a result of one of those being the wrong choice?

Very unlikely as they all affect what git does when it runs. You've not got that far yet and it can't find git to run it.

When you install Git for Windows one of the screens says how git is found and you want the second recommended option (Git from the command line.....). I thought that was the default option but perhaps it was not for you?

image

Try reinstalling - perhaps after a uninstall - and ensure that option is selected.

One other thought. If you happended to have the cmd window open BEFORE you installed git then you need to close and reopen it before it will update and find git.

Hope that helps.

@rob867

This comment has been minimized.

Copy link

@rob867 rob867 commented Sep 30, 2020

Brilliant! It was my simple error in not restarting the command prompt.

Working perfectly with my Mbox 2 mini over ASIO!

Thanks so much!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Sep 30, 2020

\o/ wahoo. enjoy! That's a nice looking little box of tricks.

@htdSoundTech2020

This comment has been minimized.

Copy link

@htdSoundTech2020 htdSoundTech2020 commented Oct 31, 2020

For those of you working with Asio4All, or similar on windows, yes, you may have to still build with ASIO to make this work just right. Even though It's a WDM\MME wrapper that acts SIMILAR to ASIO, and really just links to other devices together as one, it has an "ASIO" based register, while it still has to conform to most of the WDM\MME system requirements. If you add ASIOPRO, you can get more REWIRE functionality out of it, but that's a bit complicated; and it still uses an ASIO memory register, even though it's WDM limited (the connection to the devices is done mostly through WDM or MME, and wrapped by the Asio link). I've loaded 2 ASIOPRO drivers, and set them to different devices, to give them a place to talk to each other, and it works with Asio4All. The problem is that you have to understand the numbering of the driver system to get your Input\output system in your apps to function properly. It does work though. And quite well. I've fed inputs of a ZOOMH6 to the outputs of a Behringer fca1610, and vice versa, in different applications, at the same time. It's allowed me to align playback and live for later processing onto a video, where the two were very well aligned, and very quickly, making the project much faster from performance to product\content. Of course, this was with other apps.
I'm looking forward to trying this with asio and audacity. I'll give this a try soon, and see if I cannot figure out a less resource hungry way to do this in an automated fashion, as I have a lot of not-so-technically oriented people to play this out with.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 1, 2020

I tried to minimise but we're stuck with ASIO SDK licence not allowing redistribution, so requiring build. MS used to supply a sdk you could use to build rather than full visual studio but it seems to have gone, and anyway is still a download and install. You can try to automate the download/install but that will be fragile as links change. Do let me know.

@htdSoundTech2020

This comment has been minimized.

Copy link

@htdSoundTech2020 htdSoundTech2020 commented Nov 2, 2020

@SPIKEYPUP

This comment has been minimized.

Copy link

@SPIKEYPUP SPIKEYPUP commented Nov 3, 2020

@SteveALee I Just wanted to drop a line to say thank you so much for this script, it only took me about 10 builds to get it right, turns out...don't run this from within a console sesh in Windows Terminal, although blazing fast... I think it was too fast... lol because I kept getting random missing includes and header files each time it was so weird... of course it could have been that I should have rebooted after installing VS17, who knows, but I know that Windows Terminal is not completely bug free yet, but I mean it should be no different than a regular console window, it's still using the same cmd.exe at the end of the day right?!?!?

Regardless, after a reboot and making sure I had all the dependencies in VS (for example I wasn't even thinking when I installed it {VS17} to make sure to install the C++ packages and other relevant VC packages, hence my first few builds that were no bueno) everything went as planned... kind of, I forgot I had modified the CMD file and uncommented out the line to force a CLEAN rebuild, no big whoop there of course just more time to build if I'm not mistaken.

So after 20 minutes out popped my Audacity baby, finally... 1291 Warnings... 0 Errors.... Ooh La La just what you like to hear after a compile and build :) The error part of course, who cares about 1291 warnings, warnings can go stuff their sorry's in a sack... 🤣

Again I and the Audacity community can't thank you enough for your time and effort on this project. As someone who writes very long 500+ line batch/cmd scripts I can appreciate the time you had put in to first of all put the script together, and then second of all, make sure you debugged it so it was working...then third of all, trying to make it as UX friendly as possible knowing a lot of folks are going to attempt this who have no idea what they are doing or what even a CMD prompt is for that matter. Oh yeah and then being a nice guy and supporting the users that were having issues when you had already spent so much time and were probably busy with other things... well shucks, thanks!

That being said, as a writer of aforementioned long a$$ scripts, allow me to be a picky pup and say that there was only a single typo in the CMD file, although pretty benign and not breaking, it was in your info/feedback line to the user regarding deleting the existing folders in order to rebuild...on line 36, you forgot the leading % on the AUDACITY variable so instead of %AUDACITY% it was just AUDACITY%... I know right... it's always the small little things lol, but like I said it's benign anyway and even with it being broken the user would still get the gist of what you are saying (see what I did there? hehe). So, I would probably update that when you can, also I haven't checked out the video but you might want to just take a screenshot/snip of the VS installer portion that indicates what packages/workload items are necessary for download during installation of VS17 (checkmarked items on the right margin of the installer) otherwise I think people who don't really think about it at the time might make the same mistake I did and end up with a few bad builds before they figure out that Visual Studio might actually need some gas if the car is going to go anywhere... I'm not sure if the dependencies are indicated in the video, I didn't get a chance to watch it yet, but if it is then I think folks are covered on that front, but... I'd still probably put it in the instructions up top just to be safe :)

And with that, I'm going to ASIO up some tunes now.

Again, really, thank you. 🤗

-SPIKEYPUP / Patrick Ewalt

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 4, 2020

@SPIKEYPUP thanks for your kind words, feedback and bug report :)

Terminal

Yes same old cmd just differnt terminal for input/output. As long as you chose to run cmd in the terminal and not PowerShell it should be OK. They've made a proper release recently. As with the old cmd terminal I can only think that if it was open before VS was installed the setting (path) may not have been correctly updated for a build to work. The errors you mention seem to indicate that.

Build Warnings

yes a very lazy way to develop IMHO. You can't see the important issues for the noise. I always aim to have Zero warnings and errors. It might be possible to make them vanish into a black hole (various techniques) but I spent time on other things.

Bug

Oops, sloppy testing! :( Thanks Fixed

Clean Build

Yes, slower if you rerun anytime as first it deletes all intermediate and build components. Perhaps should be the default for absolutely minimal problems but usually OK and might save some people time (eg me when testing)

VS install options

When I tried I had all the correct defaults. However I just thought I would have installed it before uninstalling to test and settings might have be kept settings over. Will investigate. The video was kindly donated by @Renamesk

Happy ASIO tune smithing! :)

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 4, 2020

@htdSoundTech2020 Sorry I can't comment on the licence legalese but I to would prefer more flexible and open usage.

Yes it should run from memory stick as there is no requirement to install (like a so called Portable App). Just like the good ol' days :) Good on the audacity team.

My main point about SDK was you once could get a minimum SDK without VS and that was much smaller.

@itmat0

This comment has been minimized.

Copy link

@itmat0 itmat0 commented Nov 9, 2020

Hello, I would like to ask for help, because this solution doesn't work for me.

Everything runs smoothly, but as the result there is no ASIO in Audacity, just MME, DirectSound and WASAPI. Only at the beginning I get error about installing git, but the problem is not in that, it's just installed in AppData/Local/Programs, not in Program Files. And anyway, the script doesn't crash at git calls. In the end I have 1291 Warnings, 0 Errors.

Before trying this easier solution, I was trying to build Audacity, as it is written out here - https://wiki.audacityteam.org/wiki/Building_On_Windows - and the result was the same.

Any advice? Thanks!

@victorwestmann

This comment has been minimized.

Copy link

@victorwestmann victorwestmann commented Nov 9, 2020

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 9, 2020

@itmat0 It sounds like the build is working correctly so I wonder if you are running the previously installed version rather than the newly built version? Tghis doesn;t replace the installed version at all. The new version can be found under the c:\projects folder. Sorry I can recall the exact place.

Thanks @victorwestmann

@itmat0

This comment has been minimized.

Copy link

@itmat0 itmat0 commented Nov 10, 2020

@SteveALee I'm running the newly built version, at C:\projects\audacity\win\Release\Audacity.exe. But maybe some problem with old dependencies? I don't know, because I uninstalled the old version. Or could I mess up something while trying to build as in https://wiki.audacityteam.org/wiki/Building_On_Windows?

@victorwestmann I can try, but I think the video above is clear, the only difference I see is the Git download link in Detailed instructions above and in the video, but that shouldn't be relevant. Maybe the part of executing build-audacity.cmd could be useful, so I redirected the output to the file. Here it is - https://github.com/itmat0/output/blob/main/output.txt. In the console it looked like this:

C:\projects>build-audacity.cmd > output.txt
Cloning into 'wxWidgets'...
remote: Enumerating objects: 7030, done.
remote: Counting objects: 100% (7030/7030), done.
remote: Compressing objects: 100% (5951/5951), done.
remote: Total 7030 (delta 2178), reused 1967 (delta 993), pack-reused 0
Receiving objects: 100% (7030/7030), 18.51 MiB | 1.49 MiB/s, done.
Resolving deltas: 100% (2178/2178), done.
Updating files: 100% (6714/6714), done.
Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch'
Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat'
Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg'
Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png'
Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff'
Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib'
Cloning into 'C:/projects/wxWidgets/3rdparty/catch'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 14343 (delta 0), reused 40 (delta 0), pack-reused 14303
Receiving objects: 100% (14343/14343), 6.93 MiB | 4.23 MiB/s, done.
Resolving deltas: 100% (9078/9078), done.
Cloning into 'C:/projects/wxWidgets/src/expat'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 16143 (delta 0), reused 5 (delta 0), pack-reused 16138
Receiving objects: 100% (16143/16143), 14.15 MiB | 1.13 MiB/s, done.
Resolving deltas: 100% (12130/12130), done.
Cloning into 'C:/projects/wxWidgets/src/jpeg'...
remote: Enumerating objects: 612, done.
remote: Counting objects: 100% (612/612), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 1543 (delta 525), reused 469 (delta 451), pack-reused 931
Receiving objects: 100% (1543/1543), 2.61 MiB | 2.46 MiB/s, done.
Resolving deltas: 100% (1195/1195), done.
Cloning into 'C:/projects/wxWidgets/src/png'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 75139 (delta 0), reused 37 (delta 0), pack-reused 75101
Receiving objects: 100% (75139/75139), 19.50 MiB | 1.11 MiB/s, done.
Resolving deltas: 100% (68023/68023), done.
Cloning into 'C:/projects/wxWidgets/src/tiff'...
remote: Enumerating objects: 21167, done.
remote: Total 21167 (delta 0), reused 0 (delta 0), pack-reused 21167
Receiving objects: 100% (21167/21167), 8.15 MiB | 1.46 MiB/s, done.
Resolving deltas: 100% (16773/16773), done.
Cloning into 'C:/projects/wxWidgets/src/zlib'...
remote: Enumerating objects: 78, done.
remote: Counting objects: 100% (78/78), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 4946 (delta 3), reused 75 (delta 3), pack-reused 4868
Receiving objects: 100% (4946/4946), 2.64 MiB | 1.52 MiB/s, done.
Resolving deltas: 100% (3465/3465), done.
Cloning into 'audacity'...
remote: Enumerating objects: 7898, done.
remote: Counting objects: 100% (7898/7898), done.
remote: Compressing objects: 100% (5873/5873), done.
remote: Total 7898 (delta 2099), reused 5100 (delta 1721), pack-reused 0
Receiving objects: 100% (7898/7898), 52.01 MiB | 1.12 MiB/s, done.
Resolving deltas: 100% (2099/2099), done.
Note: switching to '1322b40a9c76409793c68fab761b92f56409840d'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (8645/8645), done.

Microsoft (R) Program Maintenance Utility Version 14.16.27043.0
Copyright (C) Microsoft Corporation. All rights reserved.

genrcdefs.h

Thank you!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 10, 2020

Well none of that console output is error info which is ALL you should be seeing with that stdout redirect! Tsk, Developers!

So the last line is "C:\projects\audacity\win\Release\audacity.exe" which is good. And is that the Audacity you are executing?

You say you see no ASIO, it's a bit hidden in the left hand dropdown, otherwise the UI looks much the same. Do you have any ASIO drivers installed. I don't know if that would impact the appearance though.

@itmat0

This comment has been minimized.

Copy link

@itmat0 itmat0 commented Nov 10, 2020

Yes, that's the executed Audacity.

Really no ASIO there.

Untitled

No, this is the first time I'm trying to install ASIO.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 11, 2020

Which ASIO drivers do you have installed? For what equipment?

@itmat0

This comment has been minimized.

Copy link

@itmat0 itmat0 commented Nov 11, 2020

None, as far as I know.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 11, 2020

Then I don't understand why you want ASIO support in audacity? If you have no drivers that might explain why audacity is not showing the option. It will be useless.

@itmat0

This comment has been minimized.

Copy link

@itmat0 itmat0 commented Nov 11, 2020

Yes, I'm sorry, that's the point. Now it's OK. Thank you very much!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 11, 2020

Great! 👍

@horus-roman

This comment has been minimized.

Copy link

@horus-roman horus-roman commented Nov 22, 2020

Hello I am from Ecuador and I need your help please. I have a Thomann dp-33 piano that I really want to connect to my computer, I have been trying for several months now and apparently what you have come up with here is the solution (I think the driver that the piano uses is asio4all).
Well, I followed all the instructions but this appears at the end. What can I do?

audacity-ASIO

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 22, 2020

@hurus-roman hi It looks like as @SPIKEYPUP pointed out you need to select the C++ option when installing Visual Studio.

Just run the install again (select modify VS 2017) and make sure the C++ box has the checkbox ticked then click the "modify" button.

"Desktop development with C++
Build Windows desktop applications using the Microsoft C++ toolset, ATL, or MFC."

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Nov 22, 2020

UPDATE:

  • Provided link to VS2017 installer that does not require signup to MSDN
  • Update text and install instructions
@s-vanduzer

This comment has been minimized.

Copy link

@s-vanduzer s-vanduzer commented Dec 11, 2020

Hello there!
I've followed all the instructions and watched the linked video but whenever I try running the script, I always get this error message and there is no release folder. What should I do?
Screenshot (6)
Screenshot (7)

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 11, 2020

@s-vanduzer Hmm, can you double check you got the right version of Visual Studio - Community 2017?

I don't have time to investigate for a day or two but it looks like a disagreement between the Audacity code and Visual Studio. The script checks for VS 2017 and also grabs a specific release of the Audacity code so I'm very surprised.

My hunch would be the Audacity code has somehow changed for the 2.4.1 relase but that's very unlikely.

You also seem to have found a bug as the script does not bail on the error but carries on.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 11, 2020

I just re-install VS 2017 Community and everything worked as expected. So I suspect something went wrong with your VS installation. Don't forget to open a NEW cmd window after updating VS.

@s-vanduzer

This comment has been minimized.

Copy link

@s-vanduzer s-vanduzer commented Dec 11, 2020

@SteveALee I completely uninstalled VS 2017 Community and redownloaded and reinstalled it from the link you posted at the top but I got the same error. When I looked it up, I found this stack overflow thread
https://stackoverflow.com/questions/48501426/tfs-build-error-msb4126-solution-configuration-is-invalid-how-to-fix

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 14, 2020

@s-vanduzer I'm complete at a loss to what the problem can be. The Audacity project files are obviously correct as I and other can build the specified release. They are for VS 2017 so VS should not be complaining at all in the way it is. I assume you did launch a new cmd window after reinstalling VS?

Do you have other VS studio versions installed? That should not matter either as we run the right VS CLI setup script if required.

I wonder if you have another language version of VS (non English) or something? Total long shot.

All I can suggest is trying on another PC.

Sorry.

@moorhous

This comment has been minimized.

Copy link

@moorhous moorhous commented Dec 25, 2020

Thanks!!! Your instructions worked for me and my new Audacity with ASIO works as advertised! I am a noobie so this is a testament to your care in documenting all the necessary steps. I am very happy with the results except in one respect. The new audacity.exe takes a very long time to load (several minutes) and once it does, some of the basic functionality (playback and record operations) wait several seconds before the process starts. This slow responsiveness is unlike anything I have experienced either with the standard edition of Audacity or with other software on this computer or any of my other computers. I just read through this entire transcript looking for any reports of this problem.... I'll keep trying to figure this out though.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 25, 2020

@moorhous thank you for your kinds words. A joy to read on Christmas morning :)

That is strange behaviour and I've never experienced it. I'll build again and see if all is well. I can only think there is something odd with your particular ASIO device driver. Do you have another you could try? Out of interest what device is it?

@moorhous

This comment has been minimized.

Copy link

@moorhous moorhous commented Dec 26, 2020

Thanks for the unexpectedly quick response! I am using a Behringer UM2. It's about the cheapest audio interface available and it doesn't come with its own drivers, it uses ASIO4ALL. I have been using it for about 8 months with my DAW and it works fine. But I do prefer using Audacity for some projects (e.g. I love its clear display of the waveforms).

I have a Dell XPS 17 with all drivers up to date, I believe. The Behringer USB is connected to the computer via a Dell Thunderbolt dock. When I start my standard Audacity application, the splash screen comes up for about 5 seconds (just the logo, not a full screen) and then the application window is fully loaded within 7 seconds after starting. The same process with the new Audacity (for ASIO) took me 254 seconds just now, i.e. a little over 4 minutes. During that 4 minutes, just the splash screen was visible. The times vary but I'm sure it always takes more than 2 minutes.

The response when I click play or record is about 2 seconds. I believe it has been closer to 5 seconds before but this is the first time I am using a stopwatch. In the standard Audacity application, the response is not instantaneous but less than 1 second.

Despite the delay for the application to load, the new Audacity seems to have the full functionality that I want. For the first time I am able to monitor my voice through the headphones when dubbing tracks (this is the main reason I have wanted to use ASIO drivers with Audacity).

So thanks again! If I have any insights about the delayed startup, I will be sure to pass them along.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 26, 2020

@moorhous

  1. You could do me a favour. :) I just updated my instructions for Audacity 2.4.2 and they've made changesto the build process. I'm not gettting ASIO in the audacity menus when i build. Would you be willing to test the new build and see if it works for you? (please save your current ASIO Audacity folder so it is not lost).
  2. That delay is wierd. All I can think is somehting is hogging the audio. I assume you tried the age old "turn it all off and on again"? Make sure no programs are getting exlusive access to the audio.

Note that ASO4ALL is a bridging driver for when you have a program like a DAW that want's ASIO device drivers and you only have Windows WDM drivers. You obviously lose the low latency advantage. So I would have thought normal Audacity should work with the Behringer's WDM drivers just fine (without channels), but then you sat they have none.

@moorhous

This comment has been minimized.

Copy link

@moorhous moorhous commented Dec 28, 2020

@SteveALee If I understand your last question, yes, I was managing to record OK using Audacity with Windows drivers except it doesn't support the extra channel for headphone monitoring. (Latency is not such a concern for me. I am doing solo studio recording, dubbing one track at a time.)

As for the "favour", no problem at all. It didn't work properly and the output is below. But first I need to explain that the first attempt to run your command script didn't work for the silly reason that my directory was self-identifying as "c:\projects" rather than "C:\projects", causing build-audacity.cmd to faithfully exit. I tried changing line 9 of the cmd script, replacing lower case "c:" by "C:" and then the script ran a little further but then hit a fatal error as you can see from the output below. Now I wonder why I didn't hit this snag ("c" vs "C") three days ago when I first build the new Audacity. I think that three days ago, I really must have deviated somewhat from the instructions, possibly the command shell I was using wasn't the generic "cmd" window. (This time I was paying closer attention.) Sorry, it must be hard for you to infer anything from my feedback if I can't be trusted to follow instructions to the letter... Here is that output.

c:\projects>build-audacity.cmd

Building Audacity .

Cloning into 'wxWidgets'...
remote: Enumerating objects: 7030, done.
remote: Counting objects: 100% (7030/7030), done.
remote: Compressing objects: 100% (5953/5953), done.
remote: Total 7030 (delta 2178), reused 1965 (delta 991), pack-reused 0
Receiving objects: 100% (7030/7030), 18.51 MiB | 500.00 KiB/s, done.
Resolving deltas: 100% (2178/2178), done.
Updating files: 100% (6714/6714), done.
Submodule '3rdparty/catch' (https://github.com/wxWidgets/Catch.git) registered for path '3rdparty/catch'
Submodule 'src/expat' (https://github.com/wxWidgets/libexpat.git) registered for path 'src/expat'
Submodule 'src/jpeg' (https://github.com/wxWidgets/libjpeg-turbo.git) registered for path 'src/jpeg'
Submodule 'src/png' (https://github.com/wxWidgets/libpng.git) registered for path 'src/png'
Submodule 'src/tiff' (https://github.com/wxWidgets/libtiff.git) registered for path 'src/tiff'
Submodule 'src/zlib' (https://github.com/wxWidgets/zlib.git) registered for path 'src/zlib'
Cloning into 'C:/projects/wxWidgets/3rdparty/catch'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 14343 (delta 0), reused 40 (delta 0), pack-reused 14303
Receiving objects: 100% (14343/14343), 6.93 MiB | 683.00 KiB/s, done.
Resolving deltas: 100% (9078/9078), done.
Cloning into 'C:/projects/wxWidgets/src/expat'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 16143 (delta 0), reused 5 (delta 0), pack-reused 16138
Receiving objects: 100% (16143/16143), 14.15 MiB | 380.00 KiB/s, done.
Resolving deltas: 100% (12130/12130), done.
Cloning into 'C:/projects/wxWidgets/src/jpeg'...
remote: Enumerating objects: 612, done.
remote: Counting objects: 100% (612/612), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 1543 (delta 525), reused 469 (delta 451), pack-reused 931
Receiving objects: 100% (1543/1543), 2.61 MiB | 631.00 KiB/s, done.
Resolving deltas: 100% (1195/1195), done.
Cloning into 'C:/projects/wxWidgets/src/png'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 75139 (delta 0), reused 37 (delta 0), pack-reused 75102
Receiving objects: 100% (75139/75139), 19.51 MiB | 418.00 KiB/s, done.
Resolving deltas: 100% (68023/68023), done.
Cloning into 'C:/projects/wxWidgets/src/tiff'...
remote: Enumerating objects: 21167, done.
remote: Total 21167 (delta 0), reused 0 (delta 0), pack-reused 21167
Receiving objects: 100% (21167/21167), 8.15 MiB | 526.00 KiB/s, done.
Resolving deltas: 100% (16773/16773), done.
Cloning into 'C:/projects/wxWidgets/src/zlib'...
remote: Enumerating objects: 78, done.
remote: Counting objects: 100% (78/78), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 4946 (delta 3), reused 75 (delta 3), pack-reused 4868
Receiving objects: 100% (4946/4946), 2.64 MiB | 1.33 MiB/s, done.
Resolving deltas: 100% (3465/3465), done.
Submodule path '3rdparty/catch': checked out 'b46f260f810bb693825c026269636e82b0a50722'
Submodule path 'src/expat': checked out '74f11b8c005c1a49d0ed945406f8e8c54057ef11'
Submodule path 'src/jpeg': checked out 'e951f6ed6373d3c8d550755e4ec00adadc878aca'
Submodule path 'src/png': checked out '772e393c7eb95f0424d2d895abd5f8ad0131f500'
Submodule path 'src/tiff': checked out '2a4d3a974fa3e09875a341f966fc2fe3ccd0a952'
Submodule path 'src/zlib': checked out '5888671274cde770edbe683b435f052de2b03681'
Cloning into 'audacity'...
warning: Could not find remote branch Audacity- to clone.
fatal: Remote branch Audacity- not found in upstream origin
Error: cannot checkout. Perhaps delete c:\projects\audacity

c:\projects>

@moorhous

This comment has been minimized.

Copy link

@moorhous moorhous commented Dec 28, 2020

@SteveALee I believe I have figured out the delay problem. Or rather, you identified it when you suggested that Windows was fighting for control of my audio. I was simply forgetting to go into my Windows sound properties and disable the Windows sound management before opening Audacity. I have now very reasonable response times with the new Audacity for ASIO app, comparable with the standard version. (Silly of me to overlook this, I know enough to do the same with my DAW.)

This reminds me, I wish I had an app (even a simple batch script) to automatically reconfigure my computer before and after starting my DAW or Audacity. Ideally it could change my preferences for sound management, also change my other system properties like "optimize for performance" instead of "optimize for appearance", etc. There's a long checklist of tweaks when starting music production on a computer and it would be very helpful to automate this. I don't know if the Windows operating system would yield control to such an app (maybe not, otherwise such an app would surely exist and I would have run across it by now in my internet searches).

In any case, if you want someone to test out other Audacity builds, I'm quite happy to help. I am learning alot.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 28, 2020

@moorhous

my directory was self-identifying as "c:\projects" rather than "C:\projects"... I tried changing line 9 of the cmd script, replacing lower case "c:" by "C:" ... and then the script ran a little further
Now I wonder why I didn't hit this snag ("c" vs "C") three days ago when I first build the new Audacity. I think that three days ago, I really must have deviated somewhat from the instructions, possibly the command shell I was using wasn't the generic "cmd" window.

That's a bug - thanks
Case really doesn't matter for the drive letter (C) or the file path. But line 17 does a case sensitive comparison so breaks in your case. I wonder why you get lowercase c? I've not seen that before in a cmd window. Anyhow, I'll look for a fix

but then hit a fatal error as you can see from the output below.

Oops that was my mistake. Now fixed

I believe I have figured out the delay problem. >

Huzzah!

disable the Windows sound management before opening Audacity.

What setting is that. I've not yet hit issues but I do try to keep things anlog and low tech when playing the bass, otherwise I switch to tech mode and geek out rather than do music :)

I wish I had an app to automatically reconfigure my computer before and after starting my DAW or Audacity. Ideally it could change my preferences for sound management, also change my other system properties like "optimize for performance" instead of "optimize for appearance", etc. There's a long checklist of tweaks when starting music production on a computer and it would be very helpful to automate this. I don't know if the Windows operating system would yield control to such an app (maybe not, otherwise such an app would surely exist and I would have run across it by now in my internet searches).

I think nothing exists. Many years ago (perhap Windows 7 or earlier) I looked at all the tweaks needed and agree there are many (or where). Microsoft Insiders recently announced a possible feature to configure WIndows on install for different uses. I suggested Music Production to them and also not just on install.

In any case, if you want someone to test out other Audacity builds, I'm quite happy to help. I am learning alot.>

Thanks - I will.

I updated the script to build either Audacity 2.4.1 (as before) and also 2.4.2 the latest (edit the AUDACITY_REL) . Unforntunately it seems that not only did the build system change in AUDACITY 2.4.2 but ASIO support got dropped. That was probably accidental and once I figure out a fix I'll let you (and Audacity team) know so you can try it..

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 28, 2020

@moorhous I fixed your bug (see line 17). Thanks again.

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 28, 2020

I made a code submission to Audacity (a Pull Request or PR) to fix the ASIO in 2.4.2 audacity/audacity#709 but it turns out they are working on it, though unreleased so I did not see it. Once it is released I'll update the script to 2.4.2, If anyone needs 2.4.2 with ASIO gove me a shout as I can build from my fork or Audacity

@buckohfive

This comment has been minimized.

Copy link

@buckohfive buckohfive commented Dec 31, 2020

Having never attempted a compile of Audacity before, this was tremendously helpful. I did have to debug the script, however.

I noted that I could not compile wxWidgets without uncommenting line 56 ("nmake /f makefile.vc BUILD=release SHARED=1"). I received setup.h missing errors, and when I attempted to flat copy setup0.h to other locations, the build didn't succeed (missing. lib files).

It appears this was commented out only a few days ago. It appears to be necessary.

Thank you for putting this together!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Dec 31, 2020

@buckohfive thanks for your kind words and the bug report. I've fixed it. Seems to be a mistake introduced when I worked on 2.4.2 which currently needs an upstream fix.

@micsthepick

This comment has been minimized.

Copy link

@micsthepick micsthepick commented Jan 4, 2021

for those who are having difficulty building 2.4.2 with ASIO, this forum post in the audacity forum, under "compiling audacity" may help: https://forum.audacityteam.org/viewtopic.php?f=19&t=112082&start=10#p410225

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jan 4, 2021

@micsthepick thank you for that info. I do get 2.4.2 building with ASIO and only one file needs to be updated to reproduce it here. I then saw your changes on master when making the PR. Somehow I missed your PR when searching (I guess as was closed), anyway my changes are very similar (phew! lol). But I'll check against that forum post to see if I missed anything.

However I decided that was not something that the target audience of this gist would want to do. In case I'm wrong, the following seemed to work or me.

  • Edit the script line 8 and change AUDACITY_REL to 2.4.2
  • Edit line 57 (currently an empty line) to be pause
  • Follow the instructions and run the script
  • Wait 'till when the script outputs Press any key to continue . . .
  • Save this file to \projects\audacity\cmake-proxies\portaudio-v19\CMakeLists.txt)
  • In the cmd window press the space key (well any key, except Ctrl+C)

Once the official fix on master gets released I'll update here to follow. Thanks again!

@papparaz

This comment has been minimized.

Copy link

@papparaz papparaz commented Jan 6, 2021

This is the first time I tried to build an application. Your script is very helpful and after understanding that I had to start a new cmd window after changes in the VS-installation there were no more errors (only about 1300 warnings(??)). I also found the audacity.exe in the release folder but when I tried to run audacity I got the message that there are wxbase313u_vc_custom.dll, wxmsw313u_html_vc_custom.dll, wxmsw313u_core _vc_custom.dll and wxmsw313u_qa_vc_custom.dll missing. What mistake do I make?

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jan 6, 2021

@papparaz My apologies, I left the build of those dlls commented out and the script error handling didn't catch it. Please copy the updated script and try again.

I also improved the instructions to better spell out the need to open a new window as it was obviously not quite clear enough.

Those warnings are defintitely annoying but I decided to not hide all the output for those like me who like to watch it scrolling past :-P It also helps identify problems when something goes wrong.

@papparaz

This comment has been minimized.

Copy link

@papparaz papparaz commented Jan 6, 2021

Worked perfectly now, thanks a lot!

@SteveALee

This comment has been minimized.

Copy link
Owner Author

@SteveALee SteveALee commented Jan 6, 2021

Yay! Congratulations on building your first windows app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment