Granular looper
  • I'm posting this under "Help" because I'm not sure where to go from here, or what to do with this. I've been creating effects "plugins" with Audulus so that I can get new interesting sounds for use in my own sound design. As a sound designer, one of those processes that I really wanted Audulus for was a granular synthesizer. So this is my attempt number 1.

    The benchmark target is the Mutable Instruments Clouds module. It will be a while before I can achieve that in Audulus, but this is where I'm headed with all this. Anyways, right now I'm posting a granular playback/looper module that can do time-stretching and smearing.

    I'm working on an iPad mini, so my CPU isn't allowing for more than 16 "grains" unfortunately. My hope was at least 32, and 64 if I could swing that. Not on my iPad though. (For whatever reason Audulus starts glitching out above 60%.)

    Anyways, this is a ~1 second granular looper that can stretch the input or blur it, or reverse it, or freeze and scrub it.

    Let me know your thoughts!
    Time Dilator.audulus
    10M
    IMG_0040.PNG
    2048 x 1536 - 197K
  • I have an iPad mini as well as a iPad Air 2 and I gotta say it's a pretty big difference working on the faster iPad. It sounds really interesting after messing around with it for a minute, although I am hearing a lot of clicking. How did you decide to construct the grain structure?
    Screen Shot 2016-11-25 at 8.38.38 PM.png
    947 x 610 - 133K
  • @RobertSyrett It shouldn't click, but it won't be perfectly smooth either. Stutter, more like.

    Each grain is a 100% feedback loop into a delay node, dictated by the "Stretch" time divided by 16 (the amount of grains.) I put a small logarithmic curve (or fade, I guess) on the input and the output of the "on" switch to record into the delay node. (The middle node that says BPM2) There is also a playback fade curve below that - same node, so it will actually fade in/out the recording into the delay, and fade in/out the playback of the delay. The playback fade is connected to the "Smear" knob.

    The whole thing runs sort of like a V16 engine... While recording, the "playhead" sweeps through each grain module and opens up the input to the delay and signal is recorded into the delay. At the same time the delay time is set to be 1/16th of the "Stretch" time. A longer stretch time will record longer grains. Shorter stretch times record better sounding grains, to me anyways.

    Then once the recording playhead passes the grain module, the input closes based on the logarithmic slew rate I set, and the delay just keeps looping that signal until the output of the delay is opened up.


    I'm in no way saying I know what I'm doing - still just a tinkerer - but I hope that explanation answered your question. :)

    Do you think it could work smoother somehow?
  • I think I figured out the clicking, I was playing a synth I hadn't quite finished yet and the polyphony was clipping the signal. I've been listening to your patch for a while, and it's kind of mesmerizing. I would be happy to mess around with it tomorrow. Just so you know, I'm a tinkerer myself, but I like your patch design a lot! everything is nicely spaced and the sub patching is very organized, with very little spaghetti.
  • So I poked around inside your patch until I kind figured out how things were wired up. There were a few small things I changed so I took some screencaps with comments. I thought I would try running the patch on my laptop with 32 grains. It worked alright until I tried to capture the desktop as a recording and then it glitched out. The patch runs just fine on my mac desktop though. I don't have video capture set up, so I recorded a random smidgeon in Ableton and uploaded it to soundcloud to satisfy your curiosity. https://soundcloud.com/method-of-design/timedialator

    I think you're actually already in Mutable Instruments Clouds texture territory. Compared to this youtube guide, your patch is only lacking some Blue Sky reverb. Honestly I like the 16 grain one just as much. https://youtu.be/IjcDnax9yLY?t=17m22s
    Screen Shot 2016-11-26 at 3.49.27 AM.png
    1512 x 1049 - 678K
    Screen Shot 2016-11-26 at 2.25.50 AM.png
    1454 x 840 - 125K
    Screen Shot 2016-11-25 at 11.08.49 PM.png
    1850 x 951 - 250K
  • @RobertSyrett Thank you for taking the time to put that all together!

    Concerning your notes - Smear at 0 will play back grains using a square wave type fade. Instant on/off. Clicking would make sense if it turns the grain on when the signal isn't at a zero-crossing.
    If your offset keeps that jarring dry effect of zero smear without clipping, I'll have to adopt that!

    The spread knob - basically a poor quick attempt at a mono/stereo knob with a 3dB pan law. And I think I was just doing it quick and dirty and it didn't work, so I tweaked it until they were relatively the same volume and I moved on. So OK FINE YOU CAUGHT ME

    I can update this when I have a second. The correct way would turn down the mono signal, and keep the stereo signal at 1.


    Thanks for helping me tweak this. Regarding the MI clouds, I do wish I could play the same grain more than one grain at a time. The way the delay is set up, it will only loop one after another. I'm thinking I'd have to add another delay to each grain structure on the output with a shorter delay time and utilize the feedback knob to do this. Unfortunately I'm not sure I've got the CPU, but this could smooth things out even more.

    Speaking of CPU, if you have a ton to spare, I bet you my "Course Correct" chorus/reverb would be very complimentary to this: (@biminiroad posted a cleaned up version in the second comment)

    http://forum.audulus.com/discussion/1144/first-song-2-chords-and-a-chorus-effect#Item_4





  • I made some width knobs for a mixer module I am working on, maybe you might like one?

    Also, I really enjoyed your chorus/reverb, but was super impressed with your two chord moon song! Nice textures and just the right level of complexity to riff on top of.
    Width Knobs.audulus
    402K
    Screen Shot 2016-11-26 at 12.40.33 PM.png
    963 x 578 - 120K
  • Thanks! The two chord song is mostly built from instruments that are in the library except for the pad. It's just a filtered sawtooth into Course Correct.

    Ok, so earlier today I put a delay after the main grain delay in each grain module. With the delay set to half of the length of the grain delay we get twice as many grains playing. Turning up the feedback gives me more and more grains as it plays on. I'm still tweaking it, but initial tests sound promising - it smooths out the stutter effect. I'll post it when it's done.

    Thanks for the widening patch. I'm re-considering how the widening is done though. The MI Clouds randomly pans each grain. Mine pans each grain module left or right and you can't change it. So if you freeze the Time Dilator and pan wide, it will either be all left or all right. Clouds, when frozen sounds beautifully wide when frozen. I think I can do it, but it requires twice as many delays as I have now... Hmmm - I better get to work.











  • Alright, Time Dilator mkII is here!

    I've added a smooth knob that adds a delay to the grain loop to "smooth" out each grain. If you go past 0.5 it starts getting weird (phasing) and I like it, so I kept it.

    The spread knob is now pans each grain randomly.

    The random button now plays the grains in a completely random order. This is really nice when trying to create a "grain cloud."


    I think this would go really nice with a good reverb, but I'm at 70% CPU on my iPad, which means it sounds awful, so I can't go any further.



    Let me know what you think!
    Time Dilator mkII.audulus
    26M
  • Well I really enjoy the patch! I hooked up a bunch of LFO's to the knobs and had a clock with a short duty cycle set up to toggle the record button, then I ran my Moog Sub 37 through it. I ended up making a drone type of composition that to my ears it sounded lovely.

    https://soundcloud.com/method-of-design/drone-dilagtor

    What sort of settings did you have in mind for a grain cloud?
  • Wow, nice sounds! That's great!

    As far as grain clouds, probably smear and smooth set pretty high, the random node on, and stretch a few clicks under 1.

    That gives me sort of what I want... But here's my problem now. I've sunk a ton of time into the Time Dilator, and it does basically exactly what I want. It sounds ok to me, but on my iPad it's glitching out because the CPU is too high, so it's unusable to me.

    I think it was really all just an exercise to see if it could be done. I opened up iDensity to see how mine compared, and iDensity sounds so much better. I mean, that's what it's designed for. I can run 6 instances with reverb, compression, delay, and even ring mod for a third of the CPU that my Time Dilator does.

    It would have been great to manipulate certain things at this level to see what happens, and get some new sounds that way, but at this CPU level, that just isn't realistic. Also, I came here to make sounds, not manage processing power, so maybe someone else with a different brain can use my work as a starting point and take it further.
  • I thought time dilator was really imaginatively realized with the delays, but the thought did cross my mind that it might be more easily realized in MAX/MSP or Pure Data. There was a comment in another thread where @biminiroad was saying they are working on a Data Node which you could record and recall from which would make sound design for your kind of stuff a lot more straightforward.

    There are probably ways to make something CPU efficient in Audulus that approximates what you are making. Maybe the challenge should be seeing if we can make a sound cloud that uses no more than 20% CPU on ipad 2 mini?

    Also, iDensity is a great app, isn't it? They did a good job with visualizing where the sampled grains were coming from.
  • I would love a data node!

    Now that you propose the challenge (not exactly accepting, just thinking out loud) I wonder if we could half the grain count, and run the remaining 8 through a dual delay to keep the same length, but half the CPU. Something to think about...

    I love iDensity. I just ran it through one of my Audulus effects modules I made - I'll have to upload it, it's incredible.