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.

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.

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:-)

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.

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!

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?

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.