NOTE: The guide on this page was severely outdated and has been deleted. The key parts of what was on this page can be accomplished by simply installing and running Ubuntu Studio Controls and Ubuntu Studio Installer:
sudo apt install ubuntustudio-controls ubuntustudio-installer
Running Ubuntu Studio Controls will give you the ability to add your user to the Audio group and will automatically make the changes required for realtime memory access.
If on Ubuntu Studio 18.04, this will require the Ubuntu Studio Backports PPA.