May 13, 2015

karma~

Tag cloud datafile Here it is. Finally…

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

karma

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.

WTPA2_Green_ON_FIYAH

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

wtpa2_sketch

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’.

party1.0

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.

karmareference

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.

  

29 Comments

  • 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

    • 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?
    thanks
    S

    • 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?
    Thanks!

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

    Cheers,

    Girilal

    • 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~, http://www.rodrigoconstanzo.com/2015/05/karma/: […]

  • […] R. (2015) Karma~, http://www.rodrigoconstanzo.com/2015/05/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.

      ———-begin_max5_patcher———-
      2519.3ocyasziqhiEdcpeEVQyh6clZRaiMFXzrYdH0qlUcKMZzUsJQBNItuD
      bFdTO5Vc+auO1FHPJfhjKjpxhJorwv47c9NOrM9Wuawx0pmEYKQ+MzWPKV7q
      2sXgoIcCKJ++EKOD97l3vLyks7fHKKbmX4819xEOmaZOL4ETYeYnbE5qgoGB
      Q6Eo0WppHOVjm+xQg84sbI5mJ6RFYtGp0+7e0s5xSJNHSfAXdrNmZzdaLsRJ
      a8XX9l8xjcOjJ1jau4LuU36QNl+R3Ty+3rBi9I8H9s6tS+m6GoJmHdBjrWow
      FM72QOsOLW7nHsW0LStKILd48nkwxr7NUZmKPocdKklP3luvj4PqOhdDddpz
      +sHN7kKyzR5TKIWmo0irx8djO6jN1bDf4vpYkp1hkakwZqTlTkz39uXY3wiM
      ZdQignwieVYtQ92W2jLw1DttoTwixpwSqaMLEj6bPnKRMfxxm4rkmtMpHQZR
      gzHJ1FAKSoHYrAIgf2zwvM1AqMUUceBI7LFZp0d6yv5u3N9m.CvFuKVs4qhn
      lh7R0QQhL4XpHSjjGlWJ60cGI1FVDm+vVURdl7WLR.Af3t5eaoD1YmZcvH9+
      iTo1Cn7R1kJiTIZgnkkP2b0i6KHhqgD61TYLWQR3wNFLvu.XomNy.krHacXp
      1PsNVzvMBX1JUb6tpGWrXadY2GkIImgh4pi82Ypb29AF6ZEz4ggt2ldxdnHw
      16C.mH+grvGai14gwwkNpsu8OGlHO.AlxkVSfCttSQRHnn6y1jphiaou1ddr
      idh.N9FwSxn78lGTSx.b4xiUjnk0V4HIjIHuca4g6xZ2RV9KVPuQSEqK8geH
      Wb3XLnEsufV4rZ5v1LjVq1GJzV6vaaSUGxd4vZUbyt6O9Vew35MNW+w55KdG
      w2DH2E6uxGG3fYX6GGGHJ3YY1VTEmuLhxUBPaTGN.gF5Dg9QEJ7QkLBcPlkI
      hNkz+o8hDDDQIBDejLAb5ffKIBUQV80bOJRm1.Al3Lw+u.dDmF95WP46EvcE
      HtEGPg.BAcq1hzTXzmVGpeXJ3IXRmVlEBElDgxBAVh.kBDkOuB0TnikIhM56
      iVxYcawbtBKFdXKlqqmN4D0ZbXlHYb7MzF8pBw98kcq7tSuxSBL4jo9l32Zp
      IfA2RkuVmQFsoGMmNCZtafwQkaz4.7MWyiUpifSTppX2dD3dUHP.2WFifvn4
      uzqigS2HT.d5gHJ13Lv.GDB1m3yBJ+3nKX0VNC8FhXEYhRfBXMYP.EABxnBD
      GXP5vXUNR8hcztwNe+4C6vzUAXOBmWlGf3qwNaed2PryFJuY76VgluT5lOe1
      fLJmsxCyIL2J5F3dFbyIaaTIvTMxMTMSIFlvyBwwlSbdmHeuH8h4aroG7rgt
      ofq54XGAGbyYaxsnvJbBAWH.VRnX.kJQjBw7BSftaWZPtodjmjfhg1oKh7BK
      LveFpLvgUlVDuxASvN7JPkqm2dvMuPg7vuBnYQZptTr1vmdpXlxqhjOJiDZ+
      ax2Qf3M460UkUOnSEeg9zeAQzbZa8gPZHasfhzTUZ1muT72aFhgxYlkMvgRV
      wwPzA+xXnXldYhvyB9OvrMxQqQCOQi0gI6zKcTuS3v6Z77cFUgLTGnRNrKww
      qJSCvRo3YYFGC.R+RrME8vSHaPLp+Yk4b0XjmAHXD9J14Yic42ZLZBHRb+Yf
      HUBRPEw7yK261SjxUeKyrm6MCSs2hOTOc5f14Xstf2R3IpwJ5N.GpW74ZbxH
      iJcYW3C8liOPxsAQGYRdufCiOCfC15AUlKyyoBbzI3BLo4toQfhQqeyPzCxf
      XtyVpr.ZUp8aKpnq6D47FDmACKyXyPtKG61l34sxGCYupxui8f3Nr2ibWaGU
      tqswpv98wblA5iafeu0KRI2ZjR77wTzm9SaInuS+kC5OqWIdL4yeF8VAm5G0
      XSejIlcy4J4WDrWYfIeW8N53eqgsvH6F.gxReS+vgBhSwSuqnKyPvH9tPYjN
      XZPEACpPheySwA9WQVmsqsJ.Je5qRRuhWZLBR4qmzLoEFge+XSxcOl8MQnHy
      .gpBr5hP46cqAq+9UWwDgLaULUgMtzpJlnuKULIOHFNfjMe2fyrc5IPUfTWd
      az4g.8p8oY7ouB5mlfu5Yk4Vu1vUSSkha7dHXdGMJWTsQraaIQhma7ddLIHl
      UY5YqsBlgEtrrjQ8NaNNPYncgaHD4za6gdMB6Ya9MBnt+tgpLUQ5lJpS4txi
      ZKpQhrbYR869xWNgbny0oX6K7yWfZsfp9vqza2hwCYzdAWr3B4EPjQHu5h2F
      RdwZ40E7g4j4WnGKHqmKb+BMosPimWgtC.rag1ncjAE5RIuRdaFNKMx9BoQd
      eUB9jnD34QIbuDNO4iAm2Hz3oxQsOj+fL5nBpUpLXHGamAE2ERPSc8qV2GeP
      eY12UnN5alP.5nCU49wITEkOVud72fYal85GsRPwSG2iQLEEQ7bfY1SbYrlq
      bjcl8cz2sLNBiMRBoG6CQtdFahpM40AumG4crg7Xucb5al7NJ9vHRq7Nka7h
      zgOngqX7Kg2b4kG1eLKGrcp8ckujPo8z2LQG4isJYOxzE01w99npWZHeLm6g
      qV2C8a8fWPO8MWHf2Dg.2n.z58EeTNeefD2QOYfIhfUQhB7e8976D39V8oeG
      yNe+cK4rutqYB27tjIB9Vgml+zZdiMNRG7g2CZoG68fVx8q3PbrK2A2XenZv
      uNqu4DAFSbDt2GBKVvnWOG2InvzxFqNDbK0mzonGrmpqGByySkqKxsKGXyS0
      2Ec5i1EqVGFWd1hpOaZcb3jt6jvUdnIMZW6UjzdFJOGUKOIkuBMagQCm.oyy
      p4XeNjQ7bbd0ywpdmcTH0OhyNBjmc7Ge8Qer+i834G4Qik1d7uNCROcpAKhj
      pevrYaO7eDIEVKU0ILrMPrd2VYbbMuqIGoZaDJYk0mxxlbTm.FQ+l6gWQITO
      Gt4WvObca5yZGCo1QzkEn2UD3WbGOlq4W9NTWpgre1vbN8rzEuZdB3.eLy9q
      5E93zvBS1UdVE8Zbf6NlpNpRqOzlqnA0WeQtZWZXjrbM3ws3w2Wxizu0tmep
      6Vd..TY0XZx6pMFeMKVBFv+q15NjgnyETrcnpuYYwtoZ+y3BQ04sqaYIbyF3
      AzxPSIdblmFx40Vu.cSjYP.SUOkbwR3I4xE3er.C8Xljv+0KgWt.hgp1XF9q
      mGk5X.SeGBgPmdA76SEhqPBMnGU+Q+KnL.tVLmZg6+IhiUOMrz07LT+Eyon1
      M.i8qiP2gz663RLfpGTsrcNtt.h6NoJPwg0hzuWEGcwfqlJhMle2.GhqQRIM
      CeMIBXpMbiVBGYzFvygw4zfR5nmmkXB.W.sUfUHWwbqP17o8bN9u62t6O.Xf
      mUSM
      ———–end_max5_patcher———–

Leave a comment to Emiliano Brescacin

ABOUT

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

////////////////////////////////////////////////////////////