karma~ (sampler/looper for The Party Van) beta

  • I originally posted this in The Party Van thread, but figured not too many people check in that mega long thread.

    An external raja and I have been working on for the last few months is pretty much ready to release. I've made a thorough help file, and am in the middle of doing a tutorial video, but for now, I want to do a mini release here on the forum to see if anyone can find any bugs or anything either one of us would have missed.

    The external is called karma~ and it's basically a mega looper. It will make up the core of the party van once it's done and I updated everything around it, as well as the rest of my patches that use live sampling/looping. I'm really happy with the feature set and implementation.

    There are 2 versions of the external included (along with the help file). The (b) version is the 32/64bit version that will run in either version of Max (6 or 7, or 32 or 64). The non-b version is a purely 64bit external. The features in both are the same, it just has to do with how things are calculated internally.

    It's mac only for now, but once it's being properly released there will be a win version.

    So please, test it out, and let me know what you think, if the help file/examples makes sense, and most importantly any bugs you run into. If you do find a bug, make note of which version of the external you are using (it posts to the Max window), and what version of Max you're using (6/7 32/64).


  • just to clarify this bit:
    "The (b) version is the 32/64bit version that will run in either version of Max (6 or 7, or 32 or 64). The non-b version is a purely 64bit external. The features in both are the same, it just has to do with how things are calculated internally."

    the (b) version also works in Max5. it is primarily for people still on 32-bit systems(the 'b' is for 'backwards-compatible'). for now, this (b) version also happens to work in all 64-bit versions Max so far as well(including Max7). but the 2 versions were made primarily to cater to the changing times: some folks are still on 32-bit systems, others are able to move to 64-bit. eventually, the (b) version is not likely to remain as up-to-date as the regular version.
    in addition, the regular version, because it uses a more current API(the library of C code, 3rd party devs use to extend max/msp by making externals), is more accurately thread-safe and possibly even better sound quality.

    in summary: if you're able to use the regular version, it's better to use that, otherwise, use the (b) version(and one way to tell(i think?...not sure because i only have a 64-bit system to test on...), is to try the (b) version, and if when you turn on DSP the first time, it says in the Max window something like "64bit...", then it may be that you actually have the capability to run the regular 64-bit only version instead).

    shit, hope that's not too confusing... if so, please ignore me and try whichever you'd like :D

  • so much respect to you both! very excited to check it out.

  • The "transport/logic" tab in karma~.maxhelp is not clear to me. I'm not able to produce audio there.

    I follow the steps
    1. start audio
    2. play audio
    3. play with state machine

    Nothing is being written to the buffer~ transport.

    I varied the sig~ feeding karma~ and saw movement in the multislider for a moment and the movement quickly stopped.

    After fiddling around for another minute or two with steps 1, 2 and 3 Max 7 crashed. (OSX 10.9).

  • How bizarre! It's working now. Not sure what changed...

  • intresting idea

    cant test until i pick up a new grid but i'll keep an eye on development

  • 64bit_v0.98mono

  • How challenging would it be to interface karma~ with Dirac (to enable stretch/shift similar to groove~)?

    It might already be possible to use karma~ in conjunction with stretch~ in a way that's realtime similar to groove~?

    I'm experimenting :D

  • @raja ah, i just read through your post here on the Dirac implementation:

    thanks for the info

  • Yeah exactly, it's a general purpose sampler/looper, which has the functions I want/need for the party van, and other patches (I'm nearing completion on a really sweet xbox controller-based patch, heavily built around karma~).

  • I wish I had time to fool around in max these days. This looks really nice. Well done. Looks like it could very easily form the core of many kinds of patches.

  • edited

    i've tested with regular karma :)
    10.10.2 and max 6.1.9 (32bit mode and 64bit mode)
    karma 64bit_v0.98mono (and stereo)

    in max window : umenu - doesn't understand "jongly.aiff"
    the loop is inconsistent in 64bit mode and crashes the app in 32bit mode.

    varispeed : while playing with playback speed the recorded sound is heard at normal speed, then the new speed is applied.
    position/window : playing with window left and right sides is a nice feature of tpv. i couldn't find it here. is it intended ?
    channels/buffers : start audio shows ‘64bit_v0.98stero’ then ’64bit_v0.98mono’ in the max window. i expected mono then stereo.

    i hope this help.
    and i can't wait to play with the new tpv :)


  • Rodrigo, on a side note, did you pick up a WTPA2? I just finished putting mine together but haven't even tested it yet. Time to get out the instruments.

  • @beo
    The error message for jongly is a change in how to the demosound bpatcher works in Max7. Loading a file manually should work fine.

    What do you mean "the loop is inconsistent"?

    For varispeed, if you record at 0.5 and play back, it will sound normal. You only hear changes while you record if you move it while you record, otherwise it just records at a slower speed (ie less samples). Wiggle the varispeed WHILE recording and you'll hear what I mean.

    The change from start/end to position/window is intentional. You can still get the same loop size/points, but I prefer this method of defining loops (as you can move the 'position' around, and just control 1 number), plus you can play things that around around "zero" this way too (position set to 0.8 and window set to 0.5, for example).

    The stereo/mono thing would be because the stereo one is on the right in the patch, and things load from right to left.

    Thanks for testing so thoroughly! Let me know more detail about the inconsistent/crashing stuff if you could (crash report maybe?).

    No, but I want to! Just haven't had the time to order/build stuff lately. It's so crazy seeing it come out. It's funny as the period of time from when it was ready to come out, and it coming out, is how long I've been working on the party van. I basically decided that I'd start working on Max again while I waited for it to come out, hehe.

  • btw thanks! @raja

    i check it out for sure

  • This is great, guys, thank you - I've already cut the guts out of the Party Van to make my own looper but this is much simpler.

  • @raja,

    I think I was able to compile from that other thread, but it's been a bit. Do I need Max7 for this? I haven't upgraded yet as I haven't used Max much lately. However, those stretta vids are making me rethink. After all I bought a damn push and upgraded to Live9 without having used that in ages, what was I thinking ? :) Perhaps i was watching Ableton vids and starting getting inspired by all those people that make things look easy and fluid.

  • today i couldn't repeat the crashes. good news i guess.
    today i open the computer and karma right away.
    the other day, i used tpv before and after opening karma (and i used tpv with jackaudio and live).
    i upload the reports. i had a max crash using tpv (by trying to use the mbp mic as an input and jackaudio as an output). i think this is the 155532 and the 155618 but i'm not sure. i hope it's not adding a mess.

    "the loop is inconsistent"
    the other day, the loop was randomly playing as expected, or with a silence at the end then starting again, or with a digital noise at the end then starting again.
    today the loop is adding the 2 first beats of the sample then it starts again (or one could say it's a 10 beat loop). today playing the file doesn't crash max.

    varispeed works as expected today.
    the other day, i was hearing the result of the 'speed' changes i made while recording the audio. but when i was playing with 'speed' to change the pitch of the recorded file while playing back the file, i heard the pitch as i recorded it and then the new pitch (or new speed of the playback) was applied as soon as i stopped playing with 'speed', meaning : as soon as i released the mouse arrow over the 'speed' window.

    let me know if you guys need more info. it's a pleasure to help you with this.

    i've found the help file very clear and understandable btw.

  • you're welcome :)

    about 161953 : i think tpv was still open, then i may have mess with it (like i did that cause 15xxxx : i remember now that i've changed tpv input while max audio was on and jack was on too... i just did (i mean today, now) and max crashed).

    here are max audio status and jack pref. i'm pretty sure jack was on the first day i tried karma.
    so yes : the first day i tried karma with jack, and the second day without. Both times, i used a saffire dac.
    i don't change max audio settings when using jack or not.


  • ok, thank you for the advice ! i'll try it. :)

  • will this project have a github repo soon?

  • Yeah. Gonna git it once we're at the release point (might be next compile). Didn't want to clog up a github with the months of back and forths!

  • karma~ should work with polybuffer~ right? i seem to be having problems…

    if i loadbang position 0. and window 1. i can't get the buffer to play at all. if i don't loadbang those, it plays and jumps fine, but the window is never the whole sample. if i print out the end position and window size from karma~, from both i just get 7619.0253…. no matter what buffer i set it too.

    could be doing something wrong, but this seems weird…

    also i've been getting crashes in max4live every so often, any way for me to help debug that? (running 32-bit)

  • to set karma to a buffer i'm using the message - bufr mybuffer.2 / bufr mybuffer.3 ect.

    but it seems like the end position/ window size being printed are stuck on the length of mybuffer.1 (i have karma named 'karma~ mybuffer.1 2')

  • to clarify that a little bit more, karma was changing to the correct buffers from polybuffer (i could hear the correct sample playing), but the end position/ window size was wrong.

    i sort of noticed this in the help file too, in the channels/buffers section, when i change from 'channels' to 'alternate', the alternate buffer's window size seems longer than the sample (moment of silence before it returns to the beginning of the loop)

  • here is the crash log

    can't remember exactly what i was doing at the time, but the crashes seem pretty random.

  • yeah i tried reloading the patch, but didn't help (assuming that's what u mean by restart). it wouldn't play no matter what messages i sent. (play, stop, jumps , change sig~ speed, change buffer)

    yes, it was inside a poly~

  • @elquinto
    Can you post the patch that you were using? (in M4L inside a poly?)

    And was it crashing when you did something specific or just under normal usage there?

  • i wasn't thinking unfortunately and threw it away. i can try to recreate it though, wouldn't be hard.

    the crashes were pretty random, seemed to happen without doing anything at all.
    (i'd be checking emails for a couple minutes, then... crash.)

    the way my patch works, there's a main patch/.amxd (containing polybuffer~, monome communication stuff), then satellite .amxd's for the audio output (which is where karma~ would go), so i'm not able to use karma~ when editing a satellite in max. i have to make edits, save, reload in Live, then test (with the main patch loaded).

    in other words, the max crashes occurred without sending karma~ a single message. though the crash log i posted is an ableton crash, pretty sure it was just idling when it happened, so i wasn't sending it any messages there either.

    i'm using max 6 btw. forgot to mention that.

  • So just regular play/record stuff in an .amxd?

    Were you switching polybuffers on the fly, or just addressing a single buffer from polybuffer? And karma itself was inside a poly?

  • was just trying play stuff, no record.

    i was switching to single buffers within the polybuffer. and yes karma~ was inside a poly.

    basically i just swapped the grooveduck with karma, and changed a few things to match karma's message scheme. if u want a look at the unedited patch, (sorry for the mess) it's attached. the full project (with the main patch and all) can be found here-

  • Ok, here's the 1.0 release ready version. Not doing a full on release until the tutorial vid is ready, but this is it for the code. The helpfile also has a full on reference doc on the final tab too.

    As a reminder, there are 2 versions of the external included (along with the help file). The (b) version is the 32/64bit version that will run in either version of Max (6 or 7, or 32 or 64). The non-b version is a purely 64bit external. The features in both are the same, it just has to do with how things are calculated internally.


  • win! will this have a project page somewhere? (github?) i'd like to promote it but linking to a forum thread is bad form.

  • Yeah I'll have a proper page for it. I don't want to link link to it properly yet until the tutorial video is done. I'd want it to all come out at once that way. So currently working on the vid.

    Just wanted to post the "done" version on here so people who tested it can start using it already.

  • github repo is made as well, but still not packaged with a release. The .c's and xcodes are there though.


  • exciting…

    will test it out.

  • ^coo, thanks! the object went through many many iterations since last, so it's hard to tell if i was able to do anything about m4l crashes(since i didn't have M4L to test properly), but i went through 'alot' to protect memory better and betterer, so you might actually find it stable there too(let me know).