Bassmidi: Sysex tuning support

Started by Karl Eick,

Karl Eick

To clarify, I don't think there is any tuning issue. The pitches are correct, and have always been.
The remaining differences compared to Timidity++ seem to be entirely due to sample region selection. Some instruments still sound different because Timidity++ appears to choose a different source sample before applying the final tuning. This is only a guess, but perhaps Timidity++ bases sample selection on the nearest equivalent standard tuning note, and applies the microtonal offset afterwards. That might explain some of the remaining differences in timbre.

Karl Eick

As for your questions about coarse tuning and the other tuning types, I haven't tested any combinations of key tuning with master tuning, channel tuning or octave tuning yet. For my current files, everything sounds correct apart from the sample selection differences compared to TiMidity++.

Ian @ un4seen

It should already be using the most appropriate samples from the soundfont based on the effective key after tuning. For example, if key 60 is played and the tuning says key 60 should sound like key 50 normally would, then it'll use the key 50 sample(s). Do you have a MIDI file & soundfont combination in particular that doesn't seem right? If so, please upload that and give an affected position and/or keys to check.

Karl Eick

blackwood22notes.mid is a file where I notice the differences very clearly, which I already uploaded. I'll give you the soundfont I prefer to use with this, and then the audio file from timidity to compare. I hope that helps. Timidity does something that makes it sound more like the original soundfont. In particular, I notice it with the violin, right at the beginning of the piece. It's the second and third note the violin plays, and various other parts throughout the piece. In fact, I can give you a key now. The second and third note in the violin track is a note which would correspond to key 71 in standard tuning, but bassmidi seems to select a sample region from the key before.

Karl Eick

I'm sorry, it may also be a sample region from the key after it. In any case, using 22 tone equal temperament as an example, the note which would correspond to key 71 in 12 tone equal (standard) is using a different sample than normal. It may be a rounding issue, but that's only a guess.

Ian @ un4seen

Yes. That note is key 80, which the tuning changes to key 70 + 91.4 cents, so BASSMIDI uses the key 70 sample and applies a +91.4 cents finetune. Here's another update for you to try, which will use key 71 and apply a -8.6 cents finetune instead:

    www.un4seen.com/stuff/bassmidi.zip

Karl Eick

#26
Yes, you did it! I would call this release ready now. Again, thank you so much for your efforts! When you release this publicly for everyone, it makes microtonal music creation and midi playing much simpler for many users.

Ian @ un4seen

Great to hear that it's working well now.

Still not really sure how the key tuning should interact with the other tuning options, but the latest update did change that from what I wrote before. The key tuning is now applied before all the other tunings (the "coarse tuning values are added to the note" first part doesn't apply any more - they're added afterwards now).

Karl Eick

#28
Thanks for the explanation.

To be honest, I don't know what the expected interaction between key tuning and the other tuning options should be according to the MIDI/MTS specifications.

My use case only involves Bulk Tuning Dumps, so I haven't tested any combinations with master tuning, channel tuning, octave tuning or additional coarse/fine tuning.

With the current implementation, all the tunings I've tested are working correctly and sound as expected.

Karl Eick

So, what are your plans with this? Like I said before, I think this is ready for release.

Ian @ un4seen

All being well, the new key tuning support will be in the next BASSMIDI release. You can continue to use the update posted above in the meantime (it's a "release" build). Let me know if you encounter any problems with it.

Karl Eick

That's cool! Because then, Virtual Midi Synth will be updated as well, and then everyone can profit from it. I also didn't encounter any problems whatsoever. You can go back to the standard tuning using a GM reset,  and it's even better than Timidity, because Timidity would require a GM reset even for switching between different Bulk Tuning dumps, which isn't needed here. So, again, great job!