Csound Csound-dev Csound-tekno Search About

[Cs-dev] grain3 bug + hack/fix

Date2009-01-09 17:12
Fromdp51
Subject[Cs-dev] grain3 bug + hack/fix
Using grain3, I get occasional high frequency artifacts when changing the
kphs
(file position).  A good example is Iain McCurdy's grain3.csd which you can
get here:

http://iainmccurdy.org/csound.html

Changing the "Grain Phase" parameter, some grains are played back with very 
high speed.  Set "Density" to something large,  and it becomes really
apparent.
I read the code in Opcodes/oscbnk.c to try and understand what's going on,
but I can barely understand what's going on.  Anyways, after a few hours I 
managed to get rid of the artifacts, but I'm not sure if it's really a fix. 
I changed
line #884 from:

frq = (g_frq + OSCBNK_PHS2INT(f)) & OSCBNK_PHSMSK;

to

frq = (OSCBNK_PHS2INT(f)) & OSCBNK_PHSMSK;

imode 32 (start all grains at integer sample locations) behaves differently
after the "fix", but
everything else seems the same.   Anyways, I think grain3 is more useful
with this "fix", but
maybe I broke something.  

IMO, grain3 has the potential to be one of the better sounding granular
opcodes. 

Thanks,

davis

-- 
View this message in context: http://www.nabble.com/grain3-bug-%2B-hack-fix-tp21376398p21376398.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net