Forums > MaxMSP

poly problem …so close!


d.
October 26, 2009 | 2:11 pm

Hello, I am going nuts!

I have developed a program to trigger audio samples from pre-determined scale. The scale covers microtonally tuneable notes over a span of 5 octaves.
For instance, if the user detunes the mi-flat number, mi-flat will be detuned in all 5 octaves. The user can, then choose from many temperaments. The user can also choose from a multitude of scales which turns some notes on and some off. (if the user plays notes not in the scale, they do not trigger sound.) The input comes from a fiddle~ object. The program acts and functions as the sympathetics on a sitar do. (all this stuff works and is brought over from the first release of this program)

I am in the process of converting my simple voice activated sampler to a poly-phonic sampler in order to use FFT based pitchshift without overloading the CPU.
Right now I have twelve poly~ objects, each with five voices, one instance for each octave (just because I am too thick in the head to come up with anything more elegant.)

My poly~ has receive objects for the key (in hz), the input from the fiddle object as a stream of midi floats and the tone as cents (i.e. re=211 mi-flat=302). I am using thispoly~ to figure out the midi float each instance is "listening for" and the frequency to play the sample at for each instance of the patcher. (btw, I have the speed based poly~ object running on this program and it seems to work ok) The problem is that it is not properly muting, so when I use the FFT based version of the poly~ it craps out (I know I am doing the FFT pitchshift part right too because I can turn off all but one of any of the notes to get the CPU load down and it pitch shifts accurately. I am using a mutemap message on one of the poly~ objects so I can see that it is not muting. I have tried to attach muting to the line object and the onebang object. When the onebang goes off, the sample is triggered, begins to play and a mute 0 message is sent to thispoly. When the line object finishes it’s envelope, it sends a bang out it’s middle outlet to a mute 1 message to thispoly.

***This poly~ object doesn’t use the typical note on, note off messages found in synths intended for midi controllers so I can’t see how to implement busy and not busy states, nor can I figure out why I need them. I am thinking that these are integral parts of the way poly~ is intended to work. I have been over and over the tutorials and I can’t see why my implementation won’t work and I think I am missing something due to this project not being a typical controller based synth.

I would be happy to post this patch if anyone could help me.
I am losing it.

Thanks in advance.


October 26, 2009 | 4:49 pm

Posting your patch is the way to go, then we can see what your problem might be. If you’re worried about sharing it perhaps take all the non-relevant bits out first, then no-one can steal your ideas!

lh



d.
October 26, 2009 | 11:24 pm

Here is that poly object.
I don’t think anyone wants my broken synth.
Your point is well taken, however.

– Pasted Max Patch, click to expand. –


d.
October 28, 2009 | 3:53 pm

Is there some reason why a line object performing an envelope (up and then down) would not send a bang from it’s second outlet when it got back to zero?



d.
October 29, 2009 | 5:48 pm

The onebang object doesn’t work while the instance is muted. That’s why this doesn’t work. I guess muting within a poly~ object is more absolute than I thought it was. It looks like I need to trigger the note from outside the poly~ if I want it to mute when not busy. I am going to re-design this patch with two poly objects, one will have constant dsp and the other will mute when not in use.

It’s always nice to have these conversations with myself in public.

I told you I was losing it.


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