Old 03-06-2015, 07:01 PM   #1
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default track_fft.lua

I have modified a bit the sample item_fft.lua
This works on selected tracks instead of items.
You can select multiple tracks


https://stash.reaper.fm/23557/track_fft.lua

My initial idea was to display multiple spectrums in different divisions of the window, but the first try all spectrums were drawn in the same place and I thought it was better

Q: It seems we can't get audio accessors if it is a midi track. Why? Should it work if it is from a CreateTrackAudioAccessor?
heda is offline   Reply With Quote
Old 03-06-2015, 07:58 PM   #2
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

that's some "next level" stuff there Heda! awesome!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 03-06-2015, 08:05 PM   #3
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

nice !

Is it possible to display the spectrums in the same colour as the track ?
J Reverb is offline   Reply With Quote
Old 03-07-2015, 12:47 AM   #4
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 5,207
Default

Brilliant! So great to have this integrated into the DAW - VST solutions require you to route each track to a single track's aux inputs or use multiple instances with ID numbers.

This is a way better, faster solution and if it can even be docked that would be awesome.

Ideas:

Can you make a toggle switch to fill each spectrum with a transparent color?
Settings for ballistics would also be appreciated

Quote:
Originally Posted by J Reverb View Post
nice !

Is it possible to display the spectrums in the same colour as the track ?
Excellent idea, I would add to it that if the track 1. has no colour and 2. no other tracks have color, they get assigned a color.

If Reaper 5 comes bundled with any scripts, this should be one of them.
Fergler is offline   Reply With Quote
Old 03-07-2015, 01:17 AM   #5
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by J Reverb View Post
nice !

Is it possible to display the spectrums in the same colour as the track ?
yes
download the file again. It will use Track's colors now

https://stash.reaper.fm/23557/track_fft.lua

edit.. I have updated it again.. Now if you click on the spectrum, it will toggle color mode from the original one to the one that uses track's color

Last edited by heda; 03-07-2015 at 01:40 AM.
heda is offline   Reply With Quote
Old 03-07-2015, 02:06 AM   #6
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by Fergler View Post
Brilliant! So great to have this integrated into the DAW - VST solutions require you to route each track to a single track's aux inputs or use multiple instances with ID numbers.

This is a way better, faster solution and if it can even be docked that would be awesome.

Ideas:

Can you make a toggle switch to fill each spectrum with a transparent color?
Settings for ballistics would also be appreciated

Excellent idea, I would add to it that if the track 1. has no colour and 2. no other tracks have color, they get assigned a color.

If Reaper 5 comes bundled with any scripts, this should be one of them.
yes Right click in the window to dock it
Maybe if it is developed a bit more it could be more useful than what it is now, which right now it is more like kind of a demo.
heda is offline   Reply With Quote
Old 03-07-2015, 05:49 AM   #7
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

Wow! I FR'd this once ages ago, good work Heda!
todd_r is offline   Reply With Quote
Old 03-07-2015, 06:08 AM   #8
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Brilliant, a multitrack analyzer without any routing involved.

Thanks for this heda.
nofish is offline   Reply With Quote
Old 03-07-2015, 06:14 AM   #9
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Sweet!

Some frequency and decay smoothing, amplitude/freq grid on the background, freq display tilting, maybe a zooming function...

Awesome stuff brewing up here lately! Much respect to all the volunteers!
__________________
Grey, flat and minimal theme for Reaper: Symbiosis
Seventh is offline   Reply With Quote
Old 03-07-2015, 08:48 AM   #10
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

I wonder if it's possible to have this done with actual routing behind the scenes? (to save the effort of creating all things needed for a decent useful analyser)

Like we could have a hidden track with say 16 inputs ready to go and a high quality multi input analyser with all the settings we need that would give us this but with all the fancy settings and then..

We could (when running this script), route selected tracks to the inputs on the analyser tracks for us till we unselect them or stop running the script?

Too far stretched?
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 03-07-2015, 08:53 AM   #11
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

i would need this to take from tracks using midi instruments... I don't know exactly why it wouldn't work, however.

this is a great idea and it's well appreciated.
Jae.Thomas is offline   Reply With Quote
Old 03-07-2015, 01:08 PM   #12
innuendo
Human being with feelings
 
Join Date: Nov 2013
Location: Jerusalem, Israel
Posts: 659
Default

Brilliant!
With some decay and frequency resolution options, this will become a must-have.
innuendo is offline   Reply With Quote
Old 03-07-2015, 01:10 PM   #13
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by Jason Brian Merrill View Post
i would need this to take from tracks using midi instruments... I don't know exactly why it wouldn't work, however.

this is a great idea and it's well appreciated.
I was asking in the first post if someone knows how to do it. I don't know how to do it, or maybe it can't be done currently. I hope I'm wrong.
heda is offline   Reply With Quote
Old 03-08-2015, 06:03 AM   #14
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@heda
So you are in FFT now!
Nothing can stop you
X-Raym is offline   Reply With Quote
Old 03-09-2015, 07:57 PM   #15
jshonuff
Human being with feelings
 
Join Date: May 2011
Posts: 51
Default

where do you put this file? What folder in reaper? Plugins effects??????
jshonuff is offline   Reply With Quote
Old 03-09-2015, 08:01 PM   #16
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Quote:
Originally Posted by heda View Post
I was asking in the first post if someone knows how to do it. I don't know how to do it, or maybe it can't be done currently. I hope I'm wrong.
Can't do it atm, audio accessor gives you samples pre-FX...it's up to Cockos to fix that one.
Breeder is offline   Reply With Quote
Old 03-10-2015, 02:46 AM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by Breeder View Post
Can't do it atm, audio accessor gives you samples pre-FX...it's up to Cockos to fix that one.
Thanks Breeder. Ok. I was expecting that CreateTrackAudioAccessor would have been different also from CreateTakeAudioAccessor because we could always get the take under the cursor and use CreateTakeAudioAccessor instead. No need of CreateTrackAudioAccessor if they are the same. Strange. Again not well documented in the reference html. "Create an audio accessor object for this take. Must only call from the main thread." That's all the description there is.

I see. I don't know if it could be easily fixed. Or maybe a connection from a JSFX to ReaScript? No idea if that is possible.

I don't plan to work more on this script until it is fixed then
heda is offline   Reply With Quote
Old 03-10-2015, 05:50 AM   #18
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

From testing I did for loudness analyzer in SWS, this is the observed signal flow using audio accessor (biggest difference is that track audio accessor will take into account item FXs, overlapping items and fades):
http://wiki.cockos.com/wiki/index.ph...WS#Signal_flow

Note that I'm calculating take volume and pan (and their envelopes) separately and in case of tracks I separately calculate volume fader and volume envelopes.

Welcome to coding for reaper, where you have to find workarounds all the time I guess it's a love/hate relationship - you get mad when they fix something you spent hours to find a workaround, but you still love that you created your own way around it
Breeder is offline   Reply With Quote
Old 03-10-2015, 05:57 AM   #19
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

Quote:
Originally Posted by Breeder View Post
Can't do it atm, audio accessor gives you samples pre-FX...it's up to Cockos to fix that one.
Hmm, it would really need to have at least a post fx option, even on non midi tracks, so you can see the results of Eq'ing etc. Is there an FR I can vote on?
todd_r is offline   Reply With Quote
Old 03-10-2015, 06:51 AM   #20
Nixon
Human being with feelings
 
Nixon's Avatar
 
Join Date: Dec 2011
Posts: 406
Default

If we can get pre fx samples what about creating a dockable pre-fader metering window script ? Maybe with osc (gain) support for certain (rme) interfaces
Just thinking out loud. Really appreciate all your effort.
Nixon is offline   Reply With Quote
Old 03-10-2015, 09:02 AM   #21
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,239
Default

Quote:
Originally Posted by Breeder View Post
Welcome to coding for reaper, where you have to find workarounds all the time I guess it's a love/hate relationship - you get mad when they fix something you spent hours to find a workaround, but you still love that you created your own way around it
hehe I understand you very well It just happened to me with the pre16 fix for defer() scripts
heda is offline   Reply With Quote
Old 03-10-2015, 02:55 PM   #22
thequietroom
Human being with feelings
 
thequietroom's Avatar
 
Join Date: Sep 2008
Posts: 1,696
Default

what an awesome idea. I will be watching close.
thequietroom is offline   Reply With Quote
Old 03-10-2015, 05:45 PM   #23
jshonuff
Human being with feelings
 
Join Date: May 2011
Posts: 51
Default

Break

And where do you put this file? What folder in reaper? Plugins effects??????
Anyone!!!! This is my first .lua file
jshonuff is offline   Reply With Quote
Old 03-10-2015, 05:52 PM   #24
krahosk
Human being with feelings
 
Join Date: Jul 2009
Location: Canada
Posts: 2,372
Default

WOW! thanks Heda, this is awesome!
krahosk is offline   Reply With Quote
Old 03-10-2015, 07:08 PM   #25
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

thanks heda... just installed the latest pre 64 bit today... and your fft.lua script

I do get the colors per track, but do not get to see more than one track at a time, even when many are selected. Is it me or the pre or whatchatink?

EDIT... OK now it is working with multiple tracks... I have no clue why it would not before, but I have a question.

It seems that the fft being read is pre track fx??? Am I nuts or is that how it is working?

I would have expected it to be post fx, so that if I put an EQ on the track, I'd see that result in the fft readout... right?
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva

Last edited by hopi; 03-12-2015 at 08:33 AM.
hopi is offline   Reply With Quote
Old 12-18-2015, 12:43 PM   #26
syntetic
Human being with feelings
 
syntetic's Avatar
 
Join Date: May 2014
Posts: 160
Default Cool thing

Very necessary thing, It`s bad that in Reaper is impossible to get access to a track out with midi
syntetic is offline   Reply With Quote
Old 12-22-2015, 09:45 AM   #27
krahosk
Human being with feelings
 
Join Date: Jul 2009
Location: Canada
Posts: 2,372
Default

Quote:
Originally Posted by jshonuff View Post
Break

And where do you put this file? What folder in reaper? Plugins effects??????
Anyone!!!! This is my first .lua file
c:\users\<username>\AppData\Roaming\REAPER\Scripts

OR

(<ReaperPortablePath>\Scripts for a portable Reaper installation)
krahosk is offline   Reply With Quote
Old 12-22-2015, 11:42 AM   #28
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by hopi View Post

It seems that the fft being read is pre track fx??? Am I nuts or is that how it is working?

I would have expected it to be post fx, so that if I put an EQ on the track, I'd see that result in the fft readout... right?
The track AudioAccessor API in Reaper reads the audio pre track fx and that can't be changed. In other words, it's not extremely useful for reading the audio of the track for analysis purposes like spectral displays. I think it's mostly useful for developers if they need to access the edited audio files content of a track.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 12-22-2015 at 12:09 PM.
Xenakios is offline   Reply With Quote
Old 12-22-2015, 12:12 PM   #29
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 798
Default

Impressive, thanks!
Travesty is offline   Reply With Quote
Old 12-23-2015, 05:23 AM   #30
braveness23
Human being with feelings
 
braveness23's Avatar
 
Join Date: Aug 2012
Posts: 296
Default

Quote:
Originally Posted by krahosk View Post
c:\users\<username>\AppData\Roaming\REAPER\Scripts

OR

(<ReaperPortablePath>\Scripts for a portable Reaper installation)
Forgive my ignorance but how do invoke this? I am using a portable installation of Reaper 5.1 x64. I created a 'Scripts' directory and placed 'track_fft.lua' in it. Relaunched Reaper and searched around for a way to open this window and found nothing. Am I missing something obvious? Is there a secret handshake? Thanks in advance!
braveness23 is offline   Reply With Quote
Old 12-23-2015, 05:34 AM   #31
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Open the Actions list and select ReaScript: Load. Browse to where you put the script and select it. After that it should be available right from the Actions list, shortcut can be assigned etc.
xpander is online now   Reply With Quote
Old 12-23-2015, 06:27 AM   #32
braveness23
Human being with feelings
 
braveness23's Avatar
 
Join Date: Aug 2012
Posts: 296
Default

Quote:
Originally Posted by xpander View Post
Open the Actions list and select ReaScript: Load. Browse to where you put the script and select it. After that it should be available right from the Actions list, shortcut can be assigned etc.
So there IS a secret handshake... Got it! Thanks for your help
braveness23 is offline   Reply With Quote
Old 02-26-2016, 01:58 PM   #33
Chrome Gadget
Human being with feelings
 
Chrome Gadget's Avatar
 
Join Date: Feb 2011
Posts: 35
Default

It's so bad you can't take sounds post FXs, that would have been amazing.
Chrome Gadget is offline   Reply With Quote
Old 07-11-2018, 08:33 AM   #34
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Sorry to necro this thread, but I think this is a really great script and it would be wonderful if someone could get this to work with midi tracks.
thevisi0nary is offline   Reply With Quote
Old 07-12-2018, 06:05 AM   #35
todd_r
Human being with feelings
 
todd_r's Avatar
 
Join Date: Nov 2006
Posts: 855
Default

Would be nice if this was update and added to the HeDaScripts Manager
todd_r is offline   Reply With Quote
Old 07-12-2018, 06:47 AM   #36
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by todd_r View Post
Hmm, it would really need to have at least a post fx option, even on non midi tracks, so you can see the results of Eq'ing etc. Is there an FR I can vote on?
would be huge! : ) i mean Huge!
deeb is offline   Reply With Quote
Old 08-01-2018, 10:10 PM   #37
typedef
Human being with feelings
 
Join Date: May 2018
Location: In the Jungle
Posts: 7
Default

Great script! many thanks
typedef 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 04:40 PM.


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