@d-healey
Thanks a lot, some fresh ideas is really all I need
Latest posts made by prehm
-
RE: which data container would you recommend for this use case?
-
RE: which data container would you recommend for this use case?
@VirtualVirgin
Yes I think that’s an error on my side, but still it would save the action of clearing and concatenating if I could just „view“ part of the big array through one of the small arrays.@d-healey
That idea is interesting, if I understand you correctly, I would set it up like this:?Const SmallArray = [1, 2]
Const BigArray = [SmallArray[0], SmallArray[1]]
And so onIs that what you meant? Would this keep track of value changes? Can’t test it right now but I will later, thanks!
-
RE: which data container would you recommend for this use case?
@VirtualVirgin
Yes that’s the way I’ve been doing it, but because that operation has to be done a lot of times in my script at a single note on event, I was wondering if instead there was a way to work with the exact same piece of memory in order to to save computation time, instead of clearing and concatenating over and over again. -
RE: which data container would you recommend for this use case?
Okay cool thank you, that’s good to know!
I wonder, is there any way for an array to always keep track of the concatenated state of three other arrays? Or the other way around, a smaller array that always represents a certain section of a bigger array? -
RE: which data container would you recommend for this use case?
how do you mean?
each main array holds an amount of possible note choices. all seven main arrays get summed up in the end, and there is another script in place which determines the note to choose for a note On event.
i dont really know how to specify any further without breaking down the whole concept.. -
RE: which data container would you recommend for this use case?
@d-healey
they hold midi note numbers, which are used to generate additional note ons -
which data container would you recommend for this use case?
hey there,
i a using a data structure that looks as follows
three arrays: [1, 2, 3], [4, 5, 6], [7, 8, 9]
and one array that contains all values: [1, 2, 3, 4, 5, 6, 7, 8, 9]when a number is found that is contained in one of the three arrays, this array is cleared and the "main" array should reflect the new state, like this:
number 6 was found, clear array 2: [1, 2, 3], [X], [7, 8, 9]
main array: [1, 2, 3, 7, 8, 9]this structure exists 7 times and each structure has varying values, and the input value ("found number") is the same for all of them.
everything should happen as quickly as possible (it's a midi processor).
i have been using regular arrays (I just started learning programming a month ago with HISE) but I am looking for a more efficient way to do this, and i have trouble figuring out which special container type would serve me best.i just tried using an array of midi lists, but I need to restore a base state every time a new note comes in, and it seems as if midi lists are always referenced both ways, so even if I create a reg variable that gets referenced to a constant on every note on (which contains the base state), both arrays always show the same state.
even when I store a base 64 string of the base state midi lists and recall it on a note on, it does the same thing.
any suggestions would be very welcome!
cheers!