kfreqratio -- multiply factor of table frequency (for example: 1 = original frequency, 2 = an octave up). Only integers are allowed.
kloop -- start loop point (in samples).
kend -- end loop point (in samples).
lposcilsa2 is the same as lposcilsa, but no interpolation is implemented and only works with integer kfreqratio values. Much faster than lposcilsa, it is mainly intended to be used with kfreqratio = 1, being in this case a fast substitute of soundin, since the soundfile must be entirely loaded in memory.
Examples
Here is an example of the lposcilsa2 opcode. It uses the file lposcilsa2.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o lposcilsa2.wav -W ;;; for file output any platform</CsOptions><CsInstruments>; additions by Menno Knevel 2022sr=44100ksmps=32nchnls=20dbfs=1instr1kcps=1;only integers are allowedkloop=0;loop start time in sampleskend=45000;loop end time in samplesaenvexpsega0.01,0.2*p3,.9,0.1*p3,0.2,0.5*p3,0.7;envelopeaL,aRlposcilsa2aenv,kcps,kloop,kend,1;use it for amplitudeoutsaL,aRendin</CsInstruments><CsScore>; Its table size is deferred,; and format taken from the soundfile header.f1001"drumsSlp.wav"000; This will loop the drum pattern several times.i1010.4i1115e</CsScore></CsoundSynthesizer>