May 13, 2015


Tag cloud datafile Here it is. Finally…

I am incredibly proud to present karma~, a dynamically lengthed, varispeed record/playback looper external for Max.


And here is a tutorial video showing some of what karma~ can do:

karma~, has been in somewhat active development since September 2014, when I first contacted raja to see if he would be interested in writing the C code for it. Thankfully, he was interested and able to. From that point we’ve exchanged hundreds of emails discussing the feature set, implementation, and bug fixery. I am eternally grateful for his programming wizardry and endless patience with me.

If you want to skip the trip down memory lane, you can click here to download karma~ 1.0 for Mac/Win.


Before there was karma~, there was my desire to do any kind of live sampling in Max. I first started learning Max in 2003/2004, in the Max/MSP 4 era. Even back then, Max/MSP (as it was then known) was a mythical beast of a program. You could make a unicorn make-out with a hunter if you knew how to use it, and I desperately wanted to. Over the next few years I went through a cycle of drilling the tutorials hard, then getting frustrated because I couldn’t do anything with live audio, and then quitting. I did that 2-3 times.

Enter the Where’s The Party At 8-bit hardware sampler, a cool looking and sounding DIY hardware sampler that I found super intriguing. I’m a big fan of DIY stuff, and the lo-fi sound was right up my alley. I built a complex setup around the WTPA sampler, and used it in various contexts over the next couple of years. It was simple, it was streamlined, and it kicked ass. But I realized I wanted more. I wanted to be able to sample live audio, and not just the electronic instruments I was running through the sampler. So I started conceiving and planning a beast of a setup, originally based around the WTPA 2.0 sampler which was due to come out.


Here’s a page from my sketchbook showing the front/back/top/side panels of what I had in mind:


It was an elaborate setup based around the idea of having an Arduino controlling the WTPA 2.0 via MIDI. It was quite ambitious, as you can see from the sketch. It had an LCD screen, over a dozen buttons, and lots of audio I/O, including a built-in condenser microphone.

I got weeks into the development before it hit me: I was going to have to drown in Arduino code to pull this off. I’m ok at writing Arduino code due to its similarity to Javascript, but the idea of creating such a massive project around it was kind of scary. I then thought that if I was going to do a ton of programming, I might as well do it in a language that’s easier to understand, and more powerful. This is when I decided to give Max/MSP one more push. A really big push. I was going to do it this time. I was going to push and push until I was live sampling. So I started off by trying to rebuild the WTPA sampler in Max. I began with the buffer shuffling function of the WTPA.

[During this last push I was lucky enough to be helped by some great programmers. There was a particularly exciting conversation with Pierre Alexandre Tremblay and Alex Harker (in which the term “Maxcho” was coined!) where Alex was popping in and out of the room every few minutes with recompiled versions of PA’s ipoke~ object in an attempt to do some of the varispeed dynamically lengthed looping that karma~ now does. Sam Freeman, Scott Hewitt, and Constantin Popp also provided some very helpful support/thoughts/code/time during this period of smashing-my-head-into-the-keyboard.]

Having something rigid to start building towards proved to be invaluable. It removed the “terror of the infinite” which can happen when working with an open programming environment. It also showed me that design was as much about what you don’t include as what you do. I designed with laser focused constraints, and made those work musically. What I built eventually turned into The Party Van, a monster of a program that I am very proud of. I’m endlessly humbled by seeing how, and how many, people use it. To this day, the main core modules of The Party Van are called the ‘WTPA modules’.


I initially released The Party Van at the end of 2011. It’s been through a dozen major updates and is currently sitting at a mature 1.1 release. I learned many things along the way while writing it, and developed a passionate belief in sharing things for free. I was only able to learn how to program because people (like the ever generous Pierre Alexandre Tremblay and Alex Harker) would share their patches/thoughts/time with me, so it was something I needed to do as well.

karma~ follows a long line: from initial experiments and frustrations with Max/MSP, through my hardware-based sampling days, to my rekindled passion for programming in Max. One of the things I found incredibly frustrating in Max was how difficult it was to do any kind of live sampling, or sampling of any kind. Declicking became a thankless, near endless chore, which got increasingly difficult the moment I wanted to dynamically change the size of a loop, or jump around the loop arbitrarily, or change the playback speed, etc…. Basically, looping is some of the hardest and unsexiest coding you can do in Max. A real shit show.

karma~ is born out of this really. This frustration. Why is it so hard to create a looper in Max?! Well, not anymore. karma~ is incredibly easy to use. It is super streamlined, while at the same time deep, with a powerful and esoteric feature set. It is, without a doubt, my dream looper. The accompanying helpfile and reference doc are super detailed, presenting each aspect of its functionality thoroughly, and includes a whole set of real-world applications, so that you can be up and running in no time at all.


karma~ is at the center of a massive patch that has been in development since before karma~ itself was conceived. I will post that soon enough, as soon as it is ready to roll out. In time, I will also replace the core ‘WTPA modules’ in The Party Van with karma~ modules. I will be sad to see that homage to my hardware days go from The Party Van, but digital art grieves for no one (Do androids dream of electric sheep? The answer is NO). The 1s and 0s are boot kicks to the ass of the past.

And with that I leave you with karma~. It is currently in its initial 1.0 release. There are 32/64bit versions for Mac and Windows (thanks to Barbara Cassatopo for compiling it for 32bit Windows and Alfonso Santimone for compiling it for 64bit Windows). karma~ was lovingly coded by raja, and I can’t thank him enough! And the linear interpolation used in the recording stage of karma~ is based on ipoke~ by Pierre Alexandre Tremblay.



  • Good morning Rodrigo
    this morning I found out about Karma~
    and you made my day!
    I tried for a long time to replicate the dl4
    behaviour with max, and now it is possible!!

    Thank you so much!
    Best regards

    • Mattia,
      Glad you find it useful! Yup, very easy looping now with karma~.

  • Hi Rodrigo, karma~ looks very cool and flexible.
    I’m deep into live sampling too and i had been using groove~ for all my projects but now i can consider to replace it with karma.

    Thank you to for sharing.

    • For live sampling karma~ is waaaay better suited than groove~. I’ve done the same in all of my patches while in development of it.

  • This is truly wonderful, thanks to you and raja for bringing this to life! Im excited to incorporate this into my projects ;D

  • DO you know how to convert this to a M4L patch?

    • You can just stick plugin/plugout and it’s ready to roll. I do plan on making a bunch of The Party Van modules (and modules based on karma~) into M4L devices.

      • Is there any chance you can upload a M4L version? I don’t know MAX but would like to try it as M4L in ableton. thanks in advance.

  • […] a dynamically lengthed, varispeed record/playback looper external for Max and is freely available here. The introductory/tutorial video is […]

  • Hi Rodrigo,
    Thanks for this amazing external.
    I have some trouble using “overdub 0” on maxforlive. In Max 7 it works, in maxforlive it doesn’t…
    Can you help me?

    • Glad you dig it!
      When you say it “doesn’t work” does that mean that the audio isn’t being replaced or it crashes or what?

      • No, it doesn’t crash. Simply when finish to record the buffer (my buffer is 2000 ms lenght) it stops recording…

  • Rodrigo ! congratulations for this piece of work ! saludos desde Argentina

  • Rod, once again, I’m in your debt, being out of your depth! :-)
    Your WTPA core has been serving me well for years (in a 4-track version). Now I move on, remaining firmly ensconced in you digital embrace:-)



    • Hehe, that’s great to hear!

      May karma treat you as kindly as WTPA has in the past.

      (p.s. look at the Cut Glove ‘karma modules’ as they are super updated versions of the WTPA core modules)

  • […] R. (2015) Karma~, […]

  • […] R. (2015) Karma~, […]

  • hello and congratulations for your Karma! I have encountered this problem: when I change the file inside the buffer on which Karma refers, the buffer gives me this error: I can not read the file now. Is there a solution? Thank you

    • Yeah that’s due to karma~ expecting to be the only thing modifying the buffer it’s attached to. Aiming to change how this works in a future update, so karma~ no longer sets the buffer to “dirty”, as well as allowing you to define whatever part of the buffer karma~ is attached to as an ‘initial loop’. Stuff like that would allow karma~ to function better in a ‘mixed’ environment with different buffer writing/reading objects.

  • Hi Rodrigo,

    Super cool object! I think I have found a small bug – when you send a stop message to karma~ more than once, the next play message you send does not work (but a second one does). Can live with it but it was very confusing to work out what was going wrong in a larger patch!

    • That’s a good catch. I’ll add that to the bug list, thanks!

  • Hello Rodrigo,

    Karma is one of the best Devices, I have heard so far. I would like to ask you, what I would have to do, to get multiple Karma looper devices running in one ableton project. I did have some trouble using more than one at the same time. It also seems like after a long time of using it it is necessary to restart ableton to regain the functionality from the the point where you loaded the device to a track. It felt like they responded on different midi mapped cc. After renaming individual objects and devices it worked better but only a couple of hours long. Sometimes reopening ableton and the project helps for a couple of more hours. I also do have similar problems with the device from the maxforlive plugin library ‘reverser’. Sometimes after reopening the projects the reversed signal is slower than it should be. After deleting it and undoing it it is working again. How can I try to eliminate these bugs?

    • Hmm, that’s weird. I have patches with dozens of instances of karma~ and there are no problems at all. Are you sure you having them all named differently with different buffers? When you say that it stops working after a couple of hours, what do you mean? Does it stop recording/playing back? Does audio stop working altogether?

  • Hey, all great but where i can download maxpatch for mac, working one ? Could u please attach a link ?

  • Many thanks for your excellent work. That said, I’m having a problem when trying to dynamically resize buffer~ objects associated with karma~. For example, connecting a [numbox] to [* 1000] to [size $1] to C74’s buffer~.maxhelp patch resizes the buffer correctly. But adding a karma~ object to that same patch causes repeated error messages: “can’t resize now.” Since resizing buffer~ objects in various other patches seems to works correctly, I suspect something about karma~ is causing the error. Any ideas? (Max 7.3.4, Mac OS 10.11.6)

    • Yeah it’s a known issue with karma that it leaves the buffer “dirty”. With the way karma works, however, resizing the buffer isn’t ideal, since it generally records to sections of a buffer, then only plays that part back, so resizing outside of karma could effect that.

      Another option is to use a polybuffer, then when you want to “resize” a buffer, instead make a new buffer inside polybuffer that you want, and [set newBuffer] in karma. A bit of a work around (for now), but I’ve done that when I’ve needed to do something like that.

  • Hello! Karma is fantastic, I’m loving it!

    One issue I have – I want to have a single button that clears the loop length and starts recording even if karma~ is already playing. I think do to this, I have to send “stop”, then “record”. However, to make that work, I have to add in a bunch of delays. At the moment, I need 7ms in between the first “stop” and the “record”. Any ideas?

    • This happens with all messages actually. It has to do how messages are processed in Max in that there has to be a vector delay between the messages. So it was a choice between this or having signal control over karma~ and I went with the simpler solution (sending messages).
      This is something that will be updated in the next version of karma~ (among other bug fixes and improvements!), though that doesn’t help you in the short term.

      What you can do is stick this abstraction between all your messages and karma~ and it will delay the messages by the minimum amount of time (based on your vector settings), while still passing single messages instantly. I basically stick it in front of karma~ when I need to send lots of messages in quick order.


      • Hi Rodrigo,

        I couldn’t immediately make that work (but then I was trying to do complex state on a train with headphones which probably wasn’t ideal.)

        A couple of thoughts that would make it easy for my case:
        * taking lists of commands, i.e. “stop; stop; record” that could guarantee execution order
        * some higher level commands, e.g. “stop and clear loop points”
        * also, being able to set a buffer length would be nice, e.g. “clear buffer and set to 450ms”

        (I promise I’m not trying to do tempo synchronised stuff ;) I just sometimes want to be capturing some stuff in the background, so I need a loop length without user interference…)

  • wow ❁ Rodrigo,
    thank you so much!
    this is beautiful + the video is such cool art by itself ❀.
    i’m currently working on a patch for my live music, so this is so great.
    bless you and bless your karma~ ☀

    a small question: (not directly about karma~, and sorry for my english + if i’m missing something)
    i’m trying (with very little max experience) to create a patch where i can loop a few karma~s side by side and make them dynamically (upon stopping a recording) in sizes that relate to each other by multiplication from the first loop length (using timer, delay…), and i was wondering if by any chance that is something that you already created or know from elsewhere that could work good with karma~?
    (again sorry if this question makes no sense ⚐)

    thanks again and cheers ☕⚡

    • At the moment that’s not really possible. Each karma~ has its own clock and size and works that way. That will change in the future. There is a stable 1.5 Mac version which does some of that stuff though. It’s not very documented (yet), but if you email me I can send it along with some rough instructions on what the new messages are.

      • again wow! very happy to hear that you are planning to make it possible in the future, and thanks for the fast replay :)

        im working on a pc, so not relevant i guess (◔_◔)

        while trying to build a sync mechanism (based on loop length) i have stumbled a strange behavior with karma~, and if you have a few moments i would be happy to hear from you about it >>
        basically i send a ‘record’ and after 400ms a ‘play’, but the strange thing is that the window size (from the unpack) is not constant. i wander if i’m missing something?

        thanks and have a great year ⛵

        here is the behavior in a basic form:

        • This is one of the downsides of not having a “sample accurate” transport mechanism. So sending messages in Max land (i.e. “record”, “play”) happen at message rate, which is… a big wiggly. So even if the timer is reading those as being 400ms apart, they may not actually be, particularly in a larger patch with other things going on.

          Take a look at the last tab in the helpfile for the cputimer object, and use that in your example, and you can see that the [delay 400] object isn’t accurate either. Sometimes it’s 399.43859 sometimes it’s 400.035133 etc…

          All that is to say that timing, when you want sync, can be tricky.

          There is a solution though. If you use the 1.5 version of karma~ (I think there’s a windows build on the github that someone did), you can simply send the message “setloop 400” to karma~ and it will be exactly 400ms long. Part of the updates in karma~ are to address issues like these, and this is one of the ways around that.

  • Rodrigo – many thanks for this patch. I’m working on a 4-voice version, and am currently at the stage of copying the patch x4, renaming the buffers and reassigning midi mappings. Encountering a problem – when I rename the karma object to specify the new buffer, it kills the waveform view and I can’t find a way to get it back. Any ideas?

    Also while I have you here, is there any way to harvest a bang whenever the sample loops? this would make it possible to do things like play the sample only once, trigger envelopes, etc.

    • For each instance of [karma~] you need a named [karma~], a named [buffer~], and if you want it, a named [waveform~] object. Because of how the help file is set up, there are a few objects on top of the underlying [waveform~] object, so you have to move those out of the way, then go into the inspector for the [waveform~] object, and change it’s name to whatever [karma~]/[buffer~] you are using.

      For the second point, you can look at the code in the help file in the final “misc” tab, in the [p basic_looper] patch there is a subpatch called ‘[p edgeDetection]’. It’s not sample accurately perfect, but it gives you a bang whenever the loop repeats. That patch also has a “play once”-type mechanism too.

      • Amazing, that’s what I needed, thank you! Making good progress with my 3-track timefactor + launchcontrolXL project, finding Karma~ has been a great catalyst for finally learning Max.

Leave a comment


Rodrigo Constanzo
-makes music and art
-lives in Porto/Manchester
-is a crazy person

Learn from me (for free!)

I am offering free lessons / conversations / consultations / mentoring / time / support to creative people, locally or remotely.
Want in on this?!

Read my PhD Thesis!

Composition, Performance,
and Making Things,
sitting in a tree :