Csound Csound-dev Csound-tekno Search About

[Csnd] Grain3 Issue

Date2012-08-24 17:54
FromDave Mooney
Subject[Csnd] Grain3 Issue
Hey, I've just encountered an issue using grain3 and want to see if anybody
else has had the same experience and could advise as to what to do. 

What I want to do is read through a sound file in a function table using the
output of a phasor as the kphs argument in grain3. This way the rate at
which the sound file is read through is dependent on the frequency of the
phasor and the original pitch of the sound file should be unaffected. The
issue I've encountered is that when a krate phasor is used to read from 0 to
1 over the duration of the table, the pitch of the output sound seems to be
affected significantly.

Taking Iain McCurdy's grain3 
http://iainmccurdy.org/CsoundRealtimeExamples/GranularSynthesis/grain3.csd
example 
If you navigate to the kphs parameter (which is set to take values from the
phase slider) and redefine it to be a moving value from 0-1 (i.e. with line
or phasor) and run the run the program you should experience what I’m
describing. 

If anybody has had a similar experience and could advise as to what do I
would be extremely grateful.




--
View this message in context: http://csound.1045644.n5.nabble.com/Grain3-Issue-tp5715197.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2012-08-25 19:24
FromOeyvind Brandtsegg
SubjectRe: [Csnd] Grain3 Issue

Hi Dave,
I haven't had time to check the csd, but wanted to give a quick reply on a possible cause. If the audio source is static or slowly changing, then the overlapping grains (with certain grain rates) can actually make the wave fronts compress or expand, leading to a perceived porch change. You could try using a slightly different grain rate and hear if the pitch modification changes?
Best, Oeyvind.

Den 24. aug. 2012 18:54 skrev "Dave Mooney" <dave.e.mooney@gmail.com> følgende:
Hey, I've just encountered an issue using grain3 and want to see if anybody
else has had the same experience and could advise as to what to do.

What I want to do is read through a sound file in a function table using the
output of a phasor as the kphs argument in grain3. This way the rate at
which the sound file is read through is dependent on the frequency of the
phasor and the original pitch of the sound file should be unaffected. The
issue I've encountered is that when a krate phasor is used to read from 0 to
1 over the duration of the table, the pitch of the output sound seems to be
affected significantly.

Taking Iain McCurdy's grain3
http://iainmccurdy.org/CsoundRealtimeExamples/GranularSynthesis/grain3.csd
example
If you navigate to the kphs parameter (which is set to take values from the
phase slider) and redefine it to be a moving value from 0-1 (i.e. with line
or phasor) and run the run the program you should experience what I’m
describing.

If anybody has had a similar experience and could advise as to what do I
would be extremely grateful.




--
View this message in context: http://csound.1045644.n5.nabble.com/Grain3-Issue-tp5715197.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2012-08-25 19:32
FromJustin Smith
SubjectRe: [Csnd] Grain3 Issue
This can be ameliorated with small noise sources added to your grain
rate and / or index parameters.

On Sat, Aug 25, 2012 at 11:24 AM, Oeyvind Brandtsegg  wrote:
> Hi Dave,
> I haven't had time to check the csd, but wanted to give a quick reply on a
> possible cause. If the audio source is static or slowly changing, then the
> overlapping grains (with certain grain rates) can actually make the wave
> fronts compress or expand, leading to a perceived porch change. You could
> try using a slightly different grain rate and hear if the pitch modification
> changes?
> Best, Oeyvind.
>
> Den 24. aug. 2012 18:54 skrev "Dave Mooney" 
> følgende:
>
>> Hey, I've just encountered an issue using grain3 and want to see if
>> anybody
>> else has had the same experience and could advise as to what to do.
>>
>> What I want to do is read through a sound file in a function table using
>> the
>> output of a phasor as the kphs argument in grain3. This way the rate at
>> which the sound file is read through is dependent on the frequency of the
>> phasor and the original pitch of the sound file should be unaffected. The
>> issue I've encountered is that when a krate phasor is used to read from 0
>> to
>> 1 over the duration of the table, the pitch of the output sound seems to
>> be
>> affected significantly.
>>
>> Taking Iain McCurdy's grain3
>> http://iainmccurdy.org/CsoundRealtimeExamples/GranularSynthesis/grain3.csd
>> example
>> If you navigate to the kphs parameter (which is set to take values from
>> the
>> phase slider) and redefine it to be a moving value from 0-1 (i.e. with
>> line
>> or phasor) and run the run the program you should experience what I’m
>> describing.
>>
>> If anybody has had a similar experience and could advise as to what do I
>> would be extremely grateful.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/Grain3-Issue-tp5715197.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>


Date2012-08-25 20:18
FromDave Mooney
Subject[Csnd] Re: Grain3 Issue
Cheers Oeyvind, 

Iain mailed me earlier with a workaround that corrected the major pitch
transpositions that were occurring as a result of using variable phase
values. Iain updated the grain3.csd file that I’ve linked to above to
include this workaround and that's fixed that particular problem.

The perceived pitch changes you describing were the next thing I wanted to
look at -- There seems to be cleaner time-stretching results from other
opcodes (eg. Syncgrain/syncloop). As per your advice I found that indeed the
density and grain duration in combination with the source sound material
interact quite a lot and some experimentation is required. At this stage I
think I have it working sufficiently well and can actually start using the
instrument I’ve been building. Thanks a million for your help.

Regards
Dave 




--
View this message in context: http://csound.1045644.n5.nabble.com/Grain3-Issue-tp5715197p5715213.html
Sent from the Csound - General mailing list archive at Nabble.com.