# Lua resources for UVI Falcon scripting



## nmalleus (May 19, 2020)

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)


----------



## wst3 (May 19, 2020)

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?


----------



## estevancarlos (Feb 2, 2021)

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.


----------



## Lindon (Feb 4, 2021)

might help; https://falcontinuum.com/


----------



## hostnik (Feb 9, 2021)

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.


----------



## estevancarlos (Oct 6, 2021)

hostnik said:


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


----------



## digitallysane (Oct 6, 2021)

estevancarlos said:


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


----------



## doctoremmet (Oct 6, 2021)

UVI’s own Louis Couka used to have some Lua scripting examples online somewhere IIRC

Edit: GitHub link:









lcouka - Overview


lcouka has 2 repositories available. Follow their code on GitHub.




github.com


----------



## estevancarlos (Oct 6, 2021)

digitallysane said:


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


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.


----------



## Dewdman42 (Oct 6, 2021)

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


----------



## estevancarlos (Oct 6, 2021)

Dewdman42 said:


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


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.


----------



## doctoremmet (Oct 7, 2021)

estevancarlos said:


> As I get further along I plan on uploading the UI examples which seems to be the least discussed.


That would be much appreciated.


----------



## estevancarlos (Oct 7, 2021)

doctoremmet said:


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


----------



## estevancarlos (Oct 7, 2021)

estevancarlos said:


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


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.


----------



## Pier (Oct 7, 2021)

Dewdman42 said:


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


----------



## estevancarlos (Oct 7, 2021)

Pier said:


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


----------



## Pier (Oct 7, 2021)

estevancarlos said:


> However, there are some ways to support it: make it a group effort. They could have a wiki or a forum for scripting discussions.


Totally agree. Even just an official Github repo with examples and discussions would be great.


----------



## estevancarlos (Oct 8, 2021)

Here is an initial tutorial on the subject: https://github.com/estevancarlos/uvi-falcon-scripts/blob/main/readme.md


----------



## thesteelydane (Oct 9, 2021)

I believe @Mike Greene said in another thread that he at some point reached out to UVI to inquire about developing libraries for their platform, and was told they are not really interested in having any more 3rd party developers. So it seems that for whatever reason they are not interested in taking on Kontakt.


----------



## AllanH (Oct 9, 2021)

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.


----------



## AllanH (Oct 9, 2021)

Here is what I identified at the time:





__





UVIScript: UVI Script






www.uvi.net








__





Home


This is an unofficial forum and knowledge base for UVI’s Falcon. It is not endorsed or supported by UVI and UVI do not offer technical support here.



falcontinuum.com












KVR Forum: Falcon FAQs - Check Out The New Unofficial Falcon Forum Falcontinuum.com! - patchpool Forum


KVR Audio Forum - Falcon FAQs - Check Out The New Unofficial Falcon Forum Falcontinuum.com! - patchpool Forum




www.kvraudio.com








__





Lua: documentation






www.lua.org








__





Lua Tutorial


Lua Tutorial, Lua is an open source language built on top of C programming language. Lua has its value across multiple platforms ranging from large server systems to small mo




www.tutorialspoint.com


----------



## estevancarlos (Oct 9, 2021)

AllanH said:


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


For any of us writing code, I recommend we share through Github, partly to spread the word. Also, it's my intent to design some free, open source UI graphics for the community at some point.


----------



## giwro (Oct 9, 2021)

This is very generous of you to do this, @estevancarlos 

Thanks!


----------



## Mike Greene (Oct 9, 2021)

thesteelydane said:


> I believe @Mike Greene said in another thread that he at some point reached out to UVI to inquire about developing libraries for their platform, and was told they are not really interested in having any more 3rd party developers. So it seems that for whatever reason they are not interested in taking on Kontakt.


Just to clarify, I suggested that we could set up a UVI/Falcon section on the forum (similar to the Kontakt/KSP section) which might attract more developers to using their platform. They declined, saying third party development isn't a very big priority.

This was a few years ago, and I can't be sure I interpreted their response perfectly, so I'm reluctant to be too definitive about their desire for 3rd party development.

If the demand is there, we could still do this here, by the way.


----------



## estevancarlos (Oct 9, 2021)

Mike Greene said:


> Just to clarify, I suggested that we could set up a UVI/Falcon section on the forum (similar to the Kontakt/KSP section) which might attract more developers to using their platform. They declined, saying third party development isn't a very big priority.
> 
> This was a few years ago, and I can't be sure I interpreted their response perfectly, so I'm reluctant to be too definitive about their desire for 3rd party development.
> 
> If the demand is there, we could still do this here, by the way.


That is surprising and fits in with the other signifiers. One reason I dived into Falcon is because the scripting potentially easier since there's an established Lua community out there. Oh well. We should go against UVI's ambivalence and hopefully inspire them to change their minds.


----------



## thesteelydane (Oct 9, 2021)

Mike Greene said:


> Just to clarify, I suggested that we could set up a UVI/Falcon section on the forum (similar to the Kontakt/KSP section) which might attract more developers to using their platform. They declined, saying third party development isn't a very big priority.
> 
> This was a few years ago, and I can't be sure I interpreted their response perfectly, so I'm reluctant to be too definitive about their desire for 3rd party development.
> 
> If the demand is there, we could still do this here, by the way.


Ah I see, my bad. Thanks for the clarification!


----------



## Dirtgrain (Oct 9, 2021)

Perhaps Halion would be an alternative (not as many features as Falcon, but there are third-party developers)? Or is there something else limiting that?


----------



## estevancarlos (Oct 9, 2021)

Dirtgrain said:


> Perhaps Halion would be an alternative (not as many features as Falcon, but there are third-party developers)? Or is there something else limiting that?


Probably is an alternative. I don't own it myself though so I'm curious to move the needle with Falcon.


----------



## DonnieAlan (Oct 10, 2021)

Greetings. I'm new to this forum, but not to Falcon. One thing I've looked and looked for is a video tutorial on how to use Lua to design UI's for patches created in Falcon. I really like some of the creative looking UI's used on some of the libraries on the "Info" screen. What I'd like is to see a video tutorial on how to create those nice looking interfaces. I've seem some Lua documentation, but I would learn it better by seeing it done. Is there any such video tutorial(s) out there?


----------



## doctoremmet (Oct 10, 2021)

I don’t think there is, at least not publicly shared.


----------



## b_elliott (Oct 10, 2021)

DonnieAlan said:


> Greetings. I'm new to this forum, but not to Falcon. One thing I've looked and looked for is a video tutorial on how to use Lua to design UI's for patches created in Falcon. I really like some of the creative looking UI's used on some of the libraries on the "Info" screen. What I'd like is to see a video tutorial on how to create those nice looking interfaces. I've seem some Lua documentation, but I would learn it better by seeing it done. Is there any such video tutorial(s) out there?


An additional channel worth checking is the Reaper forum. There are active Lua scripters there who likely could point you to the resources you'd like.


----------



## estevancarlos (Oct 10, 2021)

DonnieAlan said:


> Greetings. I'm new to this forum, but not to Falcon. One thing I've looked and looked for is a video tutorial on how to use Lua to design UI's for patches created in Falcon. I really like some of the creative looking UI's used on some of the libraries on the "Info" screen. What I'd like is to see a video tutorial on how to create those nice looking interfaces. I've seem some Lua documentation, but I would learn it better by seeing it done. Is there any such video tutorial(s) out there?


I was on the same hunt and there are no tutorials or videos on the topic. In fact I think my tutorial is the first but it's not a video (yet). https://github.com/estevancarlos/uvi-falcon-scripts

I am considering making a video in the future.


----------



## Alchemedia (Oct 10, 2021)

Dirtgrain said:


> Perhaps Halion would be an alternative (not as many features as Falcon, but there are third-party developers)? Or is there something else limiting that?


HALion is definitely a viable alternative and arguably better if your main intention is to share your creations since HALion Sonic SE is free.


----------



## estevancarlos (Oct 10, 2021)

Alchemedia said:


> HALion is definitely a viable alternative and arguably better if your main intention is to share your creations since HALion Sonic SE is free.


Yeah maybe I should consider selling my copy of Falcon but for now I'll see how far I can take it. I hope to nag UVI into adjusting their policies.


----------



## otristan (Oct 11, 2021)

Olivier from UVI here.

There are no private API that we use, so everything is accessible to the end users.
We don't usually share our own internal script to avoid giving our source code to other 3rd party developer and share our UI assets.

What kind of example would like to see ?

Thanks !


----------



## doctoremmet (Oct 11, 2021)

otristan said:


> Olivier from UVI here.
> 
> There are no private API that we use, so everything is accessible to the end users.
> We don't usually share our own internal script to avoid giving our source code to other 3rd party developer and share our UI assets.
> ...


Hi Olivier. Thanks for chiming in - much appreciated!

I’d like to see a video tutorial series showcasing some very basic uses of LUA scripting, especially pertaining to creating UIs for one’s own instruments. Video + some small set or maybe a central repository of some basic scripts would be a great starting point for many musicians who are tech savvy, yet not used to programming in their day jobs


----------



## otristan (Oct 11, 2021)

The thing is that we don't have the time to do cool videos about this as it has a very limited audience.
It would make more sense for a twitch like session or some course with some exercise but I'm afraid I don't have the time to handle that.

Still I can provide you guys with more advanced examples that you can check
Here is the StepLine source code

Lots of stuff in there but still limited for us to be able to share it.


----------



## digitallysane (Oct 11, 2021)

otristan said:


> Olivier from UVI here.
> 
> There are no private API that we use, so everything is accessible to the end users.
> We don't usually share our own internal script to avoid giving our source code to other 3rd party developer and share our UI assets.
> ...


Hi Oliver and thanks for being here,

Would be great to have the online help system updated a bit. There are bits missing (like the patches necessary to actually work with some of the scripting examples);
I'm mostly interested in examples that show things that can be done with patches that go beyond what the standard modules offer (modulation, note manipulation, etc). So scripting as an synth tool, less as a GUI design method;
Which brings me to: an example showing a real world usage of the Script Event Modulation modulator, which has been there for quite a bit of time yet is still undocumented.


----------



## otristan (Oct 11, 2021)

1. Yes the uvip is not listed on the website for the synth. I see if we can add it. Nothing fancy there though, just a basic patch with amp env, filter and filter env.
2. If you have more precise question I should be able to answer those.
3. Script Event modulation are basically a poly aftertouch related to a voice id and not a MIDI key like poly aftertouch.
The Script Event modulation id itself is basically a way to reference it.
You can checkout the MPE script which can be edited for usage.


----------



## digitallysane (Oct 11, 2021)

otristan said:


> 2. If you have more precise question I should be able to answer those.


Is it possible to combine modulations (a LFO for example) with stuff generated inside Lua (a noise for example) and output that as another modulator? (my thinking was that the Script Event modulator would be an interface hook to something like this).


----------



## otristan (Oct 11, 2021)

Nop, you cannot combine regular modulation with script output.
You can however program everything in the script itself and output a specific MIDI CC for you custom modulation


----------



## digitallysane (Oct 11, 2021)

otristan said:


> Nop, you cannot combine regular modulation with script output.


Well, consider it a feature request/suggestion, then.  The ability to read modulation data and use it inside the scripts.


otristan said:


> You can however program everything in the script itself and output a specific MIDI CC for you custom modulation


That's very useful, thanks!


----------



## estevancarlos (Oct 11, 2021)

otristan said:


> Olivier from UVI here.
> 
> There are no private API that we use, so everything is accessible to the end users.
> We don't usually share our own internal script to avoid giving our source code to other 3rd party developer and share our UI assets.
> ...



Thanks for talking to us.

- When interacting with widgets that send more than on/off values, it seems we can only drag up and down. Is that correct? Is there a way to change it so that the user can drag left to right?
- getTime() does not work globally. The error states that it needs to be in the audio thread. I'll assume this is the case for the other time methods.

For example this produces an error, print("time", getTime(), "end of run") and it is taken from one of the examples. How do we ensure it runs in the audio thread if it can't be accessed outside of it?


----------



## estevancarlos (Oct 11, 2021)

otristan said:


> The thing is that we don't have the time to do cool videos about this as it has a very limited audience.
> It would make more sense for a twitch like session or some course with some exercise but I'm afraid I don't have the time to handle that.
> 
> Still I can provide you guys with more advanced examples that you can check
> ...


And thank you so much for this example. It really shows a lot of details I think some of us were looking for.


----------



## estevancarlos (Oct 11, 2021)

otristan said:


> Olivier from UVI here.
> 
> There are no private API that we use, so everything is accessible to the end users.
> We don't usually share our own internal script to avoid giving our source code to other 3rd party developer and share our UI assets.
> ...


Another question about the UI.

Your Mello soundbank includes the use of an animation. The tape reel on the right hand side has an automated and subtle animation. How does that work? 

Here's my guess. You're using something like getTime() with a modulo in order to generate values every several seconds. Then that's being used to change the frames within an unclickable widget. Is that basically what's happening?


----------



## otristan (Oct 11, 2021)

estevancarlos said:


> Thanks for talking to us.
> 
> - When interacting with widgets that send more than on/off values, it seems we can only drag up and down. Is that correct? Is there a way to change it so that the user can drag left to right?
> - getTime() does not work globally. The error states that it needs to be in the audio thread. I'll assume this is the case for the other time methods.
> ...


You can use horizontal slider for left/right movement.
getTime can only be used in event callback like onNote, onController, onRelease...
as the point is to use this to time musical related events not UI ones.


----------



## otristan (Oct 11, 2021)

estevancarlos said:


> Another question about the UI.
> 
> Your Mello soundbank includes the use of an animation. The tape reel on the right hand side has an automated and subtle animation. How does that work?
> 
> Here's my guess. You're using something like getTime() with a modulo in order to generate values every several seconds. Then that's being used to change the frames within an unclickable widget. Is that basically what's happening?


We use a knob with an image strip and use a wait to increment it every N ms

`--Turning Wheel
Wheel=Knob{"Wheely",1,1,numImages, true, bounds={625,92,95,267},showLabel = false,showPopupDisplay=false}
Wheel:setStripImage(pathToMyImageStrip, numImages)
function TurnWheel(time)
local maxValue = Wheel.max
local counter = 1
while true do
Wheel.value= counter%maxValue
counter = counter + 1
wait(time)
end
end
spawn(TurnWheel,40)`


----------



## DonnieAlan (Oct 11, 2021)

estevancarlos said:


> I was on the same hunt and there are no tutorials or videos on the topic. In fact I think my tutorial is the first but it's not a video (yet). https://github.com/estevancarlos/uvi-falcon-scripts
> 
> I am considering making a video in the future.


Thank you. I will look at your tutorial. As for making a video in the future. Tomorrow is the future, right?


----------



## AllanH (Oct 11, 2021)

otristan said:


> The thing is that we don't have the time to do cool videos about this as it has a very limited audience.
> It would make more sense for a twitch like session or some course with some exercise but I'm afraid I don't have the time to handle that.
> 
> Still I can provide you guys with more advanced examples that you can check
> ...


Hi Oliver,

Thank you - I find it immensely helpful to see a functional example more than a few lines long.


----------



## doctoremmet (Oct 12, 2021)

Interesting remark by Greg / @Empty Vessel in this thread:






Falcon - How to re-use samples from expansion packs?


Deleted




vi-control.net





(you can safely ignore all my rambling in there, and skip to post #14)

Greg casually announces a new Falcon pack and apparently has cracked the LUA UI scripting secrets.


----------



## estevancarlos (Oct 12, 2021)

DonnieAlan said:


> Thank you. I will look at your tutorial. As for making a video in the future. Tomorrow is the future, right?


Fair enough. Perhaps in a week or so.


----------



## DonnieAlan (Oct 12, 2021)

estevancarlos said:


> Fair enough. Perhaps in a week or so.


No pressure, I was just being a bit cheeky for a grin!


----------



## R. Naroth (Oct 19, 2021)

Thanks for creating this thread. I just recently purchased Falcon but was disappointed to see that scripts were all locked away and the scripting documentation very unhelpful.

@estevancarlos Thanks for the github page.


----------



## emptyvessel (Oct 19, 2021)

doctoremmet said:


> Interesting remark by Greg / @Empty Vessel in this thread:
> 
> 
> 
> ...


well, not completely by any means but getting there, my rusty old memories from a Computer Science degree from 1990 is taking a while to reload and appears to have become rather patchy and corrupted in the intervening years  . Thank you for the thread @nmalleus , some very useful resources and big thanks to @otristan and others for the very useful extra information! Extremely appreciated.   
Hopefully I'm able to contribute some tips, videos etc. too before too long.
Greets from New Zealand.


----------



## Pier (Oct 20, 2021)

Empty Vessel said:


> Greets from New Zealand.


What is up with great sound designers and New Zealand? 

I already know 3: GoldBaby, Tim Prebble, and yourself are there.

Maybe I should move there and infuse myself with the powers of the island!


----------



## emptyvessel (Oct 20, 2021)

Pier said:


> What is up with great sound designers and New Zealand?
> 
> I already know 3: GoldBaby, Tim Prebble, and yourself are there.
> 
> Maybe I should move there and infuse myself with the powers of the island!


I know Tim and Hugo, not sure I would align myself with such mighty individuals but thank you!
I highly recommend it btw, it's a very stunning and extremely chilled out place. Plenty of creative inspiration for sure.


----------



## New_Loops (Oct 21, 2021)

TBH, I can't believe how difficult it is to add a background image to the macro page! Just a basic image. Why is this info so difficult to find?


----------



## doctoremmet (Oct 21, 2021)

New_Loops said:


> TBH, I can't believe how difficult it is to add a background image to the macro page! Just a basic image. Why is this info so difficult to find?


It is a simple drag and drop 

Go to the INFO tab, click on the wrench and drop a png file. Done.


----------



## New_Loops (Oct 21, 2021)

doctoremmet said:


> It is a simple drag and drop
> 
> Go to the INFO tab, click on the wrench and drop a png file. Done.


I tried d&d, will try again. The manual or website couldn't say this? Thank god you're here!!


----------



## New_Loops (Oct 21, 2021)

doctoremmet said:


> It is a simple drag and drop
> 
> Go to the INFO tab, click on the wrench and drop a png file. Done.


oh, and THANK YOU!


----------



## doctoremmet (Oct 21, 2021)

New_Loops said:


> I tried d&d, will try again. The manual or website couldn't say this? Thank god you're here!!


I remember some requirements, off the top of my head .png-format, 720×480 px. This may have changed.


----------



## New_Loops (Oct 21, 2021)

doctoremmet said:


> I remember some requirements, off the of my head .png-format, 720×480 px. This may have changed.


I will try that and confirm shortly - thanks again.


----------



## doctoremmet (Oct 21, 2021)

New_Loops said:


> I will try that and confirm shortly - thanks again.


I just dropped a random png with different pixel count without any problems, so it should still work.


----------



## New_Loops (Oct 21, 2021)

doctoremmet said:


> I just dropped a random png with different pixel count without any problems, so it should still work.


yes, me too. Dropped in the New Loops logo. I think it just stretches it.


----------



## digitallysane (Oct 21, 2021)

__





UVIScript: User Interface






www.uvi.net






*void setBackground*(string _imagePath_)
set the script background Image.
supported image types include jpg and png
Parameters

imagePathfile path to the Image can be absolute or relative


----------



## R. Naroth (Oct 21, 2021)

Yep, drag/drop works just fine. Thank you. It is quite easy to add and rearrange macro knobs. 

What is this control? Where is it added from? Sorry, I am so new to Falcon, still nibbling it away from the edges. I really must properly RTFM.


----------



## otristan (Oct 22, 2021)

It's a macro with an on/off style that you can change in the tree view inspector when selecting the macro


----------



## emptyvessel (Oct 22, 2021)

R. Naroth said:


> Yep, drag/drop works just fine. Thank you. It is quite easy to add and rearrange macro knobs.
> 
> What is this control? Where is it added from? Sorry, I am so new to Falcon, still nibbling it away from the edges. I really must properly RTFM.


assign an on/off parameter to a new macro, I usually set it to a button in the macro section of the main view but as Olivier says you also have access to the setting in the Tree view if you turn on display of Modulators with the Show Modulation Nodes icon next to the little musical notes icon near the top of the left panel. Here are the two locations:









btw for some things that seem absent from the manual there are some extra tips and info generously from Simon Stockhausen in his site/forum: https://falcontinuum.com/

720x480 png is indeed the correct format to avoid stretching


----------



## R. Naroth (Oct 22, 2021)

One more mystery solved.  @Empty Vessel and @otristan, a million thanks. I don't know what I would have done with out this forum..


----------



## New_Loops (Oct 24, 2021)

BACKGROUND IMAGE: It saves the image in EVERY FOLDER when saving a preset with samples! How to stop this? If I have 100 presets, I have 100 copies of the same image!


----------



## R. Naroth (Oct 24, 2021)

New_Loops said:


> BACKGROUND IMAGE: It saves the image in EVERY FOLDER when saving a preset with samples! How to stop this? If I have 100 presets, I have 100 copies of the same image!


I'm sure there is a better way. The manual says this:





Judging by some of the factory presets (Pure Additive 2.0 folder), I think the UI built within the Event Scripts can also be linked to the Info panel. I cant figure out how.. :-(


----------



## New_Loops (Oct 25, 2021)

I think there must be a template script to display an image, so it links to one single image. Does anyone know about this?


----------



## New_Loops (Oct 25, 2021)

Does anyone know how/where I put this to add a background image to the preset?

img = Image("resources/image.png")
img.pos = {100, 100}
img.alpha = 0.5


----------



## digitallysane (Oct 25, 2021)

New_Loops said:


> Does anyone know how/where I put this to add a background image to the preset?
> 
> img = Image("resources/image.png")
> img.pos = {100, 100}
> img.alpha = 0.5


You should spend some time studying those:




__





UVIScript: Examples






www.uvi.net





The most comprehensive one is the "MonoBassLine", but it requires a patch that's not included in that page.
Find it attached.


----------



## R. Naroth (Oct 25, 2021)

digitallysane said:


> You should spend some time studying those:
> 
> 
> 
> ...


@digitallysane Thanks so much. This patch + the script explains a lot.

@New_Loops the function to map custom UI from the Events Panel Scripts to the Info Panel is _makePerformanceView()_. Now, you can load a background image from a script like so:

`setBackground("./grunge.jpg")
makePerformanceView()`

@otristan posted a UI example here with custom control: https://vi-control.net/community/threads/lua-resources-for-uvi-falcon-scripting.93509/post-4933381, I found it very useful.


----------



## New_Loops (Oct 26, 2021)

Thanks, but I still can't work out how/where to put this. I am a sound designer, not a coder. I've been trying to do this for 4 or 5 days. I've tried on 2 forums and UVI support which is taking ages to get back to me. I have a background image saved with each preset but it saves a copy with EACH preset. I need to know how to add ONE SINGLE IMAGE that all the presets in a sound bank will see. I have the image in the sound bank folder, but when I "save program and samples" the image is saved with the samples. If I remove that image I then get errors loading the patch! It's actually incredibly frustrating. :(


----------



## digitallysane (Oct 26, 2021)

New_Loops said:


> Thanks, but I still can't work out how/where to put this. I am a sound designer, not a coder.[...]It's actually incredibly frustrating. :(


You still have to _learn _to do it, if _you _want to actually do it.
You can't get it done by others, step by step, via forums.

The UVI help site is actually reasonable, even if it could be better. You do need to spend some time, read about the clasess, methods, check the examples, modify them and understand what's happening.
Or, hire a coder.


----------



## New_Loops (Oct 26, 2021)

Forget it, I've found a workaround.


----------



## doctoremmet (Oct 26, 2021)

Thanks for sharing the workaround with us.


----------



## krussss (Jun 5, 2022)

Thanks a lot to everyone in this post, learned


----------



## Jaap (Jun 20, 2022)

doctoremmet said:


> Thanks for sharing the workaround with us.


For anyone interested. If you don't want the hussle to have these kind of errors with missing samples and images (I had the same with my first Falcon library) then here how you can set it up.

1: Create your main folder for your soundset 
2: Create subfolders in the main folder for Presets, Samples, Wavetables, Images
3: Fill the subfolders for Samples and Images with all the content that you want to use for creating the presets
4: When creating presets, make sure you load them from the subfolders
5: Choose Save Program As... instead of Save Program and Samples As... -> with Save Program As, it will remember the folder structure where it found the samples, images, wavetables etc.


----------



## estevancarlos (Aug 12, 2022)

Jaap said:


> For anyone interested. If you don't want the hussle to have these kind of errors with missing samples and images (I had the same with my first Falcon library) then here how you can set it up.
> 
> 1: Create your main folder for your soundset
> 2: Create subfolders in the main folder for Presets, Samples, Wavetables, Images
> ...


This is correct. I initially started with one big folder that contains "scripts" and then "resources" but that approach can quickly make it tricky to distribute projects.


----------



## Paolo Psound (Oct 1, 2022)

Hello, I need your help please!
I usually control an effects in my Lua script in this way:
"local Rev = Program.inserts" --for a reverb in the fx section
then I control it:
"Rev[1]:setParameter ("Bypass", self.value). -- to bypass it by a button
Now this method downs't work for a modulation. I added a LFO in mods section and I tried this code:
"local LFO = Program.mods"
"LFO[1]:setParameter("Bypass", self.value)". .... but nothing append!
:-(


----------



## doctoremmet (Oct 1, 2022)

Can’t you set the rate of the LFO to zero? I don’t think LFOs typically have bypass options anyway.


----------



## Paolo Psound (Oct 1, 2022)

I need to change 2 parameters: Depth and Freq ... but there is something wrong in my code ...


----------



## Paolo Psound (Oct 1, 2022)

The reverb works fine:
--Reverb
local FR = Program.inserts
local R27 = panel:OnOffButton("RevOn")
R27.y=fxY
R27.x=R26.x+41
R27.width=RegWidth
R27.height=RegHeight
R27.normalImage="../Artwork/00.png"
R27.pressedImage="../Artwork/RevOn.png"
R27.alpha=1
R27.changed = function(self)
FR[1]:setParameter("Bypass", self.value)
end

The LFO in Mods section (at Program level) doesn't
--LFO
local LFO = Program.modulations
local R26 = panel:OnOffButton("VibrOn")
R26.y=fxY
R26.x=R25.x+41
R26.width=RegWidth
R26.height=RegHeight
R26.normalImage="../Artwork/00.png"
R26.pressedImage="../Artwork/VibrOn.png"
R26.alpha=1
R26.changed = function(self)
LFO[1]:setParameter("Bypass", self.value)
end


----------



## otristan (Oct 3, 2022)

modulations are addressed by name not index.
for name, _ in pairs(Program.modulations)
print(name)
end


----------



## Paolo Psound (Oct 3, 2022)

Thank s a lot for your help! It works now! 

Now I need to change some "Amp. Env" parameters in a specific layer for all keygroups.
The default "Amp. Env" works at keygroup level so I tried to change it in this way (and it works):
local PercB = Program.layers[1].keygroups[1].modulations["Amp. Env"]
local R21 = panel:OnOffButton("PbassOn")
R21.changed = function(self)
if R21.value==true then
PercB:setParameter("ReleaseTime", 0.050)
elseif R21.value==false then
PercB:setParameter("ReleaseTime", 2.0)
end
end

But I need to change the value for all the keygroups of the same layer!
...

Thanks again


----------



## otristan (Oct 3, 2022)

Use the FOR(ce) Luke !

for _, keygroup in ipairs(Program.layers[1].keygroups)
local mod = keygroup.modulations["Amp. Env"]
mod:etParameter("ReleaseTime", 0.050)
end

You can probably write everything programmatically including your widget declaration and changed function


----------



## oeholmen (Oct 26, 2022)

Hi all! I have been working a lot on lua scripts for Falcon. Many of them are oriented around generative music. You can download the scripts from here: https://github.com/oeholmen/UVIScript

Do not hesitate to reach out if you have any questions! The repo is in constant development, so scripts will be added and changed frequently.


----------



## jfrisco77686 (Nov 28, 2022)

oeholmen said:


> Hi all! I have been working a lot on lua scripts for Falcon. Many of them are oriented around generative music. You can download the scripts from here: https://github.com/oeholmen/UVIScript
> 
> Do not hesitate to reach out if you have any questions! The repo is in constant development, so scripts will be added and changed frequently.


Hi thanks so much for making these scripts, really cool stuff. Have you been able to get sample or stretch oscillator views on the main performance page? looking to see if its possible to get the sample window (drag and drop) section to show on that first performance page.

Thanks,

Jay


----------



## oeholmen (Nov 28, 2022)

jfrisco77686 said:


> Hi thanks so much for making these scripts, really cool stuff. Have you been able to get sample or stretch oscillator views on the main performance page? looking to see if its possible to get the sample window (drag and drop) section to show on that first performance page.
> 
> Thanks,
> 
> Jay


I have only worked with the synthesis ocillators, so I’m afraid I can’t be of much help here.


----------



## jfrisco77686 (Nov 28, 2022)

oeholmen said:


> I have only worked with the synthesis ocillators, so I’m afraid I can’t be of much help here.


Ok no worries thank you anyways!


----------



## AnSolas (Dec 6, 2022)

Hi, 
is there a way to trigger an envelope on layer level via script?
Cheers Marc


----------



## oeholmen (Dec 6, 2022)

AnSolas said:


> Hi,
> is there a way to trigger an envelope on layer level via script?
> Cheers Marc


You can reference a modulator on layer level like so:
Program.layers[1].modulations["Analog ADSR 1"]
And the parameters are documented here: https://www.uvi.net/uviscript/_elements.html#AnalogADSR

I'm not sure if you can trigger it programmatically. What are you trying to achieve?


----------



## AnSolas (Dec 6, 2022)

oeholmen said:


> You can reference a modulator on layer level like so:
> Program.layers[1].modulations["Analog ADSR 1"]
> And the parameters are documented here: https://www.uvi.net/uviscript/_elements.html#AnalogADSR
> 
> I'm not sure if you can trigger it programmatically. What are you trying to achieve?


I just like to add a filter to a layer which has its own keytracking and envelope.


I found thios here:
`sendScriptModulation(sourceIndex, targetValue, rampTime, id)`
and this in falcon:
`scriptEventModulation`
I wonder if theses can be used for this somehow.

---
When I add an Analog ADSR 1 to layer 1 and then do a print onNote I get no value ?
`function onNote(e)
local env = Program.layers[1].modulations["Analog ADSR 1"].AttackTime
print( 'variable:', env)
...`


----------



## oeholmen (Dec 6, 2022)

AnSolas said:


> I just like to add a filter to a layer which has its own keytracking and envelope.
> 
> 
> I found thios here:
> ...


I'm pretty sure you can only trigger envelopes at the keygroup level. If you use script modulation, you must write you own modulation source. If you want to see an example, you can check out any of my modulator scripts: https://github.com/oeholmen/UVIScript/tree/master/modulators

To use script modulation you follow these steps:
1. Go to the edit tab
2. From "MOD" select the "Script Event Modulation" modulator (at the program or layer level)
3. Under "EVENT" add Script processor->Default (or a presaved script) and load the script you want to use
4. Make sure the event id is the same on the script and on the modulator
5. Assign something (filter cutoff?) to the modulator by right clicking the control and choosing the modulator from "Add modulation"

Hope this helps


----------



## AnSolas (Dec 6, 2022)

What is the best way to add a envelope modulated filter to a layer?
And at its best with the ability to keytrack it? please


----------



## oeholmen (Dec 6, 2022)

AnSolas said:


> What is the best way to add a envelope modulated filter to a layer?
> And at its best with the ability to keytrack it? please


On the ANALOG ADSR there a manual TRIGGER button that allows for the envelope to be triggered on-demand, and can be controlled remotely via automation or modulation. Use "ManualTrigger", see: https://www.uvi.net/uviscript/_elements.html#AnalogADSR


----------



## AnSolas (Dec 6, 2022)

oeholmen said:


> On the ANALOG ADSR there a manual TRIGGER button that allows for the envelope to be triggered on-demand, and can be controlled remotely via automation or modulation. Use "ManualTrigger", see: https://www.uvi.net/uviscript/_elements.html#AnalogADSR


Hm that sound tedious, imagine how much efford on an arpeggio  Can that manual Trigger be triggereed with an script event? How about filter keytrack?


----------



## oeholmen (Dec 6, 2022)

AnSolas said:


> Hm that sound tedious, imagine how much efford on an arpeggio  Can that manual Trigger be triggereed with an script event? How about filter keytrack?


Yes, you can use it with a script. Keytracking should also be possible to do in the script.


----------

