back to list

Pitch bend retuning

🔗Robert Walker <robertwalker@...>

10/11/2004 5:23:28 PM

Hi Jon,

> Um, that wasn't completely clear - how can a program handle > 12 note
> scales with pitch bends without artifacts showing up? (Not saying it can't
> be done at all, just curious).

If you get artefacts with pitch bends, then the thing to do is to
make sure the pitch bends are sent early. When they occur they
seem to be a result of sending a pitch bend immediately before
the note on - if you give the synth a bit of time to adjust
before you play the note then they don't happen any moer.

FTS sets up all 15 (16) midi channels with the necessary pitch bends
as soon as you open Midi out or at the start of the saved midi file,
using all the midi pitch bends that will be needed for the scale,
if it requires no more than 16 such as is often the case. It seems
to have been a satisfactory solution for dealing with pitch bend
artefacts in the cases where they occur.

This will deal with all scales with up to 15 (16) notes.

To understand how it works, it is as if you are playing
the scale on up to 16 pianos (or monotimbral synths).

Each is in twelve equal temperament
but they can be adjusted in pitch relative to each other.
For instance 24-et can be played on two pianos a quarter
tone apart. So that requires just two midi channels.
Send the quarter tone pitch bend right at the start when
you open midi out to tune the quarter tone sharp piano.
Now you don't need to send any more pitch
bend messages, so don't get any glitches.

Same works with - e.g. 192 et - you can now have
16 pianos each tuned a sixteenth of a semitone sharp
relateive to the previous one. Now you can play any
music in 192-et without any artefacts.

This could be done with actual pianos - it's just that
in Midi it is much faster to retune them and more practical
to play them once retuned.

For e.g. sixteen note octave scale (e.g. sixteen notes
of 17-et or whatever) then you set up
sixteen et pianos. Play e.g. all the Cs on the first one,
all the C#s on the next one, Dbs on the next, and so on right the
way along to the last one which plays Bs.
In betwen you have to leave out one of the notes
of 17-et.

But if you want to play a scale that only has
16 or less notes in it, then just
set the 16 pianos up and that's it, no need
for any pitch bends after that, so no artefacts.

If you need more than 16 scale degrees, and
find you get pitch bend artefacts,
one may need to think about splitting the
midi file either into sections in the various keys or
into parts that require different pitch bend type
microtonal accidentals or whatever.

Or of course, look for alternative equipment or software that
can retune the notes instantly without artefacts.
For instance of the soft synths, MidiCode works fine,
also the Yamaha and Roland soft synths, also
Giga, of the ones I've tested. At least I've had
no problems. It could vary I suppose depending on
computer speed or other things to do with the
OS. Can't think why it should happen when rendering
directly to audio at all unless it is done intentionally
for some reason by the software..

I'm sure there must be many more.

Robert

🔗Robert Walker <robertwalker@...>

10/11/2004 5:34:54 PM

Hi Jon,

BTW those pitch bend artefacts at the start of a note are one thing.
There is another type that happens at teh end of a note.

You notice that if you play e.g. a note on a harp voice particularly
or one wiht a lot of resonance after teh note has been switched off
- and that problem is similar to the one about sustain that
Graham mentioned - except that here the retuning software
has no way of knowing how long a note will continue to sound
after it is switched off via midi. If yo ubend it too soon
for a following note then you get a pitch bend resonance,
a kind of ghostly backgruond strange bending pitches type
effect with the pitch bent quiet after effects of the notes
that have been switched off.

You don't know how long you may need to wait. with a harp
voice it may continue to sound for seconds after it has
been switched off via midi, just gradually getting quieter.
You can switch it off completely by using an all sound off
if happy to switch off all notes in that channel -but that
gives an ugly click like effect. The safest thing is
to assume that all notes may do this and leave
the channel free for as long as you possibly can
before pitch bending it. So retuning software
should do this. But early releases before the
software authors are aware of these various problems
may not do it.

It's helpful to know if one is talking about the
start of note type glitches (at about the same
pitch of the new note played) or these
after note type glitches (at about the same pitch
as the previous note played in the channel).

Robert

🔗Aaron K. Johnson <akjmicro@...>

10/11/2004 7:18:37 PM

On Monday 11 October 2004 07:23 pm, Robert Walker wrote:

> If you get artefacts with pitch bends, then the thing to do is to
> make sure the pitch bends are sent early. When they occur they
> seem to be a result of sending a pitch bend immediately before
> the note on - if you give the synth a bit of time to adjust
> before you play the note then they don't happen any moer.

I can attest that this is true: I wrote a midi player in Python a while back,
and had a nasty bug that took a while to figure out: the scheduler needed to
give pitch bend a higher priority in the queue (i.e. it needed to be sent
before the note on message). Otherewise I got those slippy sounds that Jeff
describes.

Aaron Krister Johnson
http://www.akjmusic.com
http://www.dividebypi.com

🔗Aaron K. Johnson <akjmicro@...>

10/11/2004 7:24:58 PM

On Monday 11 October 2004 07:34 pm, Robert Walker wrote:
> Hi Jon,
>
> BTW those pitch bend artefacts at the start of a note are one thing.
> There is another type that happens at teh end of a note.
>
> You notice that if you play e.g. a note on a harp voice particularly
> or one wiht a lot of resonance after teh note has been switched off
> - and that problem is similar to the one about sustain that
> Graham mentioned - except that here the retuning software
> has no way of knowing how long a note will continue to sound
> after it is switched off via midi. If yo ubend it too soon
> for a following note then you get a pitch bend resonance,
> a kind of ghostly backgruond strange bending pitches type
> effect with the pitch bent quiet after effects of the notes
> that have been switched off.
>
> You don't know how long you may need to wait. with a harp
> voice it may continue to sound for seconds after it has
> been switched off via midi, just gradually getting quieter.
> You can switch it off completely by using an all sound off
> if happy to switch off all notes in that channel -but that
> gives an ugly click like effect. The safest thing is
> to assume that all notes may do this and leave
> the channel free for as long as you possibly can
> before pitch bending it. So retuning software
> should do this. But early releases before the
> software authors are aware of these various problems
> may not do it.

My solution in my microtonal composition scripting application 'et_compose'
was to do what I call 'channel hocketing'--say I want a four voice texture
for harps like you said here--to give each voice maximum time to sound, I
make midi channels 1,2,3,4 assigned to voice 1, and each note one is rotated
through those channels; 5,6,7,8 are assigned to voice 2 in like manner, etc.
This way the bending for long release times is avoided with a 'channel
hocket', which helps for such timbres where pitch bend artifacts might show
up.

Audio multitracking is another (though non-realtime) solution.

Where there's a will, there's a way !

Aaron Krister Johnson
http://www.akjmusic.com
http://www.dividebypi.com