Newbie: First patches: Random audio selection+playback & variable-time delay
Ok, my first ever crack at a patch.
I need one (pretty urgently, unfortunately) that at a random time (within limits yet to be finalized), randomly selects files from a choice of six. These files are then played *without* overlapping. It’s the final bit that’s causing me most headaches.
Also, the sound files don’t seem to want to play when I ask them to be read straight from a file (rather than having to manually select each time).
As a shot in the dark: Also needing to make a patch which samples a live input and delays it for a random amount of time (again, within limits to be inputted). The delay time needs to be consistent for the time something’s inputted to avoid any unwanted glitches. Am I right in thinking that I could just make a simple delay object with a random time message and manually change it before each live audio input?
I’d imagine this is elementary stuff for you all, but thankyou for any help you can give me.
I’ve posted a patch which I believe covers the first half of the question (about random files) Please let me know if this does not do what you meant, or if it doesn’t make sense. There are many ways to do this; this is how I think I would.
----------begin_max5_patcher---------- 1431.3ocyZs0aaaCE9YmeEDBCXa.tNhThRx8sBrG1K6kstmVKJnsnsUqjnFE USRKZ+s2CIkSrSssnuDlD.SYRQQc9NemajNe8pQAyD2xaCPuF8enQi95UiFY FROvn99iBpX2Nuj0ZlVvbQUEuVEL1dOE+VkY7kBTQsR2z1vmqDRzB3iZUQKp CdftwHVcNZdYw7OgD0n2ELekPzxeW.pFVBD7juKnQxWTbKx7rk4b4D3t1ogX 8Cg9XWKL6UvHc4EBTKqpoj2htSzgtgUaVntVt8sUw9DG01I4nBEBDjhZ87jv 32hZ4L47UnFlZk9EBS3FQ8upPkBV9DzaVnf2Uu7.OYKWMFspv9lUhkKK4n4h 5Z.o7b86j0oDMhtRlReezhhxRybMXesxpr.d.QWsQigI8iBhv7UE0K+fDVMK UjPxlDNFQh0sXZn4RJYRH588OzBQsps3Kb6JA22NbcWUQcIWY3Jb+fE4FFRL 6iuJZZvCyTzoVO0vMV1ZVkYYCdirfUFnuw2t5Jcy3yzF4A9f.rilghjvU4Rs JyXpTwaaYKAxElC++6XkneSaF0TxtaFCrbXJTsPVAiCVY77e2rHpULCwbm4w VJ4LM4AiVqYV6x.u.sIhl4+LqriarNq3JoXmjSx94lnzTK2XtfS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IblWkImXNheUStDcJJ5 EmZxu12TGBM8HefmbkjSgv8aVkWb7VhKAAndVK4RrxjiLXI0VVisF2zo224b k0DWk0iHmrU7vvt0gKSituy4JqXW4Z+U+viJgZO5uWh09cjAyrbJrySn0ZKp +94Joou77dIN4Q32JBcoH0iTh529CM09uJS35NaIoPmuc0OfKLjNt -----------end_max5_patcher-----------
As far as the delay, it depends on how you are deciding on when each live input segment is considered started and stopped. Setting up tapin~ and tapout~ and manually triggering would work if that’s what you want to do, but if say crossing a low amplitude threshold for a certain amount of time signifies the end of a live input segment, then you could automate it that way. (or the same with any other cues)
This is fantastic – I can iron out everything from here (non-overlapping samples…etc).
I see exactly what you mean with regards to the delay.
As the delay will only be needed seven times in the project I\’m using it for, maybe 7 separate delays, all with different possible times, can be connected to 7 audio outs – enabling overlap of the delayed signal (which will only repeat once), should this occur.
I could then just click to the next delay after the input has occurred, letting the wet signal happen whenever it does whilst guaranteeing the next delay is ready to go.
Am I missing something here?
Thank you so much for your help, I’m really extremely grateful.
You’re very welcome, glad I could help.
That sounds to me like a good solution for the delays.
Forums > MaxMSP