VG-99 Linux Drivers

Started by op111, September 01, 2008, 07:54:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

op111

Sorry if I caused undue excitement  ;)

I am in the process of finally giving up on Vista and moving all my Audio tools to Linux.  So far all the open source drivers and tools seem great... except for a lack of driver for the VG-99.

I am software engineer by profession, so I can fix this.  I was thinking of writing some ALSA drivers.  Does anyone out there have documentation on how to talk to a 99?  Roland, are out there?

P

Kostas Greece

I also want to give up from XP and Vista and I want to install linux. It could be great If you create a driver for linux!
Fender American Lone Star Strat (HSS+floyd rose), Roland VG-99, FC-300, Roland GR-20

op111

I've been trying Ardour http://en.wikipedia.org/wiki/Ardour_(audio_processor) and the ALSA driver for my Edirol UA-25.

So far, so good.  Much less painful than trying to get CakeWalk and the UA-25 talk reliably on Vista.

Anyone else out there do their audio work on Linux?

kloniwotski

I normally use a UA25 into 64Studio linux.

Just out of curiosity, I attached the VG-99 usb to my linux box, having already loaded the alsa usb-snd driver. In the factory default of advanced USB mode, no dice: the VG-99 quickly flashed up a "usb disconnected" notice on its screen.

But having switched to standard mode via the system->usb page, and restarting the VG-99, it apprarently worked fine.

You only get 16 bits at 44.1k, but I was able to start jackd and record and playback with ardour.

If you're interested, I used the jackd command:

   /usr/bin/jackd -c -s -R -dalsa -dhw:3 -r44100 -p128 -n3

(the VG-99 reported as card 3 (id VG-99!) in /proc/asound/cards, hence the dhw:3 part)

and my (rather old) kernel reports itself as

   linux 64studio 2.6.21-1-multimedia-amd64

I didn't spend long enough to evaluate the stability, but the basics are there. I suspect the advanced mode USB might be able to work with the addition of a "quirks" setting to the driver, since this was sufficient for the UA25 advanced mode, I believe.

kloniwotski

Old thread, but the right thread, I guess..

Just an update on this - I spent a bit of time yesterday patching my kernel, adding a "quirk" (basically throws the kernel a hint what to do when a usb device registers with non-standard values) for the vg-99 .. and I was able to get 24bit audio and midi working.

I've mailed the relevant code to the linux audio development list (alsa-devel) so hopefully we'll see some support in the future ( I haven't done a whole lot of testing, but the basics are there, so it should be possible to make this work well).

In case someone reading wants (and is able) to patch their own kernels in the meantime (I found this is a lot harder work than it was 10 years ago!) here's the quirk code. This should be added in

    sound/usb/quirks-table.h

immediately beneath the comment: "Roland/RolandED/Edirol/BOSS devices". If anyone else is up for helping test this, that would be great.

8<========================CUT HERE==============================

{
    USB_DEVICE(0x0582, 0x00b2),
        .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
                .vendor_name = "Roland",
                .product_name = "VG-99",
                .ifnum = QUIRK_ANY_INTERFACE,
                .type = QUIRK_COMPOSITE,
                .data = (const struct snd_usb_audio_quirk[]) {
                        {
                                .ifnum = 0,
                                .type = QUIRK_AUDIO_FIXED_ENDPOINT,
                                .data = & (const struct audioformat) {
                                        .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                        .channels = 2,
                                        .iface = 0,
                                        .altsetting = 1,
                                        .altset_idx = 1,
                                        .attributes = 0,
                                        .endpoint = 0x01,
                                        .ep_attr = 0x09,
                                        .rates = SNDRV_PCM_RATE_CONTINUOUS,
                                        .rate_min = 44100,
                                        .rate_max = 44100,
                                }
                        },
                        {
                                .ifnum = 1,
                                .type = QUIRK_AUDIO_FIXED_ENDPOINT,
                                .data = & (const struct audioformat) {
                                        .formats = SNDRV_PCM_FMTBIT_S24_3LE,
                                        .channels = 2,
                                        .iface = 1,
                                        .altsetting = 1,
                                        .altset_idx = 1,
                                        .attributes = UAC_EP_CS_ATTR_FILL_MAX,
                                        .endpoint = 0x82,
                                        .ep_attr = 0x05,
                                        .rates = SNDRV_PCM_RATE_CONTINUOUS,
                                        .rate_min = 44100,
                                        .rate_max = 44100,
                                }
                        },
                        {
                                .ifnum = 2,
                                .type = QUIRK_MIDI_FIXED_ENDPOINT,
                                .data = & (const struct snd_usb_midi_endpoint_info) {
                                        .out_cables = 0x0007,
                                        .in_cables  = 0x0007
                                }
                        },
                        {
                                .ifnum = -1
                        }
                }
        }
},

8<========================CUT HERE==============================


tekrytor

Excellent work and contribution kloniwotski!! If applause were a five star rating like the Google Play store, you would get all five for this one, IMO. Kudos and thanks for sharing.

A a GR-55 owner and Linux hack, I may try tweaking your code for the GR-55. Any tips?
SY-300/BeatBuddy/VoiceLive 3/GR-55(v1.50)/33/1/50/700/VGA-7/V-Bass, Yam-G10, GPK-4, DIY X-Bee HighlyLiquidCPU "Cozy-Lil-Footie", FCB-1010, other MIDI stuff, Godin Freeway SA and various other GK equipped controllers, Sonar X1, Audacity, KXstudio, Misc devices

kloniwotski

Hi tekrytor,

Thanks for the kind words :) In fact, I'm not at all knowledgeable about the finer points of either alsa or usb devices, so may not be the best person.. what I did was examine the output of the command

   lsusb -v

which shows how the usb devices are seen by the system.

I then took a guess based on (read: almost entirely copied from) the existing code in sound/usb/quirks-table.h for the Roland UA-100, and matched up the endpoint descriptors shown in the lsusb output to what was in the UA-100 quirk. I put in the product id, format constant and sample rates, and somewhere changed an 0x81 to 0x82 because lsusb showed 0x82 as the "endpoint address" ... pure voodoo coding, in fact :-D

If you plug in the GR55 and post the output of lsusb -v for it, I could take a look, but I'd be guessing. My advice, if you want this, would be to join Linux Audio Users list http://lists.linuxaudio.org/listinfo/linux-audio-user and post a request for help there, along with the lsusb output. Many times when this has been done before, a guy called Clemens Ladisch from the alsa team will respond with some code to try out, and he surely knows a lot more about this than I do.

I didn't go that route just because I fancied trying to do it myself, just for "fun", but I'm hoping someone from the alsa team will verify / correct my effort - it's quite likely I muffed something in it ;)

tekrytor

Excellent information, very much appreciated! I am on it.
Thanks kloniwotski!
SY-300/BeatBuddy/VoiceLive 3/GR-55(v1.50)/33/1/50/700/VGA-7/V-Bass, Yam-G10, GPK-4, DIY X-Bee HighlyLiquidCPU "Cozy-Lil-Footie", FCB-1010, other MIDI stuff, Godin Freeway SA and various other GK equipped controllers, Sonar X1, Audacity, KXstudio, Misc devices

Kevin M

Just curious, but what audio applications are you guys using under Linux?

tekrytor

I like KXStudio with Audacity, ZynAddSubFX and Bristol. There are so many other cool Linux apps, but these are my long time favorites. KXStudio uses some elegant Jack UI tools that make it one of the easier distros for mere mortals to use, IMO.
SY-300/BeatBuddy/VoiceLive 3/GR-55(v1.50)/33/1/50/700/VGA-7/V-Bass, Yam-G10, GPK-4, DIY X-Bee HighlyLiquidCPU "Cozy-Lil-Footie", FCB-1010, other MIDI stuff, Godin Freeway SA and various other GK equipped controllers, Sonar X1, Audacity, KXstudio, Misc devices

kloniwotski

I've been playing "offline" for a while now (just an enthusiast in any case :) )

I've mainly used the following (in random order)

ardour (hard disk recorder, mixer, and plugin host  - http://ardour.org/ )

zynAddSubFx (versatile synth with some lush sounds, search for it on youtube for some demos)

seq24 ( minimal sequencer  http://seq24.wikispaces.com/ )

jack (Jack Audio Connection Kit - low-latency connections for audio inputs and between audio and midi apps (think Rewire) - I get latency of about 3ms on my UA-25 with this (VG-99 yet to be tested :-) ) - http://jackaudio.org/  )

linuxsampler / qsampler ( nice quality sampler, though a pretty basic feature set compared to commercial samplers on other platforms )

hydrogen ( drum machine software : http://www.hydrogen-music.org/hcms/ - has some nice features like layering, editable instruments, and the ability to expose each instrument as a separate channel to jack)

Just lately I've been experimenting with qmidiroute ( http://http://alsamodular.sourceforge.net/ ) which I've hacked to map midi-in note values to midi-out control values, supplying a blatantly missing (imho) feature of the VG-99 - using detected pitch to control values in the assign section. This was the main reason I started to look at midi over USB from the VG-99.

Probably the "proper" hardcore way to do the above would be in pd ( http://puredata.info/ ), supercollider ( http://supercollider.sourceforge.net/ ) or maybe faust ( http://sourceforge.net/projects/faudiostream/ ) all very general systems for doing complex dsp and routing. One day I'll get around to learning one of those - but too much investment of time would be required right now...)

The linux audio experience for music production can be a frustrating and complicated business. Certainly using a dedicated distro, like kxstudio, is worth considering. There isn't as much app choice, and apps generally don't have all the features found in commercial products (ardour is the nearest thing to an exception to this that I know of, but even there midi tracking is in beta and in my experience a little unstable). Also, plugin choice and plugin UIs are limited compared to the vast array of VSTs on windows/mac (though increasingly, since the introduction of native VST support in some leading host apps, VSTs are being ported over).

So why use it? In my case, I no longer have a windows machine, and haven't had a powerful enough windows machine for .. well over a decade I suppose.. So not much choice...

Also: all the software above is free (donation supported in some cases) and often well supported by the coders themselves. It doesn't try and lock you in, cripple features to get more out of your wallet, or depend on activation codes or physical dongles (do they still do that?) to function.

If you're able, and so inclined, you can change it directly to get features you want. In many cases, developers are receptive to feature requests (though the execution, to be fair, is sometimes lacking ;-) )

And the platform itself, once you have it well set up, is rock solid and performs really well. Stable 3ms latency under moderate load on a USB 1 audio device like the UA-25 is respectable on any platform, I think.

Well, apologies for the long answer. Seems I needed to vent :)

Kevin M

I have been a fan/user of Linux for a very very long time (back to when I had to compile just about everything and chase libraries down and recompile the kernel just to get simple things working). Now, I use it daily at work and, for the most part, don't miss Windows for that. I tried, unsuccessfully, to do basic sequencing (an app called Jazz) about 12 years ago or so. Looks like there's been progress made for music production on Linux, but that it still has a ways to go.  I'd love to see a big name app ported over to Linux.

kloniwotski

Wow, yeah. Jazz is pretty old now.. check out rosegarden : http://www.rosegardenmusic.com/ - things have come a long way, eh? :)

Anyway, just to note that a patch has been accepted by maintainer of the linux sound subsystem, so at some point in the uncertain future, the VG-99 advanced mode should work out of the box with a decent linux distro. I've no idea what the schedule for this is, though.

mooncaine

With so much free time at home these days, I have set up an external drive to boot my (office's) Mac Pro to Ubuntu. Been experimenting. Learning. First time I've used a *nix box in a decade, maybe. First time I set one up and used it more than a day. Never messed with linux audio till this weekend.

So, I realize I don't know much. It actually took me a while to figure out that I should install jack; total newbie to linux audio here.

Just wanted to share the encouraging news that I opened Ardour for the first time, connected my VG-99 to a USB hub, and Ardour sees it, hears it, and I recorded a test successfully. Sounds fine, 2 channels coming in.

Pretty freakin' awesome.

mooncaine

Update: it's not all wine & roses, but I seem to have figured out how to get audio from USB devices, like VG-99 and Motu M4, into Ardour. Wasted a LOT of time yesterday because I had goofed something up.

admin

#15
Quote from: mooncaine on July 13, 2020, 07:09:35 PM
Update: it's not all wine & roses, but I seem to have figured out how to get audio from USB devices, like VG-99 and Motu M4, into Ardour. Wasted a LOT of time yesterday because I had goofed something up.

Id imagine would only work  when VG-99 is in USB Basic MODE ( = 16 bit Audio) which is USB Class Compliant ( works with iPads ) 

And not  when VG-99 is in USB ADVANCED MODE ( = 24 bit Audio) which is NOT USB Class Compliant


as stated here:
https://www.vguitarforums.com/smf/index.php?topic=1093.msg8167#msg8167

gumtown

The Linux Kernel has a lot of Boss/Roland USB Audio/Midi devices embedded, so 24bit (advanced mode) might just work fine.
There was a point where newer Roland USB Audio devices stopped working after they went the multi-channel route since the GT-100 firmware 2 (pre and post DSP/effects),
and I don't know if that one has been resolved yet.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

mooncaine

admin's assumption is reasonable, but perhaps gumtown's post explains why it just worked for me. I just checked. My VG is still in advanced mode.
I recall seeing that the Ardour program warned me here and there about sample rates, from which it's evident that the audio perceived as coming in from VG-99 is 44.1 kHz sample rate. (do I have that term right, "sample rate"? It's not how many bits, but rather how many of them per second, I think...?)

But whatever it does, it's still an intermittent experience for me because somehow I switch devices in some program, somewhere, and then waste an hour or more trying to teach myself what I did wrong and how to avoid it... fail... and eventually just log out and back in.