English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 18 July 2017, 01:34   #1
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 2,976
Protracker playback library with sound effects

I've managed to translate Phx's Protracker playback routine (as used in Solid Gold and Sqrxz) into a Blitz library.

What sets this library apart from other tracker players is that it works with all system versions (and not only 2.0+ like Ciatrackerlib) and that it supports simultaneous sound effects. The player automatically chooses the most suitable channel to override with sound effects, but you can also reserve certain channels for music only.

To install, copy ptplayer.obj to Blitzlibs:Userlibs or Blitzlibs:Otherlibs and rebuild Deflibs using either Blitzlibs:Makedeflibs or using BlitzLibMan from Aminet.

Command reference:
LoadBank 0,"mod.song",2 (loads module into bank 0 in chipmem (2))
MTInit Bank#, startpos (inserts module into player)
MTInit &module_addr, &instr_addr, startpos (inserts INCBIN module into player, set instr_addr to 0 for normal modules)
MTPlay On/Off (start/stop module playback)
MTEnd (Stop playing current module)
MTSoundFX Sound#, volume (0..64)
MTSoundFX &sample_addr.l, length.w, period.w, volume.w (0..64)
MTMasterVolume 0..64 (Master volume for all music channels)
MTMusicMask bitmask.b (Set bits 0-3 to reserve channels for music only.)
MTMusicChannels 0..4 (number of channels dedicated to music)
MTE8Trigger (Value of the last E8 command in case you want to trigger game events from a module)
Attached Files
File Type: lha BlitzPhxPlayer.lha (5.8 KB, 20 views)

Last edited by idrougge; 18 July 2017 at 13:17.
idrougge is offline  
AdSense AdSense  
Old 18 July 2017, 10:19   #2
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,048
Excellent work, thanks!
Daedalus is offline  
Old 18 July 2017, 12:36   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 2,976
Please tell me if it works or not so I can fix the code before I forget how it works.
idrougge is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Demos with music or sound effects in time with graphic effects mark_k request.Demos 7 07 December 2016 20:23
Sound issue, not all sound effects played. Connorsdad support.WinUAE 16 23 February 2015 16:32
Sound Effects in IK+ noel411 support.Games 3 07 September 2007 03:12
IK+ sound effects not working andreas support.WinUAE 4 26 July 2005 20:21
How to rip sound / effects wlcina support.Games 16 18 April 2005 03:09

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:53.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.10619 seconds with 13 queries