[MM2] Direct Music Content

Finally worked !!

User avatar
BIGzee
MM2X Active User
MM2X Active User
Posts: 495
Registered for: 9 years 2 months
Location: You're standing on it.
Contact:

[MM2] Direct Music Content

Postby BIGzee » Thu Oct 22, 2015 9:46 pm

@dummiesboy & @The_Most_Wanted : IT WORKED !!

Pardon me for not responding to PMs, dummiesboy. I got deliberately involved with getting this to work. It finally did.

Direct Music Content

Yes, people. Direct Music formats are moddable, but only upto an extent (MM2's limitations :molesto2:). As of now, with dummiesboy's help, I've found a way to partially modify the segment's (a PITA), patterns (a bigger PITA), DLS and styles of a couple of dmusic files incl. containers. This happened all of a sudden, so I'll need some time to gather up in detail, the steps how i got it working and contrive a generic/easier method.

Here we go:

A leetle brief summary of what I did and accidentally got it working.

Dear2>mm2aud.ar> then,

aud/dmusic/

>Extracted the entire folder. Here's what I did, I collected the UI.sgt, Pause.sgt and Pause.sty. Why ? Cuz the UI.sgt is just a segment that uses the Pause menu's band and patterns as well as Instrument/wave data from the DLS Collection. Alos, I knew that it was a simple crammied up music, hence..

Fired up Microsoft's Direct Music Producer>File>New>Project>{create new project}.

Several tutorials later, I've learnt ..

Code: Select all

In MM2's case : .sgt -Segment files .sty - Style files .dls - Actual Containers of Wave (music) and Instrument data. Direct Music Software implement these file formats only as runtime. While active/affiliated to Direct Music software, sgt is sgp sty is stp dls is dlp. Just changing the file formats in the end didn't work either.
As dummiesboy had asked me to, I imported the .sgt files first, then .sty and .dls were prompted, just like he had said. Pause.sty/Pause.sgt (or maybe UI.sgt, don't quite remember which) requested content from 2 different DLS Collections.

Code: Select all

A summary of what I had imported in order.. *UI.sgt *Pause.sty *DLS Collection1.dls Got prompted for DLS Collection3 *DLS Collection3 (the .dls one) Then, File>Insert Files into Project> *Pause.sgt
This is what I could see or make out of, after the importing..

Code: Select all

*[-]DLS Collection.dlp : :...DLS Collection1 : :...[-]Instruments : : : :...Bass 0,1,0 : : : : : :...[+]Articulations List : : : : : :...[+]Regions : : : :....(+25 other similar Instruments : with Articulation and : Regions folders/files) : : :...[-]Waves : :...(49 wave audio files, presumably mono 16bit PCMs.. or PPMs, no idea) *[+]DLS Collection3.dlp (same old same old) *[-]Pause.sgp (the .sgt one) : :....Pause (actual segment file) *[-]Pause.stp (the .sty one) : :....Pause (actual style file) : :...[-]Bands : : : :... Pause (actual Band file, containing the : Instruments files' data) :....Motifs : :....[-]Patterns : :... PauseBreakDown :... PauseBreakDown1 :... PauseFull (these are the gamechangers, and you don't wanna go wrong in here or the segments) *[-]UI.sgp : :... UI (menu music segments)
After a week of multiple tutorials and messing around with these MM2 runtimes and understanding what they are, I decided to take a stroll around Direct Music Software by creating a NEW Direct Music Project, starting an empty DLS Collection, an empty style, a random song in .wav (Daft Punk's Harder Better Stronger random EDM mix, since this was readily available on my disk in uncompressed .wav format.. stereo, but. So I knew there and then, it ain't gonna work. Sorry for dat :oops:), then a segment in the end, cuz a segment can only be created if there's a .wav file in the Waves folder. I tried this with the default parameters that come with the default Bands, Segments, Patterns and DLS Collections.

First off started with the wave file of the daft punk song which was of 35 mb uncompressed stereo .wav audio.

Right click the wave file in the Waves folder under the .dlp dropdown, and select "Properties". Now a dialog appears with 3 tabs in the header. Under the First tab you would notice the "Root Note" is at "C5" by default. Bear that in mind. You'll need that later. In the 3rd tab, you'll see the compression option. Select that for good. If it doesn't work, it's allright. You'll only be sacrificing the Loop function.

Now move onto the Instruments folder and right click on it and select "Insert Instrument" and right click the newly created instrument and name it to something favourable/remember-able. My case I've named it to Daft Punk. Now double click the instrument. The right pane brings you a boring surprise by default. We'll be leaving everything there at default except for

*Select the Wave dropdown menu under "Region" submenu in the left part of the right pane, and selecting the wave file's name. In my case it's 'Daft Punk - Harder Better Faster Stronger'.

*Note that the Root option is still lying at C5. It has to, since anything lower than C5 goes to the lower tones. So, C5 is the default untouched playback tone, throughout the process.

Then go to Style.stp and rename to Pause.stp. The child file "Style" gets renamed to the parent folder's name. Go to Bands folder, drop it and right click the Bands1 file and rename it to Pause. Now double click it and in the right pane delete the so-called PChannels. ALL of 'em. Now right click in the empty space and select "Add/Remove PChannels" option, and a box appears. Add the PChannel. Exit da box. Now right click the newly added PChannel and select "Properties" and in the box, firstly rename it to Something recognizable/understandable. My case, I've named it to Daft Punk as well, similar to the Instrument file. In the middle part of the box, select the "Instruments" faded checkbox, click the retro button below and select in the dropdown list, "Other DLS" and navigate to select the Instrument name in there. Get the hell outta there.

Now move onto the Patterns and rename the Pattern1 file to PauseFull (maybe you could rename it to something else too. But precaution is advised). Right click on it and select "Properties". And set the Groove values to "1". And select the "Measures" values to how long the wave file is, divide by 2. In my case it is 104 Measures since the Daft Punk song is 208 seconds long. Then exactly at C5 (todya it's always been C5 - the chosen one), at the first block, right click and select "Insert tone" or press "Insert" on your keyboard. Now drag the tone (extend) to the end of the track. You could try zooming out by pressing the zoom out buttons in the lower right corner of the right pane.

Now select the segments.sgp and rename to either Pause.sgp or UI.sgp and select the segment files by double clicking on them. A box shows up asking you to enter the Measures again, similar to the Pattern's properties. I slapped a 104 again. And in the right pane, right click on the first block of any of the segments rows and select "add track" and ctrl+select "Band", "Chord", "Groove", "Style" and "Tempo". Delete "Time Sig" track. And on first block of "Chords", right click and select "Insert note" and a box appears. Just exit the box without doing anything. Now right click the first block of Grooves and select Insert note and re-add ones to the groove range similar to the Pattern's properties, we did before. Now right click the first block of Style and select Insert Note and a box appears. Apply the parameters referring to the Measures (the usual) and select the corresponding "Style" option in the dropdown and close the box and flee.

Create a new segment and rename it to the other one - Pause.sgp if the previous one was UI.sgp (or) UI.sgp if you just did Pause.sgp, and repeat the same "segment" process.

Now alas, click on File>Runtime Save All Files: Project ...

and the Runtime files get saved in .sgt , .sty and .dls again. Same as exporting in zm 1.07b. You could save the project too for future use and easier future reference.

Now pack the Runtime files in an .ar file and try them. These sample runtime files below is the result of of this accident. It wasn't supposed to work since the audio was too high in bitrate, but shockingly it did. Try this once for yourself !!

SAMPLE RUNTIME FILES.


Dunno if I should even call this a mod, after what happened to my 2nd Non-vehicle mod for MM2, even this could play a likely ruse. Has anyone attempted this before or does anyone know about Direct Music stuff ? Currently in plans on working on a more generic, super easy tutorial (and ready to replace wave containers, segments and patterns) for noobs. That'll require me to slim down all files in the dmusic folder for easy manipulating and save as runtime - easy peasy.

There's some stuff that even I need to know like after typing this I discovered that menu music overrides the car select screen sounds. I never used the Play Music feature in MM2 before, until this week.
Last edited by BIGzee on Fri Oct 23, 2015 8:34 am, edited 1 time in total.
ImageImage
Keanu Reeves chose the Red pill and started bending spoons. I chose ZModeler 1.07b and made my own Matrix.

User avatar
FXANBSS
MM2X Active User
MM2X Active User
Posts: 686
Registered for: 11 years 1 month
Location: Midtown Club, Discord
Been thanked: 4 times

Postby FXANBSS » Thu Oct 22, 2015 11:07 pm

8O

User avatar
mm2mm1fan
MM2X Very Active User
MM2X Very Active User
Posts: 1214
Registered for: 10 years 9 months
Location: USA
United States of America

Postby mm2mm1fan » Thu Oct 22, 2015 11:18 pm

I can put my own music in-game, awesome! 8O
Retired from modifying Midtown Madness games. Nowadays I mod Crashday Redline Edition in my spare time.

Image

User avatar
The_Most_Wanted
MM2X Active User
MM2X Active User
Posts: 960
Registered for: 11 years 6 months
Location: Egypt

Postby The_Most_Wanted » Thu Oct 22, 2015 11:47 pm

Great project and good work! :)
Image
Best Midtown Madness 2 car converter of the year
Best Midtown Madness 2 innovation of the year
Author of the best Midtown Madness 2 mod of the year

Image
Best Midtown Madness 2 breakout of the year
Author of the best Midtown Madness 2 car add-on of the year

Image

User avatar
Franch88
MM2X Admin
MM2X Admin
Posts: 15758
Registered for: 16 years 10 months
Location: Italy
Been thanked: 1 time
Contact:
Italy

Postby Franch88 » Thu Oct 22, 2015 11:54 pm

What you've done sounds really impressive, great research and time spent into it. :)
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|

User avatar
sajmon14
MM2X VIP Member
MM2X VIP Member
Posts: 5321
Registered for: 16 years 2 months
Location: Poland
Contact:
Poland

Postby sajmon14 » Thu Oct 22, 2015 11:57 pm

Good work :)

aaro4130
MM2X Super Active User
MM2X Super Active User
Posts: 2405
Registered for: 15 years 10 months
Location: Canada
Been thanked: 1 time

Postby aaro4130 » Fri Oct 23, 2015 2:00 am

We can get full music into MM2 with wav files. It's nothing really new.
[img]https://i61.tinypic.com/25zrngo.jpg[/img][color=white]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer

[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]

User avatar
BIGzee
MM2X Active User
MM2X Active User
Posts: 495
Registered for: 9 years 2 months
Location: You're standing on it.
Contact:

Postby BIGzee » Fri Oct 23, 2015 11:11 am

8O
Yepz. Its happened and it cannot be unseen :P.
I can put my own music in-game, awesome! 8O
Yep. Possible, but seems so far only mono would work great cause of the possibility to compress the wave streams. We still have one heck of a problem though - Loop. Even if you get your song working, it requires very low quality version of the audio file or a very short version of it for the Loop to work, else the song plays only once. The default songs in MM2 are long cuz they are MIDI files with individual drum, snare, kick, BA DUM TSS stuff, each of the MIDI files being 14 - 55 kb in size (in Explorer), its actually a virtual band playing live and I only just figured a way to supersede the Instruments barricade to support a wave file. That's all it did. Complications arose still, so there you go - Limitations :cry:. Will be Super excited myself if Music finally works *fingers crossed*.
Great project and good work! :)
Phew, yeah :borracho:. So many Months later !!
What you've done sounds really impressive, great research and time spent into it. :)
You were the one who advised me to get dummiesboy's help !! Thanks for THAT !!
Good work :)
Thanks, sajmon14. But this is only a teensy step. There's plenty more to be done.
We can get full music into MM2 with wav files. It's nothing really new.
Through dmusic ? HOW :bigeyes: ?? This was anyway worth the little step further, not to brag :tongue:. Not just music, even menu music scores and cop chase music replaced with code 3 chatter are a possibility. Have you done this before ? :o

I just realized that renaming the DLS runtime with anything other than the exported/saved runtime name, ceases to work in-game.

The Style and Segment files MUST have the exact runtime name as the ones that are to be replaced with. Renaming them post saving/exporting from Direct Music Software will not work..

I've redone the Sample Runtime files in the first post. Download and try them to see if it works. I got a fair amount of crashes with that audio and I think it is perfect enough for testing MM2's limitations. If you experience the same, please do post here.
ImageImage
Keanu Reeves chose the Red pill and started bending spoons. I chose ZModeler 1.07b and made my own Matrix.

User avatar
KingAndy
MM2X Very Active User
MM2X Very Active User
Posts: 1114
Registered for: 10 years 7 months
Location: Lisbon, Portugal
Been thanked: 1 time
Contact:

Postby KingAndy » Fri Oct 23, 2015 12:53 pm

Honestly I skipped the process explanation part because I wasn't understanding it, but the whole thing is a great discovery, great work you've done! :)
Image
Best active member avatar
Best active member MM1 screenshot-er
Friendliest active member

Image
Most helpful active member
Best MM2 car converter of the year
Best MM2 innovation of the year
Author of the best MM2 mod of the year
Best active user's self amatory site


Image

User avatar
BIGzee
MM2X Active User
MM2X Active User
Posts: 495
Registered for: 9 years 2 months
Location: You're standing on it.
Contact:

Postby BIGzee » Fri Oct 23, 2015 1:58 pm

Lol :P. Sorry for that. Was half sleepy when typing. Will find a simple way of explaining the Howz.

EDIT: Good thing you did, actually. I went through it just now - Gave me Cancer :wak:
Last edited by BIGzee on Fri Oct 23, 2015 6:01 pm, edited 1 time in total.
ImageImage
Keanu Reeves chose the Red pill and started bending spoons. I chose ZModeler 1.07b and made my own Matrix.

User avatar
Kunal2045
MM2X Very Active User
MM2X Very Active User
Posts: 1185
Registered for: 14 years 7 months
Location: New Zealand

Postby Kunal2045 » Fri Oct 23, 2015 2:02 pm

Nice! :) Was really hoping for something like this
[align=center][color=black]Sig[/color]
[img]https://www.imgweave.com/view/4838.png[/img][/align]

Jeremiahjobling
MM2X Occasional User
MM2X Occasional User
Posts: 320
Registered for: 12 years 3 months
Location: London
Been thanked: 2 times
Great Britain

Postby Jeremiahjobling » Fri Oct 23, 2015 5:05 pm

Very good work man

But when I wanted to play music whilst on MM2 I would always have a media player playing through a list of tracks on my PC whilst I was in the game, which was good enough for me :)

User avatar
BIGzee
MM2X Active User
MM2X Active User
Posts: 495
Registered for: 9 years 2 months
Location: You're standing on it.
Contact:

Postby BIGzee » Sat Oct 24, 2015 4:01 pm

Nice! :) Was really hoping for something like this
Not to keep high expectations, but I'm starting to see the limitations gradually.
Very good work man

But when I wanted to play music whilst on MM2 I would always have a media player playing through a list of tracks on my PC whilst I was in the game, which was good enough for me :)
Thanks !! Yep. Guess we will have to stick to only that. This doesn't seem suitable for music adding, unless you guys are hellbent on adding your own audio for it, this will be quite useful for personalization.
ImageImage
Keanu Reeves chose the Red pill and started bending spoons. I chose ZModeler 1.07b and made my own Matrix.

aaro4130
MM2X Super Active User
MM2X Super Active User
Posts: 2405
Registered for: 15 years 10 months
Location: Canada
Been thanked: 1 time

Postby aaro4130 » Sun Oct 25, 2015 5:12 am

Slight audio delay, I used to use some pretty weird stuff for making videos
[img]https://i61.tinypic.com/25zrngo.jpg[/img][color=white]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer

[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]

User avatar
BIGzee
MM2X Active User
MM2X Active User
Posts: 495
Registered for: 9 years 2 months
Location: You're standing on it.
Contact:

Postby BIGzee » Mon Oct 26, 2015 6:37 pm

Slight audio delay, I used to use some pretty weird stuff for making videos
WAO 8O. All that through dmusic or source code hack (.exe one).. or Unity ? Wait, you've done this before :o. How deep did you go with it ?
-------------------------------------------------------------------------------------
Also, some new info I've dug up on ..

Even the Bands had to be renamed to the default style file; ones that it were to replace. So it came to this - .sty and .sgt files that were to be packed in an .ar to replace the default's functions, should not only have the same name of the file ("Pause.sgt" in the custom made .ar replaces the "Pause.sgt" of the mm2aud.ar) but also the containing data (Band header named "Pause" has to be named "Pause" in the 'custom edited' style file that replaces the default one). This applies to .sty and .sgt, but not .dls. DLS is just a container and mm2 reads no archive functions from it, so it needs no renaming to MM2's dmusic defaults, but still keeping in mind that ALL the renaming needs to be done before saving the Runtimes (exporting). MM2 seems to only accept/identify using only the Headers' names, not the filename. Typical :molesto2:.

And also, some very much 'Skippable' info 'bout the dmusic contents:

We officially have 11 songs in the directory
  • TacoLoco
  • SunRoof
  • Vanilla
  • London - Dunno if it even plays in MM2, but it's a song for all I know
  • Pimphand
  • BackOff
  • Bullet
  • Duck
  • Enemy
  • Groover
  • LeTigre
Let's Take an in-depth view of these children files (which isn't as deep as of now):
Taking TacoLoco as our guinea pig,
  • TacoLoco.dls - The audio container, containing .wav splits that are triggered by the Instruments.
  • TacoLocoIdle.sgt - ???. Could be when the player car is in Idle.
  • TacoLoco.sty - The Turntable. The dictator. The Nerd.
  • TacoLocoRestart.sgt - ???
  • TacoLocoStart.sgt - ???
  • TacoLocoCops.sgt - The Cop chase music. Badly needs to be replaced with a score, whaddayasay ?
  • TacoLocoCopsIdle.sgt - ???. Could be when the Cops are at a standstill, on/off the radar. Cooldown music say ?
* segment files are the 'playlist' here. And MM2 has them set to random by default, so these 11 songs randomize with no particular/definite pattern. Even on addon tracks too. Will update when i find something.

*yawn* Ambient city sounds too:
  • UndergroundAmbience
  • LondonAmbience
  • SFAmbience
Needless to say, Ambient sounds modding are as easy as turd. Simply add a replacement wave audio stream. Z'all. So, expect some modern/actually pleasing Ambient sounds for MM2.. finally :borracho: (Cheer up. That's good news).

About the default songs. We now have 11... possibly, cuz it isn't officially tested. So, if you wanted to add your own tracks, you could stitch multiple songs (number of songs that you wish to add divide by 11, give or take a few) into one long .wav file and export it to dangerously low bitrates (16 K, say) and replace them with these 10 different songs, and MM2 randomizes them for good. Dunno 'bout you guys, but sounds like a workaround to me.
(or)
Does anyone listen to Promodj or alternates ? Heard of those long 50 - 60 minute mixes ? You could download them, lower the bitrate and add 'em to the DLS collection. They're sure gonna keep you busy for long, especially for those who play MM2 for hours. Do such people even exist :wassat: ?

As I keep progressing through this stuff, I'm only finding reasons for using this as a cops score/scanner mod feature and lesser on the music replacements' favor. I NEED your comments on this. Thanks for reading this.
Spoiler
Image
ImageImage
Keanu Reeves chose the Red pill and started bending spoons. I chose ZModeler 1.07b and made my own Matrix.