fluid-dev
[Top][All Lists]

## [fluid-dev] Re: Fluidsynth~

 From: Norbert Schnell Subject: [fluid-dev] Re: Fluidsynth~ Date: Wed, 19 Oct 2005 14:22:04 +0200

```Hi Jeremy!

On 18 Oct 2005, at 20:33, Jeremy Hunt wrote:
```
I have a question about fluidsynth~ for max/msp. What are the range of float values for the LSB pitch bend message?
```
LSB is controlled by the fractional part of the pitch band value.
That makes that it is divided into steps of 1/128.

```
```What float value is equal to 1 cent?
```
```
Let's see...
- B is the value set by the bend message (default is 64)
```
- W is the value set by the "wheel" message (default is 2 = one whole tone)
``` - C is the transposition in cent

```
This is what we know about bend values corresponding to transposition in cent:
```  B = 64 ---> C = 0
B = 0 ---> C = W * (-100)
```
B = 127 ---> C = W * 100 * 63 / 64) Note: bend 128 would correspond to W * 100) cent
```
In general:
C = W * 100 * (B - 64) / 64

So trans 1 cent is achieved by:
B = 64 * C / 100 / W + 64

For the default value of 2 for W that makes:
B = 0.32 * C + 64

64.32

With 2 cent being 64.64 and so on....

```
To make sure that this theoretic values actually work I did a test with a sustained 69 note on channel 1 and another on channel 2. In some tests, counting the beating of a note on channel 1 with a bent note on channel 2, I discovered that
``` - the transposition is very just and
- quantized to entire cent values (surprise!)

```
Bringing together the 1/128 quantization of the pitch bend LSB and the 1 cent quantization of the transposition seems to make that 64.32 doesn't do anything yet. The fractional pitch bend value of 0.32 makes an LSB (0 to 127.) of 40.96, which is truncated to 40 (corresponding to to 0.312). The LSB 40 doesn't make a cent yet. So you must raise the value above 64.32 in order to obtain one cent of transposition and as well slightly above 64.64 for 2 cent. Nothing happens between 1 and 2 cent.
```
All this with the default pitch bend range (wheel) of 2.
Hope this is kind of clear.

Cheers
Norbert

```