Old 08-02-2019, 03:14 AM   #1
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default Is track sound source or not

Is there any method to recognize, using script (lua) that particular track is a sound source?
I mean contains VSTi (in contrary to VST) or audio item?

I started thinking about creating a script which will create VCA groups depending on the condition above (obviously we don't need to to VCA control sound source and delay with the same group)

thanx
MaXyM is offline   Reply With Quote
Old 08-02-2019, 09:14 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I think, tracks in Reaper are agnostic to that. You could only try to identify, whether a track holds an instrument in the FXChain or a number of MediaItems not being Midi-ones.

Have no idea, whether there's a function which tells you, if a plugin is an instrument or not. If not, there's still a way to dig through the reaper-vstplugins.ini and reaper-vstplugins64.ini, as they contain the information, if a plugin is an instrument or not.

Here are my docs about that file, if you need that.
https://mespotin.uber.space/Ultrasch...tplugins64.ini
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is online now   Reply With Quote
Old 08-02-2019, 09:47 AM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Code:
TrackFX_GetInstrument

Get the index of the first track FX insert that is a virtual instrument, or -1 if none.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 08-02-2019, 10:20 AM   #4
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Thanks guys
Looks promising
MaXyM is offline   Reply With Quote
Old 08-02-2019, 12:39 PM   #5
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,978
Default

Quote:
Originally Posted by Xenakios View Post
Code:
TrackFX_GetInstrument

Get the index of the first track FX insert that is a virtual instrument, or -1 if none.
Hi Xenakios, but isn't it unreliable?
What if the track contains arpeggiator or megababy sequencer JSFX - they will be inserted as first FX insert and then as second or third is VSTi instrument?
akademie is offline   Reply With Quote
Old 08-02-2019, 12:50 PM   #6
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by akademie View Post
Hi Xenakios, but isn't it unreliable?
What if the track contains arpeggiator or megababy sequencer JSFX - they will be inserted as first FX insert and then as second or third is VSTi instrument?
Right, but it would be a reasonable assumption that the track is then also producing audio, which is what the original poster was interested about. (Obviously there could be some exceptions when this is not going to work, but I suppose at the moment there is no other API to use.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 08-02-2019, 02:25 PM   #7
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Yes, I admit, there might be some specific scenarios not covered by a logic of my script. But at the end it has fit my needs, not all possible ones

Since only tracks which generate sound counts, I would expect tracks witch contain sequencers/arpeggiators but not any VSTi should not be recognized

And this is how Magababy is recognized.
What surprise me, that BlueArp is reported to be instrument. Indeed it's reported under VSTi (not VST). Not an serious issue since VCA routing to a track not generating any sound can't make any harm.
Just out of curiosity. Is it correct, regarding VST vs VSTi specification? Should I expect that there are plugins which are not generating sound but are listed as instruments?
MaXyM is offline   Reply With Quote
Old 08-02-2019, 02:34 PM   #8
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,978
Default

Quote:
Originally Posted by Xenakios View Post
Right, but it would be a reasonable assumption that the track is then also producing audio, which is what the original poster was interested about. (Obviously there could be some exceptions when this is not going to work, but I suppose at the moment there is no other API to use.)
Sure, but can be recognized if JSFX is effect or instrument?
akademie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.