Granular patch problems: distortion and MIDI control

Apr 6, 2013 at 11:23pm

Granular patch problems: distortion and MIDI control

Hi, I have a couple of completely unrelated problems with my patch. Here, I am trying to make a live interface and workstation for my second year of my music degree, and it will include five copies of a granular patch I have made, each of which will be selected in order to control. Right now I am trying to control two parameters simultaneously, using two ctlin objects, which proves difficult as they conflict with each other. I feel that there must be a more efficient way of solving this rather than having a ctlin for every parameter, as I plan to make another 4 copies of the granular patch, meaning 50+ ctlin objects for a few midi knobs. My second problem is the granular patch; the playback of sounds yields a horrible distortion, more so with smaller grain intervals. This is due to a very audible click at the start and finish of every grain. I made an amp envelope (trapezoid~) for each grain, which even when given a long attack, does not seem to get rid of the click. Also, it seems that the ‘copy compressed’ function doesn’t include bpatchers, subpatchers, etc. so I’ve pasted all five. Your help would be greatly appreciated!

– Pasted Max Patch, click to expand. –

Granular

– Pasted Max Patch, click to expand. –

pGrainPatch

– Pasted Max Patch, click to expand. –

pGrainVoices

– Pasted Max Patch, click to expand. –

pPlayback

– Pasted Max Patch, click to expand. –
#67575
Apr 7, 2013 at 11:44am

Hi
Can I suggest you zip/compress these numerous files; some may find the process of downloading and archiving numerous patches a bit laborious, which will deter us from assisting.

Copy Compressed will/should copy subpatchers.

Brendan

ps
not sure I grasp what your midi cc issue is, can you clarify?

#243160
Apr 7, 2013 at 12:08pm

Thanks for the reply. I probably should have thought to compress the files before, lol. Ah well. Sorry if my explanation was a bit off as well. I was rather tired. I am using a BCR2000 controller, sending MIDI messages to a ctlin object to control several different parameters on currently one granular synth. I use the route object to route different controller numbers to different parameters. I have duplicated this so that I can control two parameters simultaneously, however, one duplicate always takes priority, resulting in conflicts. The patch itself should explain this more clearly.

Attachments:
  1. LivePatch.rar
#243161
Apr 7, 2013 at 1:30pm

I’m getting continuous errors from this: “times~ doesn’t understand bang”.

MSP (~) objects don’t need bangs to function, and I couldn’t track it down in any of the main/sub patchers. And it crashes Max; you seem to be sending values plus high speed bangs via send/receive; not sure this is either healthy or necessary. Does this patch work ok for you, as posted here?

Brendan

#243162
Apr 7, 2013 at 2:17pm

I noticed that as well, which is strange because I have yet to use the times~ object in this patch. I’d imagine that it’s part of another default object. My patch itself does work for me at the moment, although if I leave Max running idle for more than 20 minutes or so, I’ll often find that it has crashed on its own accord. I guess it’s likely that times~ is part of the problem. I’ll look into reducing bangs and making the sends and receives a little clearer. Do you have any advice on how to go about doing this?

#243163
Apr 7, 2013 at 2:32pm

Just realised that times~ is just the multiplier object *~. I’ll look into which one is causing the problem.

#243164
Apr 7, 2013 at 2:34pm

In complex patches trigger order is of paramount importance – you can impose a more logical and dependent algorithm.

Use [t] or [trigger]. For example [t i i] will split a single number stream into two, with right-to-left (outlet) precedence.

Brendan

#243165
Apr 7, 2013 at 2:47pm

Thanks, right to left order is something I often forget! I have managed to get rid of the Max error message by simply putting a float number box after a receive, which stopped the incessant bang message. Unfortunately I still can’t get rid of the distortion, and can find no explanation for it at all. Here is the updated patch.

– Pasted Max Patch, click to expand. –
#243166
Apr 7, 2013 at 3:11pm

Here is a simple (primitive?) grain player, check that yours follows the same basic algorithm (if you are also relying on the [line~] object)

– Pasted Max Patch, click to expand. –

HTH
Brendan

#243167
Apr 7, 2013 at 3:57pm

#243168
Apr 7, 2013 at 4:28pm

My patch runs in a similar way, but has 32 overlapping grains, each with a variable duration. I tried using the cosine envelope which gave a similar amplitude modulation-esque distortion. I’ve tried to use your patch entirely as the grain generator, but it only seems to be able to play one grain out of the 32 available, and is not very stable.

Attachments:
  1. GranularPatch.rar
#243169
Apr 7, 2013 at 4:49pm

regarding the midi issues, make sure you don’t do things like what you’re doing with the ctlin output wiring; crossing the wires like that will mess up when you switch controllers. I’d go straight into [pack] and then do zl rev instead.

#243170
Apr 7, 2013 at 6:43pm

Thanks Wetterberg. It now works fine. Thanks a lot as well to Brandon. I managed to successfully replace much of the grain patch using your system. I’ll credit you in the patch notes.

#243171
Apr 7, 2013 at 7:35pm

“I’ll credit you in the patch notes”

Good people always do, and it appears Wetterberg provided more focused assistance than I.

#243172
Apr 7, 2013 at 7:38pm

Ps

So your amplitude modulation sideband issue is also solved?

#243173
Apr 8, 2013 at 2:14pm

Yes. It appears that my method of triggering grains using Max messages rather than signals proved very unstable, especially with 32 grain generators. Sample & hold processing seems to run a lot more smoothly and ensures that the envelope also works, allowing me to revert back to the trapezoid and have adjustable attack/decay. Thanks again, Wetterberg and Brendon for your time! I’ll post the finished patch in the community section when it’s finished. I hope to get more involved in the Max community as time progresses.

#243174
Apr 8, 2013 at 2:37pm

If you search YouTube for “fCast” you’ll find an old granulator toot of mine. And most of my replies and questions on this forum relate to granular playback/synthesis.

Good luck

Ps you must check out names like Wolek, Sakonda, Robert Henke, Timo Rozendal, grainstretch and grainfreeze.

#243175

You must be logged in to reply to this topic.