21 March 2021, 07:51 | #21 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
|
|
21 March 2021, 10:14 | #22 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
The code snippet I posted before really is a stress test, and produces audio glitch (at least in winuae) My feeling is that you *could* have some .mods where the repeat ad is written at the exact bad time. I guess probability in normal music ( reasonable period, quite long sample etc) is quite low, but in theory existing players have this potential bug when dealing with "sample without a note" |
|
21 March 2021, 11:00 | #23 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,365
|
Quote:
|
|
21 March 2021, 11:52 | #24 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
AUDxLEN is counted down 1-2 cycles after AUDxDAT DMA write so it always happens near the beginning of scan line.
|
21 March 2021, 12:31 | #25 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,331
|
Quote:
Thus, if audio DMA is currently off, write data and length into the registers, then write first two samples into the output register (as 16 bit), potentially set the period to 8 to lower the wait time for the next interrupt. This will initiate the audio state machine. Paula will generate an interrupt as soon as the first two samples are played (the same as those in your data). Then wait for the interrupt to happen that you can write more data, which will happen as soon as Paula recognizes the write. At that point, you can enable the DMA. "Wait X Rasterlines" is not necessarily going to work, even if not knowing what "X" is going to be. Depending on the Paula release, X may depend on the current playback rate, and some ancient mod players failed exactly for this reason - not waiting "properly". If audio DMA is already running, there is no need to stop it. Just wait for the next "audio done interrupt", which is an indication that Paula can take a new sample, and at this point, write the new length and address. But there is also the audio.device to do that for you. |
|
21 March 2021, 12:43 | #26 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
Waiting for interrupt after disabling DMA is not that simple.
Interrupt activates before channel state goes to idle. There is no safe way to do it without waiting (polling or timers or whatever) a bit. I think I explained this long time ago and AFAIK audio.device is not safe if CPU is "too fast". As in interrupt processing is really fast. Also, there is no need to do any AUDxDAT writes. Most likely it was done that way to simplify driver (start and continue with new sample becomes identical). No one else does that except audio.device. EDIT: Also you can't know if interrupt was due to sample ending or DMA stopping (Sample might end just after interrupt is cleared but before DMA is disabled). The shorter the sample the more unreliable it gets. EDIT2: As I already said, "dma wait" requirement is Paula design flaw. Last edited by Toni Wilen; 21 March 2021 at 18:25. |
22 March 2021, 00:07 | #27 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
If I was doing something unexpected it was almost certainly an accident. I wrote the version of that tune in FL Studio and then did the amiga mod in a few hours after not creating a mod since 1990 so just winged it - I definitely wasn't trying to use weird features Edit: And it was p61 I used in that intro and it sounded like I expected. I wrote the mod in milkytracker and never played it in Protracker on the amiga. (The mp3 of the fl studio master is in the intro download ) Edit2: Just opened the mod again, I think it must be the ostinato part you mean where the same riff goes on forever and various "similar" samples are used to retrig the previous note but with a different sample at a lower volume. Yeah that's chip tune 101 from the mods I looked at. I've not listened to this mod in ptplayer, but tbh it's so subtle I wouldn't notice in that mod because it's so fast. Maybe it _didn't _ play correctly in p61!!! (OpenMPT does as I just single stepped it and the sample changed) Last edited by Antiriad_UK; 22 March 2021 at 00:47. |
|
22 March 2021, 16:49 | #28 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Oh didn't even knew you composed this tune, congrats! I love it, feel both oldskool feeling and "melancholic" melody. So you didn't really used "sample without a note" on purpose? interesting
I don't remind what was the intro using this tune, could you post a link? ( need to listen to the original audio stream ) |
22 March 2021, 17:32 | #29 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,501
|
Quote:
|
|
22 March 2021, 17:49 | #30 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
22 March 2021, 17:53 | #31 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,501
|
I LOVE this intro by Antiriad, so Amigaish and nostalgic.
|
22 March 2021, 19:34 | #32 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
http://www.pouet.net/prod.php?which=81350 Yes I used the sample without a note on purpose. Pretty much every chip tune does something like that. I got it from looking at 4mats stuff in the 90s and assumed everyone did that . |
|
22 March 2021, 20:47 | #33 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
So I'm really confused now: I have a working modified LSP local version supporting this feature. Generic player is slightly slower, and slighty bigger ( about 540 bytes, not under 512 bytes anymore ). Insane mode is running at same speed. So my question: Is it worth to support this feature in LSP? what do you think everyone as a user? |
|
22 March 2021, 21:18 | #34 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
Last edited by Antiriad_UK; 23 March 2021 at 00:23. |
|
22 March 2021, 23:51 | #35 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,068
|
|
23 March 2021, 00:24 | #36 | |
OCS forever!
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
|
Quote:
|
|
23 March 2021, 00:39 | #37 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
|
|
23 March 2021, 01:24 | #38 | |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Quote:
This module doesn't really showcase the "instrument without a note" bug of many amiga players. |
|
23 March 2021, 19:59 | #39 | |
Registered User
Join Date: Sep 2009
Location: Norway
Posts: 1,719
|
Quote:
|
|
24 March 2021, 00:16 | #40 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I want to set up an Amiga DAW for audio recording | Overmann | support.Hardware | 8 | 07 March 2019 10:45 |
Tools for set FILTER OFF audio | jhonny82 | support.Games | 14 | 22 July 2015 16:06 |
DMA-free audio | robinsonb5 | Coders. Asm / Hardware | 3 | 05 November 2012 08:43 |
CPU execution on odd cycles if no Audio/Disk/Sprite DMA | mc6809e | Coders. Asm / Hardware | 2 | 02 April 2012 19:50 |
Unsual Case of Dr. Strange / Return of Doctor Strange | killergorilla | HOL contributions | 1 | 12 July 2007 16:08 |
|
|