Optimising pitch~ for theremin use (Midi Smooth)
I’ve been using my theremin to trigger midi notes, and send those to a vst. I’m mostly interested in using this with kontakt, but other vsts could be useful as well. Anyway, the results are somewhat unsatisfying so far. Basically its the fact that midi output only allows 127 notes, which is hardly enough information for nice vibrato or anything, all I hear is lots of staggering.
I’ve tried a few different approaches to solve this, for instance, I truncated the decimal values that pitch~ produces and sent those as a pitch bend (with the maximum bend value being the next note) to try and fill in the missing values. It ended up sounding too wonky. I also tried a few portamento patches on a couple different vsts, but while that smooths it out, it makes the triggers somewhat unresponsive.
I know I could just set up another control surface and use that for modulation/portamento, but that kind of takes the fun out of playing a theremin. So does anyone have some ideas on how to send more detailed midi information, or something of that nature?
p.s., the main goal I’m trying to achieve is to be able play the theremin and trigger some wine glass samples I have for kontakt 3.
p.s.s. while this is for the same purpose its very different question. I was wondering if maybe using a phase vocoder, or some other technique to imprint the original theremins signal onto the vst generated signal could help me get the sound I’m after.
any help would be greatly appreciated.
Why do you need to convert the theremin tones to midi if all you want to do is trigger samples from it? Maybe I don’t understand how you’re triggering the wine glass samples. Is it just a simple trigger, like:
When the theremin hits middle C, trigger wine glass sample.
If that’s the case, then pitch~ is already giving you all the information you need. Keep all of your processing in the MSP audio world, and use thresholds (i.e. < ~ and >~) to determine when the theremin has passed a particular note, and then use change~ to generate a bang accordingly.
Converting theremin tones to MIDI pitches seems like a bad idea. A theremin is inherently continuous (with respect to frequency changes), whereas MIDI is inherently non-continuous, like a piano. Unless you have a compelling reason to work in MIDI-land for this project, I’d stay away from it at all costs.
swieser1: the reason for using midi, is the large number of variations I can make to the sound, as opposed to just the original theremin tone. I don’t know if the fact that theremin is triggering notes constantly is entirely a bad thing, since it eliminates the need for an envelope follower, as midi note On is always true, unless of course the note changes, then a single note off is sent.
That part isn’t the issue though. Its really the fidelity thats troubling me, I mean, I can see that pitch~ clearly is interpreting more data than midi allows me to send. I want the note 50.487 instead of simply just 50.
Oh, and its the continuous quality of the theremin is the reason I’m interested in this project, as I’d like to use samples in a legato/portamento way. Konkakt 3 has a nice built in portamento script that allows me to crossfade samples while bending them and such, so I think its a promising start.
It sounds like you’re trying to recreate your theremin performance with the samples rather than using certain MIDI notes to trigger/process/manipulate the samples in other ways. Or am I misinterpreting what you are trying to achieve?
well.. recreating the performance using samples is the idea, yes, but I was thinking of bending the samples and crossfading between them in such a way as to result in a smooth sound. Instead of it being like a took my finger and ran it down the length of a midi keyboard.
its worth mentioning that the sound I’m after is not wildly different from the theremin sound, so the samples could be fused together with the original signal, that might give the certain smoothness I’m looking for.
I’ll try and clarify a little more; see, if I were play a note in vibrato on the theremin, the sound would fluctuate (lets use note 57 for this example) would fluctuate between 57.000 and 57.999, then this would cause the sampler to trigger only one note, and THATS where I’d like to have more detail. Some method involving pitch bend to send this extra data into a sampler seems reasonable, but I’m open to other suggestions.
Ok, well I don’t have the file here, but I could explain it to you. what I have it pretty simple so far. I’ve only just started working with MaxMSP, and I really only started testing my pitch bend theory.
basically, I take the float pitch data out of pitch~, ignoring the amplitude, as it is set to always on. I send a midiout function with the integer value 80 for the amplitude.
then I have a box where I store the current pitch in integer form, and I subtract the integer from the float to get the decimal value. (like 32.333 becomes 0.333) then I multiply the decimal value by 20 and send it through a bendout.
I tried multiplying it by more than 20, and when I raise the pitch of the theremin it kind of sounded like an engine revving up.
anyway, I also have a few gates here and there, one for if the integer pitch is great or less than the stored value, with the eventual plan to send a noteoff if thats the case. But its not functional yet.
well, thats it.
Ok, heres my code so far.
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 595 321 140 9109513 note:;
#P number 598 365 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 721 286 140 9109513 bend:;
#P comment 608 98 140 9109513 float pitch (insert):;
#P comment 667 128 140 9109513 int pitch:;
#P comment 738 150 140 9109513 store pitch:;
#P flonum 700 358 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 739 334 33 9109513 * 90.;
#P newex 654 218 27 9109513 – 0.;
#P flonum 717 307 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 610 115 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 616 240 27 9109513 gate;
#P newex 617 214 27 9109513 ==;
#P number 741 175 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 696 244 27 9109513 gate;
#P newex 700 208 27 9109513 >;
#P number 670 148 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 730 409 49 9109513 bendout 1;
#P number 721 382 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 587 340 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 575 391 55 9109513 noteout k 1;
#P connect 10 0 1 0;
#P connect 10 0 12 0;
#P connect 10 0 4 0;
#P connect 7 0 8 1;
#P connect 7 0 5 1;
#P connect 4 0 8 0;
#P connect 4 0 12 1;
#P connect 4 0 5 0;
#P connect 4 0 6 1;
#P connect 1 0 0 0;
#P connect 19 0 0 1;
#P connect 8 0 9 0;
#P connect 12 0 9 1;
#P connect 5 0 6 0;
#P connect 13 0 14 0;
#P connect 9 0 11 0;
#P connect 14 0 2 0;
#P connect 2 0 3 0;
#P connect 11 0 13 0;
#P connect 6 0 7 0;
#P window clipboard copycount 21;
I forgot to mention, in my current version, it only works when the pitch is on its way up, the current pitch has to be higher than or equal to the note being stored.
Using MIDI pitch bend messages is completely unnecessary if all you’re trying to do is detect the pitch of a theremin and trigger samples off of it. If you know the pitch of the sample, you can manipulate it by playing it faster or slower. I still don’t understand why you need to go through the intermediate step of converting everything to MIDI.
I’ve written a little patch that mimics an audio signal with MIDI note and pitch bend changes. Have a look and see if it can help you. Everything going in to the [cycle~] object is my theremin emulation so you can just hook your [adc~] straight into [pitch~] if you want to use your actual theremin. If you want me to explain what’s going on then just ask but you should be able to figure it out if you poke around a bit.
The vibrato sounds smooth when the bend does not cross over to the next MIDI note. Similarly, the portamento sounds better the less notes you pass through although I imagine you can fix these sounds if you apply crossfading, like you mentioned in your earlier post.
Oh and ignore the [lh.keys] abstraction. Its like [notein] but using a laptop keyboard rather than plugging in a MIDI controller keyboard.
----------begin_max5_patcher---------- 3359.3oc2cs0iaaiE94I+JDL5tHIcxrh5t1GVfYxs1saZBxLncAZWDPKSayN xjtRTYxjh1e6KknjEksrMGaJF29PzXQRQcNemK7PxCU9sGc1nwzOgxGY8Os9 IqyN62dzYmUUTYAmUe+YiV.+TRJLupYixSwSPYiNWTEsfkhXr6WhD8wnQV+u 5pVBYIywjYeHCkvD055Yeg84V.fe0eD24vut5gHEKvDdOV8t.sEJdOcJEOoh dni+kmE5Oprre+QOp7x4lfSBipXgf.MyIdGBmjPWr.QXMrBC8oJxbzUW98u1 5Muz5Ue66u9llZmRILBbQEaN5xLLLcz14S+PfPhI3SaO03yx2QN9yUuCfC+Y 5i8s6g8c0I6yJxHVzoSsfooVu4aew2ZQnLt19g.DffvRV20UfGN9CLP.zIPT w6XRNKqPt9GD.DDKrcCqTAhGX9OHVm7+GwiyfLp0DzR17Ch6ciExcuJtOxdf 49fgf64WPGFy6UIsicKuFDOv7tV8.tjlwfk0PsX3EGF663Hz7cpTAhiFX929 P3eB5N9CuA6i25naXNXshAdXdBCEiEDToTvu5uK3v4g.G8LfnuNgCl0TqwaE RllRgbMHqQigjYGJ33GK7STYq3tGv4Aoq3rI3.NHuj7tcbabObxAunXgr1Xu JKafK79r4AA111GlkkqDZ4qSup8gVQGBZMtfwnjspzzES5abSag4harH9glq GYfhdQZ0tHLd.7Tzv5hPFDQNoIwaeHBPiHxWaAFN.wATMFhqyv55z8fbcVFg Xwn83In5eJfAXFZQ8rKGcYBsHmgSJe1WmAISJ+w6vPBs7GmWd4pL7r4Uu.4F 2sMuLkCmY6ra9FJ416e1M7q69wapArqJcV0qvrk43j4zrIq5smmB+HlfXsEf RQ4L3p6ecJM4VDIeIFktpv2TjKdGWwkDME9CkQosbNkfZaGLCuXbam8euOk1 sE2TL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lU5EpTHUOPce.nTcG.p+uomnU2crhUkT0 7MK.pRfMQ1lml1WLoqY2tWZJPHUqyyUO+16NRpMRonUcMaPOpLvYPj4oo8NS Cy5TyUkfn8M6v4AN52k1wFWuJZSlMNLfRS0vrvDHP0HwL3DWUQ1AbeXzjHdv 5rIHNX0MFiVMnLs76I99HIfgiDSEcefg08UJx9PySS.UnIyYOFnR.qwlUGOV kQAcLaLfNJMaCGySS.UnIfYoIGMiSt9UN38DYEkKHX0cGafDwCfT0w1aXnVe mAHtm5YWJ9ODw5IWFe7yBwSowNsOFiX9M+9i9+Tc7V+E -----------end_max5_patcher-----------
ben romvari schrieb:
> Basically its the fact that midi output only allows 127 notes, which
> is hardly enough information for nice vibrato or anything, all I hear
> is lots of staggering.
If you are serious about your instrument, its maybe time to ditch Midi
based synths. I don’t know of OSC based plug-ins which could maybe get
around that problem, but why not do all in Max. As fiddle~ or pitch~
pull out the whole continuum, it would be a waste to map it to a
keyboard oriented technology…
Building a monophonic synth isn’t too hard, and probably needs less time
than figuring out how to trick Kontakt. Samplers aren’t a problem
either. You have to think about and design the trigger points of your
sounds but within Max anything is possible…
ben romvari schrieb:
> Ok, heres my code so far.
Here is my way to get the fractional part of a float, I’d use +/-
----------begin_max5_patcher---------- 1192.3oc6Zs0iiZCE94jeEr7ZyhrM1foOzeF8kUUibBNYnk.Qfyzoc09euFa HwNAx3bmcTmQhj3K3uy24hsO578oS7mW9Nu126W89l2jIee5jIplZZXR6um3 ul89hbVsZX9E7+tb9e5OS2kf+tP07FuprBQWyKKKDEr0bUW+NuJkUv55qX65 rhbtP85PsMtgIV7ZVwpWp3KDZ3fgAfYdPDo4iHTySDH.38GFqQc1+pVCXyX2 85K2JN78qaR7Oa35WtuBrd9KyKYx0q6clkpPrT.+JJx2Da7pVNokTjqeVN+M dUcVYgBByZaeuD.A.kHfwJQ.q9ElZHDRxdUd4h+hqVWPWio7km2aobCuX+LT iv5g8HyJ1Twq4EBlnE7lqLaat3k9IW69WxVvGbxC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nvNw7.gs2bZ9A4yzTbH9 +ui9glVZx9I3mGapLTCvNwhZcygaf1pgNZiSqsCGZOSqDDb79k8uW4QlKtBo 3wGjNX45GS3GOjfe.jfWAjj+3GS+Ot4iGEB -----------end_max5_patcher-----------
Thank you for all the replies! Those last to programs should probably get me on my way.
Some of you seem pretty adamant about me using purely max as my sampler. While I find this idea interesting, considering my current skill level in max, and this being my first project (I’m doing this for my own purposes, I’m not a student or anything.) it seems like it would be imprudent for me to take on the task of building a sampler, especially one capable of portamento, several velocity layers, and unique samples depending on pitch. Still, its not totally out of the question, so if anyone has advice about it, I’m all ears.
I would advise you to do whatever achieves the results you want. If you are more comfortable with kontakt then there’s no reason not to use it. I think the point people are trying to express is that the possibilities of using max are almost limitless. I’m not familiar with kontakt but I assume you can achieve everything it is capable of with max and you can add to it and tweak it to your heart’s content. If you are just starting out with max then go through the tutorials and examples and have a route through the list, there’s no better way of learning than giving it a go. People here will be all to pleased (usually!) to share their knowledge and help you out if you run in to problems. If you do decide to delve a little deeper into max programming I think you will find it rewarding, if a little frustrating at first, good luck.
Forums > MaxMSP