Author Topic: 1.17.02.52 Time Signature (& tempo?) VST send prob  (Read 7814 times)

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
1.17.02.52 Time Signature (& tempo?) VST send prob
« on: February 28, 2008, 10:35:39 »
Full Version:
OpenMPT v1.17.02.51

Has the bug occured in previous versions? If yes, please specify version(s): AFAIK, ever since the newer tempo modes were introduced.


Description of the bug:
I think I've found a problem with the "Modern" tempo mode. I think it's either sending the retrigger (or whatever it is) constantly to VST(i)s, or it's updating its speed all the time. Maybe neither. =D But what happens is that if I enable the metronome in Kontakt, it goes crazy (not even rhythmically!) "Alternative" mode seems to do the same thing, but more regularly. Using "Classic", I get a nice steady beat. Help! =D

How often does it happen?:
Constantly. :)

How to reproduce (step by step description):
Create a song using the "Modern" tempo mode, and fire up a VST that has a metronome. Although it'll get the right tempo (numerically), the reset seems to be strange...
« Last Edit: April 16, 2011, 22:23:03 by Jojo »

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #1 on: March 30, 2008, 12:22:42 »
This one's still not working. :(

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #2 on: August 23, 2008, 11:42:00 »
And bump once more...

I've done a bit more digging. It looks as though it might be a fairly simple problem: the Steinberg SDK docs give this:

tresult PLUGIN_API getSignature (long index, long* numerator, long* denominator)

and in Kontakt3, I've managed to inspect what's being sent. It looks as though numerator is being sent correctly (rows/beat, rpb), but denominator isn't - it's being sent as rows/measure (rpm). I think that the correct way to do this would be to do the following:

1. Require that rpm is an integral multiple of rpb. This is, after all, only logical. This would have to be a flag, though, 'cos I'm sure there are people out there who haven't being following this convention. :)
2. Set denominator as (rpb/rpm), and keep numerator as rpb.


Also, comments like //Screw it! Let's just return the tempo at this point in time (might be a bit wrong). in the VST source code don't inspire confidence... ;)

To save the devs some effort, I think that the problem is in
...
long CVstPluginManager::VstCallback(AEffect *effect, long opcode, long index, long value, void *ptr, float /*opt*/)
...
timeInfo.timeSigNumerator = pSndFile->m_nRowsPerBeat;
timeInfo.timeSigDenominator = pSndFile->m_nRowsPerMeasure;
...

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 706
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #3 on: August 23, 2008, 13:18:41 »
Quote from: "bvanoudtshoorn"
Also, comments like //Screw it! Let's just return the tempo at this point in time (might be a bit wrong). in the VST source code don't inspire confidence...

Well you shouldn't be that confident about the source - it's open source ;)

Quote from: "bvanoudtshoorn"
To save the devs some effort, I think that the problem is in
...
long CVstPluginManager::VstCallback(AEffect *effect, long opcode, long index, long value, void *ptr, float /*opt*/)
...
timeInfo.timeSigNumerator = pSndFile->m_nRowsPerBeat;
timeInfo.timeSigDenominator = pSndFile->m_nRowsPerMeasure;
...

Thanks for the advices. Have you tried the fix in practice?

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #4 on: August 23, 2008, 13:20:18 »
Yeah, I just found that particular comment amusing. :) It reminds me of the sort of thing I sometimes do in my own projects...


Quote
Thanks for the advices. Have you tried the fix in practice?

I haven't been able to. I still can't get OpenMPT to compile reliably under VS2008. And tbh, I just don't have the time to struggle with it atm. :(

Offline Relabsoluness

  • OpenMPT Developers
  • *****
  • Posts: 706
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #5 on: August 23, 2008, 14:55:33 »
Quote from: "bvanoudtshoorn"
I still can't get OpenMPT to compile reliably under VS2008. And tbh, I just don't have the time to struggle with it atm. :(

I would be interested to hear what is the problem; I've used VC2008 as well but after some fixes(which have been committed to source repository) haven't faced problems compiling OMPT with it.

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #6 on: August 23, 2008, 15:06:30 »
Hmm, I just got the newest version from the SVN, and it compiles ok. With 666 warnings, but that's ok. :) The only issue I can see is that I've lost XP styling - the manifest isn't getting included. :/ TBH, the last time I tried to compile was some months ago - I've been absolutely flat out since then, working on my honours project. :(

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #7 on: August 09, 2010, 13:56:06 »
Any idea if this is still happening? I suppose it would a lot easier to follow this if it could be reproduced with a small free plugin. However, searching for "timeSigDenominator" on google offers that it could be worth trying to send values 1 and 4 instead of 4 and 16.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[ASSIGNED] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #8 on: August 22, 2010, 19:06:35 »
Using TobyBear's MetroGnome, I noticed that it doesn't count properly, so I was reminded of this topic.

Code: [Select]
timeInfo.timeSigNumerator = pSndFile->m_nCurrentRowsPerMeasure / max(pSndFile->m_nCurrentRowsPerBeat, 1);
timeInfo.timeSigDenominator = 4;

This seems to work, and it seems to be what I'd expect from the specs. MPT's tempo is specified in quarters, so f.e. using RPB=4 and RPM=16 would equal a 4/4 beat, RPB=4 and RPM=12 would equal a 3/4 beat. I can't think of an intelligent way of enabling anything but quarter tempos right now, but at least this seems to fix the issue for now (although it might not be very precise for some weird tempos like RPB=4 and RPM=10).

Here's another idea:
I suppose one could use the GCD here. With 4/12, the GCD=4, resulting in a 3/4 beat. With 8/24, the GCD=8, resulting in a 6/8 beat. But I suppose that wouldn't work very well, especially since the user is not informed when quarters are used and when not.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: [PENDING] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #9 on: February 27, 2011, 16:25:25 »
Can you please test if http://sagagames.de/stuff/mptrack.exe fixes the problem?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: [PENDING] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #10 on: April 01, 2011, 17:34:44 »
...or can you test if OpenMPT 1.19 fixes this problem? :P
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
Re: [PENDING] 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #11 on: April 16, 2011, 06:59:45 »
Looks as though this is fixed in 1.19! A good steady beat from Kontakt's built-in metronome.

Although now I can see (or hear, rather) that OpenMPT and Kontakt can't seem to agree on what 90BPM actually is... The two drift out of time. I'm not sure who's at fault here, though.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #12 on: April 16, 2011, 22:23:33 »
I assume you're using modern tempo mode?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline bvanoudtshoorn

  • Extreme artist
  • *****
  • Posts: 1,053
  • Gender: Male
    • Barryvan
Re: 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #13 on: April 17, 2011, 05:58:22 »
Yep -- 8/32 at 90BPM in modern tempo mode.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,106
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: 1.17.02.52 Time Signature (& tempo?) VST send prob
« Reply #14 on: April 17, 2011, 11:37:51 »
Weird... does setting the tempo on every pattern transition (using Txx) probably help with the drifting?
(Note: Actually this should be moved to the issue tracker since it's not really related to the original problem)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.