Asset - Scripts MOD Tracker - Now works in HTML5

Mike

nobody important
GMC Elder
The new GMS 2.x version now works with HTML5 - Enjoy

https://marketplace.yoyogames.com/assets/4951/mod-tracker

HTML5 Demo: http://www.javalemmings.com/public/modplayer/index.html

Mod_Feature.png




Code:
Current effects supported: 0,1,2,9,$a,$c,$d,$f,$ea,$eb

0  = arpeggio
1  = pitch bend UP
2  = pitch bend DOWN
9  = Set sample offset
A  = Channel volume slide
C  = Set channel volume
D  = Pattern break
F  = Set MOD speed (0 to $1f)
EA = Fine volume UP
EB = Fine volume DOWN


Functions
------------
handle = mod_load_mod( filename )               Load mod file and make it ready to play
mod_play(handle)                                Play the mod file
mod_play_looping(handle)                        Loop the mod file
mod_stop(handle)                                Stop the mod file from playing
mod_resume(handle)                              Resume the playback of the mod file
mod_restart(handle)                             Restart the playback from the start of the tune
mod_set_volume(handle, volume)                  Set the global volume of the mod file (0 to 1)
mod_get_volume(handle, volume)                  Get the global volume of the mod file (0 to 1)
mod_set_channel_mute(handle,channel,true_false) Set the channel to mute
mod_get_channel_mute(handle,channel)            Get the channel mute state
mod_set_channel_volume(handle,channel,volume)   Set the channel's volume (0 to 1)
mod_get_channel_volume(handle,channel)          Get the channel's volume (0 to 1)
mod_toggle_channel_mute(handle,channel)         Toggle the channels's mute state
mod_save_recording(handle,filename)             If enabled, save the current recording
mod_set_speed(handle,speed)                     Set the MOD playback speed, from 0 to 31 - overridden by effect $f
mod_get_speed(handle)                           Get the MOD playback speed, from 0 to 31
mod_free(handle)                                Free up the current MOD, stopping it if required
 

Attachments

Last edited:

hippyman

Member
People asked and here you are with this! Nice work!!

I was curious if this is using pre-built sounds or if you are actually generating the sounds on-the-fly? Sorry if it should be obvious. I'm really not very familiar with trackers at all.
 

Mike

nobody important
GMC Elder
It plays standard MOD files, and they have samples built into them. However, you can create very small samples and loop them. MODs of 20 to 30k are not uncommon....
 

hippyman

Member
I've never really understood the MOD format so I didn't know that. I'll have to check this one out once I finally rack up four bucks on my game. It'll take about a month... :potato: But I'll get it!
 

RekNepZ

GMC Historian
This might just end up being the first (and possibly only) asset I ever buy. Now if only I had four dollars...
 
L

Lycanphoenix

Guest
Not quite as powerful as OpenMPT, but still a definite Must-Buy; especially given that it can integrate directly with GameMaker Studio, meaning more and more games might use module music these days.

This is going to be one of the first extensions that I purchase when I save up. I look forward to seeing any updates.
 
A

Ampersand

Guest
I wanted to make a famitracker clone by manually manipulating audio buffers and making raw data sounds but I got rather discouraged with audio delays. This sample-based tracking is very cool though, this will be fun to play with.
 
L

Lycanphoenix

Guest
Some incredible soundtracks were made using Sample-based modtracker formats. Look up "Deus Ex: GOTY" and "Unreal Gold" soundtracks, for some good examples.

When I make my game, currently just titled Boson (a working title), I hope to have a large portion of the soundtrack be tracker-based.
 

derboo

Member
Hmm I just bought this from the marketplace, but I'm having trouble getting it to run...

I tried using it in my own project like

music = mod_load_mod(filename);
mod_play_looping(music);


but it won't play anything.

Tried importing the demo into a new project and run it to check, but it only shows the tracker ui with the song loaded and won't play (image is stuck on the beginning of the track). Any way to solve this.

I'm using Game Maker Studio 2.3.3.570
 

Woza

Member
Hmm I just bought this from the marketplace, but I'm having trouble getting it to run...

I tried using it in my own project like

music = mod_load_mod(filename);
mod_play_looping(music);


but it won't play anything.

Tried importing the demo into a new project and run it to check, but it only shows the tracker ui with the song loaded and won't play (image is stuck on the beginning of the track). Any way to solve this.

I'm using Game Maker Studio 2.3.3.570
Download the new version from within GMS, using the my library option.
 

Ednei

Member
I bought this extension some time ago and it works perfectly for what was proposed by the author.
I would like to implement it in an RPG project I am doing, but I have difficulties because of my lack of knowledge.
From what I understand the extension allows you to load mod files, play music, pause and resume it. We can also increase and decrease its execution speed.

In a classic role-playing game, the game plays a village theme song and when you encounter an enemy and enter a battle the battle music is played. When you exit battle mode, the music becomes the village theme again.
The problem is that the village music starts from the beginning. Ideally, it would continue playing from where it left off before the battle.

Anyway, I couldn't implement it.

I've tested other extensions that play .mod files and they also don't have the functionality to retrieve a played song and resume it where it left off.

As a last attempt, I tried to load two songs into the extension at the same time. Village music and battle music.

My idea would be to pause the village music and play the battle music. When the battle was over I would pause the battle music and resume the village music.

Unfortunately I couldn't execute this idea.

The available extensions use the GM2.3 buffer function. I started to study about this subject. But I confess that I'm still lost.

Anyway. Is there any solution for this?

I appreciate any for any tip.

Thanks.
 
Top