Csound Csound-dev Csound-tekno Search About

[Csnd-dev] examples/unwrap.csd in manual

Date2018-10-07 19:38
FromJohn
Subject[Csnd-dev] examples/unwrap.csd in manual
This is currently giving many errors

WARNING: Array index 33 out of range (0,32) for dimension 1

Quick look at the code gave few clues

Date2018-10-07 20:25
FromVictor Lazzarini
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
It used to work when I wrote it. Not sure what changed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2018, at 19:38, John  wrote:
> 
> This is currently giving many errors
> 
> WARNING: Array index 33 out of range (0,32) for dimension 1
> 
> Quick look at the code gave few clues
> 

Date2018-10-07 20:29
FromVictor Lazzarini
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
It does not give those warnings with 6.11.

This is what I warned about changed behaviour. There might a whole lot of code that is not working
now because of the tinkering with arrays.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2018, at 20:25, Victor Lazzarini  wrote:
> 
> It used to work when I wrote it. Not sure what changed.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 7 Oct 2018, at 19:38, John  wrote:
>> 
>> This is currently giving many errors
>> 
>> WARNING: Array index 33 out of range (0,32) for dimension 1
>> 
>> Quick look at the code gave few clues
>> 

Date2018-10-07 20:33
FromVictor Lazzarini
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
The problem in that example is that the length of kOlph should be 513
and it is 32 after this line

 kOlph = kPha

somehow the assignment is changing the size of kOlph which is wrong.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2018, at 20:29, Victor Lazzarini  wrote:
> 
> It does not give those warnings with 6.11.
> 
> This is what I warned about changed behaviour. There might a whole lot of code that is not working
> now because of the tinkering with arrays.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 7 Oct 2018, at 20:25, Victor Lazzarini  wrote:
>> 
>> It used to work when I wrote it. Not sure what changed.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952 
>> 
>>> On 7 Oct 2018, at 19:38, John  wrote:
>>> 
>>> This is currently giving many errors
>>> 
>>> WARNING: Array index 33 out of range (0,32) for dimension 1
>>> 
>>> Quick look at the code gave few clues
>>> 

Date2018-10-07 20:35
Fromjpff
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
What is length of kPha?

On Sun, 7 Oct 2018, Victor Lazzarini wrote:

> The problem in that example is that the length of kOlph should be 513
> and it is 32 after this line
>
> kOlph = kPha
>
> somehow the assignment is changing the size of kOlph which is wrong.
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 7 Oct 2018, at 20:29, Victor Lazzarini  wrote:
>>
>> It does not give those warnings with 6.11.
>>
>> This is what I warned about changed behaviour. There might a whole lot of code that is not working
>> now because of the tinkering with arrays.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>>> On 7 Oct 2018, at 20:25, Victor Lazzarini  wrote:
>>>
>>> It used to work when I wrote it. Not sure what changed.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>>> On 7 Oct 2018, at 19:38, John  wrote:
>>>>
>>>> This is currently giving many errors
>>>>
>>>> WARNING: Array index 33 out of range (0,32) for dimension 1
>>>>
>>>> Quick look at the code gave few clues
>>>>
>>>> ==John ffitch

Date2018-10-07 20:47
FromVictor Lazzarini
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
Actually the problem is with ‘shiftin’

It is changing the length of kIn, which should be isize (1024) to 64 (the size of ksmps). That
bug was not there in 6.11

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2018, at 20:35, jpff  wrote:
> 
> What is length of kPha?
> 
> On Sun, 7 Oct 2018, Victor Lazzarini wrote:
> 
>> The problem in that example is that the length of kOlph should be 513
>> and it is 32 after this line
>> 
>> kOlph = kPha
>> 
>> somehow the assignment is changing the size of kOlph which is wrong.
>> 
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 7 Oct 2018, at 20:29, Victor Lazzarini  wrote:
>>> 
>>> It does not give those warnings with 6.11.
>>> 
>>> This is what I warned about changed behaviour. There might a whole lot of code that is not working
>>> now because of the tinkering with arrays.
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 7 Oct 2018, at 20:25, Victor Lazzarini  wrote:
>>>> 
>>>> It used to work when I wrote it. Not sure what changed.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>> 
>>>>> On 7 Oct 2018, at 19:38, John  wrote:
>>>>> 
>>>>> This is currently giving many errors
>>>>> 
>>>>> WARNING: Array index 33 out of range (0,32) for dimension 1
>>>>> 
>>>>> Quick look at the code gave few clues
>>>>> 
>>>>

Date2018-10-07 20:52
FromVictor Lazzarini
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual
I just looked at arrays.c and the changes in tabensure() have caused this bug. Shiftin should not
change the output array size, as it can use  longer arrays where the data is shifted in FIFO way.

I worry that the changes have broken other opcodes now. This is why I was against them,
since the old behaviour was not incorrect.

if we start changing behaviour like this, we will be in trouble. 

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2018, at 20:47, Victor Lazzarini  wrote:
> 
> Actually the problem is with ‘shiftin’
> 
> It is changing the length of kIn, which should be isize (1024) to 64 (the size of ksmps). That
> bug was not there in 6.11
> 
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 7 Oct 2018, at 20:35, jpff  wrote:
>> 
>> What is length of kPha?
>> 
>> On Sun, 7 Oct 2018, Victor Lazzarini wrote:
>> 
>>> The problem in that example is that the length of kOlph should be 513
>>> and it is 32 after this line
>>> 
>>> kOlph = kPha
>>> 
>>> somehow the assignment is changing the size of kOlph which is wrong.
>>> 
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 7 Oct 2018, at 20:29, Victor Lazzarini  wrote:
>>>> 
>>>> It does not give those warnings with 6.11.
>>>> 
>>>> This is what I warned about changed behaviour. There might a whole lot of code that is not working
>>>> now because of the tinkering with arrays.
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>> 
>>>>> On 7 Oct 2018, at 20:25, Victor Lazzarini  wrote:
>>>>> 
>>>>> It used to work when I wrote it. Not sure what changed.
>>>>> ========================
>>>>> Prof. Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy,
>>>>> Maynooth University,
>>>>> Maynooth, Co Kildare, Ireland
>>>>> Tel: 00 353 7086936
>>>>> Fax: 00 353 1 7086952
>>>>> 
>>>>>> On 7 Oct 2018, at 19:38, John  wrote:
>>>>>> 
>>>>>> This is currently giving many errors
>>>>>> 
>>>>>> WARNING: Array index 33 out of range (0,32) for dimension 1
>>>>>> 
>>>>>> Quick look at the code gave few

Date2018-10-07 21:46
FromMauro Giubileo
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual

To me that example works without problems. I'm using the following:

--Csound version 6.12 beta (double samples) Oct  3 2018
[commit: e194db44fc66f30a9c8ea8b6aeab1962d23ad277]

Regards,
Mauro


Il 2018-10-07 21:52 Victor Lazzarini ha scritto:

I just looked at arrays.c and the changes in tabensure() have caused this bug. Shiftin should not
change the output array size, as it can use  longer arrays where the data is shifted in FIFO way.

I worry that the changes have broken other opcodes now. This is why I was against them,
since the old behaviour was not incorrect.

if we start changing behaviour like this, we will be in trouble.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 7 Oct 2018, at 20:47, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

Actually the problem is with 'shiftin'

It is changing the length of kIn, which should be isize (1024) to 64 (the size of ksmps). That
bug was not there in 6.11

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 7 Oct 2018, at 20:35, jpff <jpff@codemist.co.uk> wrote:

What is length of kPha?

On Sun, 7 Oct 2018, Victor Lazzarini wrote:

The problem in that example is that the length of kOlph should be 513
and it is 32 after this line

kOlph = kPha

somehow the assignment is changing the size of kOlph which is wrong.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 7 Oct 2018, at 20:29, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:

It does not give those warnings with 6.11.

This is what I warned about changed behaviour. There might a whole lot of code that is not working
now because of the tinkering with arrays.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 7 Oct 2018, at 20:25, Victor Lazzarini <Victor.Lazzarini@MU.IE> wrote:

It used to work when I wrote it. Not sure what changed.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 7 Oct 2018, at 19:38, John <jpff@CODEMIST.CO.UK> wrote:

This is currently giving many errors

WARNING: Array index 33 out of range (0,32) for dimension 1

Quick look at the code gave few clues

==John ffitch

Date2018-10-07 21:58
Fromjpff
SubjectRe: [Csnd-dev] examples/unwrap.csd in manual