Csound Csound-dev Csound-tekno Search About

[Csnd] Reverse array?

Date2022-03-13 11:44
FromOeyvind Brandtsegg
Subject[Csnd] Reverse array?
Hi,
Does anyone know of an efficient way of reversing the order of items in an array? Potentially hundreds of items, so it would be best not to iterate and copy them one by one to a new array...
all best
Øyvind

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

Date2022-03-13 13:39
From"Jeanette C."
SubjectRe: [Csnd] Reverse array?
Mar 13 2022, Oeyvind Brandtsegg has written:

> Hi,
> Does anyone know of an efficient way of reversing the order of items in an
> array?
...
Possibly a very stupid question: is it unfeasible of reverting the
indexing with the help of lenarray? An efficient way of doing that might
be with linlin remapping indices running from 0.

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

Can't you see I'm a fool in so many ways <3
(Britney Spears)

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

Date2022-03-13 16:42
Fromjohn
SubjectRe: [Csnd] Reverse array?
If you want to reverse an array in place then you loop on half the length 
and swap a[i] with a[n-1].  Of course fiddling the index as Jeanette 
suggested is more efficient but not always possible.



On Sun, 13 Mar 2022, Oeyvind Brandtsegg wrote:

> Hi,Does anyone know of an efficient way of reversing the order of items in an
> array? Potentially hundreds of items, so it would be best not to iterate and
> copy them one by one to a new array...
> all best
> Øyvind
> 
> 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

Date2022-03-13 17:51
Fromfrancesco
SubjectRe: [Csnd] Reverse array?
Of course fiddling the index as Jeanette suggested is more efficient but 
not always possible.


May i ask why this?

Just curious.

Thanks,

ciao,

francesco.

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

Date2022-03-13 19:04
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
I wonder if an opcode to reverse 1-D arrays would be the fastest thing?

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 13 Mar 2022, at 17:52, francesco  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.
> 
> Of course fiddling the index as Jeanette suggested is more efficient but
> not always possible.
> 
> 
> May i ask why this?
> 
> Just curious.
> 
> Thanks,
> 
> ciao,
> 
> francesco.
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C808d191c5e3b46b1fdd308da051a1dc7%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637827907414510864%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=zY1D7HBoKIv9wu3J5QgiPt43OeouSqgPDsPBghS%2Fxkw%3D&reserved=0
> Send bugs reports to
>       https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C808d191c5e3b46b1fdd308da051a1dc7%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637827907414510864%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=G%2FPo0f%2FzBNAsnO%2FHg0IYxbZcoxZ%2BzxS9EsJ8fpqTxHo%3D&reserved=0
> 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

Date2022-03-13 20:17
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
An optional argument of an existing opcode ?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Mar 13, 2022, at 3:04 PM, Victor Lazzarini  wrote:
> 
> I wonder if an opcode to reverse 1-D arrays would be the fastest thing?
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 13 Mar 2022, at 17:52, francesco  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.
>> 
>> Of course fiddling the index as Jeanette suggested is more efficient but
>> not always possible.
>> 
>> 
>> May i ask why this?
>> 
>> Just curious.
>> 
>> Thanks,
>> 
>> ciao,
>> 
>> francesco.
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGbGlzdHNlcnYuaGVhbmV0LmllJTJGY2dpLWJpbiUyRndhJTNGQTAlM0RDU09VTkQmZGF0YT0wNCU3QzAxJTdDVmljdG9yLkxhenphcmluaSU0MG11LmllJTdDODA4ZDE5MWM1ZTNiNDZ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2ZWQ9MA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YjlRbFIrb2ppUGxoU29VUWJjSUhMVklPWHNOeTBsVmkxQzBsbnVDNWs0Zz0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=WVZMRlI4dlFUVUZ6V2NTOUU5eE9lZnFIemtoc2hxYlBDMFFCWmtKZzhzRT0=&h=60abe22d939042dea63c9adfe3ef39b6
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YlNrQ2lLclRLZUpGUE1iR0FyY2M1eW1NTUU5SUozWlJwMTNZU2NXT1BLOD0=&h=60abe22d939042dea63c9adfe3ef39b6
> 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

Date2022-03-13 22:38
FromOeyvind Brandtsegg
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
A reversearray opcode would be nice, and also nice if it could  be done as an extension of an existing opcode. Maybe slicearray could do it? (if istart is larger than iend, the output slice would be reversed)
iarr[] fillarray 1,2,3,4
ireverse slicearray iarr,3,0
(this does not work now btw, but could be practical)
Øyvind


søn. 13. mar. 2022 kl. 21:17 skrev Dr. Richard Boulanger <rboulanger@berklee.edu>:
An optional argument of an existing opcode ?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Mar 13, 2022, at 3:04 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>
> I wonder if an opcode to reverse 1-D arrays would be the fastest thing?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 13 Mar 2022, at 17:52, francesco <francescoarmandoporta@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.
>>
>> Of course fiddling the index as Jeanette suggested is more efficient but
>> not always possible.
>>
>>
>> May i ask why this?
>>
>> Just curious.
>>
>> Thanks,
>>
>> ciao,
>>
>> francesco.
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGbGlzdHNlcnYuaGVhbmV0LmllJTJGY2dpLWJpbiUyRndhJTNGQTAlM0RDU09VTkQmZGF0YT0wNCU3QzAxJTdDVmljdG9yLkxhenphcmluaSU0MG11LmllJTdDODA4ZDE5MWM1ZTNiNDZiMWZkZDMwOGRhMDUxYTFkYzclN0MxNDU0ZjVjY2JiMzU0Njg1YmJkOTg2MjFmZDgwNTVjOSU3QzAlN0MwJTdDNjM3ODI3OTA3NDE0NTEwODY0JTdDVW5rbm93biU3Q1RXRnBiR1pzYjNkOGV5SldJam9pTUM0d0xqQXdNREFpTENKUUlqb2lWMmx1TXpJaUxDSkJUaUk2SWsxaGFXd2lMQ0pYVkNJNk1uMCUzRCU3QzMwMDAmc2RhdGE9elkxRDdIQm9LSXY5d3UzSjVRZ2lQdDQzT2VvdVNxZ1BEc1BCZ2hTJTJGeGt3JTNEJnJlc2VydmVkPTA=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=bXRjWEZia1pNZ1dLYlpKaVAydjl3OENkaDFrTkV0QXRMZGRiYitpRktCTT0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Send bugs reports to
>>      https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmNzb3VuZCUyRmNzb3VuZCUyRmlzc3VlcyZkYXRhPTA0JTdDMDElN0NWaWN0b3IuTGF6emFyaW5pJTQwbXUuaWUlN0M4MDhkMTkxYzVlM2I0NmIxZmRkMzA4ZGEwNTFhMWRjNyU3QzE0NTRmNWNjYmIzNTQ2ODViYmQ5ODYyMWZkODA1NWM5JTdDMCU3QzAlN0M2Mzc4Mjc5MDc0MTQ1MTA4NjQlN0NVbmtub3duJTdDVFdGcGJHWnNiM2Q4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazFoYVd3aUxDSlhWQ0k2TW4wJTNEJTdDMzAwMCZzZGF0YT1HJTJGUG8wZiUyRnpCTkFzbk8lMkZIZzBJWXhiWmNveFolMkJ6eFM5RXNKOGZwcVR4SG8lM0QmcmVzZXJ2ZWQ9MA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YjlRbFIrb2ppUGxoU29VUWJjSUhMVklPWHNOeTBsVmkxQzBsbnVDNWs0Zz0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=WVZMRlI4dlFUVUZ6V2NTOUU5eE9lZnFIemtoc2hxYlBDMFFCWmtKZzhzRT0=&h=60abe22d939042dea63c9adfe3ef39b6
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YlNrQ2lLclRLZUpGUE1iR0FyY2M1eW1NTUU5SUozWlJwMTNZU2NXT1BLOD0=&h=60abe22d939042dea63c9adfe3ef39b6
> 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

Date2022-03-13 22:44
FromRory Walsh
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
I think reversearray would make it easier to find in the docs. 

Btw, has there been any work done on this issue, is this something that is already in Csound 7?

On Sun, 13 Mar 2022 at 22:39, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:
A reversearray opcode would be nice, and also nice if it could  be done as an extension of an existing opcode. Maybe slicearray could do it? (if istart is larger than iend, the output slice would be reversed)
iarr[] fillarray 1,2,3,4
ireverse slicearray iarr,3,0
(this does not work now btw, but could be practical)
Øyvind


søn. 13. mar. 2022 kl. 21:17 skrev Dr. Richard Boulanger <rboulanger@berklee.edu>:
An optional argument of an existing opcode ?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Mar 13, 2022, at 3:04 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>
> I wonder if an opcode to reverse 1-D arrays would be the fastest thing?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 13 Mar 2022, at 17:52, francesco <francescoarmandoporta@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.
>>
>> Of course fiddling the index as Jeanette suggested is more efficient but
>> not always possible.
>>
>>
>> May i ask why this?
>>
>> Just curious.
>>
>> Thanks,
>>
>> ciao,
>>
>> francesco.
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGbGlzdHNlcnYuaGVhbmV0LmllJTJGY2dpLWJpbiUyRndhJTNGQTAlM0RDU09VTkQmZGF0YT0wNCU3QzAxJTdDVmljdG9yLkxhenphcmluaSU0MG11LmllJTdDODA4ZDE5MWM1ZTNiNDZiMWZkZDMwOGRhMDUxYTFkYzclN0MxNDU0ZjVjY2JiMzU0Njg1YmJkOTg2MjFmZDgwNTVjOSU3QzAlN0MwJTdDNjM3ODI3OTA3NDE0NTEwODY0JTdDVW5rbm93biU3Q1RXRnBiR1pzYjNkOGV5SldJam9pTUM0d0xqQXdNREFpTENKUUlqb2lWMmx1TXpJaUxDSkJUaUk2SWsxaGFXd2lMQ0pYVkNJNk1uMCUzRCU3QzMwMDAmc2RhdGE9elkxRDdIQm9LSXY5d3UzSjVRZ2lQdDQzT2VvdVNxZ1BEc1BCZ2hTJTJGeGt3JTNEJnJlc2VydmVkPTA=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=bXRjWEZia1pNZ1dLYlpKaVAydjl3OENkaDFrTkV0QXRMZGRiYitpRktCTT0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Send bugs reports to
>>      https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGZ2l0aHViLmNvbSUyRmNzb3VuZCUyRmNzb3VuZCUyRmlzc3VlcyZkYXRhPTA0JTdDMDElN0NWaWN0b3IuTGF6emFyaW5pJTQwbXUuaWUlN0M4MDhkMTkxYzVlM2I0NmIxZmRkMzA4ZGEwNTFhMWRjNyU3QzE0NTRmNWNjYmIzNTQ2ODViYmQ5ODYyMWZkODA1NWM5JTdDMCU3QzAlN0M2Mzc4Mjc5MDc0MTQ1MTA4NjQlN0NVbmtub3duJTdDVFdGcGJHWnNiM2Q4ZXlKV0lqb2lNQzR3TGpBd01EQWlMQ0pRSWpvaVYybHVNeklpTENKQlRpSTZJazFoYVd3aUxDSlhWQ0k2TW4wJTNEJTdDMzAwMCZzZGF0YT1HJTJGUG8wZiUyRnpCTkFzbk8lMkZIZzBJWXhiWmNveFolMkJ6eFM5RXNKOGZwcVR4SG8lM0QmcmVzZXJ2ZWQ9MA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YjlRbFIrb2ppUGxoU29VUWJjSUhMVklPWHNOeTBsVmkxQzBsbnVDNWs0Zz0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=WVZMRlI4dlFUVUZ6V2NTOUU5eE9lZnFIemtoc2hxYlBDMFFCWmtKZzhzRT0=&h=60abe22d939042dea63c9adfe3ef39b6
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YlNrQ2lLclRLZUpGUE1iR0FyY2M1eW1NTUU5SUozWlJwMTNZU2NXT1BLOD0=&h=60abe22d939042dea63c9adfe3ef39b6
> 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
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

Date2022-03-13 22:44
FromOeyvind Brandtsegg
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
And thanks for the linlin suggestion, Jeanette. It looks like a good way to get around it with existing opcodes.

søn. 13. mar. 2022 kl. 23:38 skrev Oeyvind Brandtsegg <obrandts@gmail.com>:
A reversearray opcode would be nice, and also nice if it could  be done as an extension of an existing opcode. Maybe slicearray could do it? (if istart is larger than iend, the output slice would be reversed)
iarr[] fillarray 1,2,3,4
ireverse slicearray iarr,3,0
(this does not work now btw, but could be practical)
Øyvind


søn. 13. mar. 2022 kl. 21:17 skrev Dr. Richard Boulanger <rboulanger@berklee.edu>:
An optional argument of an existing opcode ?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Mar 13, 2022, at 3:04 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>
> I wonder if an opcode to reverse 1-D arrays would be the fastest thing?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 13 Mar 2022, at 17:52, francesco <francescoarmandoporta@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.
>>
>> Of course fiddling the index as Jeanette suggested is more efficient but
>> not always possible.
>>
>>
>> May i ask why this?
>>
>> Just curious.
>>
>> Thanks,
>>
>> ciao,
>>
>> francesco.
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_d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pRSWpvaVYybHVNeklpTENKQlRpSTZJazFoYVd3aUxDSlhWQ0k2TW4wJTNEJTdDMzAwMCZzZGF0YT1HJTJGUG8wZiUyRnpCTkFzbk8lMkZIZzBJWXhiWmNveFolMkJ6eFM5RXNKOGZwcVR4SG8lM0QmcmVzZXJ2ZWQ9MA==&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YjlRbFIrb2ppUGxoU29VUWJjSUhMVklPWHNOeTBsVmkxQzBsbnVDNWs0Zz0=&h=60abe22d939042dea63c9adfe3ef39b6
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=WVZMRlI4dlFUVUZ6V2NTOUU5eE9lZnFIemtoc2hxYlBDMFFCWmtKZzhzRT0=&h=60abe22d939042dea63c9adfe3ef39b6
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YlNrQ2lLclRLZUpGUE1iR0FyY2M1eW1NTUU5SUozWlJwMTNZU2NXT1BLOD0=&h=60abe22d939042dea63c9adfe3ef39b6
> 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

Date2022-03-13 22:51
Fromthorin kerr
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Reverse array?
Or allow a negative 'istride' argument (e.g. -1) for slicearray.

On Mon, Mar 14, 2022 at 8:38 AM Oeyvind Brandtsegg <obrandts@gmail.com> wrote:
A reversearray opcode would be nice, and also nice if it could  be done as an extension of an existing opcode. Maybe slicearray could do it? (if istart is larger than iend, the output slice would be reversed)
iarr[] fillarray 1,2,3,4
ireverse slicearray iarr,3,0
(this does not work now btw, but could be practical)
Øyvind


søn. 13. mar. 2022 kl. 21:17 skrev Dr. Richard Boulanger <rboulanger@berklee.edu>:
An optional argument of an existing opcode ?

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

> On Mar 13, 2022, at 3:04 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
>
> I wonder if an opcode to reverse 1-D arrays would be the fastest thing?
>
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 13 Mar 2022, at 17:52, francesco <francescoarmandoporta@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.
>>
>> Of course fiddling the index as Jeanette suggested is more efficient but
>> not always possible.
>>
>>
>> May i ask why this?
>>
>> Just curious.
>>
>> Thanks,
>>
>> ciao,
>>
>> francesco.
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://us-west-2.protection.sophos.com?d=outlook.com&u=aHR0cHM6Ly9ldXIwMi5zYWZlbGlua3MucHJvdGVjdGlvbi5vdXRsb29rLmNvbS8_dXJsPWh0dHBzJTNBJTJGJTJGbGlzdHNlcnYuaGVhbmV0LmllJTJGY2dpLWJpbiUyRndhJTNGQTAlM0RDU09VTkQmZGF0YT0wNCU3QzAxJTdDVmljdG9yLkxhenphcmluaSU0MG11LmllJTdDODA4ZDE5MWM1ZTNiNDZiMWZkZDMwOGRhMDUxYTFkYzclN0MxNDU0ZjVjY2JiMzU0Njg1YmJkOTg2MjFmZDgwNTVjOSU3QzAlN0MwJTdDNjM3ODI3OTA3NDE0NTEwODY0JTdDVW5rbm93biU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adfe3ef39b6
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://us-west-2.protection.sophos.com?d=heanet.ie&u=aHR0cHM6Ly9saXN0c2Vydi5oZWFuZXQuaWUvY2dpLWJpbi93YT9BMD1DU09VTkQ=&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=WVZMRlI4dlFUVUZ6V2NTOUU5eE9lZnFIemtoc2hxYlBDMFFCWmtKZzhzRT0=&h=60abe22d939042dea63c9adfe3ef39b6
> Send bugs reports to
>        https://us-west-2.protection.sophos.com?d=github.com&u=aHR0cHM6Ly9naXRodWIuY29tL2Nzb3VuZC9jc291bmQvaXNzdWVz&i=NWYxNzBkMDNiNTVmZGEwZmIyNjczYmRm&t=YlNrQ2lLclRLZUpGUE1iR0FyY2M1eW1NTUU5SUozWlJwMTNZU2NXT1BLOD0=&h=60abe22d939042dea63c9adfe3ef39b6
> 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
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