sending message contents in order to outlets?
Hello everyone/anyone
I would like to find a simple way to send a message with say 10 numbers in it to 10 outputs at once.
Eg. I have 10 cycle objects all needing a freqnuecy value, so instead of putting it in manually for each I would like to send a message (eg 110 220 330 440 550 660 770 880 990 1100) - and when I click it it will send them to 10 seperate outlets.
I'm working on a patch with 24 oscillators so if I can work this out it will save me lots of time (I want to have this message on the 'front panel' or a similar way if anyone has ideas.
the best I have come up with so far is 24 number boxes with each number sent via the 'send' to its corresponsing 'receive' object in the subpatch, this is very very tedious and there must be a simpler way to update all frequebcy values at once
All help very much appreciated
Ali
You can use [unpack] to break a list into its component parts. This way you'd only need one [inlet] or [send] and [receive] pair to get the data where you want it.
Hi Luke, thanks for the advice, somehow I seem to have managed to start learning Max and not stumble upon the unpack object?!?! its a good one to know lol.
I attatched my patch I'm working on and would love hear your advice on how to solve my problem. I have no idea why I can't update the frequency arguments for the cycle objects in the subpatch (that the list or number boxes should be sending the frequency values for)
If I can get it tidied up and working smoothly I can start to begin saving presets, patterns, rules for the CA etc (and tidy up the subpatch to include noise osc's, tri, sample playback...whatever ... Its part of a Uni project but I want to get this sorted before I get stuck into the musical side of things.
If you get a spare 5 mins, check it out! Any advice is very welcome.
Your main problem is that [send] and [receive] only accept one argument. Notice all those error messages in the max window when you open the patch? Currently both [s val 1] and [s val anyothernumber] are both sending to the same place, they're both equivalent to [s val]. You need to combine the numbers into one single symbol: [s val-01] for example.
To get around the problem of needing so many [send] and [receive] objects in the first place you can simplify your many instances of the same patch inside [p jit.peek] by looking into creating one subpatch and using [poly~] to run multiple instances for you. Check out the [thispoly~] object too which can report the instance number as well as the busy state which will make your multiplications much easier.
Here's a tiny example to get you started, save the first patch as "inst" and load the second patch in the same directory somewhere on the computer. It will give you an example of how you can simplify things with a little bit of maths to send the intervals into your subpatch using the offset and multiplier along with the instance number generated by [thispoly~]. I've only set this up to one [cycle~] object in the subpatch but obviously you can do it for any of the signal generating objects. It also makes it really simple to control all the [selector~] objects with one global [send] object. I hope it helps.
Cheers Luke, this could be very very helpfull, its gonna take me a little bit of time to get my head round it but I'll get stuck into it today and try to do as much as I can before I send you any further questions.
Cheers for your help mate