Hi to all,
I modified PvsRecPlay.csd by Cabbage McCurdy collection, because I could used it.
This .csd is very nice but:
In downloded version PlayOnce didn’t work correctly, because after ‘else’ was missing:
kPlayOnceNdx line 0,1,1
Moreover I insert this ‘if’ conditions:
if kLoopBeg < kLoopEnd then
kPlayNdx = (kPlayNdxkLoopLen) + kLoopBeg
elseif kLoopBeg > kLoopEnd then
kPlayNdx = kLoopBeg-(kPlayNdxkLoopLen) ;INVERT
kPlayNdx = kLoopBeg
and I replaced:
kLoopBeg portk gkLoopBeg, kporttime
kLoopEnd portk gkLoopEnd, kporttime
kLoopBeg = gkLoopBeg
kLoopEnd = gkLoopEnd
to avoid crash with begin and end point very close together.
I reduce stereo in to mono, but you can restore to stereo changing the lines with *** flags.
I added play midi instr and global envelope also.
‘Play Once’ button blink correctly now, when it turn off.
Maybe this version can be useful to someone else.
Unfortly there is an unwanted effect:
At loop, the first time the sound is better, then it’s more metallic.
Does anyone know how to avoid this?
I attach the file.
Andrea S. 2019
PvsRecPlay_07.csd (15.7 KB)
Hi to all,
Thanks @strapparts, I’m curious to see what Iain thinks of the changes. If he’s happy with them I can update the example file.
yes, with pleasure!
Thanks for using this and developing it. I tried out your version and I like the keyboard addition that you made.
I’m not able to recreate the issues that you describe and that inspired some of the changes you describe. For me, ‘Play Once’ works as it should. I’m also unable to make it crash by making the loop duration zero - the line:
kPlayPhasFrq divz gkSpeed, kLoopLen, 0.00001
should be preventing this anyway.
portk lines are intended to smooth changes made to the ‘start’ and ‘end’ loop times so that interim values, that pixel resolution makes inaccessible, are explored. Of course it’d debatable how effective and necessary this is in practice. It might be more useful with longer loops.
The addition of this line:
kPlayOnceNdx line 0,1,1
is not needed because the
else is follows is not in the same conditional level as the initial ‘if’. What this means is that the second
kPlayOnceNdx line 0,1,1, if accessed, is simply overwriting the first one, which will already be being accessed.
Do you think that the envelope attack and release times are too long? Maybe they should be user-adjustable.
I think the metallic quality you describe when looping repeats is a glitch in the pvs implementation. mis-alignment between freq and amp bins? I’m not really sure what’s causing it but modifying the FFT attributes given to
pvsanal should alter its character.
I’d like to be able to recreate the problems you describe though. Are you on Windows? On Mac it seems fine with the latest version of Cabbage.
Thanks for your replay. I am on Windows 10 and I use last version of Cabbage. I attach two snapshot, with kPlayNdx and kPlayOnceNdx values printed when begin and end point are very close to each other. With those values the sound stop.
Moreover, when I invert the order begin-end point, I don’t listen to the same selection of sound.
Maybe can the optional ‘isig’ of portk cause problems? Or is it Windows Csound release?
About metallic sound: I’ll try other settings. It’s strange that the first loop is better than the following.
I attach an other version with attack and release adjustable.
PvsRecPlay_07.csd (16.5 KB)
I realize now that in ‘PlayOnce’ speed slider set to negative side does not work well yet.
Maybe I found a solution to playOnce with speed inversion.
I attach a csd file.
What do you think about it?
PvsRecPlay_09.csd (15.1 KB)
I send the effect plugin that I used in a performance some month ago.
Any suggestions are appreciated.
All the best.
PvsRecPlay_effect.csd (25.5 KB)