AddRoutes icon indicating copy to clipboard operation
AddRoutes copied to clipboard

Blender 3.1 rtmidi Problem

Open Outboarder opened this issue 2 years ago • 26 comments

Today they released blender 3.1, unfortunately it won't load the addon. They are now using Python 3.10 and there is no rtmidi for python 3.10 (or I don't know where to download it).

Outboarder avatar Mar 09 '22 22:03 Outboarder

I confirm for Blender 3.1 I am now searching for a solution. I would like to address the MAC OS M1 architecture support issue as well. In the meanwhile you can install yourself python-rtmidi but it's not easy if you don't know python: https://spotlightkid.github.io/python-rtmidi/installation.html

JPfeP avatar Mar 14 '22 20:03 JPfeP

Would it be possible to get some more info on how to get around this? I have a project that requires the metal acceleration of 3.1 and I'm a bit dead in the water.

opchronatron avatar Mar 21 '22 03:03 opchronatron

What OS do you have ?

JPfeP avatar Mar 22 '22 19:03 JPfeP

Monterey 12.2.1 :)

opchronatron avatar Mar 22 '22 20:03 opchronatron

The author of python-rtmidi intends to officially support Python 3.10 and make a new release around April 15th. Actually python-rtmidi already works well with Python 3.10 despite being "unsupported" but there are some libs to recompile. I will see if I can recompile the libs myself for Mac with my "hackintosh" emulation, but I am not sure to achieve this goal before the date announced.

JPfeP avatar Mar 31 '22 19:03 JPfeP

Appreciate. I was able to get it mostly working in 3.0. I even did a tutorial on how to connect in blender with the face tracking app we are building https://youtu.be/bpfczOoktyg

opchronatron avatar Apr 15 '22 19:04 opchronatron

Hi, I would appreciate if you had any update on this working with Blender 3.1.2? Or on the Author of python-rtmidi? (Perhaps a link) I’ve been using this Addon with fantastic results for a year now for facial motion tracking and I’d love to keep doing so with the latest version. Here is an example of what I’m doing:

https://youtu.be/iIukgiRgRR8

I truly appreciate the work you put into this Addon.

BlendThatFilm avatar Apr 18 '22 07:04 BlendThatFilm

I just relay the info, there is a little delay : https://github.com/SpotlightKid/python-rtmidi/issues/108#issuecomment-1108735862

JPfeP avatar Apr 25 '22 20:04 JPfeP

Found a workaround. (Macbook Pro M1 Max)

  • Install Python if it's not installed. You can check if it is installed by typing in python --version command in Terminal.
  • Install python-rtmidi with pip outside of Blender by typing in pip install python-rtmidi in Terminal.
    • You can just use global installation of Python.
  • Go to pip installation folder (ex. ~/.pyenv/versions/3.9.9/lib/python3.9/site-packages)
    • You can find the exact location with pip show python-rtmidi
  • Copy rtmidi folder to Blender AddRoutes add-on location, replacing the preexisting rtmidi folder.
  • Rename _rtmidi.cpython-39-darwin.so to _rtmidi.so
    • The exact file name might be different depending on your system. The example above is from macOS build. Just find the .so file and rename that one. There should be only one .so file.

So far, AddRoutes works well with OSC input. Haven't checked MIDI and Blemote though.

jaekong avatar May 05 '22 19:05 jaekong

new rtmidi is released. tested and works fine , Win 10 / Blender 3.2 / AddRoutes 0.33 https://pypi.org/project/python-rtmidi/

Outboarder avatar Jun 13 '22 10:06 Outboarder

new rtmidi is released. tested and works fine , Win 10 / Blender 3.2 / AddRoutes 0.33 https://pypi.org/project/python-rtmidi/

Doesn't seem to be the case for me, it still does not work. Also the latest version in the link you posted is listed as April 2021

BlendThatFilm avatar Jun 13 '22 12:06 BlendThatFilm

Did you installed it like this: $ pip install python-rtmidi I tried it 2 weeks ago with no luck, tried it 2 days ago and now it works. Uninstall previous versions of python and install Python 3.10 then try $ pip install python-rtmidi. I installed my python in C:\ , rtmidi will be installed in C:\Python\Python310\Lib\site-packages\rtmidi copy rtmidi folder in python and paste/replace it with AddRoute rtmidi folder. That's what I did.

Outboarder avatar Jun 15 '22 09:06 Outboarder

Did you installed it like this: $ pip install python-rtmidi I tried it 2 weeks ago with no luck, tried it 2 days ago and now it works. Uninstall previous versions of python and install Python 3.10 then try $ pip install python-rtmidi. I installed my python in C:\ , rtmidi will be installed in C:\Python\Python310\Lib\site-packages\rtmidi copy rimidi folder in python and paste/replace it with AddRoute rtmidi folder. That's what I did.

No I just installed the new version of Blender and then re-installed AddRoutes as per any addon and it still doesn't work. I'm coming at this from the perspective of a Blender user not a Python coder.

BlendThatFilm avatar Jun 15 '22 11:06 BlendThatFilm

You don't need to code it's pretty simple, just follow the steps.

Outboarder avatar Jun 15 '22 22:06 Outboarder

You don't need to code it's pretty simple, just follow the steps.

I’m coming at this from a Blender user’s point of view so forgive me if I come off naive. My only experience/interaction with python is through Blender and doing some simple coding for extra panels and toolbars.

The only place Python is installed on my Pc (as far as I can tell) is in the Blender Foundation folder. To that end if I run ‘python —version’ in command line it tells me Python is not installed.

I also intend to record a tutorial on using this Addon for facial motion capture/vtubing in Blender it’s pointless doing this if instead of installing a quick Addon with a couple of clicks I now have to tell the viewer to jump through tons of hoops and install something they might not want to.

BlendThatFilm avatar Jun 18 '22 08:06 BlendThatFilm

I totally understand, lets hope for an update.

Outboarder avatar Jun 18 '22 15:06 Outboarder

Hello, just to say that I haven't any news from the author of python-rtmidi. So far the archive on my site contains an added binary support of rtmidi for Linux/Python 3.10 (plus the usual python 3.9 binaries for the 3 OS). I have a virtual image of MacOS and I have been able to compile the rtmidi wrapper inside it. I still hope that the author will make an announce soon but I might have a solution to offer in the meanwhile (at least for the x86 MacOS). A proper tutorial is another option.

JPfeP avatar Jun 23 '22 19:06 JPfeP

I just re-uploaded AddRoutes v0.33 on my site with "experimental" built-in support for python 3.10 on MacOS Intel: http://www.jpfep.net/static/AddRoutes_latest.zip

The M1/Arm64 arch support is still no yet included, as I need time to update various software components on my image. And there is not Jack MIDI support for this first iteration. But it will be easy to recompile with it later. Please tell me if it works for you, if you have never been able to compile python-rtmidi, it should be ready-to-go as before.

Note: this archive has python 3.10 support included for Linux as well now.

JPfeP avatar Jun 24 '22 13:06 JPfeP

At last, I have been able to compile an arm64 M1 binary module for Rtmidi. I have made a new separate archive of AddRoutes for Apple M1 users: http://www.jpfep.net/static/AddRoutes-M1.zip

Please tell me if it works with the recent version of Blender.

JPfeP avatar Jun 26 '22 19:06 JPfeP

Is there a running version for win64? for python 3.1?

I get this error when testing the last v.33 : line 7, in bootstrap mod = importlib.util.module_from_spec(spec) File "", line 568, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader'

also when manually installing rtmidi I get an error:

src_rtmidi.cpp(44): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe' failed with exit code 2

Not sure how to get it working

luigipacheco avatar Jun 28 '22 21:06 luigipacheco

There is not yet a win module of rtmidi in the current AddRoutes for Blender 3.x

I think you tried to compile it yourself (??) Apparently your installation of Python 3.10 is not found, or not installed on your system.

I am going now to focus on the win version, unfortunatly it's not easy to build on a Linux system (yet possible).

JPfeP avatar Jul 01 '22 14:07 JPfeP

There is not yet a win module of rtmidi in the current AddRoutes for Blender 3.x

I think you tried to compile it yourself (??) Apparently your installation of Python 3.10 is not found, or not installed on your system.

I am going now to focus on the win version, unfortunatly it's not easy to build on a Linux system (yet possible).

Thanks for the continued support of this fantastic Addon, I look forward to the Windows version working with 3.1.

BlendThatFilm avatar Jul 01 '22 17:07 BlendThatFilm

Great looking forward for it! thank you!

luigipacheco avatar Jul 01 '22 21:07 luigipacheco

If you want the windows version of AddRoutes for Blender 3.2, see here:

https://github.com/JPfeP/AddRoutes/issues/12#issuecomment-1183670611

JPfeP avatar Jul 13 '22 21:07 JPfeP

I tried the Apple M1 version on Blender 3.1, 3.2 and 3.3. The add-on seems to install and also shows up in the GUI but it does not work: In the background its continuously throwing "KeyError: 'bpy_prop_collection[key]: key "AddRoutes" not found'" from various modules (e.g. midi.py, osc_devices.py ..)

Bd1st1r avatar Sep 19 '22 13:09 Bd1st1r

I tried the Apple M1 version on Blender 3.1, 3.2 and 3.3. The add-on seems to install and also shows up in the GUI but it does not work: In the background its continuously throwing "KeyError: 'bpy_prop_collection[key]: key "AddRoutes" not found'" from various modules (e.g. midi.py, osc_devices.py ..)

Hello,

OK, thanks for the report. Annoying, indeed. Could you for instance send a capture screen of the full error message ?

JPfeP avatar Oct 15 '22 10:10 JPfeP