[Cs-dev] array feature wish list (I)
Date | 2014-04-09 08:40 |
From | joachim heintz |
Subject | [Cs-dev] array feature wish list (I) |
hi all - thanks for the feedback to my question about where to discuss array features. in a first step, i collected some operations which are not available for some types. i made this list some weeks ago -- so if anything is already there, even better ... 1) array / fillarray a) currently not available for strings, e.g. SArr[] array "a", "b", "c" b) not possible to have arrays as arguments, e.g. iArr1[] array 1, 2, 3 iArr2[] array 4, 5, 6 iArr[][] array iArr1, iArr2 2) lenarray does not work for string arrays, e.g. Sarr[] init 3 print lenarray(Sarr) 3) slicearray a) not possible to have i-arrays, e.g. iArr[] fillarray 1, 2, 3, 4, 5, 6, 7, 8, 9 iArr1[] init 5 iArr2[] init 4 iArr1 slicearray iArr, 0, 4 ;[1, 2, 3, 4, 5] iArr2 slicearray iArr, 5, 8 ;[6, 7, 8, 9] b) same for S-arrays: SArr[] init 9 SArr1[] init 5 SArr1 slicearray SArr, 0, 4 4) copyf2array not possible to copy to i-arrays, e.g. giSine ftgen 0, 0, 8, 10, 1 instr 1 iArr[] init 8 copyf2array iArr, giSine endin 5) copya2ftab i-arrays are missing, e.g. in the above code copya2ftab giSine, giSine 6) +, -, *, / between an array and a number do not work at i-rate. this works: kArr1[] fillarray 1, 2, 3 kArr2[] = kArr1 + 10 but this does not: iArr1[] array 1, 2, 3 iArr2[] = iArr1 + 10 7) +, -, *, / between two arrays also missing for i. this works: kArr1[] fillarray 1, 2, 3 kArr2[] fillarray 10, 20, 30 kArr3[] = kArr1 + kArr2 but this does not: iArr1[] fillarray 1, 2, 3 iArr2[] fillarray 10, 20, 30 iArr3[] = iArr1 + iArr2 8) minarray, maxarray, sumarray, scalearray do all miss i-time operations, as far as i see. 9) maparray as well: iArrSrc[] array 1.01, 2.02, 3.03, 4.05, 5.08, 6.13, 7.21 iArrRes[] init 7 iArrRes maparray iArrSrc, "sqrt" 10) = miss i-time operations. this is possible: kArr1[] fillarray 1, 2, 3 kArr2[] = kArr1 but this returns "nul opadr": iArr1[] fillarray 1, 2, 3 iArr2[] = iArr1 if overloading the '=' operator could be extended, many users would be glad, i think: kArr[] = [1, 2, 3] and even kArr[][] = [[1, 2, 3][4, 5, 6]] would be nice to have in addition to the fillarray way -- but this may better be the first point to discuss for chapter two of the array feature wish list ... best - joachim ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-04-13 19:46 |
From | joachim heintz |
Subject | Re: [Cs-dev] array feature wish list (I) |
any reaction on this? =) j Am 09.04.2014 09:40, schrieb joachim heintz: > hi all - > > thanks for the feedback to my question about where to discuss array > features. > > in a first step, i collected some operations which are not available for > some types. i made this list some weeks ago -- so if anything is already > there, even better ... > > 1) array / fillarray > a) currently not available for strings, e.g. > SArr[] array "a", "b", "c" > b) not possible to have arrays as arguments, e.g. > iArr1[] array 1, 2, 3 > iArr2[] array 4, 5, 6 > iArr[][] array iArr1, iArr2 > > 2) lenarray > does not work for string arrays, e.g. > Sarr[] init 3 > print lenarray(Sarr) > > 3) slicearray > a) not possible to have i-arrays, e.g. > iArr[] fillarray 1, 2, 3, 4, 5, 6, 7, 8, 9 > iArr1[] init 5 > iArr2[] init 4 > iArr1 slicearray iArr, 0, 4 ;[1, 2, 3, 4, 5] > iArr2 slicearray iArr, 5, 8 ;[6, 7, 8, 9] > b) same for S-arrays: > SArr[] init 9 > SArr1[] init 5 > SArr1 slicearray SArr, 0, 4 > > 4) copyf2array > not possible to copy to i-arrays, e.g. > giSine ftgen 0, 0, 8, 10, 1 > instr 1 > iArr[] init 8 > copyf2array iArr, giSine > endin > > 5) copya2ftab > i-arrays are missing, e.g. in the above code > copya2ftab giSine, giSine > > 6) +, -, *, / between an array and a number > do not work at i-rate. this works: > kArr1[] fillarray 1, 2, 3 > kArr2[] = kArr1 + 10 > but this does not: > iArr1[] array 1, 2, 3 > iArr2[] = iArr1 + 10 > > 7) +, -, *, / between two arrays > also missing for i. this works: > kArr1[] fillarray 1, 2, 3 > kArr2[] fillarray 10, 20, 30 > kArr3[] = kArr1 + kArr2 > but this does not: > iArr1[] fillarray 1, 2, 3 > iArr2[] fillarray 10, 20, 30 > iArr3[] = iArr1 + iArr2 > > 8) minarray, maxarray, sumarray, scalearray > do all miss i-time operations, as far as i see. > > 9) maparray > as well: > iArrSrc[] array 1.01, 2.02, 3.03, 4.05, 5.08, 6.13, 7.21 > iArrRes[] init 7 > iArrRes maparray iArrSrc, "sqrt" > > 10) = > miss i-time operations. this is possible: > kArr1[] fillarray 1, 2, 3 > kArr2[] = kArr1 > but this returns "nul opadr": > iArr1[] fillarray 1, 2, 3 > iArr2[] = iArr1 > > > if overloading the '=' operator could be extended, many users would be > glad, i think: > kArr[] = [1, 2, 3] > and even > kArr[][] = [[1, 2, 3][4, 5, 6]] > would be nice to have in addition to the fillarray way -- but this may > better be the first point to discuss for chapter two of the array > feature wish list ... > > best - > > joachim > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-04-13 22:24 |
From | Askwazzup |
Subject | Re: [Cs-dev] array feature wish list (I) |
Would love to react, but i just learned about arrays a week, or two ago. Seems like something i will probably need in the future, so Salute! -- View this message in context: http://csound.1045644.n5.nabble.com/array-feature-wish-list-I-tp5734040p5734210.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2014-04-14 19:39 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] array feature wish list (I) |
Attachments | None |
Date | 2014-04-14 22:52 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] array feature wish list (I) |
Attachments | None |
Date | 2014-04-15 12:48 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] array feature wish list (I) |
Attachments | None |
Date | 2014-04-16 09:49 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] array feature wish list (I) |
Attachments | None |