|
|
|
07-20-2015, 02:09 AM
|
#1
|
Human being with feelings
Join Date: Nov 2014
Posts: 194
|
lua to process midi and osc?
Is there any chance, any way to use lua with midi and osc messages?
Just like you would with pd or OSCIIBot?
PD gets quite messy for larger projects and is hard to maintain, OSCIIBot uses eel (?) or similar, LUA is just so much nicer and easier to learn.
I have seen that there are some extencions to add midi or osc support, but i cannot see for example how i would route midi with lua. I suppose we would need some kind of program running that handles the data io between lua, reaper and the physical devices?
|
|
|
07-20-2015, 03:03 AM
|
#2
|
Human being with feelings
Join Date: Nov 2014
Posts: 194
|
there is also the possibility to use lua with pd. pdlua...
this sounds quite promising, problem is that i could not find any foolproof documention to get started...
All i could manage was a lua script printing "hello" on pd´s console.
Has anyone ever ventured into this?
|
|
|
07-21-2015, 03:08 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by jrp
Is there any chance, any way to use lua with midi and osc messages?
|
Currently the support for that in ReaScript (Lua, EEL and Python) is very limited, unfortunately. You can't really do what you are asking for with the limitations that currently exist.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
07-21-2015, 11:15 AM
|
#4
|
Human being with feelings
Join Date: Nov 2014
Posts: 194
|
well, i was rather thinking about processing midi and osc outside of reaper, so not with reascript.
Like in PD where you just set up an udp connection and midi i/o and you are ready to rock.
Only that pd soons grows to a monsterous something if you start doing some nice controllsurvace stuff...
I was trying some more to understand how pdlua works as that seems like the best of two worlds, but no luck. Maybe i´m not such a nerd after all...
|
|
|
07-21-2015, 11:35 AM
|
#5
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by jrp
well, i was rather thinking about processing midi and osc outside of reaper, so not with reascript.
|
Ah so, a thing like OsciiBot but using Lua instead of EEL. Well, I don't recall anything like that existing. I've occasionally thought about doing something like that myself, since I like OsciiBot in principle but I find the EEL language quite terrible to write.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
07-22-2015, 01:40 AM
|
#6
|
Human being with feelings
Join Date: Nov 2014
Posts: 194
|
exactly my point.
I´m just learning how to code, and for a beginner lua is great with all the available tutorials.
Anyway, there seem to be a lot of extencions for Lua that bring functions for manipulating midi or osc. What seems to be missing is a kind of "frame" that provides access to midi hardware i/o and handles the network connection.
That could be PD. The way i read the info i found LUA is already part of PD-extended.
Creating an object called pdlua in pd gives a lot of instructions (that i can´t make use of).
You can then, it seems, define objects and functions in LUA that can be connected in pd.
I imagine it might be possible to have just a few objects in pd that setup connections, switch some options and midi channels etc, maybe do some osc routing and midi mapping.
At the same time the main code for handling a controll survace is running in a few LUA "objects"...
Last edited by jrp; 07-22-2015 at 01:45 AM.
|
|
|
07-22-2015, 03:27 AM
|
#7
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
I started a little side project last night in C++/Juce that allows writing Javascript code to process incoming MIDI messages.
Why Javascript and not Lua? Because Juce comes with a barebones but a more or less working Javascript engine. My previous attempts at embedding Lua into a C++ application haven't been entirely successful, there are all kinds of messy details to worry about that are not explained well enough anywhere.
The app doesn't do anything practically useful yet and I am not sure if this progresses to anything, but time will tell.
edit : It can now send OSC messages from the Javascript code.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 07-22-2015 at 03:48 AM.
|
|
|
07-22-2015, 06:03 AM
|
#8
|
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Originally Posted by jrp
[...] That could be PD. The way i read the info i found LUA is already part of PD-extended.
|
Indeed.
Quote:
Originally Posted by jrp
Creating an object called pdlua in pd gives a lot of instructions (that i can´t make use of). [...]
|
Why can't you make use of the instructions? What exactly isn't clear, where do you get stuck?
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
|
|
|
11-29-2016, 06:29 AM
|
#9
|
Banned
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
|
atom wrote his http://ctrlr.org Ctrlк app, using both Juce and Lua. The app itself also can use lua scripts.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 12:27 PM.
|