praxworld.com Electronics, music, electronic music! general geekery

30Dec/100

Free M4L Delay Effect

Update! See below for the JavaScript file, and a Max abstraction that you can plug into any Max4Live patch and convert a time signature to milliseconds based on the current tempo. Hot stuff!!

I just finished my first attempt at reverse-engineering the Lexicon PCM42/PSP42 delay unit. You can download it here: http://www.maxforlive.com/library/device.php?id=518. I have found that reverse-engineering things is a great way to learn about MaxMSP, and get ideas for crazy ways to do things too. The end result came out fairly well:

As with all successful Max projects (well for me anyway), my efforts also yielded a number of abstractions that I may be able to re-use. Most notable in the recyclable abstraction department is a JavaScript that I found here. Its function is to take a time signature and output the corresponding value in milliseconds based on the current tempo. This was necessary since the tapout~ object requires time input value to be in milliseconds. Adapting it for use within Live was pretty straightforward.

Along the way I discovered that using an LFO to shift the delay time resulted in clicks. I put in a line object, but that had the effect of "softening" the effect of the LFO, so all of the waveforms kind of seem like a sine wave. Another befuddling aspect of the PCM42 is the apparent ability to crossfade between LFO waveforms. After implementing the feature and playing around with it, I couldn't really tell much difference. It doesn't seem like the ideal application for something like that. At least I got a handy little signal crossfading abstraction out of the deal though. Anyway, if you're looking for a funky delay effect based on a cool old-school rackmount (and its superb VST counterpart by PSP Audio), download this one and give it a try!

UPDATE: Here is the adapted JavaScript source. Copy it and save it as converter.js anyplace in your Max path:

var tempo = 0;
var msv = 0;
var sDivU = 0;
var sDivL = 0;
var div = .25;

function list()
{
var a = arrayfromargs(arguments);
tempo = a[0];
sDivU = a[1];
sDivL = a[2];
//post(a[0] + ", " + a[1] + ", " + a[2] /n);

calculateTime();
}

function calculateTime(){
if(!tempo || !div || !sDivU || !sDivL)return;
var dTime=(60.0*1000.0*parseFloat(sDivU))/(parseFloat(tempo)*div*parseFloat(sDivL))
dTime=roundOff(dTime,2)
msv=dTime
bang();
}

function roundOff(x,nrDec){
fact=Math.pow(10,nrDec)
x=Math.round(x*fact)
return(x/fact)
}

function calcTuplet(myForm){
var tuplet=myForm.selectTuplet[myForm.selectTuplet.selectedIndex].value
var nr=myForm.number[myForm.number.selectedIndex].value
var noemer=tuplet.substring(tuplet.indexOf("/")+1,tuplet.length)
myForm.subdivisionLower.value=noemer
myForm.subdivisionUpper.value=nr
myForm.division.options[2].selected=true
calculateTime(myForm)
}

function bang() {
outlet(0, msv);
}

UPDATE: To accompany the above JavaScript, here is a handy abstraction that you can use in your patches. it converts a time signature to milliseconds based on the current tempo set in Ableton Live:

Copy this code to your clipboard, and from within Max go to File, New from Clipboard. Boom!

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.