English Amiga Board

Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

Thread Tools
Old 22 February 2021, 23:02   #121

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,804
Originally Posted by h0ffman View Post
Anyways, I'll grab your latest beta and give it a try.
Thanks. But there is no beta available, just the patch. I will upload a beta of the source and tell you the URL (maybe after I had a look on the master-volume issue).

One thing I have noticed is the master volume doesn't appear to be effecting samples which are already playing.
Indeed. I never noticed that in our games, which offer a volume option in the menu, because new samples are usually playing fast enough.

I have a short fade which occurs when soundtracks are switched and the looped samples being played by the mod are not reducing until another sample is played.
Yes, that's annoying. I will have a look these days.

Is that how it currently works, i.e. master volume doesn't come into effect until a sample is triggered?
Correct. The volume is always set together with a new sample. But the last volume is stored in the channel status, so I could probably just use this and write a new volume to AUDxVOL whenver the master volume changes. Seems easy.
phx is online now  
Old 23 February 2021, 13:08   #122
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 505
Legend! Gimme a shout when its ready.
h0ffman is offline  
Old 24 February 2021, 21:13   #123

Photon's Avatar
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 4,931
Yes! Master volume must be changed on command not trigger because this is used in all kinds of modules to emulate arp/echoes. Sometimes also the notetempo is not fast enough to make a volume fade act fast enough (without some insane fade value requiring a - master volume reset value on the next note).
Photon is offline  
Old Today, 20:10   #124

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,804
Latest ptplayer 6.1beta is here:

Now all channel volumes should be changed immediately during the mt_mastervol() call.
Set NULL_IS_CLEARED=1 to test the idle-looping of samples at $0.

Complete list of changes in current beta:
- Fixed note delay command (EDx), which still played the previous note
  in some situations (Antiriad/EAB).
- mt_mastervol() must change the volumes of all channels immediately
  and shouldn't wait for the next sample being played.
- Symbol ENABLE_SAWRECT may be used to disable sawtooth and rectangle
  waveforms for vibrato and tremolo, which saves memory for their tables
  (suggested by Antiriad).
- Symbol NULL_IS_CLEARED may be used to indicate that the memory locations
  $0 and $1 in your system are zero, so they will be used for idle-looping
  of audio channels.
- Removed cia.i and custom.i include files and included the required
  symbols directly into the source.
- New function mt_loopfx() for playing looped sound effects.
- New function mt_stopfx() for immediately stopping a sound effect.
phx is online now  
Old Today, 21:04   #125
Registered User

Join Date: Jun 2016
Location: europe
Posts: 304
Not sure how much in demand it would be, but you never know...
Instead of using static tables, you could generate them with a one-time initialization. Why? Well, in case you also need the compressed player to be as short as possible.
Like in my case, I'm using a heavily modded and optimized P612 but the same thing applies, I was able to reduce its compressed size from 2.7kb to 1.7kb (trying to stuff as much as possible within a 5.5kb track, for example) just by generating the vibrato sine table and fine-tuned period table. Each routine is about 40 bytes long (and if you play "dirty" you can scrap that code so it occupies no space once it's done).
The same could be done with master volume and the other 2 vibrato tables. They don't look too complicated.
a/b is offline  
Old Today, 21:34   #126

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,804
If I would do that, then it has to be optional. ptplayer is mainly intended for games, where I would rather save some bytes in RAM than on disk.

I remember a few guys here worked on a routine to generate the tables during runtime and maybe you were one of them?
When it really works you can always send me a patch by email and I will try it.
phx is online now  

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MOD-player with external sound effects phx Coders. Asm / Hardware 14 18 June 2012 11:41
Amiga Forever&Protracker bad sound moriez support.WinUAE 14 06 January 2009 02:26
What was the first Amiga tracker to support external midi instruments Kola Amiga scene 3 09 December 2008 20:20
Sound/Protracker package Dunny request.Apps 3 23 July 2008 20:17
Sampled sound player? cdoty Coders. General 7 25 August 2007 17:21

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 21:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.07139 seconds with 16 queries