MAX: From Windows to Linux + Wine for realtime sound processing

personal_username's icon

Hi all,

I'm thinking about working on Linux + Wine from now on.

Main problem might be latency

On my Max patch latency would be a real issue (realtime-ness is very important) and as the patch is using mostly sound - not video/jitter though - I'm worried if this migration is a no-no on the first place...

Distro suggestion
I read on the forum that Xorg could be the distro to go.
Maybe the lighter Linux OS (compared to Windows) could balance the potential virtualisation latency? I really do hope so.
If added latency is in the order of let's say 10/20 msec I could consider that. If more probably not...

Patch Requirements
I'll mainly use my patch as an application. So no real need to edit it in Linux. I'm just going to run it as is.
The app is going to:
- play Kontakt Virtual Instruments vst
- read some files from hard drive and
- need to read serial port / OSC rounting.

Soooo... that's it!
While waiting for Max for Linux, i really do hope to receive some feedback to make this migration a bit easier ;-)
Any info/tip is *warmly* welcomed!
Thanks a lot!

brendan mccloskey's icon

Hi
I run MaxRT under Wine, my distro is Fedora 23 with the PlanetCCRMA realtime kernel (a custom build developed by Standford Uni Centre for Music and Acoustics). I cannot give you any scientific data relating to latency or performance, because my knowledge of Jack is almost non-existent; for example, I don't even know what audio driver MaxRT uses. I can run a fairly intensive patch (a poly voice granular playback engine built in Gen~), and anecdotally at least I have no issues with latency/RAM/CPU usage. It's smooth and responsive to GUI input.

If you are talking about MIDI -> Audio latency I can't comment (you say you use a MIDI vst), but I could set something up and test it.

Best regards
Brendan

brendan mccloskey's icon

ps "while waiting for Max on Linux"

settle in for a long wait

personal_username's icon

Hi Brendan, thanks a lot for your reply!
My setup does not need jack under windows/mac. Should I need it on Linux? My experience with it has been far than positive actually...

As for your proposed MIDI>audio test latency... that would be simply great! ;-)
THANKS AGAIN!

PS yes, i see people in line here with me for Linux. Setting a tent, buying some snacks. A lot of people here. Music's not lacking... actually enjoyable atmosphere ;-)

brendan mccloskey's icon

Hi
sorry for the lack of clarity: Jack is an audio/midi server and API that allows real time distribution among Jack-friendly software on Linux (and Mac/Win too I think), it supports Port Audio, Core Audio and ALSA drivers. I realise that I implied that Jack was a driver, it's not. I rely on Supercollider a lot these days, so Jack is imperative for me. But according to the Jack website, a real time kernel-based OS distro is NOT critical. Again I am lacking hard numbers here for you, but if you're seriously considering the move from Win/Mac to Linux, look at:

and

I have in the past used both the PlanetCCRMA kernel version of Fedora23, and the vanilla version. Not hardcore stress-testing, just everyday Max/SC/Arduino/Processing stuff. I only prefer PlanetCCRMA because, well, you know. It's fuckin California man!

;)

brendan mccloskey's icon

Actually, d'yknow what. I have some free time over the coming two weeks (https://en.wikipedia.org/wiki/Battle_of_the_Boyne); I'll put a simple Arduino->MaxRT synth patch together, just to put these anecdotal comments of mine under the microscope, and you can test it yourself. Do you have a Linux distro running at the moment?

ps shhh idontreallyunderstandwine . . . .

Brendan

personal_username's icon

Hi Brendan,

any news? ;-)

brendan mccloskey's icon

Hi @personal_username
I'm afraid I didn't pursue this, in the absence of a definite response, and other commitments too, but I'm still willing to put something together - though it will be another 2 weeks as I have a conference coming up! BTW, I tried to run full-blown Max under Linux, but, as has been noted here and elsewhere, the PACE copy protection causes Max to fail and there seems to be no way round it. It runs fine in RT mode though. Also, Fernando Lopez-Lezcano has just released a new RT kernel for Fedora 23/24

I'll keep in touch.

Brendan

personal_username's icon

Thanks!
Very welcome news ;-)

Th8a's icon

Hey, man! I have been wishing that I could get at least the RT of max or my standalones running in linux for quite some time now. Could you tell me what your WINE setup is like, so I can take a good shot at making it happen?
Cheers

brendan mccloskey's icon

Hi
what Linux distro are you on? I found Wine for Fedora here:

It installs a number of applications, including an Add/Remove program, which you use to open the .exe file of MaxRT.

tbh, I don't use it much at all. On Linux, I do my sound processing stuff in Supercollider, so MaxRT just sits there on my taskbar.

HTH
Brendan

Th8a's icon

Thanks for the reply and sorry for my delayed response, as things have been pretty hectic on my end these days. I went on a serious quest to get max running in linux via wine. I tried several different distros and wine versions etc. Of everything I tried, the best I could get it to run was using Fedora26 with crossover, or playOnLinux with wine 9.23 staging for 64bit versions. I had some success, though not full on success. The Max RT runs surprisingly smooth with one major set back that was consistent through all combinations of distros and wine versions that I tried, and that is that the umenu object would glitch out and crash everything when clicked. You can use umenus in other modes or send it inc-dec or messages to change its values and it would work ok, but as soon as the dropdown menu feature is used it all comes crashing down. It's a similar page fault issue as when you try to start the full Max program. I even got that running somewhat, but again there are certain graphics elements such as umenu and patching that just refuse to work nomatter what I try. I did some debugging to see if I could pinpoint exactly what component of max, wine or linux was causing the issue, but then life pulled me away from having the time to put into this and the furthest I got was that it's somehow related to graphics cards or drivers. I tried these setups on various computers with different GPUs and drivers, and all have the same exact result, which tells me that this is a bug in wine. I still maintain faith that the proper wine settings and drivers etc will correct the issue, but my skills in this department are limited, so for now, I give anyone who's interested this info and pass the torch to anyone who's up to the task - at least until I can find time to revisit this project. Til then, I have started to get pretty good at pd-l2ork, but the workflow in that is still no where near as slick as Max. Thanks for recommending fedora. Its a super stable and clean distro. Cheers!
th8a

brendan mccloskey's icon

Hi
thanks for the update, sounds like you've been very thorough in your efforts - less so than I. I have ditched Wine and MaxRT from my Linux machine, I'll just run full Max on my Win10 PC.

I have recently discovered further alternatives, including the OWL pedal, which is slated to run gen~ code. But I've been drawn to Arduino + Mozzi (and maybe Teensy 3.2 in the near future), for standalone audio synthesis and sensor control.

As always, option anxiety is the killer.

Happy hunting!

Brendan

Th8a's icon

Those are all good gadgets for hardware synths. In my experience in this dept, nothing beats a teensy with a breadboard, a trip to an electronics junk yard and a few yard sales for dated hardware to gut for parts... chips, tubes, transformers, potentiometers etc. I recently picked up the C.H.I.P. for 8 bucks, which is something like a raspberry pi zero with built in hard drive, wifi, bluetooth and a breadboard attatched to the gpio pins. It has it's own linux distro out of the box. I can see this thing having tons of potential if you could fire up PD to control the GPIOs of this guy. Just be sure to get the HDMI add on cause it ships with composite, and i dont have the right cable anymore, so its just sitting there.

Gee... I wonder how much fun and what kind of wacky contraptions we would come up with if say.. Max 7 were to run on ubuntu? (looks to C74 with pleading eyes.) I really do miss Max these days, but just cannot deal with non free OS's anymore..,. Im sure many can relate. The gen code stuff is cool, but I'd say 90% of most people's uses for max don't involve embedded hardware, but just good ol in-the-box custom GUIs. I get that there isn't a whole lot of motivation for c74 to go the linux direction, but even just fixing a few little bugs to enable max users to run max on wine would shut whiny bitches like me up pretty effectively... lol. oh well... in an ideal world, I suppose...

Th8a's icon

*UPDATE*

I have managed to get Max 7 to run somewhat smoothly in a sense. Before, no matter what, running the full Max 7 app in wine was certain to crash immediately. Now, I have it running. The catch is that UI goes black and stays that way. The program is actually still running underneath the black UI, so it's not a full blown crash, but rather some shortcoming with the wine gpu handling with MAX. I finally accomplished this after countless hours of trial and error... whew. I'm so close yet so far still! if anyone has any idea what component, .dll file, dependency, WINE setting or any other ideas that my help out, PLEASE hmu!

Gilles Marivier's icon

hi !
I'm going to try to run max (or a max app standalone) on a raspberry today. Did you figure out your problem under WINE ?

Carlo Cattano's icon

Interested into the evolution of this . Heard news of a windows 10 succesfull installation on raspberry pi , but only a few drivers work , but the github is getting some love
https://www.youtube.com/watch?v=c0VqVm8X_zQ github links in description

Th8a's icon

Yes. There is some news on this front. Max 8 runs perfectly in wine. I am using the latest wine staging and make sure all of the applicable microsoft redist libraries are installed within your prefix.

Roman Thilenius's icon

does this include the html browsing / autrhorisation / package manager things?

Music_SDP's icon

TH8A,

for someone who's interested in this for an application distribution, but has NEVER used Wine, would you consider putting together a walk-through of your setup?

Or, would you be able to point me to some good resources for self-learning?

msnf's icon

Same things for TH8A
can you write more details about installation?
You speak about "microsoft redist libraries" => you mean "Visual C++ Redistributable Package" fro https://appdb.winehq.org/objectManager.php?sClass=application&iId=5766 ?
But the last version in the table is from 2015 tested with WIne 2.7 and you speak about last wine - is it Wine 3.0.4 ?
etc....
Can you write us some more detailed information ?

Th8a's icon

Yes. I have written a little walkthrough on one of the other threads about max on wine. You can find it here https://cycling74.com/forums/max-on-linux/replies/2