plane flattening and interleaving with Gen?
I’m slogging my way through tutorials but maybe somebody could give me some direction or guidance! I think what I want to do is swiz the matrix into rgb and then combine the values sequentially into a 1 char matrix, which I can then jit.spill. But I think all matrices in Gen are 4 plane, and maybe its not possible to sequence the r, g and b in the right order because of the "synchronicity" of Gen. I was also thinking maybe I could take the swizzed r, g, b data and pack it into, say, the alpha channel of a matrix (that is 3 times the duration of the source matrix) so that I could jit.spill it out once all properly interleaved.
Any ideas would be much appreciated!
Gen as it stands right now only works with inputs and outputs that have the same matrix format. For example, if you send a [4 char 320 240] matrix to jit.gen, you’ll get a [4 char 320 240] matrix out. There’s no way to get a [1 char 960 240] matrix, which is what it seems like you want.
The fastest way to flatten a matrix is to use jit.coerce. The other option is to use jit.multiplex and jit.unpack. Here are both solutions:
----------begin_max5_patcher---------- 757.3ocyXtsbaBCDF9Z7SgFt1MiN.X6dU5yQmNdjAEhbAIpPN1sYx6dAAD6z XvxIXUtvvni7ueZ0t63mm44uQdfU5C9J36.Oumm44Y5ptCu11d94zCwYzRyz 72x028PQY5Nt+7lgePJzk7+vpGFguC11sbmNio0+tf0r899yq9A9Q6vEJVIS noZtTrVwh0MyJ.FVsC.xhf5Wv1GGWEUG+HWjdtUfpeszrDR3IqgmXDtby1uf VbpnEzbi17+lhSy5FQrKmKpTtwbQsclKSLSkbbRM1mYV35NeY1r5GyuBNVrm KRj68GEhAMDCGX.PjkPCh5aQmRskCxlwgEihO06Mzv.6cNvSFmCAaekh59nZ 1A8qbJeWllWjwN.tuLlJVSA3qEZUay5bpVwObQ705mfCH2ENGfHM9X84mDdk .D6Tf4.LgH0uV.GjRASQJsSTPi+If74fzPsrAfnl6oMO6EfjO38z2Bv.2Dzt uPRHT3wPR8F4E4fHuiRVH3qoqsLCTafY6R.AmdXnOKBCit745par8nkooYrd MEtPOnkrrwCcY2sv9uK9ZkAETU0EQMSslInaxLeIn8FIZ7hl8qJYnj.xUGJa CUjZAVBLXIJbHrDMJg3+HPImUVRSYuiJxBl3pKtZHXfhfGoAYQmCy4nQ3+MZ LPBuTEcCffg0wdtgUFfBVYxnY.zJxPNMiSZswt5IiYBHf3GopNdAtuHiJX4z B.Bf+rEMXC+ZyVhabz5if3oHAikLULqBTFBtJ5l6wEBOoTJT.dvZoFchY9J9 Ybw+92JXjZc+uEikxcU3o0L6pOFbTrIrRMWXJ23zIE9lI8HOIgINMmSBurNM jwRgm8.0Z8T4dW4jagdPtQOg1vmktiOKsQOKbmdf1nGra8ePWROAty+gXCeB bFev1HGh6NtrQNvoEcblZrx0AMofyJmoFahCFMoNpbWPvHKTi6tiGdCUSS8O zhhmXpx1szHjpBF2JU0MilaZxEMMM6nuh8Dua9KlUuauL6u.EDH4+C -----------end_max5_patcher-----------
Thanks Wesley, looks like jit.coerce has been the easy way to do this all along ;) Always wondered what it did ("header munging" ?!??)