Forums > Max For Live

generating pitch bend

February 27, 2011 | 9:52 pm

anyone has any how to use xbend?
i seem to be doing something wrong.
i want to create a pitch bend (not from an actual midi controller but from
something internal to the patch like a live knobslider)


February 27, 2011 | 10:25 pm

You’re going to have to be a bit more detailed.

What’s not going the way you expect?
Have you checked the help file?


February 27, 2011 | 10:30 pm

yes, i’m basically not sure what kind of information i need to send to
xbendin. and how do i send xbendout out.
is it int or flo or whatever?
do i need to midi format it before?
what’s not going the way i expect (after various different tries)
is actually outputing the pitchbend.
(not through midi format not through midiout)


February 27, 2011 | 10:34 pm

i’m sorry if this is a completely obvious question but i’m a newb.


February 27, 2011 | 10:35 pm

check the help files. (option + click on object)

If the help files don’t send out midi, you’ve got a problem.

xbendout (and xbendout2) take integers in and send messages formatted for the midiout object.


February 27, 2011 | 10:37 pm

It’s confused me before. After all, noteout sends midi from max, but bendout just formats messages for midiout. But this is the way it’s always been.


February 27, 2011 | 10:37 pm

also, double click on midiout to set the port you’re sending from


February 27, 2011 | 10:40 pm

so can i create an int slider that sends values 0.-168383. to xbendout to miditout and receive a pitch bend in the instrument after the midi effect?


February 27, 2011 | 10:52 pm

I copied this from somewhere… Also I made a demonstration patch for you.

"MSB and LSB Don’t let this bit of technical jargon scare you off. MSB stands for Most significant byte and LSB stands for Least significant Byte. This data format is used when 127 values are not enough for the control. Think of it like a shortwave radio. The MSB sets the coarse tuning and the LSB is the fine tuning. Synths with very finely articulated knobs may send out an MSB and LSB, but most just send an LSB. You can tell by recording a knob tweak in your sequencer, then looking at the data in the event editor. If there are two sets of controllers, each with a range of 0-127, that’s what’s going on, it’s sending a MSB and an LSB. Don’t worry about learning hexidecimal code that the programmers have to deal with. Unless you are writing music software, all that stuff is a waste of time. Just remember, coarse and fine tuning."

– Pasted Max Patch, click to expand. –

February 27, 2011 | 10:54 pm

ps. copy that big block of garbledy gook, open a new patcher, and paste it in.


February 27, 2011 | 10:56 pm

To be clear, you can cut that long chord and you’ve got your high res pitch bend in and out. I just connected them to show you how it works


February 28, 2011 | 10:02 am

o.k i think i got it. this divides the pitch bend into 128 pieces of 128 pieces?
(it took a little time but in the end i just placed an operator with the pitch bend up to 24 st and saw if i hear the changes the lsb is making)

one little question. why is it that the msb receives input>/ 128
and lsb % 128?


February 28, 2011 | 11:00 am
– Pasted Max Patch, click to expand. –

February 28, 2011 | 11:06 am

Say someone gives you the current time number of minutes after midnight, and you want to display it on your digital watch.

The way to calculate the number of hours is to divide the number of minutes by 60 and round down.

The way to calculate the number of minutes into *the current* hour is by dividing by 60 and display the remainder.

To convert back, you multiply the number of hours by 60 and add the number of minutes.


February 28, 2011 | 11:22 am

Just for the sake of completeness:
if you don’t need/want the separation of coarse and fine tuning, you can simply use [xbendout] instead of [xbendout2], sending values 0..16383.

Here is the corresponding patch (adapted from Matt’s example).

– Pasted Max Patch, click to expand. –

February 28, 2011 | 3:18 pm

o.k so what’s the basic differences between the two methods?
if i use msblsb version i get more accuracy and less smoothness and
if i use the other method i get more fluid action but it’s less tone accurate?

thank the both for your help i don’t think i would have figured this out on my own.


February 28, 2011 | 3:42 pm

broc!!!

ok ok … wait. Now *I’m* confused!!! Perhaps this was the blind leading the blind and an apology is necessary.

If I open up xbendout.maxhelp, There’s an xbendout with a 127 step slider attached and it says, "Xbendout only changes the most significant byte of the pitch message." There’s a comment pointing to 64 that says "center point"

Then, after that it says "However, using xbendout with midiout, you can send messages which change both bytes."

Those two statements appear to contradict each other.

Furthermore the help file’s 128 step slider seems to be manipulating the least significant byte.

How does midiout tell if it’s a high resolution or low resolution signal?

– Pasted Max Patch, click to expand. –

February 28, 2011 | 3:47 pm

secdef,

my post might confuse you more than necessary. Not everything in max is this confusing.


February 28, 2011 | 3:56 pm

crap. just when i thought i was getting it.


February 28, 2011 | 4:00 pm

well wait… your patch works right? That’s all that matters.


February 28, 2011 | 4:05 pm


February 28, 2011 | 4:07 pm

So the help file appears to be incorrectly labeled.

Basically you had it right but the help file confused me.


February 28, 2011 | 5:55 pm

Yes, the help file for xbendout is obviously wrong.

But the actual behavior is correctly described on the reference page:

"In left inlet: The number is a 14-bit pitch bend value to be formatted into a complete MIDI pitch bend message by xbendout."


February 28, 2011 | 5:56 pm

GOOD TO KNOW!


February 28, 2011 | 9:10 pm

thank the both of you again!


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