How to get the name of a playlistitem? #83
Answered
by
demberto
YihaoChen96
asked this question in
Q&A
|
Dear Dev team, |
Answered by
demberto
Oct 21, 2022
Replies: 1 comment 2 replies
|
Yea, I planned to make use of import pyflp
project = pyflp.parse(r"F:\Prog\Python\PyFLP\tests\assets\FL 20.8.4.flp")
for track in (track for arr in project.arrangements for track in arr.tracks):
# print(track) -- Get track information
for playlist_item in track:
if playlist_item["item_index"] <= playlist_item["pattern_base"]:
channel_iid = playlist_item["item_index"]
print(f"Playlist item for {project.channels[channel_iid]}")
else:
pattern_num = (
playlist_item["item_index"] - playlist_item["pattern_base"]
) # 1, 2, 3, ...
print(f"Playlist item for {project.patterns[pattern_num]}")I just opened an issue (#84). You can subscribe for notifications related to that issue. |
2 replies
Answer selected by
demberto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yea, I planned to make use of
ChannelPlaylistItemandPatternPlaylistItemclasses, but until that's done you can use this code: