Csound Csound-dev Csound-tekno Search About

[Csnd] hrtfopcodes.c

Date2018-08-18 16:58
From"C. R. Craig"
Subject[Csnd] hrtfopcodes.c
I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:

for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)

While it may be the case that offset is always 0, it would seem safer to me to code

for ( j = offset ; j < (nsmps+offset) ; j++ )

Robert
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-08-18 17:02
Fromjpff
SubjectRe: [Csnd] hrtfopcodes.c
offset is usuay zero.  This code is used throughout csound.  I cannot 
understand your point.


On Sat, 18 Aug 2018, C. R. Craig wrote:

> I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:
>
> for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)
>
> While it may be the case that offset is always 0, it would seem safer to me to code
>
> for ( j = offset ; j < (nsmps+offset) ; j++ )
>
> Robert
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-08-18 17:04
FromVictor Lazzarini
SubjectRe: [Csnd] hrtfopcodes.c
nsmps should be the number of samples to be processed in the buffer, if the code was
correctly converted to provide sample accurate support from 6.0 (I suppose it was,
but John would know the answer)

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 18 Aug 2018, at 16:59, C. R. Craig  wrote:
> 
> I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:
> 
> for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)
> 
> While it may be the case that offset is always 0, it would seem safer to me to code
> 
> for ( j = offset ; j < (nsmps+offset) ; j++ )
> 
> Robert
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-08-18 17:04
From"C. R. Craig"
SubjectRe: [Csnd] hrtfopcodes.c
It may not be an issue. However, if offset is not zero, then the code will not behave as expected.

Robert

> On Aug 18, 2018, at 9:02 AM, jpff  wrote:
> 
> offset is usuay zero.  This code is used throughout csound.  I cannot understand your point.
> 
> 
> On Sat, 18 Aug 2018, C. R. Craig wrote:
> 
>> I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:
>> 
>> for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)
>> 
>> While it may be the case that offset is always 0, it would seem safer to me to code
>> 
>> for ( j = offset ; j < (nsmps+offset) ; j++ )
>> 
>> Robert
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-08-18 17:05
Fromjpff
SubjectRe: [Csnd] hrtfopcodes.c
I should have added this is the sampe-accurate code where the output 
starts partway through a nsmps blovck (offset) or/and finishes earky 
(early)


On Sat, 18 Aug 2018, C. R. Craig wrote:

> I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:
>
> for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)
>
> While it may be the case that offset is always 0, it would seem safer to me to code
>
> for ( j = offset ; j < (nsmps+offset) ; j++ )
>
> Robert
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2018-08-18 17:14
From"C. R. Craig"
SubjectRe: [Csnd] hrtfopcodes.c
Ah, okay. Makes sense.

Robert

> On Aug 18, 2018, at 9:05 AM, jpff  wrote:
> 
> I should have added this is the sampe-accurate code where the output starts partway through a nsmps blovck (offset) or/and finishes earky (early)
> 
> 
> On Sat, 18 Aug 2018, C. R. Craig wrote:
> 
>> I was reading the source for the hrtfmove opcodes and noticed that an assumption concerning the value of “offset” is made in a few places:
>> 
>> for (j = offset; j < nsmps; j++) . . . (lines 611, 1921, 2307)
>> 
>> While it may be the case that offset is always 0, it would seem safer to me to code
>> 
>> for ( j = offset ; j < (nsmps+offset) ; j++ )
>> 
>> Robert
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here