Pitch visualizer with max and Blender + OSC

Forrest Mau's icon

Hey Folks,
I am working on a tool, wich sends me OSC messages from Max to blender (3D Software). So far i am able to use the amplitude of a signal to control parameters is Blender in realtime to generate visualizers. Because this works even better than excpected, i want to get on the next level, and also use other things than the amplitude to control parameters. The pitch of the signal as float would be apreciated.
I tryed with many different objects, like fiddle, retune and sigmund, but there are always the same problems. Especially sounds like guitars getting too many wrong interpreted tones wich are way too far away from the actual pitch.
Dont get me wrong: it absolutely doesnt have to be precise, but it should visually represent what you can hear, and if the value breaks out to far its really irritating to look at.
I know my question is kind of inaccurate, sorry for that :). But if anyone has experience with stuff like that, every hint or tip can help. Is there maybe for example an object that filters out values, if they are too far away from the value before? I am too new to Max to figure out the possibilitys. Maybe you can help me with that.

Here is the super ugly patch so far:

Max Patch
Copy patch and select New From Clipboard in Max.

Sorry for the mess, like i mentioned i am pretty new to max.

Ty

Forrest

Andy Maskell's icon

I can't really help much with what you are doing other than to say that guitars are probably the most notoriously difficult instruments to detect pitch from because of all the transients and harmonics they give off. Worse still, if it's an electric guitar put through effects units. Even the type and position of pickups can make a big difference. It's why MIDI guitars/pickups have never really taken off.

It is worth a bit of "spring cleaning" in a patch sometimes. Max doesn't always follow the lines of the connectors in the way that you might imagine, especially when you have metro and other interrupt driven events in the patch. Bear in mind that Max usually processes things from the bottom right to the top left so even moving objects to the left and right of each other can make a difference to the order in which they are processed in time (and thus frequency) critical patches. Even a single object with multiple outlets usually blurts out the output messages in the opposite order (right to left) to what you might think.

If this might be significant, I suggest you read and work through:

Tutorial 5: Message Order and Debugging

As a simple example, paste this little patch into a new patcher window. Hit the bang button to start the metro. Then pick up the *10 object, drag it around to different positions relative to the /10 object and see what happens to the result in the message box!

Max Patch
Copy patch and select New From Clipboard in Max.