ModPlug Central

OpenMPT Development (Archive) => Feature Requests => Feature Request Archive => Topic started by: Skaven on May 05, 2009, 04:30:53

Title: Multiple sequences within one song file
Post by: Skaven on May 05, 2009, 04:30:53
It would be convenient if MPT / the IT format supported multiple sequences within one song file. These would be displayed as separate "folders" in the tree view, and could be separately called via code. They would loop individually.

The main reason why I've been looking for something like this, is that when making game music,  I've had to share the sample set to save disk space, yet have multiple different tunes for  different game states (main menu, gameplay1, gameplay2, game over fanfare, win fanfare, etc) within the song. Usually I've done this by just appending them one after another in the Sequence, and they get accessed with offsets from within code.

The problem with this is that whenever a sequence's length is changed as the music is worked on, all the consequent sequences (and their offsets and loop commands) will shift and have to be double-checked. Which is kind of error-prone for a scatter-brained L'Artiste like myself. :oops: Also, it gets difficult to keep track of all the different tracks that are in the song file (I try to separate them with "+++" markers in the sequence to tell them apart).

"Officially" supported multiple pattern sequences within one tracker song would make this easier for this particular purpose. :)
Title: [PENDING] Multiple sequences within one song file
Post by: LPChip on May 05, 2009, 08:38:14
You can archieve this by using a -- pattern in between. I know that XMPlay has support for this. If you happen to use Bass.dll as engine, you most likelly can use multiple sequences.

I do agree that your suggestion would be nice.
Title: [PENDING] Multiple sequences within one song file
Post by: Skaven on May 05, 2009, 15:12:49
Quote from: "LPChip"You can archieve this by using a -- pattern in between.
Yes, that's what I have been doing so far. The only problem is that because the sequences are following one another in the sequence list, they will all shift if the length of any sequence changes, so you have to update all the Bxx loop commands and music offset code calls accordingly.

If each sequence was treated as a separate entity, this would not happen.
Title: [PENDING] Multiple sequences within one song file
Post by: LPChip on May 05, 2009, 16:17:08
Hmm... I know that XMPlay can autodetect this, and loop on it accordingly, even without a Bxx command being present in the song. Not sure if Bass has all these functions in it (if you're using bass at all), but you might be able to program an autodetection part yourself by looking for the -- patterns.

Do note, that even if this request is build, there will still not be support in a game area.
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on May 05, 2009, 17:01:55
Since I've been using a similar technique in my game, I can safely say that BASS
1) won't detect subtunes, you have to search for them yourself
2) won't loop subtunes correctly if the Bxx is missing.
Title: [PENDING] Multiple sequences within one song file
Post by: Skaven on May 08, 2009, 19:06:57
I mailed with Ian "BASS.DLL" Luck briefly, and he said it's actually possible to bypass the pattern sequence in the tracker song and "softcode" the pattern sequences to an external file, or something along these lines. Here's a direct quote:

QuoteRegarding the dynamic order list, that may actually already be possible with the latest builds. They include a BASS_TAG_MUSIC_ORDERS option (for BASS_ChannelGetTags), which gives the order list. It wasn't really intended for modifying the order list, but I think it would possible to do that by modifying the returned array.

So, this might be a viable option for games, if the programmers are willing to go through the trouble.
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on May 08, 2009, 19:09:28
Hehe yeah, Ian introduced the BASS_TAG_MUSIC_ORDERS flag for me because I was doing exactly this... Scanning for subtunes by decoding the mod was too much hazzle, so I asked him if there could be a way to find out the actualy order list. :)
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on September 22, 2009, 21:40:49
Okay, so the MPTM format supports multiple sequences now (not through the treeview, though, but I work on this). Do you have any comments on that, e.g. how it should be enhanced in the next versions?
The next version will also be able to merge all sequences into one sequence when converting to .IT or other formats. That will also take care of Bxx comamnds.
Title: Multiple Sequences
Post by: Really Weird Person on September 24, 2009, 23:15:12
That is a nice feature indeed. I think that I could get used to it! The 50 limit was a shocker though. I was thinking that the limit would have been 256. Here are my requests in regard to this particular feature:
#1:  Increase the limit to at least 256 (though 65,000 would probably be a little bit of overkill) (Note:  If this is done, I shouldn't have to ask about limit increases again, as 4,000 × 256 = 1,024,000. If I do, I will let you know, as I am not sure how hard this feature was to implement.)
#2:  Make the sequences consecutive. What I mean by this is that once the first sequence (labeled with a zero) finishes, the song should move on to the following sequence, not repeat it.
#3:  Add a "Sequence" row to the Go to... dialog.
#4:  Allow creating of a shortcut for sequence creation (since I did not see this anywhere in the setup dialog)
#5:  When creating new sequences, they should be blank and contain the same number of patterns as the previous sequence, but the pattern row cursor (though the term may be incorrect) should be put back to the first position (as opposed to being duplicates).
#6:  The time should also be consecutive. This applies to the Approximate song length and playback time at position... dialogs. It should also be consecutive (as opposed to each individual sequence having one). If you want to know the length of any particular sequence, you could format the playback time dialog to reflect a selected range in addition to a particular position in the song (which you may want to add the sequence number to, by the way).

As for the tree view, here is what you could do. You can have subfolders under the Sequence folder (renamed Sequences) with each individual sequene underneath (also as folders). The individual sequence folders would be designed just like the Sequence folder is now.

Note:  This feature is a major step toward winning me over with the newer versions (though I am not sure that I would necessarily want to redo some of my older songs, but I might redo them too. I guess that only time will tell that one.)
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on September 25, 2009, 11:47:42
Quote
#2: Make the sequences consecutive. What I mean by this is that once the first sequence (labeled with a zero) finishes, the song should move on to the following sequence, not repeat it.
This doesn't make sense. Multiple sequences equal to multiple songs, and this is not meant to be a playlist...
Title: Multiple Sequences
Post by: Really Weird Person on September 25, 2009, 14:41:21
Hmm, the newer version is suddenly less appealing. I guess though that you can't say that I didn't at least try to help with the second part (the one about the tree view changes) even if some of the other suggestions are like Strong Bad's bogus mathematical theorems (http://www.hrwiki.org/wiki/Bogus_Mathematical_Theorems) (though perhaps not as weird as those and  probably not as strangely named either :lol:).
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on September 25, 2009, 15:37:51
How could you benefit from chained sequences? oooooh right, you want to to do songs with 6440404606404600469649346846230932 patterns again. Sorry, no. Simply: No.
Title: Multiple Sequences
Post by: Really Weird Person on September 25, 2009, 18:32:58
Though you are likely qutie serious with the post, I actually chuckled at the number. That is funny. Let's see here, what would that number be, hmm. 6,440,404,606,404,600,469,649,346,846,230,932 would be quite a large number indeed. I was trying to find something that would break it down by place value position (denoted by the commas), but I could not seem to find such a thing.
Title: [PENDING] Multiple sequences within one song file
Post by: Paul Legovitch on December 30, 2009, 20:57:53
Quote from: "Jojo"Okay, so the MPTM format supports multiple sequences now (not through the treeview, though, but I work on this). Do you have any comments on that, e.g. how it should be enhanced in the next versions?

I'd say that neither the tree view nor the pattern editor are really user friendly to view or edit a sequence, so even less multiple sequences (that requires right click sub menus to manage them).
I think we could benefit from having a Sequence/Order Manager where instead of a line, the order list would be presented in a matrix (32 wide, variable height) that would behave exactly like the current order list (right-click menu, shortcuts, drag & drop actions, etc.) while being a lot easier to work with.

(http://img258.imageshack.us/img258/7580/sequencemanager.png)

You can see the whole song, drag & drop actions are easier and the structure is clearer (as an option, [+++] and [---] patterns could act as "end of line" to enhance the structure).

- Manage multiple sequences via buttons : new - delete - merge (better than sub menus).
- Select the sequence number, sequence name.
- Loop current sequence (or not).

Quote from: "Jojo"The next version will also be able to merge all sequences into one sequence when converting to .IT or other formats. That will also take care of Bxx comamnds.
I've been working on a module with multiple songs in it (for a game), so sequences would have been of great help during the creation process (to then merge into a classic module with Bxx jumps as you say).
Video game music aside I think sequences would also allow me to work on multiple versions of the same song or work on several independent parts I want to merge into one song. I like to start in many directions when I have a good set of instruments, the sequence feature would be great to work on these independently and then select and merge.

By the way, along with Ctrl+C Ctrl+V to copy and paste orders, I'd like Ctrl+A to select all orders, if possible.

I think I would certainly use sequences a lot, providing a proper interface.
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on December 30, 2009, 21:41:44
sounds like an interesting idea, but also like a lot of work.

QuoteI'd like Ctrl+A to select all orders, if possible.
Note that you can simply use Home+Shift-End to do that in the meantime.
Title: [PENDING] Multiple sequences within one song file
Post by: Paul Legovitch on December 30, 2009, 22:11:46
Quote from: "Jojo"sounds like an interesting idea, but also like a lot of work.
Especially the matrix. :oops:
Quote from: "Jojo"Note that you can simply use Home+Shift-End to do that in the meantime.
Noted, thanks.
Title: Multiple Sequences in One Song
Post by: Really Weird Person on January 02, 2010, 02:21:30
Quote from: "Jojo"The next version will also be able to merge all sequences into one sequence when converting to .IT or other formats. That will also take care of Bxx comamnds.

I would assume that only happens if the sequences total 240 patterns or less (as that is all that is allowed in IT format). As for position jumps, having to use them can be quite cumbersome if the song needs to be more than 256 patterns long (as the X-parameter effect does not affect the position jump that I am aware of).

Quote from: "Paul Legovitch"You can see the whole song

That is assuming that your username on Modplug Central is not Really Weird Person. Wow, his songs are long! Have you ever seen any of them? I have and, wow, one of them even ended up being 64,974 patterns long! He tries to steer clear of songs that end up being 1 GB or more in size, and so far, he has done a good job. As for making them short, hmmm, that is a completely different story. The songs sound nice, but can occasionally last for days (literally) before repeating.

Quote from: "Paul Legovitch"I'd like Ctrl+A to select all orders, if possible.

Hi, Paul, as well as what Jojo mentioned, you can also change the actual shortcut in the keyboard tab in the setup dialog (accessed by pressing Control-F1*). That is what I did. Control-5 is kind of odd for such a function. Control-A is what Windows uses (as well as most programs for it). Wow, when I submit the post, the screen reads that x (where x represents the quoted user) "wrote:" followed by the post. I guess that I am not the only user that uses a tablet PC. :lol:

* Note to Paul:  Depending on your computer's configuration and if you have Narrator open, you may or may not hear this keystroke.
Title: [PENDING] Multiple sequences within one song file
Post by: Paul Legovitch on January 04, 2010, 09:10:44
For the sake of keeping things organized, let me quote here a suggestion related to sequences and possible issues discussed in the general forum (http://forum.openmpt.org/index.php?topic=3516.0&sid=30d754b6cdce7f440241ba834a8659ca) :
QuoteIssues :
No indication of the current sequence number :
-> in the pattern panel, select the sequence number next to the sequence name (see mockup).

Risk to alter a pattern used in several sequences without knowing it :
-> in the pattern order, add an asterisk * for these patterns.
-> in the pattern order right-click menu, add the possibility to Replace by Copy for these patterns (equivalent to : Duplicate Pattern + delete original).

Mockup :
(http://img136.imageshack.us/img136/1857/sequence1.png)
Sequence 0 : patterns #0 to #4 are marked as "used in another sequence".
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on January 04, 2010, 20:42:31
a sequence switcher has been added for now, and yeah, and indication of already used patterns would sure be useful, but it won't be done for now.
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on January 25, 2010, 22:25:10
Many improvements have been done to sequence handling in the latest version; Please confirm that this has been added as wished in OpenMPT 1.18 release candidate (http://forum.openmpt.org/index.php?topic=3701.0). You can set the thread status to S=C yourself then. Any additional feature requests concerning sequences should be re-posted in a different thread, to keep things tidy.

Some of the biggest improvements in short:
- Full sequence handling in treeview.
- Quick sequence switcher in pattern editor.
- Enhanced sequence conversion features when converting from/to MPTM and in cleanup dialog.
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on May 30, 2010, 13:45:12
Anything to add here? If not, you may set the thread status to closed then. :)
Title: [PENDING] Multiple sequences within one song file
Post by: Skaven on June 06, 2010, 16:16:25
Well, I tried drag-dropping patterns from the horizontal sequence to one of the tree view sequences to move them, but I can live without that. Copy-pasting multi-selected patterns works pah-fectly. :)
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on June 06, 2010, 16:21:53
Right, dragging *to* the treeview does not work yet. I'll see if this can be easily done...
Title: [PENDING] Multiple sequences within one song file
Post by: Skaven on June 06, 2010, 18:02:25
Oh, found a little bug. If there is a Stop ("---") inside one of the multi sequences, and you convert the song back to an .it, those stops appear as "???"s in the merged sequence. I was hoping to be able to rearrange the multiple sequences... but ended up adding more sub-sequences inside a sequence, causing this oddity.  :oops:  

How difficult would re-arranging the multiple sequences be to implement?  :)  (yeah, give them a little something, and they end up asking for moar MOAR!!11)
Title: [PENDING] Multiple sequences within one song file
Post by: Saga Musix on June 06, 2010, 18:11:22
Hmm - does this really still happen with OpenMPT 1.18.02.00 (http://forum.openmpt.org/index.php?topic=3951.0)? I did a quick test with several sequences containing a "---" pattern, and they were all converted properly...
Title: [PENDING] Multiple sequences within one song file
Post by: Skaven on June 06, 2010, 18:38:12
Ah yes, sorry. Hadn't updated in a while. Works now. :)