English Amiga Board


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

 
 
Thread Tools
Old 17 March 2021, 13:46   #41
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
To clarify: the conversion process generates a stream for Paula's registers, not a stream of samples.
Just like a generic module player would do (per tick) by processing the tracker commands.
ross is offline  
Old 17 March 2021, 13:49   #42
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by Galahad/FLT View Post
Er only in the conversion process which can be as slow as it likes.
Would be interesting to see how many MB of sample data it creates
DanScott is offline  
Old 17 March 2021, 13:50   #43
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by DanScott View Post
Would be interesting to see how many MB of sample data it creates
It depends on the mixing frequency and the length of the song
ross is offline  
Old 17 March 2021, 13:58   #44
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by ross View Post
It depends on the mixing frequency and the length of the song
I'd go full 24bit 96khz just for the quality...
DanScott is offline  
Old 17 March 2021, 15:05   #45
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,987
Quote:
Originally Posted by ross View Post
To clarify: the conversion process generates a stream for Paula's registers, not a stream of samples.
Just like a generic module player would do (per tick) by processing the tracker commands.
Yes I know this, but don't see why the outputted LSP data would be significantly bigger.

Yes the data going to two of the channels is going to be denser having had two other channels mixed in, but there is also going to be 2 channels with ZERO data as a result, no data stream to process at all
Galahad/FLT is offline  
Old 17 March 2021, 15:12   #46
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
Quote:
Originally Posted by Galahad/FLT View Post
Yes I know this, but don't see why the outputted LSP data would be significantly bigger.

Yes the data going to two of the channels is going to be denser having had two other channels mixed in, but there is also going to be 2 channels with ZERO data as a result, no data stream to process at all
Wouldn't the commands to set Paula to play up to 4 samples every now and then (I'm grossly simplifying here of course, I know it's more complicated than that) be much smaller than premixed audio for 2 channels?

Or am I misunderstanding what you want to do?
roondar is offline  
Old 17 March 2021, 15:58   #47
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,987
Quote:
Originally Posted by roondar View Post
Wouldn't the commands to set Paula to play up to 4 samples every now and then (I'm grossly simplifying here of course, I know it's more complicated than that) be much smaller than premixed audio for 2 channels?

Or am I misunderstanding what you want to do?
The way I understand how the LSP conversion process works is it works as its own mod player, and at the point that the data is to pass to the audio hardware registers, its that data that is captured and saved as a stream.

That way it can correctly play/convert the mod in question and capture any tricks it does because it doesn't matter, at the point that the data is to be put into those hardware registers is what LSP captures.

My point is this, LSP can use fast mem for its entire music format, is incredibly fast to play.

If the 4 channels are mixed into 2 at conversion time, it will still be a fast replayer, the quality of the "mod" should still be good, and it frees up 2 channels.

My understanding of how Leonard does his conversion might be wrong of course, but that is what I'm presuming it does and if it does and Leonard feels up to it, the cpu intensive channel mixing gets done in the conversion process, leaving the 2 channel player still as fast as before.
Galahad/FLT is offline  
Old 17 March 2021, 16:07   #48
lmimmfn
Registered User
 
Join Date: May 2018
Location: Ireland
Posts: 672
I think your suggestion Galahad would be brilliant if implemented
lmimmfn is offline  
Old 17 March 2021, 16:14   #49
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,960
Quote:
Originally Posted by Galahad/FLT View Post
Yes I know this, but don't see why the outputted LSP data would be significantly bigger.

Yes the data going to two of the channels is going to be denser having had two other channels mixed in, but there is also going to be 2 channels with ZERO data as a result, no data stream to process at all
From my memory about 20 mixed bytes is played by 1kHz in single VBI. Then for 28kHz you will be have:
28x20=560 bytes per 1 channel
2 channels is 1120 bytes per VBI
1 second is 50x1120= 56000 bytes per second.
For 60 seconds long song 3360000 bytes is necessary.
Don_Adan is offline  
Old 17 March 2021, 16:23   #50
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
Quote:
Originally Posted by Galahad/FLT View Post
My point is this, LSP can use fast mem for its entire music format, is incredibly fast to play.
Samples are still in chip.
no9 is offline  
Old 17 March 2021, 16:29   #51
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 388
Quote:
Originally Posted by Galahad/FLT View Post
The way I understand how the LSP conversion process works is it works as its own mod player, and at the point that the data is to pass to the audio hardware registers, its that data that is captured and saved as a stream.

That way it can correctly play/convert the mod in question and capture any tricks it does because it doesn't matter, at the point that the data is to be put into those hardware registers is what LSP captures.

My point is this, LSP can use fast mem for its entire music format, is incredibly fast to play.

If the 4 channels are mixed into 2 at conversion time, it will still be a fast replayer, the quality of the "mod" should still be good, and it frees up 2 channels.

My understanding of how Leonard does his conversion might be wrong of course, but that is what I'm presuming it does and if it does and Leonard feels up to it, the cpu intensive channel mixing gets done in the conversion process, leaving the 2 channel player still as fast as before.

I don't think it works that way at all. I think the stream it outputs is just driving Paula, directing it to DMA the correct sample data at the correct rate and volume.


All the samples still live in Chipmem. This is how I understand most MOD players work, the difference here is that it's no longer interpreting a MOD format in run-time to then drive Paula. It's partially compiling the MOD format data.
Jobbo is online now  
Old 17 March 2021, 16:40   #52
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 388
What might be possible for any MOD pre-processor would be to fold channels into each other to minimize sound clipping.

But I suspect only some really old or neive MODs with lots of empty space would benefit from anything like that.
Jobbo is online now  
Old 17 March 2021, 16:41   #53
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Galahad/FLT View Post
The way I understand how the LSP conversion process works is it works as its own mod player, and at the point that the data is to pass to the audio hardware registers, its that data that is captured and saved as a stream.

That way it can correctly play/convert the mod in question and capture any tricks it does because it doesn't matter, at the point that the data is to be put into those hardware registers is what LSP captures.
LSP conversion process captures pointer/length, period and volume, it knows nothing about samples.

Quote:
My point is this, LSP can use fast mem for its entire music format, is incredibly fast to play.
Any module player could do this, it has nothing to do with the speed of LSP, which is due to not having to process the tracker commands in real time (which are preprocessed).

Quote:
If the 4 channels are mixed into 2 at conversion time, it will still be a fast replayer, the quality of the "mod" should still be good, and it frees up 2 channels.
Pre-generating it would require an insane amount of chip memory.
You should do it for every channel mixing point (sample/pitch) you would encounter in the module (which is what real time mixers do).
ross is offline  
Old 17 March 2021, 16:47   #54
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,987
Quote:
Originally Posted by ross View Post
LSP conversion process captures pointer/length, period and volume, it knows nothing about samples.


Any module player could do this, it has nothing to do with the speed of LSP, which is due to not having to process the tracker commands in real time (which are preprocessed).


Pre-generating it would require an insane amount of chip memory.
You should do it for every channel mixing point (sample/pitch) you would encounter in the module (which is what real time mixers do).
Right ok, seems I misunderstood 100% how it worked

Galahad/FLT is offline  
Old 17 March 2021, 16:55   #55
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Quote:
Originally Posted by ross View Post
LSP conversion process captures pointer/length, period and volume, it knows nothing about samples.
Yeah, that's the basic idea. But it gets complicated when you introduce FX like sample offset, in which case you have to create virtual samples (you are not limited to PT's 31, it can go up to 5000+) that only reference parts of the actual samples.
So it can get rather complicated with the samples during the conversion, in order to make the player see no difference and don't do any extra work.
a/b is offline  
Old 17 March 2021, 17:12   #56
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by a/b View Post
Yeah, that's the basic idea. But it gets complicated when you introduce FX like sample offset, in which case you have to create virtual samples (you are not limited to PT's 31, it can go up to 5000+) that only reference parts of the actual samples.
So it can get rather complicated with the samples during the conversion, in order to make the player see no difference and don't do any extra work.
ross is offline  
Old 17 March 2021, 22:23   #57
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by a/b View Post
While thinking about bullet-proof exit/special codes $F00F, I did a few tests and found a bug with resetv vectors. It's a rare case, but you never know...
LSP v1.03 is out! it fixes this corner case. Thanks a/b for the detailed description of the bug and the repro test .mod!
leonard is offline  
Old 18 March 2021, 03:50   #58
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
If you want to play several mods (generic player), there's a problem with m_relocDone because it's global and only the first mod will be relocated. Maybe instead check if the address of the first instrument is 4?
a/b is offline  
Old 18 March 2021, 08:13   #59
leonard
Registered User
 
leonard's Avatar
 
Join Date: Apr 2013
Location: paris
Posts: 133
Quote:
Originally Posted by a/b View Post
If you want to play several mods (generic player), there's a problem with m_relocDone because it's global and only the first mod will be relocated. Maybe instead check if the address of the first instrument is 4?
correct. I'll add this to my next fix list
leonard is offline  
Old 18 March 2021, 15:08   #60
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
I resume the talk about having a more compact format for .lsmusic

Although leonard, as you said, you must have done myriads of tests because the format is already very effective.
So it is more of an academic discussion that may or may not lead to something feasible.

The first thought was for a real time LZ(run) depacker, with a small circular buffer (perhaps in the stack) and short distance for matches (my tiny lz32b would be perfect for that).
But even if we solve the double stream problem, it still remains that it would be rather slow due to the fact that the extraction of the token would require a refill check every peeked byte.

But there is a different possibility, as we are not talking about random data but musical data.
Trackers usually work with vertical patterns, but the correlation even horizontally is often strong.
And it is the horizontal correlation that interests us because it represents the tick time in which you grab the notes and the effects.

So the question is: have you run any tests to see how often horizontal correlations are repeating?

Because adding a level of indirection and a dictionary (maybe even built with some entropy encoding) could save a lot of space.
Put simply: token -> dictionary -> stream_pair_pointers -> usual_decoding
Sure it would be slower, but not that much.
ross 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 17:57.

Top

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