Olivier, a more in depth documentation of scripting in Falcon, of the available APIs and the limits vs traditional lua would be so very welcome!You are trying to apply a C++ paradigm to something that is not implement at all like that.
wait is not similar to a thread wait. It waits an exact number of frame and slice the processing buffer to place your event at the exact position in the c++ code. It is way easier to code a sequencer like that than it is in c++ thanks to lua coroutine which are cooperative.
Think to those spawn as event that are placed in a timed event fifo handled in the audio thread which just substract the remaining sample to your deadline and call the lua call when it should have occured.
There is no c++ thread used to support this.
Doing an arp like the example I have sent is a bit more complicated in c++. Here it's just very simple especially for non coder and it's implemented behind the scene like you would have done in c++ using some kind of std::function in a scheduler based on elapsed frame in the audio thread
Hope this clarify things.
Limit with traditional lua is mostly file handling and system stuff, but besides this it’s mostly vanilla lua with a custom API dedicated to voice handling and other specific uvi engine functionOlivier, a more in depth documentation of scripting in Falcon, of the available APIs and the limits vs traditional lua would be so very welcome!
I have a script in my repo that does exactly that. Check out "triggerCompiled.lua" that is in the "compiled/utils" folder. Activate autostart, and it will hold for as long as the transport is active. Let me know if you have any issues or questions about the script.Hey guys,
I just started using Falcon,love it and i'd like to do a very simple thing but Lua scripts is like Chinese to me,this is the first time i look at this language,i am not a programmer either,only a sound designer.
I'd like to have a script that generates a note on message on master play in Falcon and note off when stop is pressed,i'd only need 2 knobs,one to select the note and one to select the velocity.
Should be a very simple thing to script right?
Unless i can do this already without a script but haven't found a way.
This would be very useful for drones where i don't want to press a key each time to start it,juste the play would trigger it.
Thanks.
Oh Thanks!I have a script in my repo that does exactly that. Check out "triggerCompiled.lua" that is in the "compiled/utils" folder. Activate autostart, and it will hold for as long as the transport is active. Let me know if you have any issues or questions about the script.
Note: You cannot set the velocity in this script (it defaults to 64). However, you can use another script to set the velocity: "compiled/util/noteVelocityCompiled.lua"
I don't know any scripts like this, but it is a good idea. I'll let you know if I create oneHey guys do you know of any sequencer,script in Falcon where you can record notes from the keyboard?
You can input notes in the arpegiator but step by step and there's a midi record script but too limited as you can't change anything afterward and no quantize,i'd like to input a sequence into a sequencer by playing with a keyboard ideally.
Oh that would be greatI don't know any scripts like this, but it is a good idea. I'll let you know if I create one
local Dahdsr1
function onInit()
print("Initialising")
Dahdsr1 = Program.modulations["DAHDSR 1"]
if Dahdsr1.AttackTime ~= nil then
print("Dahdsr1.AttackTime = " .. Dahdsr1.AttackTime)
else
print("Dahdsr1.AttackTime is nil.")
end
if Program.Name ~= nil then
print("Program.Name = " .. Program.Name)
else
print("Even Program.Name is nil.")
end
end
I'm going to answer my own question. Before I posted the question, I had actually tried the correct technique but unluckily tested it with Program's Name. That still did not work, though I don't actually need that data. Here's a fixed script.How do I access the attributes of elements in the Program hierarchy? In my script, all attributes return nil:
Here is the output when I test the script:Code:local Dahdsr1 function onInit() print("Initialising") Dahdsr1 = Program.modulations["DAHDSR 1"] if Dahdsr1.AttackTime ~= nil then print("Dahdsr1.AttackTime = " .. Dahdsr1.AttackTime) else print("Dahdsr1.AttackTime is nil.") end if Program.Name ~= nil then print("Program.Name = " .. Program.Name) else print("Even Program.Name is nil.") end end
Initialising
Dahdsr1.AttackTime is nil.
Even Program.Name is nil.
If anyone wants to try out my script, add it to any program in the Organic Texture 2.8 folder of the Factory sound bank, such as BAS Biggy or PLK Zonophone.
local Dahdsr1
function onInit()
print("Initialising")
Dahdsr1 = Program.modulations["DAHDSR 1"]
local attackTime = Dahdsr1:getParameter("AttackTime");
if attackTime ~= nil then
print("Dahdsr1.AttackTime = " .. attackTime)
else
print("Dahdsr1.AttackTime is nil.")
end
local programGain = Program:getParameter("Gain")
if programGain ~= nil then
print("Program.Gain = " .. programGain)
else
print("Program.Gain is nil.")
end
local programName = Program:getParameter("Name") -- This is nil
if programName ~= nil then
print("Program.Name = " .. programName)
else
print("Program.Name is nil.")
end
end
I have an early alpha version of this ready now. It has record and quantize, but not any editing options yet. You can test it if you like, and I’ll let you know when a more complete version is ready.Oh that would be great
I think that is the only thing missing in Falcon,for now it is more on the side of arps and generative stuff.
Just a simple polyphonic sequencer where you could loop a region and it would record whatever notes you play. In Reaktor i had done something like this,similar to your polyphonic sequencer and i could record from keyboard,voice one would go to sequencer 1,voice 2 to sequencer 2 and voice 3 sequencer 3. I don't know how Falcon handles voices though...
Oh nice!I have an early alpha version of this ready now. It has record and quantize, but not any editing options yet. You can test it if you like, and I’ll let you know when a more complete version is ready.
UVIScript/compiled/util/recordingSequencerCompiled.lua at master · oeholmen/UVIScript
Synth Scripts. Contribute to oeholmen/UVIScript development by creating an account on GitHub.github.com
Unfortunately, the code files are not provided for those UVI-supplied scripts that you can add to your program in Falcon. Perhaps Olivier from UVI, who has been monitoring this thread, will be able to make the code for Chip Arp available, as he has previously done with at least one other script. Or you could ask UVI directly.Is there a way to open the "ChipArp" Script and add your own arpeggios to it?
Any help or maybe some tips on re-programming my own would help