17 January 2020, 15:55 | #1 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Playing a long running sample...
I have (currently) a 2 minute sound byte that I to sample and convert to be played as part of a scene on the A1200.
Now using this site https://www.colincrawley.com/audio-f...ze-calculator/ i have put in a sample rate of 22Khz, 8 bit depth and 1 mono channel and the file size uncompressed comes out at 2.64mb. Ideally I have about 750Kb available to the sample so I'm looking at the best ways that I can get it to play on the Amiga. As I know absolutely nothing about Paula I'm looking for suggestions on the best way to achieve this... my understanding is that Paula will only play a sample of upto 64kb in size. The first obstacle would be compressing the 2.64mb of data so I was going to slice it up into 64kb packed buckets. About half the clip would be loaded and uncrunched in chip ram, once the first samples start playing I can then stream in the from floppy the remaining buckets and play those. Is this the right way to go about this or is there a simpler way? If needed I could lower the quality but i'd like to keep it as clear as possible because it is speech over music so clearer the better. Any help/advice is appreciated. Geezer |
17 January 2020, 16:00 | #2 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,409
|
One small detail: Paula can play up to 128KB in one sample, not 64KB.
As for the method, it may be possible to use simple audio compression forms and still end up real-time. Though AFAIK fast audio compression tends to not be very good in terms of gains (or quality if you use lossy). |
17 January 2020, 16:04 | #3 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
|
|
17 January 2020, 16:55 | #4 | ||
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
Quote:
Always best to ask the EAB first on stuff like this. Geezer |
||
17 January 2020, 23:31 | #5 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
OK so I had a play around with this and I guess it's a bit challenging...
What I'm trying to do is get the audio sample here: https://www.amigagamedev.com/Downloads/newblack_raw.mp3 which is 2 minutes long to be able to play with decent quality on the Amiga, BUT i need to get the file size down to about 700kb. So I transcoded the file using sox to both 8Khz and 12Khz... The 12Khz I would go with but it would mean I have to fit it across two disks, although it would fit in the A1200 chip ram. the 8Khz version is reduced quality... but still quite large and I don't think they'll compress down to one floppy. https://www.amigagamedev.com/Downloa...lack_8khz.8svx https://www.amigagamedev.com/Downloa...ack_12khz.8svx I tried Kalms utils but all i got was "Fail" when trying to convert the wav's... Can this be taken to a 1 disk floppy with audio akin to the 12Khz??? Possibly a madman task. Geezer |
18 January 2020, 00:11 | #6 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
you dont need to play long sample from chip ram.
for handling long sample players on Amiga you can check source players for: ADPCMmono NTSP onEscapee and from custom modules from Dragons Lair and Space Ace. All available on the Wanted Team page. |
18 January 2020, 00:20 | #7 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
This implies I would be using another ram type...?
|
18 January 2020, 00:27 | #8 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
|
18 January 2020, 01:00 | #9 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
18 January 2020, 01:31 | #10 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
A noisy test
|
18 January 2020, 01:43 | #11 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
Decoding from chip ram to chip ram can be not very good for 68020+. But i dont know how many CPU time you have. If I remember right for pure chip ram sample playing you can use replay from AfterBurner custom module.over 400kB sample, if I remember right. Or maybe from CarrierCommand? I forget, it was Dave Lowe music. He used two versions for sample type playing. Pure one sample only and splitted for more samples version.
|
18 January 2020, 03:21 | #12 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
I dont know how many chip ram free you have for sampled music, but you can use ADPCM (rate 1:2, if I remember right) or NTSP (rate 5:9). Or simple pack sample with PackFire (LZMA) or Arj7, and depack to chip ram. If you want to use only one disk for sampled music, your packed (ADPCM, NTSP, LZMA,ARJ7) file can be maximum 901120 bytes long or ~1.1MB if you used longtrack MFM format.
|
18 January 2020, 10:29 | #13 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
|
18 January 2020, 11:16 | #14 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
For the encoding phase: sox. I've set a frequency for an Amiga PER=300, with a low pass filter at 6Khz and dither. Sure some better filter and tests be needed. Then I've assembled PlayAdpcm from Kalms's package. Probably the exe from Kalms's encoder need a recompilation because do not work on today Win machines. EDIT: Ok, now I'm in the laptop where I launched the encoding stage. Note: it's absolutely not a series of recommended filters, they are simply the first thing that came to my mind and that could give 'decent' results, certainly it can be improved, we can discuss of this. sox command line used: sox.exe -v 0.92 -S -V -D "newblack_raw.mp3" "newblack_raw.ima" remix - lowpass 6000 rate -v -s -I 11822 dither -S Results: Code:
Level adjust : 0.92 (linear gain) Channels : 1 Sample Rate : 11822 Precision : 13-bit Sample Encoding: 4-bit IMA ADPCM effects chain: input 44100Hz 2 channels remix 44100Hz 1 channels lowpass 44100Hz 1 channels rate 11822Hz 1 channels dither 11822Hz 1 channels output 11822Hz 1 channels Last edited by ross; 18 January 2020 at 14:05. Reason: sox |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ST-08 sample disk | Dionysis | request.Apps | 7 | 15 October 2021 12:57 |
well get old cd tv up and running long with new amiga 1200 | mcbone | Amiga scene | 0 | 05 July 2013 20:23 |
Towers (Warning, long shot and long post) | Drake1009 | Looking for a game name ? | 2 | 13 May 2005 00:11 |
A very long, LONG shot... | staticgerbil | Coders. General | 0 | 13 April 2003 11:18 |
|
|