English Amiga Board


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

 
 
Thread Tools
Old 28 December 2019, 12:24   #81
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
AHI (start 1994) comes later and is only useful with fast processors because of it's mixing nature. Games used Paula direct because there wasn't something else. Some later games in the mid/end '90 supported it. It has also a Paula direct mode.
daxb is offline  
Old 28 December 2019, 14:48   #82
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
Yeah, but games used paula direct because they didn't need/want any library or the OS to play audio. But there are players (TFMX) that are able to play more than 4 channels at once (or possibly game engines). Still using hardware/custom code.
jotd is offline  
Old 10 January 2020, 22:59   #83
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Decided to give the 5.3 version of this library a go, but can't get the example program to work under Amiblitz 3.7.3 on WinUAE. It compiles fine (for simplicity I changed the paths to ram:filename, but kept everything else the same), but just sits there silently mocking me. It quits fine when I right-click, and the debugger doesn't show any issues. The mod plays fine in HippoPlayer. Is there something I'm missing?
Daedalus is online now  
Old 11 January 2020, 19:35   #84
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Daedalus View Post
Decided to give the 5.3 version of this library a go, but can't get the example program to work under Amiblitz 3.7.3 on WinUAE. It compiles fine (for simplicity I changed the paths to ram:filename, but kept everything else the same), but just sits there silently mocking me. It quits fine when I right-click, and the debugger doesn't show any issues. The mod plays fine in HippoPlayer. Is there something I'm missing?
Hmm, wait a minute. The pt library uses number 195, maybe that library number is used by another library in Amiblitz 3.7.3?
MickGyver is offline  
Old 12 January 2020, 00:05   #85
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Yeah, there's one of the Lotan libraries that also uses 195 - that's an old one though from the Ultimate Blitz CD I think, it's also #195 in my Blitz 2.1 setup. But I changed the library number to 48 and rebuilt my deflibs with it, and the commands are recognised fine (though the library name itself is not).
Daedalus is online now  
Old 12 January 2020, 11:02   #86
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Daedalus View Post
Yeah, there's one of the Lotan libraries that also uses 195 - that's an old one though from the Ultimate Blitz CD I think, it's also #195 in my Blitz 2.1 setup. But I changed the library number to 48 and rebuilt my deflibs with it, and the commands are recognised fine (though the library name itself is not).
I might have done something wrong when porting version 5.3 to Blitz Basic. I have no idea what though. I will do some testing myself as soon as I find the time.
MickGyver is offline  
Old 02 April 2020, 00:31   #87
Zener
Registered User
 
Zener's Avatar
 
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 432
This library is great! With Amiblitz2 I had no problem generating deflibs, and plays nicely. One issue I have is that when using it in Vampire V4 I am getting no sound from it, no module sound and no sfx sound. Any idea?

At least it is better than then default Module from Blitz, it hangs the V4 when used. With this lib it is just no sound.
Zener is offline  
Old 13 July 2020, 11:08   #88
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
Quote:
Originally Posted by MickGyver View Post
I might have done something wrong when porting version 5.3 to Blitz Basic. I have no idea what though. I will do some testing myself as soon as I find the time.

Do you mind if I include the lib in the AmiBlitz3 package?
Honitos is offline  
Old 13 July 2020, 17:44   #89
fabbroz
Registered User
 
fabbroz's Avatar
 
Join Date: Sep 2019
Location: Italy
Age: 49
Posts: 36
Any possibility to use KS1.3?
fabbroz is offline  
Old 13 July 2020, 22:12   #90
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Honitos View Post
Do you mind if I include the lib in the AmiBlitz3 package?
Please, as far as I'm concerned, go ahead! This library is all thanks to phx, I just converted the latest version for Blitz Basic, based off of idrougge's older version.

Quote:
Originally Posted by fabbroz View Post
Any possibility to use KS1.3?
This library should support KS1.3.
MickGyver is offline  
Old 15 July 2020, 15:02   #91
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 145
I added the ptplayerlib to the AmiBlitz3-package.
It has libnum #48, as #195 is already used by LotanArgs.

Does someone know if there is any documentation or amigaguide for that library?
Honitos is offline  
Old 25 July 2020, 21:18   #92
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 862
First I'd like to say, this is fab and works unlike the CIA tracker lib for Blitz I was using which caused crashes and didn't work on 1.3.

I'm not sure if I'm setting it right

I tried setting the channel to play the samples to 3 and then tried setting the music mask to %1110 (my mod uses channels 0-2). But still the sample playing stops channel 2 (or at least it's channel 2 in ProTracker!)

Am I getting the mask/ch wrong?

Cheers,
Coagulus is offline  
Old 26 July 2020, 02:03   #93
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Coagulus View Post
I tried setting the channel to play the samples to 3 and then tried setting the music mask to %1110 (my mod uses channels 0-2).
Bit 0 is channel 0, so it should have been %0111.
phx is offline  
Old 26 July 2020, 13:03   #94
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 862
Quote:
Originally Posted by phx View Post
Bit 0 is channel 0, so it should have been %0111.
Doh!

Changed it to that but the sfx is blocking out the channel which is 3 on ProTracker. %1011 does the same and so does %1000 which is very odd.

On my Protracker mod, Channels 1,2,3 have the music.
1 - drums/bass
2 - hihat/bass
3 - tune
4 - Blank

Without the mask or with, the tune keeps getting stopped by the SFX but it should be choosing the blank channel?

I then got rid of the mask and tried setting the channel on the samples (first 0, then 1) and it still eventually started to block out the tune...

I should note I'm using the version that's been added to the Ultimate Blitz CD install.

EDIT setting the channel to 2 in Blitz under WinUAE seemed to work and the sounds went on the blank channel. But then I tried the compiled exectuable in WinFellow and they blocked the tune again.

EDIT2: setting MTMusicMask %0100 is working.

Last edited by Coagulus; 26 July 2020 at 16:18. Reason: retried and didnt want back to back posts
Coagulus is offline  
Old 27 July 2020, 20:22   #95
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Coagulus View Post
Doh!

Changed it to that but the sfx is blocking out the channel which is 3 on ProTracker. %1011 does the same and so does %1000 which is very odd.

On my Protracker mod, Channels 1,2,3 have the music.
1 - drums/bass
2 - hihat/bass
3 - tune
4 - Blank

Without the mask or with, the tune keeps getting stopped by the SFX but it should be choosing the blank channel?

I then got rid of the mask and tried setting the channel on the samples (first 0, then 1) and it still eventually started to block out the tune...

I should note I'm using the version that's been added to the Ultimate Blitz CD install.

EDIT setting the channel to 2 in Blitz under WinUAE seemed to work and the sounds went on the blank channel. But then I tried the compiled exectuable in WinFellow and they blocked the tune again.

EDIT2: setting MTMusicMask %0100 is working.
Odd behaviour indeed, %0100 should mean that only channel 2 (from channels 0-3) is reserved for music.
MickGyver is offline  
Old 28 July 2020, 15:44   #96
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Hmmm. I just had a look at the source code again, and it seems that the mask set by mt_musicmask() is just a "hint" which channels should better not be used for effects. But when the player only sees busy channels, with no free lines at the current pattern position, it might use those channels nevertheless.

So when you give your mask as %0100, prioritising only a single channel, the chances are higher that all your effects fit into the remaining channels.
phx is offline  
Old 28 July 2020, 18:41   #97
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 862
Quote:
Originally Posted by phx View Post
Hmmm. I just had a look at the source code again, and it seems that the mask set by mt_musicmask() is just a "hint" which channels should better not be used for effects. But when the player only sees busy channels, with no free lines at the current pattern position, it might use those channels nevertheless.

So when you give your mask as %0100, prioritising only a single channel, the chances are higher that all your effects fit into the remaining channels.
Glad you've found that. Thought i was going loopy. Next question is can a sound effect be forced into one only though. (My next game. which I'm about half way through coding already, uses 3 channels again.)
Coagulus is offline  
Old 29 July 2020, 12:25   #98
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Quote:
Originally Posted by Coagulus View Post
Glad you've found that. Thought i was going loopy. Next question is can a sound effect be forced into one only though. (My next game. which I'm about half way through coding already, uses 3 channels again.)
This should be possible with my converted version of the library. Look at the example I included:
Code:
WBStartup

INCLUDE "ptplayer_inc.bb2"

MTInstall 1 ; Install the CIA MOD player routine (1=PAL,0=NTSC)

LoadBank 0,"playingw.mod",2 ; Load a module into chipmem
addrMod.l=Bank(0) ; Get the pointer to the module

DEFTYPE .sfx clap         ; Create a sfx instance
LoadSound 0,"909Clap.iff" ; Load a sound
; Initialize a sfx for ptplayer
SFXInit{&clap,0,64,-1,1} ; {*pointer.sfx, sound_index, volume, channel (-1=best), priority (>0) }

MTInit 0,0 ; Initialize a module from bank 0, start position = 0
MTPlay On  ; Start playing the module

While Joyb(0)<2
  VWait
  If Joyb(0)=1
    MTPlayFX &clap
  EndIf
Wend

MTEnd    ; Stop playing the current mod
MTRemove ; Remove the CIA MOD player routine

End
Here is the link to the library with the example: http://eab.abime.net/showpost.php?p=...9&postcount=64
MickGyver is offline  
Old 29 July 2020, 16:34   #99
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Usually you should be able to specify a fixed channel number when starting an effect. But I'm still confused about your statement that it didn't work for you to play an effect on a fixed channel of 0 or 1. Or did I misunderstand that?
Quote:
Originally Posted by Coagulus View Post
I then got rid of the mask and tried setting the channel on the samples (first 0, then 1) and it still eventually started to block out the tune...
Otherwise MickGyver's example with SFXInit and MTPlayFX should work for you, if you replace the -1 in SFXInit with your prefered channel number.
phx is offline  
Old 06 January 2021, 16:33   #100
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
I was looking for some source code to load a Protracker file into Blitz and this came up in search, although it doesn't exactly do what I want, so let me ask:

Can I, instead of playing the module, extract some of its data to use in other ways?
For example: find sample #8 and play that using Blitz, and show the sample name.
Bren McGuire 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 15:24.

Top

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