English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 07 March 2017, 00:21   #1
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 442
How to grab raw audio

Hi Toni, how can i grab audio *before* filter and conversion/interpolation to host?
In 'option' there is a flag to save .wav excluding filter but the saving is only in standard format..
My need is raw sample (16 bit, even L/R mixed and volume adjusted) in 1/(amiga period) real frequency.

(i know i know, is a strange request )

ross is offline  
AdSense AdSense  
Old 10 March 2017, 17:23   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Try "sample ripper". It saves all Paula DMA played samples as wave files. (If you use DMA mode).

(Why?)
Toni Wilen is offline  
Old 10 March 2017, 18:41   #3
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 442
Hi Toni, I'm trying a not-DMA copper player with a fast sample rate.
But what about changing *volume* even with the copper?
I need to know which waveform is real time generated..
(more on this if someone interested but my goal was better resolution with only one voice).

What's the formula that calculate sample value for the host?
Suppose a 16 bit signed host value (and exclude all mixing).
It's something like amiga_sample/64*amiga_volume*256?

Thanks!
ross is offline  
Old 10 March 2017, 19:11   #4
mia
Registered User

 
Join Date: Jan 2017
Location: UK
Posts: 2
Hi ross, have you really got the copper driving the audio? what sample rate can you get? one voice is fine, do you have any more info on this? thanks. I've been using the Vbl to send quantums of audio to paula, getting realtime waveforms, but using the dma to actually play the sample - streaming the memory basically, but this sounds much better...
mia is offline  
Old 10 March 2017, 19:20   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Quote:
Originally Posted by ross View Post
Hi Toni, I'm trying a not-DMA copper player with a fast sample rate.
Switching off all interpolations and using 4 ch mode should result in non-processed output.

Quote:
But what about changing *volume* even with the copper?
Change should be instant but because volume in real hardware is PWM (volume value selects pulse width), results may not be exactly same if volume is continuously changed.

Quote:
What's the formula that calculate sample value for the host?
sample * volume, then channel mixing (depends on selected channel mode) and interpolation, result is scaled (if not already) to 16 bit sample.
Toni Wilen is offline  
Old 10 March 2017, 22:14   #6
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 442
Quote:
Originally Posted by Toni Wilen View Post
Switching off all interpolations and using 4 ch mode should result in non-processed output.
I'm not sure i've understood Your sentence..
How to switch-off interpolations?

Quote:
Originally Posted by Toni Wilen View Post
Change should be instant but because volume in real hardware is PWM (volume value selects pulse width), results may not be exactly same if volume is continuously changed.
Yes, my idea/solution was to use some 'multiple' of PWM volume pulse cycle to reduce distortion.
With a period of 128 (maxvol*2), PAL freq. 27710, we have two complete and regular sequence; as a bonus is a frequency replicable with DMA to compare
If I sincronize copper for [startcycle:sample*2/volume|start+128:volume|start+256:sample*2/volume and so on] in teory we can have a working player...

Quote:
Originally Posted by Toni Wilen View Post
sample * volume, then channel mixing (depends on selected channel mode) and interpolation, result is scaled (if not already) to 16 bit sample.
And.. YES: was exactly my formula in my scenario
This give me 4856 different sample value (>12bit!) with a single audio channel and the great property of being 'dense' on small value and 'relaxed' in high value. More dynamics and better for ear (and for compressor based on quantised table!).

Probably this is only a proof of concept, the copper is really difficult to use for synced video effect in this situation.. but if I find the time I try something.
I'm totally off-road?

Thanks Toni!
ross is offline  
Old 10 March 2017, 22:35   #7
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 442
Quote:
Originally Posted by mia View Post
Hi ross, have you really got the copper driving the audio? what sample rate can you get? one voice is fine, do you have any more info on this? thanks. I've been using the Vbl to send quantums of audio to paula, getting realtime waveforms, but using the dma to actually play the sample - streaming the memory basically, but this sounds much better...
Yes, the simplest test is with a write in AUDxDAT per line (ok ok and INTRQ ).
This give You a frequency of (3546895/227*2)Hz -> 31,250KHz in PAL machine.
You can use more sample per line, but warning!, if You use <64 periods -> >55,420 kHz the PWM volume cycle is broken (You have to use vol=64).
[Toni you can confirm this?]

Bye!
ross is offline  
Old 10 March 2017, 22:39   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,542
Quote:
Originally Posted by ross View Post
How to switch-off interpolations?
Sound panel interpolation disabled, filter always off, stereo separation 100%, channel mode 4 channels (=no paula 4 ch -> 2ch mixing). Resampling of course can't be disabled (not really possible to save wave file that has variable frequency)
Toni Wilen is offline  
Old 10 March 2017, 22:52   #9
ross
Vae victis!

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Posts: 442
Quote:
Originally Posted by Toni Wilen View Post
Sound panel interpolation disabled, filter always off, stereo separation 100%, channel mode 4 channels (=no paula 4 ch -> 2ch mixing). Resampling of course can't be disabled (not really possible to save wave file that has variable frequency)
I got it
ross is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting raw audio on a PC for Amiga pulselooper Amiga scene 11 22 September 2010 20:35
How to grab a .device from RAM? vulture request.Other 2 11 March 2010 21:22
how to grab screen of AMOS programs... HexeH support.Apps 2 11 June 2004 12:53
Grab It !!!!! It Is Pure History plasmatron Amiga scene 3 15 March 2004 22:08
Akiko is out to grab MethodGit Amiga scene 1 02 December 2001 23:45

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 03:40.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.16954 seconds with 11 queries