| That was it, I had an array of size 64, with 65 it runs fine.
Thanks so much.
2015-05-01 11:16 GMT+02:00 Victor Lazzarini :
> I had a look at the code:
>
> 1) ceps expects an array of N/2+1 magnitudes, where N is your FFT size (pow-of-two)
> 2) it is designed to work with mags, which in turn is designed to work with rfft
> 3) you can use other sources, provided that you supply the input in the format
> it expects: magnitudes for non-negative freqs, from 0Hz to Nyquist inclusive.
> (input array needs to be pow-of-two+1 size)
>
> So, here's an example with rfft
>
> ksig[] init 1024
> ...
> kout[] ceps mags(rfft(ksig)), 10
>
> Note that the Csound fft implementation seems to need at least 64 samples to
> work properly, so you need to have at least 65 magnitudes in the input.
>
> I will write a proper example soon.
>
> Regards
> ========================
> Dr 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 1 May 2015, at 00:43, Oeyvind Brandtsegg wrote:
>>
>> .. and the same error if I use fft instead of rfft (might be obvious,
>> but I tried just to be sure).
>>
>> No hurry, I'm calling it a day now. Will pick it up again sometime
>> during the weekend.
>>
>>
>> 2015-05-01 1:41 GMT+02:00 Oeyvind Brandtsegg :
>>> Thanks for the quick reply.
>>> I tried
>>> kMelCeps[] init 64
>>> kMelCepsIn[] init 64
>>> kMelCepsIn rfft kMelCepsInput
>>> kMelCeps ceps kMelCepsIn, 16
>>> where kCepsInput is an array of size 64, with alternating amp and freq values
>>> for each of the 32 mel frequency bands.
>>>
>>> Still I get
>>> INIT ERROR in instr 2: non-pow-of-two case not implemented yet
>>>
>>> kMelCeps ceps kMelCepsIn 16
>>>
>>>
>>> Should the input to rfft be the amps only, or the amp, freq pairs ?
>>> Also, perhaps there is something else wrong in my code that triggers
>>> the init error? The sizes of the arrays or something?
>>>
>>>
>>> 2015-05-01 1:11 GMT+02:00 Victor Lazzarini :
>>>> ceps needs a spectrum calculated with rfft, and the second argument is the number of coefficients kept.
>>>>
>>>> Something like this
>>>>
>>>> kfft[] rfft ksigarray
>>>> kceps[] ceps kfft, inumcoeffs
>>>>
>>>> I have not had time to prepare a full example yet, but I will do.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>>> On 30 Apr 2015, at 23:59, Oeyvind Brandtsegg wrote:
>>>>>
>>>>> I'm experimenting more with this, bear with me if what I ask does not
>>>>> make sense. I am in unfamiliar territory...
>>>>>
>>>>> I'm trying to create mel frequency cepstral coefficients,
>>>>> so I iterate over the bins in an fsig,
>>>>> making a 32 band mel frequency spectrum (checking which band the
>>>>> frequency of the bin belongs to and accumulating amplitudes for that
>>>>> band).
>>>>> I then take the log of the amps for each band.
>>>>> Then I have an array of size 64, with alternating amp and freq values
>>>>> for each of the 32 mel frequency bands (this array is called
>>>>> kMelCepsInput below),
>>>>> and I try to do
>>>>> kMelCeps[] init 64
>>>>> kMelCeps ceps kMelCepsInput
>>>>> which gives
>>>>> error: Unable to find opcode entry for 'ceps' with matching argument types:
>>>>> Found: k[] ceps k[]
>>>>>
>>>>> Should there be an extra argument to ceps?
>>>>> I tried
>>>>> kMelCeps ceps kMelCepsInput, 32
>>>>> but that gives
>>>>> INIT ERROR in instr 2: non-pow-of-two case not implemented yet
>>>>>
>>>>> kMelCeps ceps kMelCepsInput 32
>>>>>
>>>>> I do note the extra blank line in the error message (before the line
>>>>> containing ceps), so perhaps this refers to another error (somehow
>>>>> concealed in the blank line?)
>>>>>
>>>>> Also do enlighten me if I'm going about this in a completely backwards fashion.
>>>>>
>>>>> best
>>>>> Oeyvind
>>>>>
>>>>> 2015-04-24 14:04 GMT+02:00 Victor Lazzarini :
>>>>>> ceps takes in an array of mags + freqs/phases and outputs the cepstrum. iceps does the inverse, takes a cepstrum and returns an array of mags + freqs/phases. The only thing is that freq/phases are lost in the process, so only the mag data is relevant in the iceps output.
>>>>>>
>>>>>> Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>>
>>>>>>> On 24 Apr 2015, at 12:24, Oeyvind Brandtsegg wrote:
>>>>>>>
>>>>>>> Good. Just to remind me, what does ceps and iceps do?
>>>>>>> Is it conversion between an array of amplitudes and a cepstrum?
>>>>>>>
>>>>>>> Also, forgive my ignorance, but is it normal that the second cepstrum
>>>>>>> coefficient is always zero?
>>>>>>> If I do
>>>>>>> kCeps[] init giFftTabSize
>>>>>>> kCeps pvsceps fsin
>>>>>>> kceps_b2 = kCeps[1]
>>>>>>> the value of kceps_b2 is zero
>>>>>>>
>>>>>>>
>>>>>>> 2015-04-24 13:07 GMT+02:00 Victor Lazzarini :
>>>>>>>> Same for ceps btw but with an array input instead of fsig, containing pv data and a required parameter for coeffs
>>>>>>>>
>>>>>>>> iceps is array to array, but I will change its name to cepsinv to avoid conflicts in the next release. It was an oversight to give it a name starting with i
>>>>>>>>
>>>>>>>> Victor Lazzarini
>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>> Maynooth University
>>>>>>>> Ireland
>>>>>>>>
>>>>>>>>> On 24 Apr 2015, at 11:52, Oeyvind Brandtsegg wrote:
>>>>>>>>>
>>>>>>>>> Wonderful, thanks
>>>>>>>>>
>>>>>>>>> 2015-04-24 12:36 GMT+02:00 Victor Lazzarini :
>>>>>>>>>> yes that's it but with an extra liftering optional parameter
>>>>>>>>>>
>>>>>>>>>> karr[] pvsceps fsig[, icoefs]
>>>>>>>>>>
>>>>>>>>>> where icoefs is the number of preserved coefficients, which defaults to all coefs (no liftering)
>>>>>>>>>>
>>>>>>>>>> Victor Lazzarini
>>>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>>>> Maynooth University
>>>>>>>>>> Ireland
>>>>>>>>>>
>>>>>>>>>>> On 24 Apr 2015, at 10:41, Oeyvind Brandtsegg wrote:
>>>>>>>>>>>
>>>>>>>>>>> Great, thanks.
>>>>>>>>>>> In the meantime, just the syntax for pvsceps would be swell. Guessing
>>>>>>>>>>> something like
>>>>>>>>>>> kArr pvsceps fsig
>>>>>>>>>>> (?)
>>>>>>>>>>>
>>>>>>>>>>> 2015-04-24 11:31 GMT+02:00 Victor Lazzarini :
>>>>>>>>>>>> Looks like there are no pages for these. I will try to fix that. I'll get back with the info.
>>>>>>>>>>>>
>>>>>>>>>>>> Victor Lazzarini
>>>>>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>>>>>> Maynooth University
>>>>>>>>>>>> Ireland
>>>>>>>>>>>>
>>>>>>>>>>>>> On 24 Apr 2015, at 09:47, Oeyvind Brandtsegg wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>> what is the syntax for using pvsceps?
>>>>>>>>>>>>> also interested in the same for iceps and ceps
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>>> Oeyvind Brandtsegg
>>>>>>>>>>>>> Professor of Music Technology
>>>>>>>>>>>>> NTNU
>>>>>>>>>>>>> 7491 Trondheim
>>>>>>>>>>>>> Norway
>>>>>>>>>>>>> Cell: +47 92 203 205
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://flyndresang.no/
>>>>>>>>>>>>> http://www.partikkelaudio.com/
>>>>>>>>>>>>> http://soundcloud.com/brandtsegg
>>>>>>>>>>>>> http://soundcloud.com/t-emp
>>>>>>>>>>>>>
>>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Csound-users mailing list
>>>>>>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>>>>>>> Send bugs reports to
>>>>>>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Csound-users mailing list
>>>>>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>>>>>> Send bugs reports to
>>>>>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>> Oeyvind Brandtsegg
>>>>>>>>>>> Professor of Music Technology
>>>>>>>>>>> NTNU
>>>>>>>>>>> 7491 Trondheim
>>>>>>>>>>> Norway
>>>>>>>>>>> Cell: +47 92 203 205
>>>>>>>>>>>
>>>>>>>>>>> http://flyndresang.no/
>>>>>>>>>>> http://www.partikkelaudio.com/
>>>>>>>>>>> http://soundcloud.com/brandtsegg
>>>>>>>>>>> http://soundcloud.com/t-emp
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Csound-users mailing list
>>>>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>>>>> Send bugs reports to
>>>>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Csound-users mailing list
>>>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>>>> Send bugs reports to
>>>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Oeyvind Brandtsegg
>>>>>>>>> Professor of Music Technology
>>>>>>>>> NTNU
>>>>>>>>> 7491 Trondheim
>>>>>>>>> Norway
>>>>>>>>> Cell: +47 92 203 205
>>>>>>>>>
>>>>>>>>> http://flyndresang.no/
>>>>>>>>> http://www.partikkelaudio.com/
>>>>>>>>> http://soundcloud.com/brandtsegg
>>>>>>>>> http://soundcloud.com/t-emp
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>>> _______________________________________________
>>>>>>>>> Csound-users mailing list
>>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>>> Send bugs reports to
>>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>>> _______________________________________________
>>>>>>>> Csound-users mailing list
>>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>>> Send bugs reports to
>>>>>>>> https://github.com/csound/csound/issues
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Oeyvind Brandtsegg
>>>>>>> Professor of Music Technology
>>>>>>> NTNU
>>>>>>> 7491 Trondheim
>>>>>>> Norway
>>>>>>> Cell: +47 92 203 205
>>>>>>>
>>>>>>> http://flyndresang.no/
>>>>>>> http://www.partikkelaudio.com/
>>>>>>> http://soundcloud.com/brandtsegg
>>>>>>> http://soundcloud.com/t-emp
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>>> _______________________________________________
>>>>>>> Csound-users mailing list
>>>>>>> Csound-users@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>>> Send bugs reports to
>>>>>>> https://github.com/csound/csound/issues
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>>> _______________________________________________
>>>>>> Csound-users mailing list
>>>>>> Csound-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>>> Send bugs reports to
>>>>>> https://github.com/csound/csound/issues
>>>>>> Discussions of bugs and features can be posted here
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Oeyvind Brandtsegg
>>>>> Professor of Music Technology
>>>>> NTNU
>>>>> 7491 Trondheim
>>>>> Norway
>>>>> Cell: +47 92 203 205
>>>>>
>>>>> http://flyndresang.no/
>>>>> http://www.partikkelaudio.com/
>>>>> http://soundcloud.com/brandtsegg
>>>>> http://soundcloud.com/t-emp
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>>> _______________________________________________
>>>>> Csound-users mailing list
>>>>> Csound-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>>> Send bugs reports to
>>>>> https://github.com/csound/csound/issues
>>>>> Discussions of bugs and features can be posted here
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>> _______________________________________________
>>>> Csound-users mailing list
>>>> Csound-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-users
>>>> Send bugs reports to
>>>> https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://flyndresang.no/
>>> http://www.partikkelaudio.com/
>>> http://soundcloud.com/brandtsegg
>>> http://soundcloud.com/t-emp
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://flyndresang.no/
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://soundcloud.com/t-emp
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> Csound-users mailing list
>> Csound-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-users
>> Send bugs reports to
>> https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
|