Author Topic: Multiple sequences within one song file  (Read 10431 times)

Offline Skaven

  • Workaholic artist
  • ***
  • Posts: 112
    • http://www.mikseri.net/skaven
Multiple sequences within one song file
« 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. :)

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,005
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
[PENDING] Multiple sequences within one song file
« Reply #1 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.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Skaven

  • Workaholic artist
  • ***
  • Posts: 112
    • http://www.mikseri.net/skaven
[PENDING] Multiple sequences within one song file
« Reply #2 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.

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,005
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
[PENDING] Multiple sequences within one song file
« Reply #3 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.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #4 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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Skaven

  • Workaholic artist
  • ***
  • Posts: 112
    • http://www.mikseri.net/skaven
[PENDING] Multiple sequences within one song file
« Reply #5 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:

Quote
Regarding 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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #6 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. :)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #7 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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Really Weird Person

  • Crazy artist
  • ****
  • Posts: 818
  • I love Daisy (デイジー)!
  • Operating System: Windows 8 Pro x64
Multiple Sequences
« Reply #8 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.)

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #9 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...
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Really Weird Person

  • Crazy artist
  • ****
  • Posts: 818
  • I love Daisy (デイジー)!
  • Operating System: Windows 8 Pro x64
Multiple Sequences
« Reply #10 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 (though perhaps not as weird as those and  probably not as strangely named either :lol:).

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #11 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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline Really Weird Person

  • Crazy artist
  • ****
  • Posts: 818
  • I love Daisy (デイジー)!
  • Operating System: Windows 8 Pro x64
Multiple Sequences
« Reply #12 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.

Offline Paul Legovitch

  • Workaholic artist
  • ***
  • Posts: 145
    • http://legovitch.blogspot.com
[PENDING] Multiple sequences within one song file
« Reply #13 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.



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.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,512
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
[PENDING] Multiple sequences within one song file
« Reply #14 on: December 30, 2009, 21:41:44 »
sounds like an interesting idea, but also like a lot of work.

Quote
I'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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.