Bugs item #3395423, was opened at 2011-08-20 18:52 Message generated for change (Comment added) made by veplaini You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3395423&group_id=81968 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Opcodes Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Menno (menno0) >Assigned to: Victor Lazzarini (veplaini) Summary: sflooper issues Initial Comment: 1. the manual states: ar1, ar2 sflooper ivel, inotenum, kamp, kpitch, ipreindex, kloopstart, kloopend, kcrossfade, ifn [, istart, imode, ifenv, iskip] 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 soundfont. 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 changes. 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 print ivel 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 endin f0 60 ; stay active for 1 minute i1 0 1 60 100 i1 + 1 62 < i1 + 1 65 < i1 + 1 69 10 e ---------------------------------------------------------------------- >Comment By: Victor Lazzarini (veplaini) Date: 2011-08-24 16:00 Message: Responding to your points 1. yes, the manual is wrong. It was probably a cut-and-paste from flooper2 (ifn is a parameter of flooper2), so please go ahead and fix it. 2. Since this opcode is exactly like flooper2, it uses the same principle where the loop points refer to the original positions in the sfont (or table in the case of flooper2). This is the expected behaviour, when you play it at a different rate, the looped segment will be shorter or longer (this is not a time-scale independent pitch shift). This is also, I think, the behaviour of loscil etc.. However the loop is k-rate controllable, so it can be scaled according to pitch, if it is what the user wants. Please, by all means, place a note in this page, if you think it's important. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=564599&aid=3395423&group_id=81968 ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net