Sunday, November 23, 2014

How to run Guitar Rig 5 with Reaper on Arch Linux

Since I really like to fool around with my electric guitar and record stuff, this was one my reasons to dual-boot, but now it seems like I finally don't really need to anymore.
This short guide will tell you how you can get WineASIO to work with Reaper and Guitar Rig.

So one of the first things we need is wine.

                                     sudo pacman -S wine

Should do the trick. Then we also need the jack server and a frontend for it, the most popular is qjackctl.
                         
                                    sudo pacman -S qjackctl jack

Now run qjackctl to select your audio interface in the Setup screen. I have this dedicated guitar interface: http://www.behringer.com/EN/Products/UCG102.aspx

It's not the best, but it's cheap and works on Linux.

Be sure to set the sample rate and the buffer size correctly. I can get it down to 256 samples and to a latency of around 10 msec (on Windows it does go under that).

Add your user to the audio group with

                                   sudo usermod -a -G audio yourusername

And now you should be able to start the jack server from qjackctl

Next up we need wineasio, this has to be installed from AUR wineasio or wineasio-git.

For some reason, this didn't really work for me, so I compiled my own. You still need steinberg-asio though.

                                 sudo packer -S steinberg-asio

This will install asio.h into /usr/include/steinberg-asio/asio.h

(Normally you would get this from the Steinberg SDK, which you would get by signing up for a Steinberg Developer account)

Now if the AUR package didn't work for you, then you can download wineasio from here:

                                http://sourceforge.net/projects/wineasio/

And copy asio.h from the above location to the source tree. After which, as the README file says:

Do the following to build for 64bit Wine.
# ./prepare_64bit_asio
# make clean
# make -f Makefile64

Now that should result in wineasio.dll.so being built. Check the architecture with the following command:

[balazsbela@archlinux wineasio]$ objdump -f wineasio.dll.so |grep arch
architecture: i386:x86-64, flags 0x00000150:

All good, now copy it into /usr/lib64/wine/  (Assuming you use the 64 bit version).

Now we need to register it, so REAPER sees it.

                               wine64 regsvr32 wineasioa

This should result in the message: Successfully registered DLL wineasio.dll

Now run winecfg and check that the drive in the Audio tab is winealsa.drv and only that.

WineAsio is now installed!

So lets get Reaper from: http://www.reaper.fm/download.php

The instalation is straightforward, next next finish.

Now you can get the free version of Guitar Rig from here:

http://www.native-instruments.com/en/products/komplete/guitar/guitar-rig-5-player/download/


So download and install that, set the VST plugin folder in Reaper (start it with wine reaper.exe, it usually lives in ~/.wine/drive_c/Program\ Files/REAPER\ (x64)/)

Now Guitar Rig should appear when you add effects to a track and you should be able to use it.


This approach is not perfect, I still get some buffer underruns with my USB interface, there is also a way to use a realtime kernel, that would probably make it a lot better, but it works and it's good enough for now.

In case I may have forgotten something:

http://lkubuntu.wordpress.com/2014/01/09/how-to-set-up-wineasio/
http://forum.cockos.com/showthread.php?t=16786


It does show how wine has come such a long way, maybe now with the open-sourcing of .NET it will get even better.

Wednesday, December 25, 2013

2013 Wrap Up

Apparently, I managed to neglect blogging for almost an entire year.
But now, since 2014 is right around the corner, I think it's time to give an update.

It's been a very exciting and busy year that demonstrated that moving from Java web-development back to my C++/Qt roots has been a good decision. The project I have been working on is nearing completion, while I can not disclose many details of it, I can tell that it is something truly unique that has not been done before. Working with bluetooth, gps and embedded arm boards has proven to be a lot more fitting direction for me than Java web-development ever was and I definitely want to continue on the embedded side of things. Also C++ 11 (and soon C++ 14) comes with lots of exciting new features that move it closer to functional languages.
Another thing that I've learned this year is that web-development is also very important and my 1.5 years of Java enterprise were definitely not a waste, JavaScript is starting to show up in the weirdest places (http://creativejs.com/2013/08/tessel-a-javascript-programmable-micro-controller-board/) and I'm pretty sure that this trend will continue (emscripten, asm.js anyone ?).

Between working and my Master's degree I didn't really have too much time for personal projects this year, only a few minor commits in github and various educational projects, but I've already chosen my thesis project and I've already started researching it.

Also, it's a very strange feeling to see your 10th grade project on Linux Insider (http://www.linuxinsider.com/story/74828.html) after so many years. It has been at least 5-6 years and I'm seriously surprised it still works in modern distro releases (or Windows for that matter).
People still keep downloading it, which just shows the huge demand for this kind of app. It really makes me want to redesign it, rewrite it from zero, give it a very solid plugin based architecture and release a new version together with an SDK for third party devs (these were my plans all along). But I simply can not find the time to do it, especially not alone, and I have a bunch of ideas I would like to implement. So I guess it will have to wait. I am of course very sad about disappointing my users and I dislike the idea of abandonware, but I hope people understand that I have to prioritize.

One of the other changes that I've made this year is switching to Arch.
I've been using ArchLinux for more than half a year now and I am so satisfied with it that I've even bought a shirt (http://www.freewear.org/?page=show_item&id=FW0026 , the price also contains a donation to the project).

It's simple, reliable, has great KDE 4 support, rolling releases and just up-to-date enough to be stable (as in bleeding edge, without the risk of breaking). It's great for development environment and for daily use.
Huge kudos to the Arch devs. I will try to install Arch at my workplace too (we use Ubuntu now).

In terms of hobbies I've managed to work on quite a few musical projects this year, one of them is my personal musical project (on which we work with my girlfriend and with various session collaborators) , another was a full band, with regular band practice (but it didn't last for long) and another project on which I did mostly sound engineering related work (upcomming release).

That kind of wraps it up, I hope that the next year will be at least equally awesome.

Merry Christmas to you all and a Happy New Year!







Thursday, January 17, 2013

New year, new challenges

The new year brought a lot of change to my life. I have kind of returned to my C++/Qt roots. I've recently switched jobs, I've left enterprise java web development for C++ Qt development on embedded devices.
While using cutting edge web technologies with well organized and solid java frameworks is nice, I've received an e-mail on one of the mailing lists that a company in my hometown was searching for Qt developers, so I went to see what it's about. I'm currently working on a very interesting and challenging project with direct assistance/guidance/review from very good German engineers from KDAB, the leading Qt consultancy firm in Europe. I get to use ubuntu linux, git and the latest Qt 5. I'm finally putting the knowledge I've gained with my biggest projects to use. To familiarize myself with Qt5, before starting the job (and as a project for the university) I wrote an aggregator that takes articles from Reddit and Hacker news and shows them in the same list.

This showcases the capabilities of QML and webkit.

Check it out here: https://github.com/balazsbela/qgator

Monday, July 30, 2012

Thesis summary article and updates

As I promised, I'm posting the article about my license thesis that was presented at a local conference held by the two prominent faculties in Cluj (UBB and UT). I've won first prize in the category of UBB students and I would like to thank Siemens Romania for the laptop they've offered as a prize.

Here you can download the paper:

3D Software Visualization Tool for Enhanced Code Comprehension

If there is interest, I will post my entire thesis.

Other than that, I'm busy with work and I will be doing my Master's Degree in Software Engineering.That will keep me busy for another two years.


Monday, June 18, 2012

Symbion 1.0 Released


Symbion 1.0 was released on sourceforge, you can now download it at           http://sourceforge.net/projects/symbion/


Symbion was chosen as a name because the profiler attaches itself to the host program in a way that resembles symbiotic relationships in nature and also because the visualizer uses different interconnected nodes that form a mistletoe-like structure.

I finished writing my thesis today, I also wrote an article about Symbion which will be presented at a conference. I will post both online after they are presented.

Until then, I made a video demoing the new capabilities:


























Saturday, April 21, 2012

Source code browsing

I've implemented the source code viewing. Here's a screenshot:

You simply click a node, it turns orange and appears in the source code viewer, it also has some really basic syntax highlighting. With right click, you can expand nodes.You can also select expanded nodes for source code viewing. It also automatically scrolls near the function definition in the source file, the method name is also highlighted.

What I've been up to lately

Yes, it's been a year again and while writing yearly blogposts is not my intention, this is how it happened.

I've been busy.Now that I check my blog and see all the C++/Perl posts it may come as a surprise to some that I have a new job. For the last 8 months I've been working as a Java Developer at ISDC. We do enterprise web development, yeah, I know what you're thinking, but you're wrong. It's not boring at all, I've had the chance to work on some really interesting projects, one of them was recreating a simpler version of google earth using HTML5 and canvas and laying out some geographical data on it, it was a really interesting R&D project.Other than that it's still challenging, enterprise needs are very different from standard, traditional web application needs. What I like the most is, that we try to do things by the book, reviews are strict, business processes are a priority, our aim is quality.I feel like I'm a lot more disciplined coder.

So if work (part time, 20 hours a week), school (3rd year, final) wasn't enough to keep me busy, I've started to work on my thesis project.

Ever had the heart warming experience of maintaining a huge project you haven't worked on ? Thousands of modules, packages, classes of unfamiliar code. It's hard to decide even where to start. Well this is what my thesis project would like to address. Using the JVMTI a profiling agent attaches itself to the execution of a java program and gathers data about the execution. This data, for now, is limited to all the function calls that match a specific ruleset.This process is done using the ASM API, which lets you hook into the JVM class loading process, and rewrite the classes at runtime, before they are executed.

The gathered data is stored in a huge XML file and a 3D visualizer, written in JMonkey, reads it and allows you to visualize the callgraph, jumping to the relevant source-code portion. This allows you to execute a very simple use case and follow the execution path, without going through every detail a debugging process would force you to. You can give regular expressions matching the classes you would like to record, the rest is ignored. This lets you focus on your code.

The project is called Symbion (because of the Symbiosis-like relationship between the profiling agent and the profiled program). While it's heavily work in progress, you can check it out here: http://sourceforge.net/p/symbion/

I've attached a few screenshots below:

I've made an artificial starting node, so I won't have multiple trees.You can expand each function node and get what functions it calls. The source code display is not implemented yet.

I've taken a week off to work on this project, but it's not expected to be stable anytime soon.I'll have to defend my thesis in June,so it should be done by then.

Here's a pic of the profiler and the console, you can see each class that matched your rules.It's profiling a very simple application I had as homework for school back in the second year.

So yeah, this concludes my little adventure in software visualization.The finer details are yet to be dealt with.I hope it will be actually useful.