JPfeP / AddRoutes

Allow MIDI, OSC and a remote Android App to control Blender 2.8
http://www.jpfep.net/pages/addroutes/
GNU General Public License v2.0
95 stars 8 forks source link

Blender 3.1 rtmidi Problem #10

Open Outboarder opened 2 years ago

Outboarder commented 2 years ago

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).

JPfeP commented 2 years ago

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

opchronatron commented 2 years ago

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.

JPfeP commented 2 years ago

What OS do you have ?

opchronatron commented 2 years ago

Monterey 12.2.1 :)

JPfeP commented 2 years ago

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.

opchronatron commented 2 years ago

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

BlendThatFilm commented 2 years ago

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.

JPfeP commented 2 years ago

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

jtodaone commented 2 years ago

Found a workaround. (Macbook Pro M1 Max)

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

Outboarder commented 2 years ago

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

BlendThatFilm commented 2 years ago

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

Outboarder commented 2 years ago

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.

BlendThatFilm commented 2 years ago

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.

Outboarder commented 2 years ago

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

BlendThatFilm commented 2 years ago

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.

Outboarder commented 2 years ago

I totally understand, lets hope for an update.

JPfeP commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.

luigipacheco commented 2 years ago

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

JPfeP commented 2 years ago

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).

BlendThatFilm commented 2 years ago

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.

luigipacheco commented 2 years ago

Great looking forward for it! thank you!

JPfeP commented 2 years ago

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

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

Bd1st1r commented 1 year ago

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 ..)

JPfeP commented 1 year ago

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 ?