Mixed type in aray

Official support for: loomer.co.uk
Post Reply New Topic
RELATED
PRODUCTS

Post

I get a mixed type in array , I use three variables (range 0-15) to adres/scroll throught the wavetables
Image
Eyeball exchanging
Soul calibrating ..frequencies

Post

Simplified , same issue
What's wrong , I have done this numerous times in the past.
Image
Eyeball exchanging
Soul calibrating ..frequencies

Post

P.s.
The sysex messages are still send ( first example ) but the error message stays there
Eyeball exchanging
Soul calibrating ..frequencies

Post

It's because the default values for template parameters are `undefined`. So when the left rotary sends it's first message (let's say it is the value 23), the template is building the array `[ 23, undefined, undefined ]`, which is mixed and hence invalid. Once the third rotary has initialised, then the array is populated by numbers and everything is fine.

I've since added default values to [template], and better error messages for this situation.

I guess until you've sent all three values, you don't want the message to be sent anyway, as it would be an incomplete SYSEX message. The way I usually deal with this type of routing is to have a [branch] that between the rotary and the [template] call inlet. When the final rotary has initialised, it toggles the branch to allow messages to be sent to the `call` inlet. I can post a screenshot if that'll help explain what I mean?
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post

Effectively, this:

Image

So messages to the `call` inlet are surpressed until after the third rotary has initialised.

(Which does admittedly seem like too many modules for a common idiom. Let me think about whether there is a better, cleaner, way of doing this...)
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post

The issue is that the values need to be send at all times .
There are 450 wave numbers and these are send out in hex , so each rotary range 0-15
For example 0,3,8 = wave number 56
1,4,4,=324 etc
I guess I will be better of with just one rotary ( value 0-450 )and use floor division + modulo to split it up into chunks of 16
Eyeball exchanging
Soul calibrating ..frequencies

Post

Phew that's a lot of wiring for a simple task
Can't this be improved in the future ?
Eyeball exchanging
Soul calibrating ..frequencies

Post

That example I posted should do what you need then. Once all three rotaries have initialised, changing the value of any of the three will send the SYSEX. It's only during setup that calling the template is supressed.

(I'm forming an idea of how to make this better, though, so watch this space...)
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post

Although, in this specific case, where basically you take one value that you need to split into sysex bits, I think that modulo and floor division is perhaps the better solution. It would certainly be more intuitive to choose a value from one rotary than split across three.
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post

Yep , that's what I am working on now
thanks for the help
Eyeball exchanging
Soul calibrating ..frequencies

Post

No problem. If you do get this working with a single rotary, I'd be interested in seeing your solution, if you wouldn't mind sharing. Thanks.
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post

Much easier this way
Here's the solution , works perfectly with just one knob range 0-450 , with use of modulo and floor division
Image
Eyeball exchanging
Soul calibrating ..frequencies

Post

Great work! Thanks for sharing.
Architect, the modular MIDI toolkit, beta now available for macOS, Windows, and Linux.

Post Reply

Return to “Loomer”