![]() |
![]() |
#121 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
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).
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
#122 |
Registered User
Join Date: Aug 2008
Location: Salisbury
Posts: 750
|
Legend! Gimme a shout when its ready.
|
![]() |
![]() |
#123 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,650
|
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).
|
![]() |
![]() |
#124 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Latest ptplayer 6.1beta is here:
http://sun.hasenbraten.de/~frank/TEST/ptplayer61beta.lha 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: Code:
- 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. |
![]() |
![]() |
#125 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,053
|
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. |
![]() |
![]() |
#126 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
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. |
![]() |
![]() |
#127 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
Only feature request I'd have is a possibility to configure a channel that the player won't use at all (including no audio interrupts for that channel, nor any other register writes to it). This would make integrating my mixer with your new versions easier than searching through the code myself
![]() |
![]() |
![]() |
#128 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
![]() EDIT: Oh, I think you mean that audio interrupts are generated because such a channel is idling with a 1-word sample? Last edited by phx; 27 February 2021 at 23:44. Reason: Ok, maybe now I understand... |
|
![]() |
![]() |
#129 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,436
|
Hmm, maybe I'm misunderstanding. I'll check with a three channel mod to be sure and come back to you. First have to find one though (as it is, my mixer test program just plays back a 4 channel mod and I've simply hacked the player source to never touch AUD3).
|
![]() |
![]() |
#130 | ||
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
![]() The current modified version is below, I’ll update it with phx’s beta fixes later. I’d cut the master volume as didn’t need it at the mo. https://github.com/jonathanbennett73...er_minimal.asm Quote:
![]() Last edited by Antiriad_UK; 28 February 2021 at 12:02. |
||
![]() |
![]() |
#131 | |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,053
|
Quote:
Because of effect optimizations the table is negated (negative half of each row comes first), so you'll have to rearrange the move.b order. This is written for speed and size, not only for size (both code and base table are placed in a disposable area and overwritten after the use, so the size doesn't matter 100%). Code:
; a3 = FrameCtr (a.k.a. mt_Counter) lea (VibTremTab\.End-64-FrameCtr,a3),a4 moveq #15*2,d2 .VTLoop1 lea (VibTremTab\.GenData-FrameCtr,a3),a2 lea (32,a4),a5 clr.b (a4)+ clr.b (a5) moveq #64/4-1,d1 ; sine with 4x mirroring .VTLoop2 move.w (a2)+,d0 mulu.w d2,d0 swap d0 move.b d0,(32,a4) ; [pi,pi*3/2] move.b d0,(32-1,a5) ; [pi*3/2,pi*2] neg.b d0 move.b d0,(a4)+ ; [0,pi/2] move.b d0,-(a5) ; [pi/2,pi] dbf d1,.VTLoop2 lea (-1-64/4-64,a4),a4 ; start of next row subq.w #1*2,d2 bge.b .VTLoop1 VibTremTab .GenData DC.W $1800,$3100,$4a00,$6100,$7800,$8d00,$a100,$b400 DC.W $c500,$d400,$e000,$eb00,$f400,$fa00,$fd00,$ff00 .GenDataEnd DCB.B 16*64-(.GenDataEnd-.GenData),0 Last edited by a/b; 28 February 2021 at 13:15. Reason: clarification about negated table |
|
![]() |
![]() |
#132 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,053
|
OK, I found an older test version, this should probably be more useful to you since it's shorter (only 2x mirroring, but larger base table which shouldn't matter) and no negation:
Code:
lea (VibTremTab\.End-64,pc),a1 moveq #15*2,d2 .VTLoop1 lea (VibTremTab,pc),a0 moveq #64/2-1,d1 .VTLoop2 move.w (a0)+,d0 mulu.w d2,d0 swap d0 move.b d0,(32,a1) neg.b d0 move.b d0,(a1)+ dbf d1,.VTLoop2 lea (-64/2-64,a1),a1 subq.w #1*2,d2 bge.b .VTLoop1 VibTremTab DC.W $0000,$1800,$3100,$4a00,$6100,$7800,$8d00,$a100 DC.W $b400,$c500,$d400,$e000,$eb00,$f400,$fa00,$fd00 DC.W $ff00,$fd00,$fa00,$f400,$eb00,$e000,$d400,$c500 DC.W $b400,$a100,$8d00,$7800,$6100,$4a00,$3100,$1800 DCB.B 15*64,0 .End |
![]() |
![]() |
#133 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
![]() Edit: This is working nicely! It still seemed that the negative values came first but I just switched the order of the moves around as suggested and it matches the normal values perfectly. I'll add it to the github version shortly. Thanks ![]() Last edited by Antiriad_UK; 28 February 2021 at 20:04. |
|
![]() |
![]() |
#134 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,213
|
Would be great to have a version of this player with all options available as equates.
I used a stripped down version for Colombia, with the SFX handling stripped out and the master volume removed too (was able to remove all those tables) |
![]() |
![]() |
#135 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
![]() Edit: I've updated the modified github version with phx's beta changes and a/b's sine generator. The default player (with all options/sfx turned on) is 13096 bytes. The default player with MINIMAL defined and saw/rect waves disabled is 5457 bytes. The modified player with the period/finetune/sine vibrato generation is 3116 bytes (plus 2672 bss). Last edited by Antiriad_UK; 01 March 2021 at 11:16. Reason: Updated github. |
|
![]() |
![]() |
#136 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
![]() Quote:
Yes... I would have to see it to judge how intrusive it is. There is already a lot of conditional assembly in the code (MINIMAL & Co). Quote:
|
|||
![]() |
![]() |
#137 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,213
|
Just popping Antiriads version into my demo system.
I'm getting a "repeatedly defined symbol" error, as the EQU's for the hardware registers are conflicting with my "custom.inc" Might be worth popping an "CUSTOM_REGS equ 0/1" or similar, around those (and the CIA defines) |
![]() |
![]() |
#138 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
|
|
![]() |
![]() |
#139 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
#140 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,213
|
I don't link object files
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MOD-player with external sound effects | phx | Coders. Asm / Hardware | 14 | 18 June 2012 10:41 |
Amiga Forever&Protracker bad sound | moriez | support.WinUAE | 14 | 06 January 2009 01:26 |
What was the first Amiga tracker to support external midi instruments | Kola | Amiga scene | 3 | 09 December 2008 19:20 |
Sound/Protracker package | Dunny | request.Apps | 3 | 23 July 2008 19:17 |
Sampled sound player? | cdoty | Coders. General | 7 | 25 August 2007 16:21 |
|
|