You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
✨ Possible to change length, position and offset of an audio sample #97
Length is the length of the item as it is visible to you in the playlist.
End offset is the internal position from the end of a sample or a pattern. Now you might think that start_offset + length is enough for that, why another field?
And the answer to this is, I don't know myself 😄 FLP is a weird format.
@jubabrut Will it possible for you to test PyFLP and find out bugs and suggest new ideas like these? Doing so will be a great help for me and will fasten the release cycle. A stable version will be ready sooner 🤗
Do you know how the offset value is construct ?
Right now I don't fina logic with a value like 1174289603
Did you notice a full audio clip offset are (-1082130432, -1082130432), so weird
For the moment I try PyFLP and discover all features, that's why I find some bugs on different functionnalities.
But yes I wiil try to pass more time on this project in order to help you to increase the release cycle and find bugs.
What is your goal with this library? Because it is a huge work
For me my wish list will be to be able to generate music with AI but it seems complicated today to created channel, pattern, etc. directly with the program
Do you know how the offset value is construct ? Right now I don't fina logic with a value like 1174289603
Did you notice a full audio clip offset are (-1082130432, -1082130432), so weird
I need to take a look at it, maybe its incorrectly parsed, maybe it is a float, maybe it is not an absolute value at all.
What is your goal with this library? Because it is a huge work
At first, I aim to make all existing structures parseable and editable. I try to find the representations of various quantities like the TimeStretching.time feature you had problems with. That is the hardest part.
I am also looking at the ability to clone or add certain entities like channels or MIDI notes for example. Once things like channels can be cloned, you can play with the values and modify them to your liking.
Some particular areas needing work are:
MIDI and Internal controllers
Patterns
Automation clips
I generally try to add features when I am genuinely sure that the integrity of existing data is not compromised. PyFLP guarantees to not touch the data you didn't modify. FL studio on the other hand, rewrites everything from scratch, since it knows how the format works entirely.
PyFLP is not an FL Studio replacement. It can most certainly be used in project file converters and real-world DAWs that aim to support FLP format (if they ever get written in Python 😄)
About TimeStretching.time it is interesting because in fact I searched a solution by using Python, to solve a problem I have with FL Studio. (A bug is open by Image Line because strange behovior happens when you switch a sample with different BPM. Position, length and offset change randomly).
(A bug is open by Image Line because strange behovior happens when you switch a sample with different BPM. Position, length and offset change randomly).
FL has grappled with timing issues since eternity 😄
Ok because I really don't understand how to use offset value.
I think its interpreted incorrectly (might be a float, might be PPQ dependant, dunno). But atleast the start, end values seem to match up with the arrangement. I will take a look at this. You will have better luck if you look at the individual bytes instead of these integers, use int.to_bytes(value, 4, "little")
Now you get 4 numbers instead of one and maybe it can help you find out some relation between the arrangement and them.
Although I don't think there's anything useful out of these numbers, maybe they represent a quantity I don't know about.
Wdym? There are no other Python libraries which can parse FLPs to the best of my knowledge. This implementation of playlist item offsets is from MonadGroup's FLParser which parses it as a float or uint32 as well.
I think i initially parsed it as float as well and got similar results. The playlist items are locked to the resolution of the PPQ (unlike automation points, which are completely free), so I think float would be too accurate for that and waste space
From my first constatation, the offsets values indicate the time where to cut the sample, by not taking account the arrangement, the general bpm or the time stretching.
See below it is the same samples (the second one is time stretched) but cuted on the same location as the first one.
And the offset end values are the same.
It is an element to reply to the difference between offset and length.
So I need to found a relation between
offset end 1138116901
the real cut at: 0,42857143 seconds (exactly in my example)
Activity
demberto commentedon Oct 27, 2022
While actually I have not implemented this, the exception was a result of a bug in here:
PyFLP/pyflp/_descriptors.py
Lines 121 to 129 in 5034910
This was quite a big bug making nearly everything unsettable. This reminds me of testing the setters as well.
demberto commentedon Oct 27, 2022
Technically it is settable via the huge
PlaylistEventbut that needs low-level API knowledgedemberto commentedon Oct 27, 2022
Done, implemented in latest commits. New release comming soon 🎉
jubabrut commentedon Oct 27, 2022
Thanks
perfect it works too
what is the difference between the length and the offset (end minus start) ?
Moreover I don't understant the "end value"
because I created the smallest audio clip possible
And this is the offset value
offset : (0, 1084851705)
length : 1
demberto commentedon Oct 27, 2022
Start Offset:
Length is the length of the item as it is visible to you in the playlist.
End offset is the internal position from the end of a sample or a pattern. Now you might think that
start_offset+lengthis enough for that, why another field?And the answer to this is, I don't know myself 😄 FLP is a weird format.
demberto commentedon Oct 27, 2022
@jubabrut Will it possible for you to test PyFLP and find out bugs and suggest new ideas like these? Doing so will be a great help for me and will fasten the release cycle. A stable version will be ready sooner 🤗
jubabrut commentedon Oct 28, 2022
Do you know how the offset value is construct ?
Right now I don't fina logic with a value like 1174289603
Did you notice a full audio clip offset are (-1082130432, -1082130432), so weird
For the moment I try PyFLP and discover all features, that's why I find some bugs on different functionnalities.
But yes I wiil try to pass more time on this project in order to help you to increase the release cycle and find bugs.
What is your goal with this library? Because it is a huge work
For me my wish list will be to be able to generate music with AI but it seems complicated today to created channel, pattern, etc. directly with the program
demberto commentedon Oct 28, 2022
I need to take a look at it, maybe its incorrectly parsed, maybe it is a float, maybe it is not an absolute value at all.
At first, I aim to make all existing structures parseable and editable. I try to find the representations of various quantities like the
TimeStretching.timefeature you had problems with. That is the hardest part.I am also looking at the ability to clone or add certain entities like channels or MIDI notes for example. Once things like channels can be cloned, you can play with the values and modify them to your liking.
Some particular areas needing work are:
I generally try to add features when I am genuinely sure that the integrity of existing data is not compromised. PyFLP guarantees to not touch the data you didn't modify. FL studio on the other hand, rewrites everything from scratch, since it knows how the format works entirely.
PyFLP is not an FL Studio replacement. It can most certainly be used in project file converters and real-world DAWs that aim to support FLP format (if they ever get written in Python 😄)
jubabrut commentedon Oct 28, 2022
Ok because I really don't understand how to use offset value.
Look at this example, that has no sense
PyFLP test 4.zip
About
TimeStretching.timeit is interesting because in fact I searched a solution by using Python, to solve a problem I have with FL Studio. (A bug is open by Image Line because strange behovior happens when you switch a sample with different BPM. Position, length and offset change randomly).demberto commentedon Oct 28, 2022
FL has grappled with timing issues since eternity 😄
I think its interpreted incorrectly (might be a float, might be PPQ dependant, dunno). But atleast the start, end values seem to match up with the arrangement. I will take a look at this. You will have better luck if you look at the individual bytes instead of these integers, use int.to_bytes(value, 4, "little")
jubabrut commentedon Oct 28, 2022
I really don't understand how to use to_bytes
it gives me something like
demberto commentedon Oct 28, 2022
Yes sorry I meant
which will give you something like
Now you get 4 numbers instead of one and maybe it can help you find out some relation between the arrangement and them.
Although I don't think there's anything useful out of these numbers, maybe they represent a quantity I don't know about.
jubabrut commentedon Oct 29, 2022
do other python libraries provide the same result for offsets?
demberto commentedon Oct 29, 2022
Wdym? There are no other Python libraries which can parse FLPs to the best of my knowledge. This implementation of playlist item offsets is from MonadGroup's FLParser which parses it as a float or uint32 as well.
I think i initially parsed it as float as well and got similar results. The playlist items are locked to the resolution of the PPQ (unlike automation points, which are completely free), so I think float would be too accurate for that and waste space
jubabrut commentedon Oct 29, 2022
I was just thinking about FLParser but I didn't test that library
Thanks again for the time and your patience.
jubabrut commentedon Oct 29, 2022
From my first constatation, the offsets values indicate the time where to cut the sample, by not taking account the arrangement, the general bpm or the time stretching.
See below it is the same samples (the second one is time stretched) but cuted on the same location as the first one.
And the offset end values are the same.
It is an element to reply to the difference between offset and length.
So I need to found a relation between
offset end 1138116901
the real cut at: 0,42857143 seconds (exactly in my example)
demberto commentedon Oct 29, 2022
Interesting, I am converting this to a discussion