Forums > MaxMSP

How to create real-time harmony?

May 30 2009 | 12:27 am

I would like to create a simple harmony function for voice or instrument input.

Play/sing a C and the output is an E (or whatever interval selected).

To do this in real-time would seem to be complex, though perhaps there are some simple solutions?

eg, if I shortened the wavelength, I would run out of buffer to keep pace. Or, perhaps I only take snips of the input buffer and repeat those sections until the pitch changes?

Any thoughts/suggestions?

Is this a crazy thing to attempt? (not needing incredible quality)

Thank you for your help,

May 30 2009 | 1:09 am

There are a few MSP objects that do exactly what you’re looking for- take a look at gizmo~ and freqshift~.

In order to create "harmony" you will need to have multiple channels- one with the unprocessed "C" (straight from audio input) and others with the pitch-shifted manipulated input (the "E" you’re going for).

May 30 2009 | 1:16 am

You could use gizmo~ to pitch-shift the incoming signal, its very straightforward in terms of the fft patch involved, you can just copy the help file into your own patch.

Also check out the pitch~ and fiddle~ pitch tracking externals, they work well in real time.



I think the only thing you will find tricky is if you want the harmony to stay in a specific key or mode, rather than atonal, which is what the simplest arrangement would give you. It is definitely possible, just might take some experimenting.

One issue is always latency, but if you make sure to keep the fft size low and your I/O and signal vector sizes reasonable you should be fine.

Sorry I’m not sure what you mean about wavelength and buffer.

May 30 2009 | 1:28 am

Thanks for the great feedback and suggestions.

I’ll dig into freqshift and gizmo tonight and see how far I can get.

RE: wavelength and buffer – not worded clearly. I meant that shortening the wavelength to raise the pitch; but if I did this, then I would run out of sample and have a blank spot that would need to be filled in by something else.

Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP