Old 08-14-2018, 04:54 AM   #1
LuCsa
Human being with feelings
 
Join Date: Aug 2016
Posts: 87
Default Reaper's Spectrograms

Hey, fellow Reapers.

I wondered how Reaper generates the spectrograms for its spectrogram view and if it's somehow possible/allowed to use Reaper('s spectrogram functionality) to generate spectrograms of a given wav file to use it outside of Reaper?
Also, is there a way to work with the peak data?

Thanks!
Lukas
LuCsa is offline   Reply With Quote
Old 08-14-2018, 09:52 AM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
Default

There is https://www.reaper.fm/sdk/reapeaks.txt but it looks outdated (v5.15+ uses floating point, and it doesn't mention spectrograms & spectral peaks)...

EDIT: The API has GetMediaItemTake_Peaks which allow extracting spectral information.

Last edited by cfillion; 08-14-2018 at 11:37 AM.
cfillion is offline   Reply With Quote
Old 08-14-2018, 11:33 AM   #3
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

Not to hijack the thread, but it has often occurred to me that the spectral view, with a separate color per note, could be used to generate midi from audio (missing the octave).
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is online now   Reply With Quote
Old 08-14-2018, 10:00 PM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,784
Default

Quote:
Originally Posted by Philbo King View Post
Not to hijack the thread, but it has often occurred to me that the spectral view, with a separate color per note, could be used to generate midi from audio (missing the octave).
I suppose the resolution is not fine enough.
Moreover this only would work for a sequence of pure sine waves, but not for real audio signals, containing multiple frequencies at the same time, so you can't easily "follow a melody" or even detect a chord.

To do this you would need to use e.g. Melodyne, that performs such things by really complex algorithms.

-Michael

Last edited by mschnell; 08-15-2018 at 06:51 AM.
mschnell is offline   Reply With Quote
Old 08-15-2018, 05:50 AM   #5
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,204
Default

Quote:
Originally Posted by mschnell View Post
I suppose the resolution is not fine enough.
Moreover this would only would work for a sequence of pure sine waves, but not for real audio signals, containing multiple frequencies at the same time, so you can't easily "follow a melody" or even detect a chord.

To do this you would need to use e.g. Melodyne, that performs such things by really complex algorithms.

-Michael
I think you overstate your case a bit. I agree it's not great for chords, but I see definite consistent colors for any pitched mono melody, even with complex harmonics (pipe organ, distorted guitars, etc.). You do have a point that there is other software that would do the job better. But it would be a convenient feature.

Returning to the OP topic, I suppose there is better software for doing that as well. While you could drag a Wav into Reaper, turn on spectrograpgh peaks mide, and zoom it up to do a screen capture, the lack of frequency indicator lines and an amplitude color index would make it fairly useless for serious measurements. I suppose it depends on what you use it for.
__________________
Tangent Studio - Philbo King
www.soundclick.com/philboking - Audio streams
Philbo King is online now   Reply With Quote
Old 08-27-2018, 02:42 PM   #6
LuCsa
Human being with feelings
 
Join Date: Aug 2016
Posts: 87
Default

Hey guys, sorry for the very late reply!

As for the pitch detection idea: I side with Michael in that pitch detection is a very complex task for complex sounds (which almost any real sound is...) - I think we all agree on that - but yeah, maybe a simple algorithm would pick the frequency area of highest intensity (ignoring all other frequency contents), quantizing them to half-tone steps with respect to a given reference tone (e.g. 440Hz) --> extracting, so to say, the "monophonic melody of highest intensity". But even that could fail as for instance low piano notes tend to have a fundamental lower in intensity than its e.g. second partial.

But back to the topic: I asked because the spectrogram looks very convenient and simple, good enough in resolution. I have a recording where there are some clicks (one to two samples make a jag in the waveform). In order to find and correct them, I look for vertical sharp lines (meaning constant intensity over all frequencies at a given time) in the spectrum (the laws of Fourier analysis demand that a pulse in the time domain gives a constant frequency response). It would be so nice if Reaper could toggle into a "destructive wav editing" mode in order to make such corrections.

Cheers,
Lukas

@Reaper api... to be very frank...I don't understand the documentation of that function.
LuCsa is offline   Reply With Quote
Old 08-31-2018, 07:09 AM   #7
dave_t
Human being with feelings
 
dave_t's Avatar
 
Join Date: Jan 2016
Posts: 169
Default

Taking the hijack further,

Quote:
Originally Posted by mschnell View Post
I suppose the resolution is not fine enough.
Moreover this only would work for a sequence of pure sine waves, but not for real audio signals, containing multiple frequencies at the same time, so you can't easily "follow a melody" or even detect a chord.

To do this you would need to use e.g. Melodyne, that performs such things by really complex algorithms.

-Michael
There are a few plugins less "mainstream" than Melodyne that do audio to polyphonic MIDI - I assume they use spectral analysis. The results aren't pristine, but I think you could probably pick out melodies and hard-to-hear chords
e.g. https://www.kvraudio.com/product/mp3...y-nguyen-chung
dave_t is offline   Reply With Quote
Old 08-31-2018, 07:20 AM   #8
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

SoX can be used to generate spectrograms.
__________________
I like turtles
bezusheist 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 09:18 PM.


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