English Amiga Board


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

 
 
Thread Tools
Old 12 January 2024, 13:03   #181
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
There are no 'subtunes' in MOD format, per se. You just start playing a song from the position where a supposed subsong starts. When the player encounters Bxx command (it is the Protracker's GOTO) it jumps wherever you like, e.g. go back to the subsong's begining.
no9 is offline  
Old 12 January 2024, 14:21   #182
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Thanks. That's what I wanted to know.
OK back to programming
carrion is offline  
Old 17 January 2024, 11:58   #183
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
One more question:
Is there a way to play Sound FX on selected channel? Looking at the functions provided in first post I think there's not but maybe there's some trick to do it.
The thing is that the music in my game leaves 4th channel almost empty to play sfx but when I play the sfx it plays it also on other channels which I dont like.
TIA
carrion is offline  
Old 17 January 2024, 12:14   #184
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
Use MTPlayFX, you can set the channel in the sfx structure:

Code:
;   Request playing of a prioritized external sound effect, either on a
;   fixed channel or on the most unused one.
;   Structure layout of SfxStructure:
;     void *sfx_ptr  (pointer to sample start in Chip RAM, even address)
;     WORD  sfx_len  (sample length in words)
;     WORD  sfx_per  (hardware replay period for sample)
;     WORD  sfx_vol  (volume 0..64, is unaffected by the song's master volume)
;     BYTE  sfx_cha  (0..3 selected replay channel, -1 selects best channel)
;     BYTE  sfx_pri  (priority, must be in the range 1..127)
;   When multiple samples are assigned to the same channel the lower
;   priority sample will be replaced. When priorities are the same, then
;   the older sample is replaced.
;   The chosen channel is blocked for music until the effect has
;   completely been replayed.
;
E-Penguin is offline  
Old 17 January 2024, 15:25   #185
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 152
Looks promising, but how do I access this structer after laoding or decodeing a sample file?
carrion is offline  
Old 17 January 2024, 17:33   #186
E-Penguin
Banana
 
E-Penguin's Avatar
 
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,214
I've put examples here:
https://github.com/E-Penguin/blitz_p...master/example
E-Penguin is offline  
 


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 07:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07912 seconds with 14 queries