Part of my sound design process is creating long sections of sound which I record out of patches or programs as audio files. This is often from live manipulation of patches, controlled randomisation or other similar processes which produce interesting modulation or variation in sounds. I wanted a way to throw some of these sounds together quickly without having to worry about editing the files beforehand to make them work together. This container is designed with that in mind. Driven by a phasor~, it lets you choose a part of the file to play, adjust the pitch and length of the section being played back and seamlessly cross-fades back to the start position without any clicks. At its core is a slightly modified version of the wavefade example in the max examples (Extras (drop-down menu)>Examples overview >MSP >Sampling).
The best way to get a feel for what it does is to try it out:
XFade Container 0.9
The is the most basic way to get it working is to load it into a bpatcher and check the box 'Embed patcher in parent' in the bpatcher inspector, this will then save the path of any files you load in.
Connect it up using a phasor~ like so:
The patch needs the frequency of the phasor~ as a float in its right inlet, so be sure to also connect that too.
Things get more interesting when you connect several up like so:
Try having several instances connected to the same phasor~, but with different settings for their individual rate multipliers. This creates interesting phase relationships between the sounds, so they connect up together like a series of tape loops. You can also use several instances with the same sound and adjust the pitch to create chords.
As with the previous device, this is a work in progress so is a bit untested. Please use it and report back any problems.
This is part of a set of modules I'm intending to build, so when they are all at this stage I'll probably put some effort into making them look a little nicer! I'll also post some proper example patches.
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.