What's new

Lua resources for UVI Falcon scripting

nmalleus

New Member
Hi,

I'm sure I'm not the only one who wants to do my own Lua scripts for Falcon... and I'm sure some of you have already started!

This thread aims to centralize Lua resources for UVI Falcon, so do not hesitate to browse through and share what you have coded or discovered online.

First contact on UVI website.

Official documentation on UVI website.

Examples

https://www.uvi.net/uviscript/examples.html
- Chorder
- Ensemble
- InvertPitch
- Keyswitch
- Legato
- MonoBassLine
- Portamento
- QuarterTone
- TimbreShifting
- Tremolo
- Unison
- Vibrato

https://github.com/johnclavin/luacode-uvi-falcon
- 12 Tone Jazz 2 Chromatic

https://github.com/lcouka/falcon-punch
- Bass Extractor
- Chord Bank
- Chord
- Delay
- Double
- Fix Overlaps
- Mapper
- Mono Group
- Note Range
- Note Single
- Piano Analyzer
- Piano
- Random Note
- Random Play
- Release Trigger
- Scale

https://github.com/nmalleus/Falcon
- Choke Cymbals (for Drum Designer)
 
Wow, I've held off on Falcon because, well, because I just didn't feel like I needed yet another sampler. BUT, I use LUA at work for DSP and control system programming, and I am starting to become comfortable with the language. This might be the excuse I need to dive deeper and really learn it?
 
Just got Falcon with a major focus on scripting. I come from the MaxMSP scene. Do you know of any example Lua scripts demonstrating the use of the image class? I want to see code demonstrating the potential for customizing the UI. It looks promising.
 
Does anyone have any video examples of what you can do with Lua in Falcon? I've perused the documentation above, but not being familiar with Falcon enough, and only knowing some shell scripting, I'm having a hard time understanding why anyone would bother. Are there any songs or highly regarded pieces of music that have been created with Lua in Falcon? Or even just musical passages or phrases that can give an idea? I'm comparing it to Bitwig's generative and algorithmic possibilities and that just seems much more straightfoward/faster to get equal results, and there's a lot more examples of that already on Youtube. And of course decades of history with Max/MSP.
 
Does anyone have any video examples of what you can do with Lua in Falcon? I've perused the documentation above, but not being familiar with Falcon enough, and only knowing some shell scripting, I'm having a hard time understanding why anyone would bother. Are there any songs or highly regarded pieces of music that have been created with Lua in Falcon? Or even just musical passages or phrases that can give an idea? I'm comparing it to Bitwig's generative and algorithmic possibilities and that just seems much more straightfoward/faster to get equal results, and there's a lot more examples of that already on Youtube. And of course decades of history with Max/MSP.
I get the impression Falcon users ignore the Lua feature. Scripting is often outside a lot of musician's wheelhouse. I also get the impression that UVI is ambivalent on the topic. Here are my thoughts.
  • UVI only provides basic Lua script examples. Any advance presets have their scripts "locked".
  • I reached out to UVI asking for more advanced scripting examples. They refused.
  • I think it's a part of their business strategy. Their advanced and very graphical Falcon instruments have locked scripts. These are also the products that sell for more money. In other words I don't believe they want casual users making advanced Falcon projects with scripting. They sort of want to control that whole thing. I see it as a challenge.
  • I think they mostly use scripting for the UI. For example their Mello product includes an elaborate UI with animations as well.
 
I get the impression Falcon users ignore the Lua feature. Scripting is often outside a lot of musician's wheelhouse. I also get the impression that UVI is ambivalent on the topic. Here are my thoughts.
  • UVI only provides basic Lua script examples. Any advance presets have their scripts "locked".
  • I reached out to UVI asking for more advanced scripting examples. They refused.
  • I think it's a part of their business strategy. Their advanced and very graphical Falcon instruments have locked scripts. These are also the products that sell for more money. In other words I don't believe they want casual users making advanced Falcon projects with scripting. They sort of want to control that whole thing. I see it as a challenge.
  • I think they mostly use scripting for the UI. For example their Mello product includes an elaborate UI with animations as well.
I reached to UVI for an example they omitted and they did send it to me (check here: https://vi-control.net/community/threads/falcon-is-worth-buying.114166/page-3#post-4911815 )

I don't think there's any conspiracy there, or UVI holding back to keep an advantage.
Having more advanced content for their platform would be a bonus and an incentive for people to buy Falcon.
They use scripting for more than UI, a lot of the functionality in their expansions is done with it.
Thing is, I don't think they want (or have the resources) to support a community of programmers that would bury them in support requests.

Most people praise UVI for providing Falcon updates for free.
I would gladly pay some upgrade price and see the product grow more or more support for a potential Lua developers community.
 
I reached to UVI for an example they omitted and they did send it to me (check here: https://vi-control.net/community/threads/falcon-is-worth-buying.114166/page-3#post-4911815 )

I don't think there's any conspiracy there, or UVI holding back to keep an advantage.
Having more advanced content for their platform would be a bonus and an incentive for people to buy Falcon.
They use scripting for more than UI, a lot of the functionality in their expansions is done with it.
Thing is, I don't think they want (or have the resources) to support a community of programmers that would bury them in support requests.

Most people praise UVI for providing Falcon updates for free.
I would gladly pay some upgrade price and see the product grow more or more support for a potential Lua developers community.
If there wasn't a business incentive then they wouldn't hide the scripts for their products. I've used MaxMSP extensively and they don't hide any of their code from the user. As far as I can tell the same goes for NI Reaktor products. I can view and tinker with NI's Razor in Reaktor. I think UVI's approach isn't a conspiracy. It's just a business approach. One that I find disappointing.

If they wanted to make their advanced scripts available they wouldn't make it inaccessible. For example if you attempt to view the script for Vector Pro VX, it reveals a script that loads an external lua file. That lua file is packaged in their UVI format that can't be opened. So you can not view any of that code.

Additionally they provide zero examples demonstrating graphical UI.

I agree that they don't have the resources to support Lua scripting but I think that applies whether they make all their code accessible or only some of their code accessible.

With that said, I've now figured out how to create graphical, somewhat interactive UI in Falcon since my previous post.
 

Attachments

  • Falcon 2021-10-06 13-48-06.mp4
    3.6 MB
just to play devil's advocate. It could simply be that the their Lua language extensions are currently evolving and they just don't want to formally document it nor share scripts that could become outdated in the future as they change their Lua API they are using.

There are any number of reasons why they may have determined that at least for now, we can't get in on the LUA scripting to the extent they are. It could in fact also be as you said, that they don't want to enable third party developers to develop cool libraries.

many third party Kontakt libraries also do not share their KSP code...and for good reason...that is where a lot of intellectual property is regarding certain sound libraries. Source code is intellectual property, it takes manpower to create and has inherent value. UVI makes Falcon but it also makes sound libraries that they sell. Why would they want to give away their intellectual property to third parties to compete with them?

Now that being said...I think full documentation for the LUA api they are using is in order. But they may have decided, at least for now, that at least some of that API they are going to keep hidden secret information so that they can make better sound libraries... or maybe not, maybe its as I said....not finalized enough yet. Who knows. If they are keeping some of the API secret in order to avoid competition for sound libraries...then that is a decision they have made which will continue to limit the sales of Falcon itself...since third parties are mostly ignoring the Falcon platform until now. I suspect a third party could contact UVI and arrange through contracts to get full information about Lua if they are really motivated...and UVI can decide on a case by case basis whether to cooperate with a third party developer. As I said, this would come down to their own decision making about which approach will generate more revenue for them, opening up Falcon for more third party libraries to emerge.. (thus selling more copies of Falcon), or continuing to release more sound content for Falcon that they can sell to their existing user base.

it is what it is...
 
just to play devil's advocate. It could simply be that the their Lua language extensions are currently evolving and they just don't want to formally document it nor share scripts that could become outdated in the future as they change their Lua API they are using.

There are any number of reasons why they may have determined that at least for now, we can't get in on the LUA scripting to the extent they are. It could in fact also be as you said, that they don't want to enable third party developers to develop cool libraries.

many third party Kontakt libraries also do not share their KSP code...and for good reason...that is where a lot of intellectual property is regarding certain sound libraries. Source code is intellectual property, it takes manpower to create and has inherent value. UVI makes Falcon but it also makes sound libraries that they sell. Why would they want to give away their intellectual property to third parties to compete with them?

Now that being said...I think full documentation for the LUA api they are using is in order. But they may have decided, at least for now, that at least some of that API they are going to keep hidden secret information so that they can make better sound libraries... or maybe not, maybe its as I said....not finalized enough yet. Who knows. If they are keeping some of the API secret in order to avoid competition for sound libraries...then that is a decision they have made which will continue to limit the sales of Falcon itself...since third parties are mostly ignoring the Falcon platform until now. I suspect a third party could contact UVI and arrange through contracts to get full information about Lua if they are really motivated...and UVI can decide on a case by case basis whether to cooperate with a third party developer. As I said, this would come down to their own decision making about which approach will generate more revenue for them, opening up Falcon for more third party libraries to emerge.. (thus selling more copies of Falcon), or continuing to release more sound content for Falcon that they can sell to their existing user base.

it is what it is...
I completely agree that this is all a possibility. It did cross my mind. As I dive further into the API I no longer suspect they're hiding portions of it. I think they're just not providing examples or much clarity for possibly some of the reasons that have been discussed so far.

As I get further along I plan on uploading the UI examples which seems to be the least discussed.
 
That would be much appreciated.
Here's some insight I'll document more clearly later.

UI components are known as widgets. Some (maybe all?) allow you to associate a graphic with the widget. It refers to them as "Strip Image". These images use the concept of animation frames. So when you create them you can create each frame, horizontally, demonstrating their animation.

The code below shows the creation of the slider widget. Then I use a method called setStripeImage in order to associate an image with the slider. This method requires an integer value that represents the number of frames in the animation.

sCircle = Slider("circleSlider", 0.5, 0.0, 1.0, false, true) sCircle:setStripImage("resources/circles/strip4.png", 10)

I think the real difficulty is the graphical aspect. You need to create consistent frames with the same dimensions. They then need to be next to each other, in order, horizontally. I made mine in Adobe XD.
 

Attachments

  • lua_falcon.png
    lua_falcon.png
    259.4 KB · Views: 35
Here's some insight I'll document more clearly later.

UI components are known as widgets. Some (maybe all?) allow you to associate a graphic with the widget. It refers to them as "Strip Image". These images use the concept of animation frames. So when you create them you can create each frame, horizontally, demonstrating their animation.

The code below shows the creation of the slider widget. Then I use a method called setStripeImage in order to associate an image with the slider. This method requires an integer value that represents the number of frames in the animation.

sCircle = Slider("circleSlider", 0.5, 0.0, 1.0, false, true) sCircle:setStripImage("resources/circles/strip4.png", 10)

I think the real difficulty is the graphical aspect. You need to create consistent frames with the same dimensions. They then need to be next to each other, in order, horizontally. I made mine in Adobe XD.
Once you have that, you can create a callback function that uses the value returned from the UI slider.

sCircle.changed = function(self) print("slider changed", self.value) end

A callback function refers to a new function (a task) that the computer will perform after another function runs. In this case when sCircle.changed is executed, the callback function (everything after the equal sign) will run. In my example I print values to the console, self.value. This self.value returns its own value. This can be used to change something musical, etc.
 
just to play devil's advocate. It could simply be that the their Lua language extensions are currently evolving and they just don't want to formally document it nor share scripts that could become outdated in the future as they change their Lua API they are using.
This makes sense IMO. All developers know that maintaining a public API is a massive headache.

OTOH scripting is not an obscure Falcon feature. It's advertised prominently in the Falcon product page. Seems weird that UVI would decide to offer this and not do it properly. As a developer customer there is nothing worse than bad documentation.
 
This makes sense IMO. All developers know that maintaining a public API is a massive headache.

OTOH scripting is not an obscure Falcon feature. It's advertised prominently in the Falcon product page. Seems weird that UVI would decide to offer this and not do it properly. As a developer customer there is nothing worse than bad documentation.
Yeah that's how I feel. I was very pleased to see their scripting option but they're a bit too laid back about the entire matter. Having been involved with the Max community, it absolutely can require a lot of effort to support a community with scripting. However, there are some ways to support it: make it a group effort. They could have a wiki or a forum for scripting discussions.
 
Last edited:
A few years ago, I reached out to UVI asking essentially the same questions. I had a few ideas I wanted to experiment with, but it was difficult to get going. I ended up just using JUCE (different beast, I know), but I would have preferred to just work in Falcon. Thanks for getting this going again. Maybe we can assemble a list of resources and make a sticky for reference. I'll see if I have anything else.
 
Top Bottom