Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Example Code of "Implementing a plugin data parser" doesn't work #190

Open
1 task done
SilverShepherd opened this issue May 11, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@SilverShepherd
Copy link

Describe the issue

Screenshot 2024-05-11 154712
Hello,
I tried the example code from the "Walkthrough: Implementing a plugin data parser" from the documentation. I followed each step as mentioned and then some errors occured

This is the first error Message:

Traceback (most recent call last):
File "c:\Users\Silver Shepherd Lap\Documents\Coding\Code Projekte.xpj zu .flp\Sammelsurium\FLP Decontructor - Fruity Balance VorlagenTest_3.py", line 8, in
events = project.events_asdict()
^^^^^^^^^^^^^^^^^^^^^
AttributeError: **'Project' object has no attribute 'events_asdict'
**

The Compiler doesn't seem to know teh command "events_asdict"

And in other scenarios the ".struct" command is also not as an attribute there.
But maybe that is because the "events_asdict()" command is needed to create this attribute.

The Fruity Balance Demo FLP was created in FL Studio 21.2.3

Hopefully someone can help.

What version of PyFLP are you using?

2.2.2dev6

What code caused this issue?

import pyflp
from pyflp.plugin import PluginID

# Parse the FLP file into a project
project = pyflp.parse("fruity-balance.flp")

# Collect all the events as a dict of ID to event
events = project.events_asdict()

# Get the first plugin data event - the Fruity Balance one itself
plugin_data_event = events[PluginID.Data][0]

# Get the raw data and convert it to a tuple of 8-bit unsigned integers
data = tuple(bytearray(plugin_data_event._struct))
print(data)

Screenshots, Additional info

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SilverShepherd SilverShepherd added the bug Something isn't working label May 11, 2024
@SilverShepherd SilverShepherd changed the title 🐞 🐞 Example Code of "Implementing a plugin data parser" doesn't work May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant