Csound Csound-dev Csound-tekno Search About

[Csnd-dev] pfields > 2000

Date2025-05-08 11:28
FromEduardo Moguillansky
Subject[Csnd-dev] pfields > 2000
I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 11:59
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
Do you have the PR number?
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 12:22
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000

On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
Do you have the PR number?
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 17:52
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
I can post a PR later today

On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:

On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
Do you have the PR number?
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 19:37
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
No need, I have all I require there. Leave it with me, there's some internal changes that I may need to look after (6->7)

Thanks
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 17:53, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:


I can post a PR later today

On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
I think this might be it:


On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
Do you have the PR number?
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 21:11
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
The schedule opcode itself also needs changes, that was not part of the original PR: There is also some wasteful copying of memory, where an EVTBLK is created and filled with an .extra chunk only to dispose the memory right after that.

On Thu, May 8, 2025 at 8:37 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
No need, I have all I require there. Leave it with me, there's some internal changes that I may need to look after (6->7)

Thanks
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 17:53, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:


I can post a PR later today

On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
I think this might be it:


On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
Do you have the PR number?
Prof. Victor Lazzarini
Maynooth University
Ireland

On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.

I don't have the code anymore

Test code:

<CsoundSynthesizer>

<CsOptions>

-odac

</CsOptions>

<CsInstruments>


sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1


instr 10

ipfields[] passign 4

printarray ipfields

turnoff

endin


instr 20

ipfields[] genarray 0, 2000

ipfields[0] = 10

ipfields[1] = 0

ipfields[2] = 1

schedule ipfields

turnoff

endin


</CsInstruments>

<CsScore>


i 20 0 1


</CsScore>

</CsoundSynthesizer>









Date2025-05-08 21:17
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
yes, I realised the schedule opcode needs to be able to access the extra field. 

I am considering now whether we may just go for a fully dynamic memory arrangement and dispense with the extra field. It may
be the best solution now, but it’s a lot more involved.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 May 2025, at 21:11, Eduardo Moguillansky  wrote:
> 
> The schedule opcode itself also needs changes, that was not part of the original PR: There is also some wasteful copying of memory, where an EVTBLK is created and filled with an .extra chunk only to dispose the memory right after that. 
> 
> On Thu, May 8, 2025 at 8:37 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> No need, I have all I require there. Leave it with me, there's some internal changes that I may need to look after (6->7) 
> 
> Thanks
> Prof. Victor Lazzarini 
> Maynooth University
> Ireland
> 
>> On 8 May 2025, at 17:53, Eduardo Moguillansky  wrote:
>> 
>>  I can post a PR later today
>> 
>> On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky  wrote:
>> I think this might be it:
>> 
>> https://github.com/csound/csound/pull/1764
>> 
>> On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
>> Do you have the PR number?
>> Prof. Victor Lazzarini 
>> Maynooth University
>> Ireland
>> 
>>> On 8 May 2025, at 11:33, Eduardo Moguillansky  wrote:
>>> 
>>>  *Warning*
>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>> I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.
>>> 
>>> I don't have the code anymore
>>> 
>>> Test code:
>>> 
>>> 
>>> 
>>> -odac
>>> 
>>> 
>>> 
>>> sr = 44100
>>> ksmps = 64
>>> nchnls = 2
>>> 0dbfs = 1
>>> 
>>> instr 10
>>> ipfields[] passign 4
>>> printarray ipfields
>>> turnoff
>>> endin
>>> 
>>> instr 20
>>> ipfields[] genarray 0, 2000
>>> ipfields[0] = 10
>>> ipfields[1] = 0
>>> ipfields[2] = 1
>>> schedule ipfields
>>> turnoff
>>> endin
>>> 
>>> 
>>> 
>>> 
>>> i 20 0 1 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 


Date2025-05-08 22:09
FromEduardo Moguillansky
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
The fact that this went so long unnoticed is an indication that long events are probably not the norm. In that case, it might be practical to just keep the current design. Probably also the array version of the "ftgen" opcode needs to be looked after, since it also uses the EVTBLK struct.



On Thu, May 8, 2025 at 10:17 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
yes, I realised the schedule opcode needs to be able to access the extra field.

I am considering now whether we may just go for a fully dynamic memory arrangement and dispense with the extra field. It may
be the best solution now, but it’s a lot more involved.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 May 2025, at 21:11, Eduardo Moguillansky <eduardo.moguillansky@GMAIL.COM> wrote:
>
> The schedule opcode itself also needs changes, that was not part of the original PR: There is also some wasteful copying of memory, where an EVTBLK is created and filled with an .extra chunk only to dispose the memory right after that.
>
> On Thu, May 8, 2025 at 8:37 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> No need, I have all I require there. Leave it with me, there's some internal changes that I may need to look after (6->7)
>
> Thanks
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 8 May 2025, at 17:53, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>>
>>  I can post a PR later today
>>
>> On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>> I think this might be it:
>>
>> https://github.com/csound/csound/pull/1764
>>
>> On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
>> Do you have the PR number?
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>> On 8 May 2025, at 11:33, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
>>>
>>>  *Warning*
>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>> I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.
>>>
>>> I don't have the code anymore
>>>
>>> Test code:
>>>
>>> <CsoundSynthesizer>
>>> <CsOptions>
>>> -odac
>>> </CsOptions>
>>> <CsInstruments>
>>>
>>> sr = 44100
>>> ksmps = 64
>>> nchnls = 2
>>> 0dbfs = 1
>>>
>>> instr 10
>>> ipfields[] passign 4
>>> printarray ipfields
>>> turnoff
>>> endin
>>>
>>> instr 20
>>> ipfields[] genarray 0, 2000
>>> ipfields[0] = 10
>>> ipfields[1] = 0
>>> ipfields[2] = 1
>>> schedule ipfields
>>> turnoff
>>> endin
>>>
>>> </CsInstruments>
>>> <CsScore>
>>>
>>> i 20 0 1
>>>
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>>
>>>
>>>
>>>
>>>
>>>


Date2025-05-09 00:12
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] pfields > 2000
I got this mod done now and it’s passing all the tests. I think it’s probably a good idea to make it dynamic at least in the
case of realtime events.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 May 2025, at 22:09, Eduardo Moguillansky  wrote:
> 
> The fact that this went so long unnoticed is an indication that long events are probably not the norm. In that case, it might be practical to just keep the current design. Probably also the array version of the "ftgen" opcode needs to be looked after, since it also uses the EVTBLK struct. 
> 
> 
> 
> On Thu, May 8, 2025 at 10:17 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> yes, I realised the schedule opcode needs to be able to access the extra field. 
> 
> I am considering now whether we may just go for a fully dynamic memory arrangement and dispense with the extra field. It may
> be the best solution now, but it’s a lot more involved.
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
> > On 8 May 2025, at 21:11, Eduardo Moguillansky  wrote:
> > 
> > The schedule opcode itself also needs changes, that was not part of the original PR: There is also some wasteful copying of memory, where an EVTBLK is created and filled with an .extra chunk only to dispose the memory right after that. 
> > 
> > On Thu, May 8, 2025 at 8:37 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> > No need, I have all I require there. Leave it with me, there's some internal changes that I may need to look after (6->7) 
> > 
> > Thanks
> > Prof. Victor Lazzarini 
> > Maynooth University
> > Ireland
> > 
> >> On 8 May 2025, at 17:53, Eduardo Moguillansky  wrote:
> >> 
> >>  I can post a PR later today
> >> 
> >> On Thu, May 8, 2025 at 1:22 PM Eduardo Moguillansky  wrote:
> >> I think this might be it:
> >> 
> >> https://github.com/csound/csound/pull/1764
> >> 
> >> On Thu, May 8, 2025 at 12:59 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
> >> Do you have the PR number?
> >> Prof. Victor Lazzarini 
> >> Maynooth University
> >> Ireland
> >> 
> >>> On 8 May 2025, at 11:33, Eduardo Moguillansky  wrote:
> >>> 
> >>>  *Warning*
> >>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> >>> I had submitted a PR long ago which fixed this problem, but it seems to not have been applied to csound 7. Whenever the number of pfields exceeds 2000 csound crashes.
> >>> 
> >>> I don't have the code anymore
> >>> 
> >>> Test code:
> >>> 
> >>> 
> >>> 
> >>> -odac
> >>> 
> >>> 
> >>> 
> >>> sr = 44100
> >>> ksmps = 64
> >>> nchnls = 2
> >>> 0dbfs = 1
> >>> 
> >>> instr 10
> >>> ipfields[] passign 4
> >>> printarray ipfields
> >>> turnoff
> >>> endin
> >>> 
> >>> instr 20
> >>> ipfields[] genarray 0, 2000
> >>> ipfields[0] = 10
> >>> ipfields[1] = 0
> >>> ipfields[2] = 1
> >>> schedule ipfields
> >>> turnoff
> >>> endin
> >>> 
> >>> 
> >>> 
> >>> 
> >>> i 20 0 1 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
>