Measured Chromatic Scale Pitch Bends: A Detailed Explanation

Discuss all things music related! Need help with that chord? Song progression sound a little flat? Pitch bends a mindbender? Just wondering what else there is to learn? This board is for you!

Moderators: nZero, Willow

Measured Chromatic Scale Pitch Bends: A Detailed Explanation

Postby Solaphar » Mon Mar 23, 2009 8:54 am

Edit: Many thanks to The_Epitome for title, intro, and summary.

Introduction
This will explain how you can make an instrument move up and down scales using just pitch bend, and the magic of MIDI!
Possible scenarios for this might be = ... (e.g. if you want to emulate a guitarist doing that fretty thing or whatever it is)
First I'll say a bit of theory, then how I worked it out, and then go on to demonstrate it in practice.

Introduction Continued (Sola's text starts here)
Well, I looked around here and didn't see any information about this subject, so I thought I'd craft a little tutorial/discussion about it, and then give a boring lecture on it for the next half-hour.

By the way, I use Cakewalk Music Creator 2003 when I'm working with midi events (Anvil Studio when I'm not), so all of the following screenshots will be of the Cakewalk program. Therefore, I don't know how well (if at all) my tutorial will translate into your own sequencing program.

Oh, a word of warning, for those of you who already know a bit of music theory (I imagine most readers here already do), a lot of this will sound incredibly familiar. So you can just gloss-over/tune-out those parts when I get to them.

Alright, here we go
Up until December of last year, I had no idea how to do pitch bends.

Even though, prior to that time, I had attempted to sequence music with pitch bends, I never really had the motivation to truly try and figure it out until I came across a certain song which I really wanted to sequence.

This particular song has sliding and hammer-ons in the bassline. Stuff that I was surprisingly not used to. Surprising because I'm a bassist, although I hardly practice it these days, so that might explain my lack of familiarity. And despite this, I still have the audacity to call myself a bassist, heh.

Anyhow, this song that I really wanted to sequence (and am still in the process of sequencing... it's getting there) finally gave me the motivation to learn pitch bends and so, after looking at various midi files with bends, I did some trial-and-error, crunched some numbers, and came up with a nice equation.

Pitch Bend Equation
Image

Now I'll tell you what this means in just a minute, but before I do that, I need to explain some things.


If you look at the events list in a midi file containing pitch bends, you'll probably notice that it's full of all sorts of events. In Cakewalk, for instance, the events are color coded: black for notes, reddish-pink for controllers, RPN, and light-blue for changes in the pitch wheel.


In this first screenshot, I have "RPN" selected. Using the Kind of Event window, I can change this event to a different kind of event. I'm not going to though, since it's already an RPN event like I want it to be.
Image


If you'll notice in this next shot, under the 'Data' column, I have selected the value 0 (zero). This will make your generic RPN event into a Pitch Bend Sensitivity event so you'll probably want to set it at zero too (that's why you're reading a Pitch Bend tutorial, isn't it?), and I'll explain more on this later.
Image


In the screen shot below, the value which I have highlighted is what I refer to as the as P variable. It's the same "P" as in the PBE (pitch bend equation) above. Why did I choose to refer to this value as "P"? Answer: Pitch bend. So, in this example P=2048
Image


In the following screenshot, I have selected the t variable. In this case, t=512, and I'll explain this next.
Image


Now, what is so special about the 't' value/variable anyway?

Well, the 't' value, represents the increment of change of one Half Step, also known as a Semitone, on the pitch wheel.

A semitone, is one twelfth of an octave. In other words, twelve of these semitones, one after another, make up what known as the chromatic scale

Now, I don't know about you, but I like the chromatic scale. I like it a lot. When I am working on music, I think in terms of the chromatic scale. Diatonic scale? No thank you sir, not for me. Sure, need it for understanding all those modes (Aeolian, Ionian, Phrygian, etc) But when I'm sequencing, thinking about modes feels like more trouble than it's worth to me.

One reason that I like the chromatic scale is because the distance between each note on the chromatic scale is, logarithmically, the same (err, for the most part). Also, it's easier for me to think in terms of the chromatic scale, especially since my electric bass is divided by its frets into half steps.

Also, half steps are simply the best starting point from which to do pitch bends (yes it's just my opinion).

You can, and should, use fractions of a semitone when necessary. Fractions are good for stuff like, trumpets, trombones, other brass stuff... ok so I can't think of any more off the top of my head but that's a good start, right?

Back to the PBE: Quick Review

P=your PBS (Pitch Bend Sensitivity) value (highlighted in the 3rd screenshot above).
t=the value of a semitone for a Pitch Wheel event (highlighted in the 4th screenshot above).
2^(20)=is a constant equal to 1,048,576

So this pitch bend equation is actually pretty easy, right? Just two variables and a constant. Speaking of the constant, if you don't like how it's written, you can also try writing it as
Image or Image

Personally I prefer to remember it as "two to the power of twenty", but just go with whatever you personally can remember.

One more thing you should have noticed by now, is that, since 't' is inversely proportional to 'P', (yeah, I know it's obvious), you can just switch the P & t variables of the equation, and it's still true:
Image
Anyway, this equation, where you solve for t, instead of for P, is actually the one you'll use most often. If you're plugging in different PB Sensitivity values, you'll probably want to know what the Pitch Wheel Semitone value is going to be, after all, and how many octaves a specific P value will make available to you.

Hey, I respect everyone's intelligence (even though I may not sound like it in parts of this tutorial). Some midi sequencers start when they're like 12, and if they see this, I want them to notice it too, because as obvious as this is to most of us, it's good if every sequencer notices.

Here's one final way of thinking of the PBE:
Image
Since P multiplied by t always adds up to the same constant, 1,048,576, it can be a quick way of double-checking that you have the correct t value for a given P value (and vice versa). Like, hmm, is a 't' 682.67 correct for a 'P' of 1536? Well, 700 times 1500 equals 1,050,000, so that's probably right. :D

What values for P are possible?

It's possible to set P to any number between 0 and 16383. That's said, values ranging from 128 to 3072 are what actually make the Pitch Bend Sensitivity event useful and are the values affected by the pitch bend equation.

0-127
Any value of P between 0-127 will simply negate all wheel movements. In other words, there will be no bending at all, even if you have a bunch of wheel events. Obviously, it's pointless to do this because you will have simply rendered all of your fancy wheel movements useless, thereby making them a redundant, unnecessary waste of space. Kind of like me, hahaha.... =(

128-3072
As already stated, these are the values which are actually useful to us sequencers, however there is one exception, as I'll explain in the next sentence.

256
256 is a special value. At a P value of 256, the t value for a pitch wheel event is set at 4096. The thing is, this is the same value of a semitone even without the PB Sensitivity event, so it's the same as if the Pitch Bend modifier were not even there.

Just as a P value of 0-127 renders all wheel events useless, in a way, the 256 renders the Pitch bend event itself useless. This of course assumes that you only use 256 throughout your whole song. If you were to change the Pitch Bend Sensitivity to 256 from some other previous value that you placed earlier in your song, then 256 would be useful for you. Personally, I've never done this since I only ever need to use one sensitivity setting for the whole song.

3072-16383
At 3072, you can bend a note 4 octaves (-8192 to 8191). Any P value above 3072 (3073-16383) is still the equivalent of having your PB Sensitivity set to 3072. Doesn't matter whether you set your P value at 4096, 8192, etc, it's still the same as if it was set at 3072.

So, four octaves is all you get in midi. And honestly, do you really need to bend more than that? I'm not sure I'd even want to listen to a note that bends more than 4 octaves. =)


RPN Data Value
Remember that RPN value under the 'Data' (if you don't go back and look at the second screenshot again). Well, even though this isn't all that important, in my opinion, I thought I'd share what I know about it. (actually, I'll finish this part later)

Pitch Wheel Event Values
Well, we've established that t is a half step. But what about other values? Well, all we need to do is use multiples of t.
If you'll look back at any of the first four screenshots, you'll notice that it has pitch wheel values descend from 3584 on down to 0. If you'll recall, the "t" value in that case was 512 (due to the PB Sensitivity value of 2048). That means the G 3 actually starts 7 half steps higher, at a D 4, and descends to a G 3 in approximately and a quarter note of duration.

But wait, why end it on a zero?
Well, this should be pretty obvious. It sounds better!

Allow me to elaborate- if the note being bent terminates the bend at zero, then you don't have to worry about squeezing in another pitch wheel event with a "zero" value before the next note comes in right after the one you were bending (what I will refer to as 're-zeroing'). What this means though, is that, in order to make a bend that ascends in pitch, you'll have to start at a negative pitch wheel value to raise your pitch (as opposed to starting at zero, going to some arbitrary positive number and re-zeroing at the last possible millisecond (I see this a lot *facepalm*).

Also, ending on zero prevents your note duration from being less than the full amount that you want it to be (re-zeroing can make it 959 instead 960 ticks). Yeah, it may not seem like a huge difference, but some people use timing set at less than 960 ticks for their quarter notes. If it's made short enough, then it can make an audible difference!

Now, granted, this it isn't always possible to avoid re-zeroing, but the only instance, as far as I know, where you won't be able to end at zero is when you're bending a note more than two octaves before terminating it (as P value 3072 will give you two ascending octaves for -8192 to 0, and two descending octaves for 8191 to 0).

Here are a couple of pictures demonstrating improper re-zeroing and the proper solution to it. (persons who's work is used as an example shall remain anonymous)

Notice how, in order to descend in one octave in pitch, the person chose to start at zero and use negative wheel values, and then they had to tack on a zero at the end:
Image

Next, this is the same motif (albeit, in a different section of the song), but I've tweaked it to start at a positive value and arrive at zero.
Important: In the picture below, please notice that the note being bent (selected inside the red box) is a C3 and not a C4 as in the previous picture. In both cases, the bend starts at C4 and ends on C3, but since the wheel events below end on zero, then they consequently must end on a C3. So, C3 must be the zero value (whereas above, C4 is the zero value).
Image

Let me give an example of this:

A P value of 2560 sets the 't' variable at 409.6. Unfortunately, decimal values can't be entered for events. So, what we will have to engage in is known as "rounding."


Rounding!

Actually you should know how to do that already if you're old enough to use a midi sequencing program. That said, there's a (not so commonly known) standard technique if you should arrive exactly on a .5 value, and that is to round to the nearest even number. So, if you get 402.5, round down to 402. If 403.5, then round up to 404.

So, instead, I'll just put up a picture instead to illustrate fractions of a semitone. In this particular screen shot below, the wheel events are divided into 50 cent pieces (50 cents being half of a semitone). The total amount that the note is bent is 3 octaves.
Image <---The image is too long to thumbnail, So you have to click a link instead. =/

Please notice how I wasn't able to terminate the note on a zero, but instead on a 6554. And the when it repeats (more quietly), it has to jump back down to -8192. Here's a midi of it.


Summary:
So basically all you need to do is enter RPN values (this and that) and then to bend up a semitone you move it up 50 cents, to go up an octave it's 650, etc.


F.A.Q.
Q)So, how'd you figure this stuff out?
A)Trial and error. Opened a few midi files that had different PB Sensitivity values, and then just did some experimentation and calculations using notepad and calculator. I still have the notepad file that I used as a scratchpad and it's here if you want to read it - have fun deciphering it.

Q)Why should I only use whole 't' values for things like guitars? (Edit: thanks to HyperX for pointing out my ignorance here, wish someone had done it sooner so I wouldn't have looked like a fool for two weeks, lol)
A)You shouldn't. On fretted guitars, when you fret a guitar note normally, you will move in only semitone increments, however guitar strings can also be pulled to the side and oscillated (for vibrato) by the fretting hand, giving fractions of semitones.

Q)So, I can use wheel events to make my instruments sound out-of-tune?
A)Err... yes, but... why would you want to? Sure, it might make your instruments sound slightly more realistic, but there's a danger of over-doing it and just ending up with something that sounds quite unpleasant. O_o


Well, that's it
(I'll go back and finish that one section later on RPN 'data' values later.)

I welcome comments and criticisms. Please let me know if I got anything wrong (I'm still quite a n00b when it comes to events) and ways that I could improve this, such as any ways I can say things/describe things differently. Like I previously mentioned, I haven't used any other sequencers except for Cakewalk (and Anvil Studio) so I don't know how well (if at all) this information can be adapted to one's own sequencing program.

Also, if this has been helpful to anyone, please don't hesitate to say so. If this helps even one person, then I'll have felt it was worth it for me to have written it.
Last edited by Solaphar on Tue Apr 21, 2009 1:10 am, edited 12 times in total.
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: A Brief Pitch Bend Tutorial

Postby Solaphar » Sun Apr 05, 2009 10:43 pm

In retrospect, I'm guessing that almost everyone who frequents this forum already knew how to do pitch bends. It only now occurs to me that I must have been the last person here to learn how to do them, lol. Still, I never saw any tips about how to do pitch-bending on the forums before, so I thought that writing this guide would be worthwhile, in case there were others like myself.

But, I'm already regretting it. I still don't know how well the advice translates into other sequencer programs, and I don't even know if what I wrote was 100% correct, and most of all I don't know if this has even helped anyone.

So, basically, I'm just curious about some things:

1)Is anything in this guide wrong/incorrect?
2)Is there anything that isn't understandable or could be rewritten for more clarity?
3)Is there anything I left out?
4)Does this information work in your own midi-sequencing software?
5)Have you, personally, found this guide even slightly useful?

If anyone can answer any one of these questions, you can just PM me privately, no need to post in this thread.

It's just kind of disheartening that after two weeks, I've gotten zero feedback about this tutorial (neither negative or positive). Even negative comments that can help me improve this tutorial are welcome... I'm desperate for something... anything, lol.

Please PM me. =(
Thanks.
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: A Brief Pitch Bend Tutorial

Postby HyperX » Mon Apr 06, 2009 12:58 am

I have to say, if you think a fretted guitar can't move in fractions of a half step, you clearly have not listened to David Gilmour.
HyperX v2 - Now with sequencing!
HyperX
Member
 
Posts: 556
Joined: Mon Nov 14, 2005 2:38 pm

Re: A Brief Pitch Bend Tutorial

Postby The_Epitome » Mon Apr 06, 2009 5:49 pm

Solaphar wrote:It's just kind of disheartening that after two weeks, I've gotten zero feedback about this tutorial (neither negative or positive). Even negative comments that can help me improve this tutorial are welcome... I'm desperate for something... anything, lol.


Well, you've obviously spent a great deal of time - I have to be honest, at first I thought you'd copied and pasted from another site! Thank you very much for going to the effort!
I'm sure this could be useful for some people and therefore will make it a sticky.

EDIT: as for any feedback, it may come across as a bit of a self-discovery piece of writing - that is, acting more as a journal for the way you worked it out than a guide for newcomers. So I suggest perhaps having a quick introduction, or 'quick start' guide, and perhaps section headings so that if somebody has a particular problem to solve they know which part to read (since there's quite a lot there).
Bear in mind that most people will only want to know how to do little, simple, unmeasured pitch bends, so to be precise this guide is for how to do an entire chromatic scale in pitch bending.

If you want an example of this sort of pitch bending in action I might recommend my Gambit MIDI from Spiderman vs. X-Men ( http://www.vgmusic.com/music/console/ni ... Gambit.mid ) - it's chock full of that sort of thing. Not to be listened to with Quicktime, though, which tends to really mess up pitch bends.
This is the online avatar of Sam Wolff.
Image
User avatar
The_Epitome
Update Staff
Update Staff
 
Posts: 600
Joined: Tue Aug 02, 2005 4:41 pm
Location: Leamington Spa, UK

Re: A Brief Pitch Bend Tutorial

Postby Solaphar » Tue Apr 07, 2009 3:34 pm

HyperX wrote:I have to say, if you think a fretted guitar can't move in fractions of a half step, you clearly have not listened to David Gilmour.

You're absolutely right, I never have listened to him (until now that is, since I'm currently listening to a google vid of him playing on another browser tab). Honestly, I don't have a wide exposure to music (a personal choice). 99% of what I listen to is either video game music or J-pop (these days, it's mostly the latter). I have listened, and still occasionally do listen, to mainstream western music (rock, jazz, etc.), but I always get bored with it quickly whenever I do. Also, I have a bass-playing friend who's into punk, so he sometimes shows me youtube music videos of the punk songs he likes. Yeah, it's sad that I have such narrow tastes, but those are my personal genre preferences and I doubt they'll change anytime soon, so what can you do?

Also, I wasn't thinking about string-pulling and also the oscillating technique on the fretting hand for doing vibrato on guitar. Honestly, I've only ever played 4-string bass (and piano), not guitar, and I'm still very new at bass-playing and so far, I only just fret the note, and don't pull the string to the side or do vibrato on bass, none of that fancy stuff yet. Yeah, these all sound like excuses, but I'm just trying to explain why I wasn't thinking of fractions of chromatic tones on guitar. That said, I'll go back and try to reword the tutorial in order to take into consideration that excellent point you brought up.

The_Epitome wrote:at first I thought you'd copied and pasted from another site!

Ow, that's pretty harsh dude, but I did indeed write this, in my own words, and without ever reading a single article about pitch-bending.

The_Epitome wrote:EDIT: as for any feedback, it may come across as a bit of a self-discovery piece of writing - that is, acting more as a journal for the way you worked it out than a guide for newcomers. So I suggest perhaps having a quick introduction, or 'quick start' guide, and perhaps section headings so that if somebody has a particular problem to solve they know which part to read (since there's quite a lot there).

Edit: Actually, I don't quite know how to go about doing this. I thought having the background was semi-important so if I got stuff wrong people would understand why. "Hey, that guy was totally off on that one section. Oh wait, nevermind, he's n00b at pitch-bending, that's why he got that part wrong."(flame-dodge +1)

If possible, do you think you might give me one or two more suggestions about how to organize a quick-start guide? I kind of consider all of the information important, and I thought the order I wrote it in was pretty logical.

The_Epitome wrote:Bear in mind that most people will only want to know how to do little, simple, unmeasured pitch bends, so to be precise this guide is for how to do an entire chromatic scale in pitch bending.

You suddenly lost me. Sorry, I'm kinda slow sometimes. I'm guessing you mean wheel events that don't use a Pitch Bend Sensitivity value, right?

The_Epitome wrote:If you want an example of this sort of pitch bending in action I might recommend my Gambit MIDI from Spiderman vs. X-Men ( http://www.vgmusic.com/music/console/ni ... Gambit.mid ) - it's chock full of that sort of thing. Not to be listened to with Quicktime, though, which tends to really mess up pitch bends.

I see, and it has lots of panning too. Personally, I get annoyed with that sort of thing quickly if it's overused though. Luckily the panning is only slightly annoying to me, as it doesn't oscillate from ear-to-ear fast enough to be bothersome.

I myself, don't actually have a lot of experience using pitch bends. I have only sequenced two songs that have pitch bends. And one of them isn't even done (the other one technically isn't done either, but it's just a guitar part I need to tweak.)


Oh, I question that I still would like the answer to is, how well does this guide work in other sequencers? Is there any way that I can rewrite it to be more universally accessible to users of any sequencer program?
Last edited by Solaphar on Wed Apr 08, 2009 11:47 am, edited 2 times in total.
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: A Brief Pitch Bend Tutorial

Postby The_Epitome » Wed Apr 08, 2009 7:01 am

Solaphar wrote:
The_Epitome wrote:at first I thought you'd copied and pasted from another site!

Ow, that's pretty harsh dude, but I did indeed write this, in my own words, and without ever reading a single article about pitch-bending.

Well I didn't mean it as an insult... quite the opposite...?

What I'm thinking of in terms of piece structure is this:

Well, the title is wrong - it isn't a brief tutorial. It's a detailed explanation of how to do a measured chromatic scale in pitch bend. What I meant by what 'most users' want to do is just do little slides here and there, maybe a bit of expressiveness to add to their MIDI, such as a bass guitar sliding down slightly after a note.

So your introduction could be this:
This will explain how you can make an instrument move up and down scales using just pitch bend, and the magic of MIDI!
Possible scenarios for this might be = ... (e.g. if you want to emulate a guitarist doing that fretty thing or whatever it is - I'm not a guitarist, don't know)
First I'll say a bit of theory, how I worked it out, then go on to demonstrate it in practice.


Then your article is pasted here -

Summary:
So basically all you need to do is enter RPN values (this and that) and then to bend up a semitone you move it up 50 cents, to go up an octave it's 650, etc.

Hope that helps - I would have found this useful myself for that Gambit one, which I am aware sounds fairly awful right now. It's too loud and has some mistakes. Might fix that later.

Oh, I question that I still would like the answer to is, how well does this guide work in other sequencers? Is there any way that I can rewrite it to be more universally accessible to users of any sequencer program?


It's similar in mine (Cubasis). I think most will have some sort of MIDI event viewer, and that's where you put the data in.
This is the online avatar of Sam Wolff.
Image
User avatar
The_Epitome
Update Staff
Update Staff
 
Posts: 600
Joined: Tue Aug 02, 2005 4:41 pm
Location: Leamington Spa, UK

Re: A Brief Pitch Bend Tutorial

Postby Solaphar » Wed Apr 08, 2009 11:42 am

The_Epitome wrote:
Solaphar wrote:
The_Epitome wrote:at first I thought you'd copied and pasted from another site!

Ow, that's pretty harsh dude, but I did indeed write this, in my own words, and without ever reading a single article about pitch-bending.

Well I didn't mean it as an insult... quite the opposite...?

Oh, ok. Thanks then. At first I thought it was a borderline plagiarism accusation. Heh, I guess that's why I took it the wrong way.

The_Epitome wrote:Well, the title is wrong - it isn't a brief tutorial. It's a detailed explanation of how to do a measured chromatic scale in pitch bend.

Yeah, I did originally intend for it to be brief, but kept thinking up more stuff as I went along. I'll fix that, and thanks for the title suggestion.

The_Epitome wrote:What I meant by what 'most users' want to do is just do little slides here and there, maybe a bit of expressiveness to add to their MIDI, such as a bass guitar sliding down slightly after a note.

Thank you for spelling it out for me. I understand now.

The_Epitome wrote:So your introduction could be this:
This will explain how you can make an instrument move up and down scales using just pitch bend, and the magic of MIDI!
Possible scenarios for this might be = ... (e.g. if you want to emulate a guitarist doing that fretty thing or whatever it is - I'm not a guitarist, don't know)
First I'll say a bit of theory, how I worked it out, then go on to demonstrate it in practice.


Then your article is pasted here -

Summary:
So basically all you need to do is enter RPN values (this and that) and then to bend up a semitone you move it up 50 cents, to go up an octave it's 650, etc.

Hey thanks again, that'll totally work. I'll use it (maybe with a few modifications) and give you credit, if that's ok with you.

The_Epitome wrote:I would have found this useful myself for that Gambit one, which I am aware sounds fairly awful right now.

I'm not sure which Gambit you're referring to. Hopefully, you can go back and edit your post to give a link to that.

The_Epitome wrote:
Solaphar wrote:Oh, I question that I still would like the answer to is, how well does this guide work in other sequencers? Is there any way that I can rewrite it to be more universally accessible to users of any sequencer program?

It's similar in mine (Cubasis). I think most will have some sort of MIDI event viewer, and that's where you put the data in.

More helpful information; you've been incredibly helpful and I can't thank you enough. (Although I must've thanked you, like, five times by now?)


Edit: Modified the original post, also put in a couple more pics demonstrating the dreaded 're-zeroing'. =P
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: Measured Chromatic Scale Pitch Bends: A Detailed Explanation

Postby Solaphar » Wed Oct 21, 2009 10:02 am

I haven't fully tested this yet, but I think I haev some stuff wrong in my "What Values for P are Possible" section. When I wrote this, I was using WinXP, and it seemed to me back then that I could only get P values up to 3072 to have an effect. Now that I'm using Vista, it seems that all possible P-values, inlcuding those up to 16383, are working.

Now maybe they did this in XP too and for some reason I didn't notice. Right now, I can't go back to check this, but I'll try to over the next few days. If anyone else wants to double-check this and let me know how it works on their own setup, I'd really appreciate it. It would help me to check that it's not just my computer being goofy or me being stupid and not making correct observations.

As always, I'm open to any and all suggestions on how to revise this guide. Think I should trim parts out? Tell me where. Do you think there's some pertinent information that I left out? Let me know and we'll integrate it into the guide. You will, of course receive full credit for your contributions and my deepest gratitude.
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: Measured Chromatic Scale Pitch Bends: A Detailed Explanation

Postby LupineDream » Fri Dec 11, 2009 2:26 pm

This is beautiful, I have been looking for something like this for a long time, it will really add complexity to my songs.

Thanks
~Loopy Dream
LupineDream
Member
 
Posts: 5
Joined: Sun Dec 06, 2009 11:45 pm
Location: USA

Re: Measured Chromatic Scale Pitch Bends: A Detailed Explanation

Postby Solaphar » Sat Dec 12, 2009 6:59 pm

LupineDream wrote:This is beautiful, I have been looking for something like this for a long time, it will really add complexity to my songs.

Thanks

Haha, you flatter me.

But really, if you see anyway in which I can improve this guide, anyway at all, please don't hesitate in telling me. I'd be even more grateful than I am from having it praised... Not that I dislike your praise. =)
User avatar
Solaphar
Member
 
Posts: 213
Joined: Tue Aug 02, 2005 5:49 pm

Re: Measured Chromatic Scale Pitch Bends: A Detailed Explana

Postby Bavi_H » Sun Oct 07, 2012 1:58 pm

Some notes:

Note 1. The Registered Parameter 0 (Pitch Bend Range) value uses the high byte for semitones and the low byte for cents. (In MIDI data, the high bit of an 8-bit byte is reserved for distinguishing status bytes from data bytes, so each byte has 7 bits of usable data -- values 0 to 127.)

S is a number of semitones, 0 to 127.
C is a number of cents, 0 to 127.
P is the pitch bend range value (the value to put in a Registered Parameter 0 event).
P = 128S + C

For this tutorial, you always want an exact number of semitones, so keep C as 0. (Based on Solaphar's description, it sounds like the MIDI device they use ignores the cents part of the pitch bend range value. However, other MIDI devices might use the cents value, so you should set it to zero to be safe.) If C is always zero, we can simplify the equations to the following:

S is a number of semitones, 0 to 127.
P is the pitch bend range value (the value to put in a Registered Parameter 0 event).
P = 128S

Next, you can calculate what values to use in the Pitch Bend event.

t is the pitch bend value (the value to use in a Pitch Bend event) for one semitone.
t = 8192 / S

(Note the range of the Pitch Bend event value is -8192 to +8191, but for easier math, we're pretending the range is -8192 to +8192.)

Note 2. Some sequencer programs may not have a way to enter Registered Parameter numbers and values. In that case, you have to manually enter them yourself using the correct Control Change events, like this:

Code: Select all
Meas:Beat:Tick  Event Kind      Chan  Value1             Value2
--------------  --------------  ----  -----------------  ------
1:1:0           Control Change  1     101-RPN MSB        0
1:1:0           Control Change  1     100-RPN LSB        0
1:1:0           Control Change  1     6-Data Entry MSB   19
1:1:0           Control Change  1     38-Data Entry LSB  0

In this case, you don't need to calculate the entire P value. The Data Entry MSB value is the semitones value (S), and the Data Entry LSB value is the cents value (C).
Bavi_H
Member
 
Posts: 18
Joined: Fri Oct 05, 2012 6:14 pm
Location: Texas, USA


Return to Music Discussion and Q&A

Who is online

Users browsing this forum: Bing [Bot] and 1 guest