Array within array
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
Example , I've got an array [ 60,63,67] , going into a " get element" module .
Triggering the key input of the "get element" with a counter gives me the notes in successive order .
In supercollider we can have arrays within arrays so it will give you successive notes until it get to the nested array which will then be a chord or interval , like this
[ 60,63,[67,79],58]
67-79 will be played as an octave interval of two notes
Sadly architect doesn' tallow for nested arrays , so how would one solve this ?
Triggering the key input of the "get element" with a counter gives me the notes in successive order .
In supercollider we can have arrays within arrays so it will give you successive notes until it get to the nested array which will then be a chord or interval , like this
[ 60,63,[67,79],58]
67-79 will be played as an octave interval of two notes
Sadly architect doesn' tallow for nested arrays , so how would one solve this ?
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
GOt it , has to be an array in a tuple like this
I thought the get element was only for arrays , but it also works for tuples and thus array within tuple
(60,61,[64,67,70],73,77)
I thought the get element was only for arrays , but it also works for tuples and thus array within tuple
(60,61,[64,67,70],73,77)
Last edited by gentleclockdivider on Fri Jan 27, 2023 12:45 pm, edited 1 time in total.
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
Damn , which brings us to the next problem
Transposing arrays is fine , but not tuples , same goes for reversing
Transposing arrays is fine , but not tuples , same goes for reversing
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
Shuffle doesn't work on tuples either.
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
Any info ?
It would be great if tuples can also be processed by certain modules ( see above )
It would be great if tuples can also be processed by certain modules ( see above )
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
- KVRer
- 23 posts since 28 Jun, 2021
Tuples are typically immutable, so doing something like changing the order of elements (i.e shuffle) isn't possible. The quick start guide makes a comment about this:
I know that doesn't help answer the original question, but it seems that support for nested arrays would be better than finding workarounds using tuples.In tuples, each element position represents something specific, so reordering a tuple's elements makes no sense.
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
Noppes , I want a collection of note data+chord data within a single data module
This works
(60,62,[70,74,77],65)
element 1 =60
element 2=62
element3=[70,74,77]
element 4=65
The tuple contains an array which is the chord , the other elements are just regular notes
This is feeded into an get element and the get element nr. is read by an upwards counter , but as written earlier certain operations are not possible .
Best way would be this [60,62,[70,74,77],65] , a nested array , the single elements are still read as single notes , the nested array is a chord .
Last edited by gentleclockdivider on Sat Jan 28, 2023 9:48 pm, edited 1 time in total.
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
double post
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
- KVRer
- 23 posts since 28 Jun, 2021
I was wondering whether an array of tuples might be a workaround, albeit a possibly ugly one. Something like [(60, 0, 0), (62, 0, 0), (70, 74, 77), (65, 0, 0)] and you just discard the zero values in your subsequent processing.
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
That doesn't work .
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies
-
gentleclockdivider gentleclockdivider https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=203660
- KVRAF
- Topic Starter
- 6230 posts since 22 Mar, 2009 from gent
2 Colin , would it be possible to get this in a future update (array in array)
Eyeball exchanging
Soul calibrating ..frequencies
Soul calibrating ..frequencies