Pages: [1]   Go Down
Author Topic: Passing pitch bend through using MIDI.h library  (Read 832 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've started my first Arduino project. It's a MIDI filter that uses Francois Best's MIDI.h library which I'm using to filter notes on different channels via a lot of channel switches. That part is working perfectly. However, I need to pass other types of data through to the output. I set it up to read pitch bend and send it back out and it works but the resolution is pretty low - I can hear staircasing. And I can't find any information about how this might be improved. But perhaps I've implemented it incorrectly, I don't know. I'm just doing this:
Code:
void HandlePitchBend(byte channel, int val)
{
    MIDI.sendPitchBend(val,channel);
}
I'm wondering if this is a limitation or just a bad approach. Any ideas?
Logged

Offline Offline
Edison Member
*
Karma: 48
Posts: 1632
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the pitchbend staircase when it is connected directly to the MIDI device?
If not, the problem is in your code.

Pete
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm going Roland PC200mkII-->Arduino MIDI IN-->Arduino MIDI OUT-->Roland UM550 MIDI IN-->Ableton Live

I've never heard this phenomena before from any of my controllers. And then again I've never programmed with Arduino so I'm sure it's the code. But the only thing I have in the loop is MIDI.read with handleNote functions so I'm guessing it's just the way I am approaching thru.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I discovered that it's the resolution of the pitch bender in the Roland PC-200 controller. My hardware synths must feature smoothing of some sort. But when I go directly into a plugin I can hear the stepping. So the code is faithful after all.
Logged

Pages: [1]   Go Up
Jump to: