1

I'm working on a patch in Pure Data which uses an 8 number scale to decide which chords can be played. E.g. if a chord uses a note that is not in the scale, re-roll. Obviously this isn't the most musical soultion as we usually expect accidentals and such, but here we are looking at a primitive method for procedural music. Here is the problem patch:

CreateChords patch

As soon as I attempt to use a new scale, pure data freezes and requires an immediate restart.

Any suggestions would be greatly appreciated.

Thanks,

Liam

2 Answers2

2

It would be massively more efficient and easier to use an object like [coll] or [textfile] to store your chord patterns. Instead of having each pattern in a message object, which you then need to feed individually through all of the processing, you would just have one object, and feed your random number generator into it, which will then spit out the corresponding code. something like this

your patch reworked

there you have it. A spaghetti mess of wires and boxes reduced to 11 objects and 11 cables. There are several other ways to accomplish similar things, but this was the first to come to mind. If this one works for your purpose, cool, or else lemme know and I'll show you other ways.

th8a
  • 46
  • 1
  • Thanks for your reply, I appreciate the re-work you offered. Unfortunately an approach like this isn't possible as I should have mentioned, as I plan to use this patch embedded using libpd, only vanilla objects are currently supported under this framework. Many of the objects you have used are from the extended version I believe. –  Mar 29 '17 at 18:02
  • I also actually discovered the cause of the error, I was getting a stack overflow error in the console. I'm rethinking how to approach this problem –  Mar 29 '17 at 18:04
1

Ah, yea, I suspected a stack overflow as the cause of the crash. It's easy to make that mistake with so many wires so close together, as it's hard to see what all has been connected or mis-connected. Accomplishing this idea using only vanilla objects is quite a bit more challenging, now that you mention it. Here's something that could possibly work.

another approach

th8a
  • 46
  • 1
  • 1
    If that's unreadable to you, I wonder how much time you have spent in Puredata? That's kinda what stuff looks like in pd. – th8a May 01 '17 at 07:45