still in the process of creating examples in the manual and working on the
opcodes of the letter S, i think there is an error in the manual on the
1. the manual states: ar1, ar2 sflooper ivel, inotenum, kamp, kpitch,
ipreindex, kloopstart, kloopend, kcrossfade, ifn [, istart, imode, ifenv,
But ifn is not mentioned in the text anywhere and when omitted completely
the example below works perfectly. I think the right syntax should be:
ar1, ar2 sflooper ivel, inotenum, kamp, kpitch, ipreindex, kloopstart,
kloopend, kcrossfade [, istart, imode, ifenv, iskip]
which makes perfect sense since the sound source is provided by the
2. there is something odd with the loop start and the end, which, as manual
says, are in seconds.
I found that when playing the note on a different pitch than the pitch in
which the sample of the soundfont was recorded, the loop start and end times
Again, see the example below.
I think that this should be noted in the manual, that the loop times work on
the sample of the soundfont.
Or perhaps there can be an optional parameter that makes the looping times
work in absolute time all over the pitch range?
The example, as intended for the manual:
; Select audio/midi flags here according to platform
; Audio out Audio in No messages
-odac -+rtmidi=virtual -M0 ;;;realtime audio in, midi in
; For Non-realtime ouput leave only the line below:
; -o sflooper.wav -W ;;; for file output any platform
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
isf sfload "07AcousticGuitar.sf2"
sfpassign 0, isf
instr 1 ; play from score and midi keyboard
mididefault 60, p3
midinoteonkey p4, p5
inum init p4
ivel init p5
ivel init ivel/127 ;velocity dependent
kamp linsegr 1,1,1,.1,0 ;envelope
kamp = kamp * .0002 ;scale amplitude (= kamp/5000)
kfreq init 1 ;do not change freq from sf
; ivel, inum, kamp ,kfreq, ind,loopstrt,loopend,xfade, ifn
a1,a2 sflooper ivel, inum, kamp*ivel, kfreq, 0, 0, .2, .05
outs a1, a2
f0 60 ; stay active for 1 minute
i1 0 1 60 100
i1 + 1 62 <
i1 + 1 65 <
i1 + 1 69 10
View this message in context: http://csound.1045644.n5.nabble.com/sflooper-again-tp4712204p4712204.html
Sent from the Csound - Dev mailing list archive at Nabble.com.