Im only able to draw one element made up of 3 structs. I have not have any success turning this in to a group of elements to create my song builder. I have had to take many steps back to the most stable version that I have been able to come up with.
The playlist element consists of 3 structs contained inside [pd $0-display]
The first struct is a $0-bang object this bang will trigger the matching # to play the wave "loop"
The second struct is the play position. "the bright green bar" when a wave is played its play position is updated increasing the size of this green bar. until it == 1.
The last struct is a background panel more details below.
The arguments for each line inside the text file are as follows.
1- # of wave file we wish to play. (Not to be confused with the current index of the file or line number. this argument will most likely never run in sequential order. It can be any given number.)
2 - R
3 - G
4 - B
The last three arguments are rgb values for the background struct.. Each playlist item should change colors when it is first drawn depending on the values set in the text file.
At this point im stuck I dont know how I should append more copies of this playlist element/subpatch to [pd $0-display].
Also if there is more elements then space allowed I'm going to need some sort of page or bank control to update/show the rest of the playlist items.
I was also thinking of adding a second bang to act as a removal function for when it comes to editing items in the playlist.
here is my current song builder patch.
SongBuilder.zip
I hope someone can help. I've been struggling with this for a while.