[Loris-cvs] Loris/scripting loris.i,1.143,1.144
C++ class library for sound analysis, synthesis, and morphing
Brought to you by:
kfitz
|
From: Kelly F. <kf...@us...> - 2010-01-11 03:50:38
|
Update of /cvsroot/loris/Loris/scripting In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv460/scripting Modified Files: loris.i Log Message: Removed resampling capabilties with timing envelope. These are not ready for prime time yet, and will be introduced in the next release version of Loris. Index: loris.i =================================================================== RCS file: /cvsroot/loris/Loris/scripting/loris.i,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** loris.i 10 Jan 2010 07:04:17 -0000 1.143 --- loris.i 11 Jan 2010 03:50:25 -0000 1.144 *************** *** 858,873 **** "Resample all Partials in a PartialList using the specified sampling interval, so that the Breakpoints in the Partial ! envelopes will all lie on a common temporal grid. The Breakpoint ! times in resampled Partials will comprise a contiguous sequence of ! integer multiples of the sampling interval, beginning with the ! multiple nearest to the Partial's start time and ending with the ! multiple nearest to the Partial's end time. Resampling is ! performed in-place. The Breakpoint times in densely resampled Partials will comprise a contiguous sequence of ALL integer multiples of the sampling interval (very large, but useful for some third-party tools, like the CNMAT ! sinusoids~ external for Max/MSP). Default is sparse (not dense) ! resampling. If phase correct resampling is selected, Partial frequencies are --- 858,872 ---- "Resample all Partials in a PartialList using the specified sampling interval, so that the Breakpoints in the Partial ! envelopes will all lie on a common temporal grid. The Breakpoint times in densely resampled Partials will comprise a contiguous sequence of ALL integer multiples of the sampling interval (very large, but useful for some third-party tools, like the CNMAT ! sinusoids~ external for Max/MSP). ! ! The Breakpoint times in sparsely resampled Partials are simply quantized ! to integer multiples of the of the sampling interval. ! ! Default is sparse (not dense) resampling. If phase correct resampling is selected, Partial frequencies are *************** *** 879,887 **** %rename( resample ) wrap_resample; %feature("docstring", "Quantize the breakpoint times in the specified Partials. In previous versions of Loris, this was called sparse resampling. DOCUMENT ME.") quantizeBreakpointTimes; ! %{ --- 878,887 ---- %rename( resample ) wrap_resample; + /* %feature("docstring", "Quantize the breakpoint times in the specified Partials. In previous versions of Loris, this was called sparse resampling. DOCUMENT ME.") quantizeBreakpointTimes; ! */ %{ *************** *** 891,894 **** --- 891,920 ---- %inline %{ + + void wrap_resample( PartialList * partials, double interval, + bool denseResampling = false, + bool phaseCorrect = true ) + { + + try + { + Resampler r( interval ); + r.setPhaseCorrect( phaseCorrect ); + if ( denseResampling ) + { + r.resample( partials->begin(), partials->end() ); + } + else + { + r.quantize( partials->begin(), partials->end() ); + } + } + catch ( std::exception & ex ) + { + throw_exception( ex.what() ); + } + } + + /* void wrap_resample( PartialList * partials, double interval, bool phaseCorrect = true ) *************** *** 943,946 **** --- 969,973 ---- r.quantize( partials->begin(), partials->end() ); } + */ %} |