View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001731 | OpenMPT | Plugins / VST | public | 2023-09-29 15:04 | 2024-10-21 12:48 |
Reporter | 02FD | Assigned To | Saga Musix | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | feedback | Resolution | open | ||
Platform | arm64 | OS | Windows | OS Version | 11 |
Product Version | OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (upgrade first) | ||||
Summary | 0001731: VST ppq is not updated when the cursor is moved | ||||
Description | For VSTs like SNES emulation plugin C700, which read the ppq value for setting the recording positions for hardware exports, this makes getting accurate timings for loops nearly impossible. This might work best as a toggle in the options as this may not be desirable for everyone, but currently, when the module isn't playing, the ppq value is always 0, and if you play next row one by one, the value continues increasing as if the module was playing between rows. | ||||
Steps To Reproduce | 1) Download C700 VST and load it into OpenMPT 2) Click "Set Recorder" 3) Place cursor anywhere in the song and click "Set" on any of the recording parameters 4) Value is still 0.00 5) Play the next row in the song from that position 6) Click set again 7) Value is not 0.00 8) Click set again 9) Value continues to increase despite the cursor being stationary | ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | |||||
Tested code revision (in case you know it) | |||||
Unfortunately this is technically not really possible at the moment, because the ppq is entirely derived from the number of samples rendered so far, which of course must keep increasing while the paused row is playing. Generally the PPQ generation is not stable at the moment for this very reason too, just changing the tempo in the middle of the song will cause the PPQ to change accordingly. So I'm afraid there is no simple fix for this. |
|
Rats. I figured that might be the case. I have a workaround for my problem that could at least be put in the hidden settings; not sure how you feel about it, though. Would it be possible to have a "default PPQ position" that controls the value outputted when the song is stopped so you can adjust manually until this is sorted out? I understand if my request is unreasonable, this is a very specific issue I'm having. I'm also not sure, given your description, the feasibility of that idea. |
|
I don't think that's a good idea. However, looking at the time retrieval code, it appears that OpenMPT pretends that the transport is in playing mode even when it is really paused. Maybe unsetting the |
|
Wait, hold on... Why is PPQ being calculated based on the samples rendered? |
|
Because OpenMPT as a tracker has no concept of PPQ, doesn't keep track of anything even remotely similar to PPQ, so the easiest way of implementing it was an estimation based on the current sample position and tempo - which is accurate if the tempo never changes. As I said, it would definitely make sense to have proper PPQ calculation but that would require nontrivial changes to the playback logic, not a simple workaround. |
|
And the number of rows that have played in the song isn't "remotely similar to PPQ"? I don't question your knowledge; you're much more experienced than I am. I just want clarification. |
|
OpenMPT does not keep track of how many rows were played. Even if it did, that would still not help as soon as any time signature changes are involved. You can only keep track of PPQ by actually counting PPQ. Any other proxy metric, be it rows or total samples rendered, will fail at either tempo or time signature changes. |
|
FWIW - there would be other interesting use cases for keeping track of PPQ time in OpenMPT, such as sending and receiving MIDI time codes to/from other devices. So that would be one more reason for properly implementing this. |
|
I see. I understand you're incredibly busy, so I'm happy hear that there's some interest in this. In general I think OpenMPT has some amazing potential in terms of MIDI support! |
|
I had another stab at this and while I now have accurate PPQ reporting working, unfortunately it doesn't really solve your problem. The main issue here is that OpenMPT does not run any plugin processing while playback is paused, so the plugin also doesn't ask back what the current playback position is. It doesn't even do that when pressing the Set button. Essentially the plugin assumes that playback must always always running. That's something that might happen in the long term with OpenMPT to behave more like other VST hosts, but not something that can be fixed simply in the context of this issue here. |
|
As of r21901 (OpenMPT 1.32.00.30), PPQ reporting is more accurate now. For modules made with older versions of OpenMPT, you first need to disable the compatibility setting "Report inaccurate PPQ position to VST plugins (like OpenMPT 1.31 and older)" (https://wiki.openmpt.org/Manual:_Compatible_Playback#Playback_Compatibility_Settings). As mentioned in my previous comment, simply navigating around in the module while playback is stopped will still not give you the correct song position in the plugin (because the plugin doesn't ask for it while playback is stopped). However, if you start playing from the row and immediately go into row play mode, you can press the Set button in the plugin and remove the fractions that have since been added to the PPQ position. |
|
r21904 improves the behaviour a bit further, there's one thing I overlooked that kept resetting the PPQ position when stopping playback. That no longer happens now, so you can also just start playback and stop it (instead of going into step mode) to keep the wanted PPQ position. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2023-09-29 15:04 | 02FD | New Issue | |
2023-10-03 18:51 | Saga Musix | Note Added: 0005785 | |
2023-10-18 21:07 | 02FD | Note Added: 0005791 | |
2023-10-19 17:20 | Saga Musix | Note Added: 0005792 | |
2023-10-19 17:46 | 02FD | Note Added: 0005793 | |
2023-10-19 17:48 | 02FD | Note Edited: 0005793 | |
2023-10-19 17:49 | Saga Musix | Note Added: 0005794 | |
2023-10-19 17:58 | 02FD | Note Added: 0005795 | |
2023-10-19 18:00 | Saga Musix | Note Added: 0005796 | |
2023-10-19 18:10 | Saga Musix | Note Added: 0005797 | |
2023-10-19 18:23 | 02FD | Note Added: 0005798 | |
2024-10-19 21:57 | Saga Musix | Note Added: 0006114 | |
2024-10-20 16:17 | Saga Musix | Note Added: 0006136 | |
2024-10-20 16:17 | Saga Musix | Assigned To | => Saga Musix |
2024-10-20 16:17 | Saga Musix | Status | new => feedback |
2024-10-21 12:48 | Saga Musix | Note Added: 0006137 |