English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 11 March 2021, 00:21   #1
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 387
Light Speed Player

This new replay routine by Leonard sounds utterly bonkers!


https://www.pouet.net/prod.php?which=88177


I don't know very much about how player routines normally work. It was always a black box I never wanted to look in.


But now I would be really interested to hear how those routines worked and how this one is able to smash the old records!


Amazing stuff!
Jobbo is online now  
Old 11 March 2021, 00:49   #2
lesta_smsc
Registered User
 
lesta_smsc's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 3,173
Incredible! I mean the speed is insane and command line is really simple to convert the files. Given its ridiculously small file size, this could easily be incorporated into future productions saving quite a bit of space for other interesting things
lesta_smsc is offline  
Old 11 March 2021, 02:09   #3
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
Traditional MOD player code is reading the song data, calculating all the stuff and then writing the data to the audio hardware registers

What LSP does, is cut out the middle man, and converts the mod into literally a stream of data that can be read and written quickly to the hardware registers.

This is why the regular LSP player is less than 512 bytes, but the converted module *could* be larger (but not always) than the original module.
DanScott is offline  
Old 11 March 2021, 03:34   #4
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Comparison to P61 is not really fair: any optimized PT player using a custom format should be noticably faster due to P61's real-time pattern decompression (and there's still plenty of optimizations to be made in P61).
Interesting approach, and really good work nonetheless.
a/b is offline  
Old 11 March 2021, 15:52   #5
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
Quote:
Originally Posted by a/b View Post
Comparison to P61 is not really fair
Yes it is... essentially they are both doing the same thing.. playing a module
DanScott is offline  
Old 11 March 2021, 17:00   #6
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Quote:
Originally Posted by DanScott View Post
Yes it is... essentially they are both doing the same thing.. playing a module
So does a bus and "my Ferrari"... transport passengers ;P. Or maybe a more relevant example, demo vs. wild demo (but in this case you could just say TBL and it becomes irrelevant :P :P ).
They don't provide the same functionality:
P61 = play + compress
LSP = play
For some people, not specifically you, it's just semantics, maybe they don't really care much about the compression, it's a bonus. As long as it's reasonable simple to use and fast (read: doesn't get nuked to 15-16 rasterlines range if you happen to use fine-tuning).
I wouldn't touch P61 if it wasn't for the compression (if your audio budget is say 192kb, getting ~30kb more for the samples is really nice), especially after seeing the source code. Have to feel sorry for all the poor guys who volunteered to maintain it :P.
So yeah, from my perspective they are not in the same category.
a/b is offline  
Old 15 March 2021, 00:17   #7
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by a/b View Post
So yeah, from my perspective they are not in the same category.
I disagree. LSP is a module player, data takes "almost" the same size of a original MOD ( sometimes smaller, sometimes bigger ). It's true P61 almost produce smaller files, but LSP is not far from .mod regarding file size. And don't forget the added size is "any memory". It doesn't waste audio chip memory ( so it's generally not an issue for a demo to add some "any memory" data.

LSP idea is very simple: dump PAULA registers. But data format to decode insanely fast AND keep a reasonable data size as .mod does IS the key feature.
leonard is offline  
Old 15 March 2021, 03:22   #8
lmimmfn
Registered User
 
Join Date: May 2018
Location: Ireland
Posts: 672
Does anyone have qny CPU usage comparisons of rhis technique vs regular mod player? Or DMA access info(presumably will be the same)
lmimmfn is offline  
Old 15 March 2021, 09:07   #9
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quote:
Originally Posted by lmimmfn View Post
Does anyone have qny CPU usage comparisons of rhis technique vs regular mod player? Or DMA access info(presumably will be the same)
The whole point of LSP is to reduce cpu time. LSP is primarily going to be used by those coding intros and demos that need to squeeze every last piece of performance from the machine.

LSP has done away with all the calculations in the conversion phase, I cant imagine this method takes up very many raster lines at all.
Galahad/FLT is offline  
Old 15 March 2021, 09:19   #10
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by lmimmfn View Post
Does anyone have qny CPU usage comparisons of rhis technique vs regular mod player? Or DMA access info(presumably will be the same)
you can run "benchmark.adf" in the LSP archive. Basically LSP normal mode is 1 raster line average time (with 2 rasterlines peak )
LSP Insane mode is half a raster line average time, and 1 raster line peak
leonard is offline  
Old 15 March 2021, 09:31   #11
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
I'm still amazed at just how fast it is. Worst case of only 0,6% CPU use per frame
Truly a great achievement.
roondar is offline  
Old 15 March 2021, 09:58   #12
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Quote:
Originally Posted by leonard View Post
I disagree. LSP is a module player, data takes "almost" the same size of a original MOD ( sometimes smaller, sometimes bigger ). It's true P61 almost produce smaller files, but LSP is not far from .mod regarding file size. ....
Not sure what you are disagreeing with. I'm not critisizing LSP, it's very good for what it does. Again, P61 will inherently be slower than any similarly optimized PT player due to real-time decompressing, and this is by design. That's why I'm saying it's unfair (and I don't mean 100% unfair, it's always a grey zone, depends who you are asking): LSP is a mod player, P61 is a mod player and compressor.

About the size (the "almost" part in your post)...
P61 typically reduces patterns size down to about 1/4-1/3. One of my test modules has 41 patterns (real music, not a bunch of empty notes), and that's compressed to 7.5kb (header+patterns), for example. ~34kb memory saved, or extra ~34kb for the samples, potentially resulting in better music.

As I said, some people don't care about that (does it work? check), or memory is simply not an issue. But in same cases it is, for example occasionally you can read here how game devs are talking about memory constraints and how to fit everything within 0.5mb or 0.5+0.5mb, all while using a PT player that can spike up to 16 rasterlines.
Use whatever works best in your scenario.
a/b is offline  
Old 15 March 2021, 11:09   #13
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
Isn't P61 incompatible too with some Protracker commands (I seem to remember a list of the unsupported stuff)

LSP supports all commands, so can play back modules 100% where P61 can't

P61 also alters the samples, so an external tool (for example aklang), that relies on samples being in the locations that a module specifies, won't work correctly with P61 either
DanScott is offline  
Old 15 March 2021, 11:18   #14
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
So now you describe that they are not doing the same thing?
no9 is online now  
Old 15 March 2021, 11:58   #15
8bitbubsy
Registered User
 
8bitbubsy's Avatar
 
Join Date: Sep 2009
Location: Norway
Posts: 1,710
I have mixed feelings about LSP. It's good for what it is, but calling it the "fastest .MOD player" is a bit misleading, in my opinion. In the end, it has nothing to do with the old format.
8bitbubsy is offline  
Old 15 March 2021, 12:12   #16
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
The interesting thing about methods like LSP uses is that it should actually be format-independent. As long as a converter can be made, LSP should be able to play it. In that sense, it's not a .MOD player.

But in the sense of how it's been presented now (with AFAIK only a .MOD converter), I have no real issue calling it a .MOD player as that is what it's used for (albeit with a conversion ahead of playback).
roondar is offline  
Old 15 March 2021, 12:32   #17
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
Quote:
Originally Posted by roondar View Post
But in the sense of how it's been presented now (with AFAIK only a .MOD converter), I have no real issue calling it a .MOD player as that is what it's used for (albeit with a conversion ahead of playback).
The same is true of p61 too
DanScott is offline  
Old 15 March 2021, 12:38   #18
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
Exactly! I'd call P61 a .MOD player as well
roondar is offline  
Old 15 March 2021, 13:34   #19
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
So P61 is kind of lossy compression for mods.
no9 is online now  
Old 15 March 2021, 22:14   #20
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
P61 doesn't suport pattern break Dxx if xx != 0 (performance hit because of compression), E4x/E7x rect/saw vibrato table (not because it can't), E3x glissando (don't know the reason). LSP doesn't support short samples (have to pad manually), EFx funk (can't work), some mods can explode in size.
In practical terms, other than size explosion (change tool) these are all nothingburgers for me personally.

Roondar brings up an interesting point, LSP could easily be format independent. Just need to write a converter.

Quote:
Originally Posted by no9 View Post
So P61 is kind of lossy compression for mods.
Samples, yeah (it's optional). I handle those things outside, with a dedicated compressor. Same for sample delta/undelta since not only samples benefit from it.
a/b 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
BZR Player - a new music player for Win bLAZER Retrogaming General Discussion 1037 29 September 2023 20:32
West Phaser - missing note "Supports Light Gun" (+Updated Light Gun list) Velociraptor5 HOL data problems 0 03 February 2020 22:43
FAT Player MikMod v5 (amiga mod player for Nintendo DS) spajdr Amiga scene 0 14 August 2008 21:55
Apidya - Inaccessible bonus stage (Speed of Light) FOUND! killergorilla Amiga scene 116 17 March 2008 10:17
Player Manager speed/sound problem Guest support.Games 3 10 April 2002 23:46

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:33.

Top

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