|
|
|
08-14-2018, 04:54 AM
|
#1
|
Human being with feelings
Join Date: Aug 2016
Posts: 87
|
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
|
|
|
08-14-2018, 09:52 AM
|
#2
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,910
|
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.
|
|
|
08-14-2018, 11:33 AM
|
#3
|
Human being with feelings
Join Date: May 2017
Posts: 3,195
|
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).
|
|
|
08-14-2018, 10:00 PM
|
#4
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
|
Quote:
Originally Posted by Philbo King
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.
|
|
|
08-15-2018, 05:50 AM
|
#5
|
Human being with feelings
Join Date: May 2017
Posts: 3,195
|
Quote:
Originally Posted by mschnell
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.
|
|
|
08-27-2018, 02:42 PM
|
#6
|
Human being with feelings
Join Date: Aug 2016
Posts: 87
|
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.
|
|
|
08-27-2018, 09:51 PM
|
#7
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,636
|
It would be rather easy to do a JSFX using FFT to implement the pitch detect algorithm you describe, outputting Midi notes. But I suppose nobody will bother to do so, as close to never there will be a usable signal for such conversion.
OTOH, the "peak" files that Reaper creates for generating the spectrum display, will use a by far lower resolution than semitones. Otherwise they would be huge.
-Michael
Last edited by mschnell; 08-31-2018 at 01:20 PM.
|
|
|
08-29-2018, 06:39 AM
|
#8
|
Human being with feelings
Join Date: Aug 2016
Posts: 87
|
For my purpose it is actually not about frequency resolution at all. I just would like to use the picture information calculated by Reaper to find the clicks in my waveform. And I just wondered whether it is possible to access this data in its peak files (and if yes: how?) or if there is any function in the Reaper API (or code which it uses to calculate the spectrograms).
cheers,
Lukas
|
|
|
08-29-2018, 07:06 AM
|
#9
|
Human being with feelings
Join Date: May 2017
Posts: 3,195
|
I'don't imagine it's possible but suspect you would get a lot of false positives from sounds like rim shots (drums in general), pick clicks, stuff like that. I don't have any info on the format of the spectrogram peak file format; however.
|
|
|
08-30-2018, 08:38 AM
|
#10
|
Human being with feelings
Join Date: Aug 2016
Posts: 87
|
Oh, no, I find them manually and it works perfectly fine. The lines in the frequency response are perfectly homogeneous and can be distinguished from "natural click" sounds and I manage to find the corresponding "dips" in the waveform. If Reaper had a destructive wav-editing mode I could directly repair the waveform inside it.
Well...then I need to find some library to compute spectrograms... Or Cockos introduces a wav-editing mode.
Cheers and thanks,
Lukas
|
|
|
08-31-2018, 07:09 AM
|
#11
|
Human being with feelings
Join Date: Jan 2016
Posts: 169
|
Taking the hijack further,
Quote:
Originally Posted by mschnell
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
|
|
|
08-31-2018, 07:20 AM
|
#12
|
Human being with feelings
Join Date: Nov 2010
Location: Mullet
Posts: 829
|
SoX can be used to generate spectrograms.
__________________
I like turtles
|
|
|
09-04-2018, 06:58 PM
|
#13
|
Human being with feelings
Join Date: Feb 2018
Posts: 121
|
This discussion is admittedly way above my head, so please keep that in mind (I have a degree in cooking, no real studies in music production, engineering, etc, and I'm a late-comer to musical production in any form).
I normally would just read and soak up the infos here but I thought maybe - if I understand at all what your trying to accomplish (there's a good chance I don't!) - I have a solution to offer that I'd credit to Kenny Gioa from Reaper Mania; I think the video was "External Editor in Reaper" (~) where he uses the classic program " Audacity to edit some wav forms of an analog instrument recording which contained some big spikes/ "clipping."
I've not delved into this yet nor had need to, but, it was surprisingly simple in his example to locate and hone in on those spikes and destructively remove them without any perceivable negative impact on sound quality (by me, anyway). The spikes were far less recognizable inside of reaper. This is a simple approach and doesn't get into the spectogram analysis algorithms and such, but sometimes simple is the better route?
Hope that if nothing else this relates to what you are trying to achieve - good luck!
|
|
|
09-12-2018, 09:06 AM
|
#14
|
Human being with feelings
Join Date: Mar 2014
Posts: 3
|
I'd recommend https://sonicvisualiser.org/ for nice-looking spectrographs + optional metadata. It's free, open source, and easy to use.
If you want to get really fancy, it also supports VAMP analysis plugins: https://www.vamp-plugins.org/
Nothing like Melodyne, but I've used it to identify certain features in sounds and dump the results into files that I parsed with other home-made software.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:37 AM.
|