[Csnd] offline fft
Date | 2017-10-19 20:43 |
From | Peter Burgess |
Subject | [Csnd] offline fft |
Hi there Csound folks. I'd like to do some offline spectral analysis of wav files. I can only see ways to do real time fft. How do I go about loading a wav file and performing fft at "I rate"? Pete -- http://algorythmradio.com https://soundcloud.com/algorythmradio Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2017-10-19 21:53 |
From | Peter Burgess |
Subject | Re: [Csnd] offline fft |
I've got my wav file in a function table. But I can't find any pvs opcodes that will analyse data from an f-table. Am I missing something? Or is this the wrong set of opcodes for offline analysis? On Thu, Oct 19, 2017 at 8:43 PM, Peter Burgess |
Date | 2017-10-19 21:58 |
From | "Jeanette C." |
Subject | Re: [Csnd] offline fft |
Oct 19 2017, Peter Burgess has written: > I've got my wav file in a function table. But I can't find any pvs > opcodes that will analyse data from an f-table. Am I missing > something? Or is this the wrong set of opcodes for offline analysis? The pvs opcodes were especially designed for live realtime processing. Adhoc, I can't suggest an alternative opcode. The pvanal utility can convert .wav files to phase vocoding formats, but that might not serve your purposes. ... Best wishes,, Jeanette -------- * website: http://juliencoder.de - for summer is a state of sound * SoundCloud: https://soundcloud.com/jeanette_c I thought love was just a tingling of the skin <3 (Britney Spears) Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2017-10-19 22:28 |
From | Peter Burgess |
Subject | Re: [Csnd] offline fft |
That's fair enough, Csound is a realtime audio language. If anyone can point me in the right direction that would be great, otherwise, I might have found a way to do it in c++ using fftw and libsndfile. That could be adventagious anyway because there's some c++ magic I want to do to the resulting spectral data before I perform the real Csound action. On Thu, Oct 19, 2017 at 9:58 PM, Jeanette C. |
Date | 2017-10-19 23:15 | |||||||||||||||
From | Iain McCurdy | |||||||||||||||
Subject | Re: [Csnd] offline fft | |||||||||||||||
You can perform the analysis within a k-rate loop and write the file using pvsfwrite. This will create the .pvx file more or less instantly.
Sfile = "SoundFile.wav" kcnt = 0while kcnt<(filelen:i(Sfile)*kr) do asig diskin Sfile fsig pvsanal asig,2048,512,2048,1 pvsfwrite fsig,"analysis.pvx" kcnt += 1 od turnoff
From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Peter Burgess <pete.soundtechnician@GMAIL.COM>
Sent: 19 October 2017 21:28 To: CSOUND@LISTSERV.HEANET.IE Subject: Re: [Csnd] offline fft That's fair enough, Csound is a realtime audio language. If anyone can
point me in the right direction that would be great, otherwise, I might have found a way to do it in c++ using fftw and libsndfile. That could be adventagious anyway because there's some c++ magic I want to do to the resulting spectral data before I perform the real Csound action. On Thu, Oct 19, 2017 at 9:58 PM, Jeanette C. <julien@mail.upb.de> wrote: > Oct 19 2017, Peter Burgess has written: > >> I've got my wav file in a function table. But I can't find any pvs >> opcodes that will analyse data from an f-table. Am I missing >> something? Or is this the wrong set of opcodes for offline analysis? > > The pvs opcodes were especially designed for live realtime processing. > Adhoc, I can't suggest an alternative opcode. The pvanal utility can > convert .wav files to phase vocoding formats, but that might not serve > your purposes. > ... > > Best wishes,, > Jeanette > > -------- > * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c > > I thought love was just a tingling of the skin <3 > (Britney Spears) > > Csound mailing list > Csound@listserv.heanet.ie > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to > https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here -- http://algorythmradio.com https://soundcloud.com/algorythmradio
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
Date | 2017-10-19 23:43 | |||||||||||||||
From | Peter Burgess | |||||||||||||||
Subject | Re: [Csnd] offline fft | |||||||||||||||
Aha, fantasic. I'll give that a shot too, thanks Iain! On Thu, Oct 19, 2017 at 11:15 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:
-- |
Date | 2017-10-20 22:23 | |||||||||||||||
From | Albert Graef | |||||||||||||||
Subject | Re: [Csnd] offline fft | |||||||||||||||
Very useful, thanks. But is there a way to grab the data from the pvx file in textual format so that it can be plotted, e.g., in gnuplot? TIA,On Fri, Oct 20, 2017 at 12:15 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:
-- Dr. Albert Gr"af Computer Music Research Group, JGU Mainz, Germany Email: aggraef@gmail.com WWW: https://plus.google.com/+AlbertGraef |
Date | 2017-10-20 22:28 |
From | Victor Lazzarini |
Subject | Re: [Csnd] offline fft |
There’s a utility called pv_export that should do this for you. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 20 Oct 2017, at 22:23, Albert Graef |
Date | 2017-10-20 22:43 |
From | Steven Yi |
Subject | Re: [Csnd] offline fft |
On Fri, Oct 20, 2017 at 5:28 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: There’s a utility called pv_export that should do this for you. |
Date | 2017-10-21 00:52 |
From | Albert Graef |
Subject | Re: [Csnd] offline fft |
Wonderful, thanks! On Fri, Oct 20, 2017 at 11:28 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: There’s a utility called pv_export that should do this for you. -- Dr. Albert Gr"af Computer Music Research Group, JGU Mainz, Germany Email: aggraef@gmail.com WWW: https://plus.google.com/+AlbertGraef |