Hello !
I'm looking for a way to add some extra data to a song.
The data should be available from every instance of PatternXP, that is why I don't want to save the data as a part of the machine.
The only solution I can think of is to create another machine, a dummy one, to act as a server of this extra data.
But it seems a lot of work ...
If anyone have a very clever idea for my problem, that would be great
Adding extra data to the bmx
Re: Adding extra data to the bmx
use an atomic global boolean to check in every save() callback if the data was already written.
for loading do something similar. the instance that actually holds the data fills the shared data.
should work, unless someone has a better idea.
for loading do something similar. the instance that actually holds the data fills the shared data.
should work, unless someone has a better idea.
Re: Adding extra data to the bmx
That could be. I thought about that, but if this instance is removed, I have to send the data to another.UNZ wrote:use an atomic global boolean to check in every save() callback if the data was already written.
for loading do something similar. the instance that actually holds the data fills the shared data.
should work, unless someone has a better idea.
That's probably not impossible.
I had also the idea to use the "Info View" to save the data, I don't know if a lot of people use it ?
Re: Adding extra data to the bmx
remember that there is only one instance of "data". so since the data would be shared (either global or static inside your class) you dont really have to "send the data to another", instead whatever instance gets to save first just does the real save and the others dont save anything. the pointer to the data is the same in every instance.
Re: Adding extra data to the bmx
You are right, that's what I'll do, thanksUNZ wrote:remember that there is only one instance of "data". so since the data would be shared (either global or static inside your class) you dont really have to "send the data to another", instead whatever instance gets to save first just does the real save and the others dont save anything. the pointer to the data is the same in every instance.