fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Recent discussions on sysex commands and the MIDI Tuning


From: David Bellows
Subject: Re: [fluid-dev] Recent discussions on sysex commands and the MIDI Tuning Standard
Date: Wed, 17 Aug 2016 15:09:59 -0700

ey Marcus,

> Using fluidsynth 1.1.6 your updated MIDI file plays fine, at least on
my Linux system. Which version are you using?

I'm using Kubuntu 16.04. dpkg -l fluidsynth lists:
fluidsynth                      1.1.6-3              amd64

And are you sure it plays fine? I don't mean to question your ears but
I'm definitely not getting the quarter-tones in the Fluidsynth
version. I've attached three flac files of the chromatic scale for
24-EDO over one octave: timidity.flac, fluidsynth.flac, and both.flac
which is a merged version. In both.flac you can clearly hear that
every other note (or so) is not the same while the others are.

I'm using the following Fluidsynth command:
fluidsynth -T flac -F fluidsynth.flac soundfonts/fluid.sf2 Piano_Standard.midi

Is that correct?

> Yes, as far as I can understand, you can assign different tuning
programs/banks to any voice. So using multiple channels with different
tunings should be possible.


In my preliminary tests I have to choose a different channel and
tuning program in order to get both voices to play through. That still
means just 16-note polyphony but at least it's better than the 1-note
polyphony before for Timidity. But I need to play with it more.

I wonder, does this mean I can send multiple tuning tables? One for
each tuning program and then just make sure the notes are using the
correct one? That would be an improvement but would mean that any
division of the octave over 128 would have problems.

> Another solution would be to use non-real-time Sysex tuning change
messages. That way you can set up your tuning, send noteon, send a
non-real-time tuning change (which won't affect the currently sounding
note) and send another noteon.

I'm not sure if I understand what you're saying here (forgive me,
figuring out this MIDI stuff is difficult for me!). I used to use
tuning tables that I would send at the very beginning of the file but
once you get above 12 divisions of the octave you start to lose your
range in total octaves (eg, 128-EDO means only one octave available
using that method). But it seems you might be referring to something
else?

> But do you really change between tuning systems while playing the
song?

I think so, see above. My software generates music using a pseudo
random number generator so I don't know which notes I'll need to use.
I could hope that there are fewer than 128 notes and create a tuning
table just for that but that seems like a lot of work plus it makes
generating the music more difficult in the first place (I'd lose my
easily manipulated interval relationships). But as the algorithms I
use become more complicated and the pieces longer I will definitely
need more than 128 notes per piece. Sending the tuning for each note
actually seems the most elegant solution -- it's basically sending a
specific audio frequency to the MIDI file.

> looking at your new file, I see that you send the tuning program
change RPN messages before each tuning Sysex message. While that
works, I don't think it is necessary. Choosing the tuning program for
the channel once at the beginning of the file should be enough.

You're right. I only did that so that we would be sure that it is
happening, making it easier to see the commands. The way my software
interacts with the MIDI library I'm using, I can't get away from
having tons of copies of essentially the same control commands.
Normally I put them at the beginning of the MIDI file which hopefully
doesn't cause any problems.

Dave

On Wed, Aug 17, 2016 at 2:20 PM, Marcus Weseloh <address@hidden> wrote:
> Hi again,
>
> looking at your new file, I see that you send the tuning program
> change RPN messages before each tuning Sysex message. While that
> works, I don't think it is necessary. Choosing the tuning program for
> the channel once at the beginning of the file should be enough.
>
> Cheers,
>
>    Marcus
>
> 2016-08-17 22:52 GMT+02:00 Marcus Weseloh <address@hidden>:
>> Hi David,
>>
>> 2016-08-17 19:22 GMT+02:00 David Bellows <address@hidden>:
>>>> I had another look at the FluidSynth source, though. It seems like voices 
>>>> start out with no tuning prog defined. So even when you change tuning prog 
>>>> 0 using the Sysex messages, that tuning won't be used. Try adding RPN 
>>>> messages to select tuning prog 0 for your channel before sending the 
>>>> real-time tuning Sysex messages.
>>>
>>> I've attached a new file. I *think* I've done what you suggested by
>>> sending control codes 100:0, 100:3, 6:0. Unfortunately the results are
>>> the same: no quarter-tones with FluidSynth but Timidity plays it fine.
>>
>> Using fluidsynth 1.1.6 your updated MIDI file plays fine, at least on
>> my Linux system. Which version are you using? Probably best to upgrade
>> to the latest version. MTS support has been introduced in 1.1.0, I
>> think.
>>
>>> By the way, what does the tuning program parameter even mean? The
>>> problem I ran into with Timidity is that if I tried to send two sysex
>>> commands to the same note at the same time even on different channels,
>>> it wasn't able to handle it. Would changing the program for each voice
>>> I want fix that problem?
>>
>> Yes, as far as I can understand, you can assign different tuning
>> programs/banks to any voice. So using multiple channels with different
>> tunings should be possible.
>> Another solution would be to use non-real-time Sysex tuning change
>> messages. That way you can set up your tuning, send noteon, send a
>> non-real-time tuning change (which won't affect the currently sounding
>> note) and send another noteon. That way you might get two differnet
>> tunings for the same MIDI note.
>>
>> But do you really change between tuning systems while playing the
>> song? If not, then you could set up the tuning before playing the
>> song, no need to send real-time tuning changes in the first place.
>>
>> Cheers,
>>
>>    Marcus
>
> _______________________________________________
> fluid-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

Attachment: timidity.flac
Description: audio/flac

Attachment: fluidsynth.flac
Description: audio/flac

Attachment: both.flac
Description: audio/flac


reply via email to

[Prev in Thread] Current Thread [Next in Thread]