generating pitch bend

Feb 27, 2011 at 9:52pm

generating pitch bend

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)

#55230
Feb 27, 2011 at 10:25pm

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?

#198776
Feb 27, 2011 at 10:30pm

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)

#198777
Feb 27, 2011 at 10:34pm

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

#198778
Feb 27, 2011 at 10:35pm

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.

#198779
Feb 27, 2011 at 10:37pm

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.

#198780
Feb 27, 2011 at 10:37pm

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

#198781
Feb 27, 2011 at 10:40pm

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?

#198782
Feb 27, 2011 at 10:52pm

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. –
#198783
Feb 27, 2011 at 10:54pm

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

#198784
Feb 27, 2011 at 10:56pm

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

#198785
Feb 28, 2011 at 10:02am

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?

#198786
Feb 28, 2011 at 11:00am
– Pasted Max Patch, click to expand. –
#198787
Feb 28, 2011 at 11:06am

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.

#198788
Feb 28, 2011 at 11:22am

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. –
#198789
Feb 28, 2011 at 3:18pm

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.

#198790
Feb 28, 2011 at 3:42pm

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. –
#198791
Feb 28, 2011 at 3:47pm

secdef,

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

#198792
Feb 28, 2011 at 3:56pm

crap. just when i thought i was getting it.

#198793
Feb 28, 2011 at 4:00pm

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

#198794
Feb 28, 2011 at 4:05pm

#198795
Feb 28, 2011 at 4:07pm

So the help file appears to be incorrectly labeled.

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

#198796
Feb 28, 2011 at 5:55pm

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.”

#198797
Feb 28, 2011 at 5:56pm

GOOD TO KNOW!

#198798
Feb 28, 2011 at 9:10pm

thank the both of you again!

#198799

You must be logged in to reply to this topic.