Conversation
| "I", | ||
| ) | ||
|
|
||
|
|
There was a problem hiding this comment.
To support both the recent and the old version of BloodOverdrive two Structs would be used here.
class _FruityBloodOverdriveStruct(StructBase)
->
class _FruityBloodOverdriveNewStruct(StructBase)
class _FruityBloodOverdriveOldStruct(StructBase):
PROPS = dict.fromkeys(
(
...
"pre_band",
"color",
"pre_amp",
"x100",
"post_filter",
"post_gain",
...
),
"I",
)
There was a problem hiding this comment.
Didn't think about how big the names would get, use _FruityBloodOverdriveStruct2 probably?
| class FruityBloodOverdriveEvent(StructEventBase): | ||
| STRUCT = _FruityBloodOverdriveStruct | ||
|
|
||
|
|
There was a problem hiding this comment.
The BO event would set both versions of the struct, so NativePluginEvent can use the one it decides to be appropriate.
class FruityBloodOverdriveEvent(NativePluginEvent):
struct_old = _FruityBloodOverdriveOldStruct
struct_new = _FruityBloodOverdriveNewStruct
There was a problem hiding this comment.
NativePluginEvent would look at the events stream and decide which plugin version it encountered.
class NativePluginEvent(StructEventBase)
# check the version of the plugin based on stream size and/or plugin marker in the first 4 bytes?
# set the appropriate struct
There was a problem hiding this comment.
I need to consider whether I should just modify existing StructEventBase logic to accomodate multiple structs, since its very possible that the functionality NativePluginEvent might be used by other events
demberto
left a comment
There was a problem hiding this comment.
Is it possible for you to use FL Studio 20.8.4.2304, for modifying the test FLP? If not maybe I can add the FBO myself in a commit to this PR.
Nice work, thanks :))
|
|
||
| INTERNAL_NAME = "Fruity Blood Overdrive" | ||
|
|
||
| plugin_marker = _PluginDataProp[int]() # 3 |
There was a problem hiding this comment.
No need to expose an internal parameter in the public interface.
I think this can be better exposed via a normal boolean is_old property.
There was a problem hiding this comment.
This was my workaround to get it to work with StructEventBase.
The proper way would probably be to read the first 4 bytes self._stream.read_I() and then set is_old in NativePluginEvent?
There was a problem hiding this comment.
Or maybe, it can be added as a property in _PluginBase itself
pyflp/plugin.py
Outdated
| | Default | 10000 | 0.0000 | | ||
| """ | ||
|
|
||
| unknown_event_first = _PluginDataProp[int]() |
There was a problem hiding this comment.
Same as a above for both unknown events
| class FruityBloodOverdriveEvent(StructEventBase): | ||
| STRUCT = _FruityBloodOverdriveStruct | ||
|
|
||
|
|
There was a problem hiding this comment.
I need to consider whether I should just modify existing StructEventBase logic to accomodate multiple structs, since its very possible that the functionality NativePluginEvent might be used by other events
| "I", | ||
| ) | ||
|
|
||
|
|
There was a problem hiding this comment.
Didn't think about how big the names would get, use _FruityBloodOverdriveStruct2 probably?
978554c to
6b9e167
Compare
|
@demberto I am still unsure whether this should first be released using Properties#63 (comment) Test FLP
Unfortunately, some project-related properties are changed when saving the same file in another FL Studio breaking existing tests. |
Structs of some other plugins have a unused / unknown data. This was a conscious design decision of PyFLP 2.0 to provide as informative events as I can in case they are displayed in a tool like FLPEdit, or if the model parsing logic fails due to haphazard event ordering or their absence, these would be a good fallback.
Yea. I completely forgot that the licensee name will change if you just save the FLP. To solve this issue, I have create a test-asset-isolation branch to explore the solutions in #6. Native plugins have FST files in FL Studio's plugin database. I am refactoring the tests to use this new layout, while the full FLP will just be used for project settings, and a few other things which cannot be exported to presets.
If If instead, just the existing |
|
@ttaschke I have reworked most of the unit tests to use presets, including plugins, it should be very easy to add a blood overdrive preset and test it. |
|
@demberto |
|
@demberto |
|
@ttaschke Yes. Infact you don't need to have 2 different structs at all, you can cover all parsing logic by the classes provided in construct. |
|
Hey @ttaschke long time no talks. What do you plan to do with this PR? |
|
@demberto I just started changing the code in this PR to use |
|
@ttaschke I am actually considering restructuring the modules into more submodules. |
Draft for blood overdrive parsing with support for just the new version of the plugin