31 January 2016, 00:59 | #181 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
This thread is home to the boldest propositions!
Quote:
This said, it is close enough for many laykitten to not hear the difference if their ear is not trained. If that is important, one way to work around it would be to have another sample tuned to a multiple of the unreachable frequencies. Maybe more than one would be needed actually. |
|
31 January 2016, 14:43 | #182 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,853
|
Quote:
Maybe i misunderstand your point - this topic is quite strange to follow - everyone seem to agree and at the same time everyone disagree. Math/DSP is quite clear, HW limitations are quite clear, outcome is very simple multichannel audio is possible but with mediocre quality as even 8 bit is beyond current Amiga capabilities (unless you are able to apply noisehaping which is extremely difficult as OCS does support only sub Nyquist NS and to go for higher sampling rate you need to use or ECS/AGA or Copper or CPU and as you can imagine CPU power is insufficient to do this in real time on most Amiga). Btw as not musician - what kind of frequency is most frequently used as sample rate for samples (to cover usable musical scale)? |
|
31 January 2016, 15:26 | #183 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,307
|
Difficult to say. I`ve seen many different sample rates. The lack of memory forced to use lower rates. I would guess that most frequently used was 16kHz (C-3). The first years I recorded with the same value, later 22kHz (F-3) but for more then 3 sec. (64kb limit) I went for the next lower note/rate or just to C-3, F-2, C-2. Although, as said nearly every note/rate was used. Below 8kHz (C-2) could be ignored IMO because seldom used.
|
31 January 2016, 19:59 | #184 |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Just a quick note, stepping can be done with:
Code:
move.b (a0), d0 ; read sample adda.w (a1)+, a0 ; increment sample pointer according to the (sign extended) stepping table Code:
add.w a0,d1 addx.l d2,d3 move.b (a2,d3.l),d0 ... And it should be possible to mix 6 channels (3 per L/R output) for a total of 8 channels in less than 260 clocks/update, still a bit slow... 14kHz would take 3.6M clocks to render. |
31 January 2016, 20:21 | #185 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
"stepping table" would be huge, especially since it is using 16 bit words to store essentially only 1-bit worth of data
|
01 February 2016, 04:55 | #186 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
I have a hunch that adding frequency or volume constraints would not hurt musicians that much and would allow significant speed-ups. One only needs to hear 2 channels music to get convinced that creativity can overcome constraints. Yes, the constraint is different but the principle stays valid: creative people always find ways around constraints that coders did not think about, that is almost in their DNA. Regarding the up sampling artifacts mentioned by Meynaf, yup these would be audible but to which point? Has anyone tried? (Yes, I know I should, and probably will eventually.) I wonder to which extent they can be compensated for by mixing precomputed "correcting" samples for the most used up sampling ratios (possibly as a function of the original waveform too)... |
|
02 February 2016, 13:38 | #187 | |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
But sure one could compress it, something like this would perhaps work? Code:
move.w (a1)+, d1 ; fetch stepping bitmap ; unrolled 16 times move.b (a0), d0 ; fetch sample ... ; volume lookup, mixing ... add.w d1, d1 ; set X according to next stepping value subx.w d2, d2 ; D2 = 0 or -1 suba.w d2, a0 ; step... |
|
02 February 2016, 18:46 | #188 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,806
|
Quote:
That said, simple methods are still good enough depending on the application. |
|
02 February 2016, 20:54 | #189 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,853
|
Downsampling can be performed quite easily - just select samples in regular interval... but or you don't have best quality (as you can use only limited bandwidth to fulfill Nyquist criteria) or you accepting unavoidable aliasing (which is so common in Amiga and some people even like it).
Upsampling is very easy - just repeat sample value but still... no best possible quality... There is always trade-off on such slow machine... |
02 February 2016, 20:54 | #190 | ||
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
Quote:
I have used a modified version of Lanczos resampling to good effect, for a 2:1 ratio this is fairly easy and quick. All samples could be doubled or quadrupled in length before the module is played, then interpolation is effectively pre-calculated to some degree, if you are willing to use that much RAM. |
||
02 February 2016, 22:28 | #191 | |
Registered User
Join Date: Jan 2016
Location: Knivsta / Sweden
Posts: 20
|
Quote:
Code:
add.w a0,d1 ;a0 = fraction of speed d1 = current fractional position addx.l d2,d3 ;d2 = integer of speed, d3= index into sample move.b (a2,d3.l),d0 ; fetch sample Last edited by drhex; 03 February 2016 at 05:26. |
|
02 February 2016, 22:33 | #192 |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Using stepping tables is a real example of integer based scaling - there is no fractional precision per se (though it will mostly behave as having the precision of the table generator). There will be artifacts at the update frequency but those are probably so minor that they can be ignored. Have to try it to see.
|
02 February 2016, 23:41 | #193 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
http://eab.abime.net/showpost.php?p=...&postcount=130 |
|
03 February 2016, 12:36 | #194 | |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
The non-compressed version is a bit faster but still have the same kinds of limitations. It could be useful for some cases though. |
|
03 February 2016, 19:02 | #195 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,853
|
Quote:
Upsampling/downsampling is more like address operation than data processing. Decimation is quite similar - apply lowpass filter then select samples - asynchronous sample rate conversion is performed as first upsampling then downsampling. If you prefilter your data before upsampling/downsampling then lowpass is optional. Interpolation is different topic - there is no optimal approach for this especially in time domain, in frequency domain you may apply spectral band replication with sufficient results. |
|
03 February 2016, 20:42 | #196 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
but it seems the confusion about which way round are upsampling/downsampling is a problem of Amigaland, Protracker calls shortening the sample "upsampling" (by a factor of 2 in this case) whereas in signals processing land upsampling results in a longer sample. Weird. Lanczos resampling, btw, IS a low-pass filter. |
|
03 February 2016, 21:36 | #197 | ||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,853
|
Quote:
Quote:
http://www.dsprelated.com/showarticle/167.php http://www.dsprelated.com/showarticle/903.php Yes - Lanczos is a windowed sinc (windowed by Lanczos window) and as every windowed sinc it introduce own problems. |
||
03 February 2016, 22:02 | #198 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
ok yes it was i who got them the wrong way round, because as i just explained, apparently Protracker got them the wrong way round. What confused me was you talking about Zero Order Hold and Zero Fill, a distinction nobody mentioned(?)
Quote:
|
|
04 February 2016, 06:00 | #199 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
I.e., instead of going from ABCDEFGH to AABCDEEFGH you'd have 0ABCD0EFGH Or am I completely misunderstanding you (most likely)? |
|
04 February 2016, 16:23 | #200 | |||
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,853
|
Quote:
Quote:
Quote:
Last edited by pandy71; 04 February 2016 at 17:23. |
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sound channels switched? | bLAZER | support.WinUAE | 21 | 28 October 2014 08:43 |
A600: missing sound channels | cosam | support.Hardware | 28 | 23 May 2010 06:43 |
More that 4 Sound Channels??? | Dragon3d | support.WinUAE | 8 | 01 February 2008 17:30 |
shufflepuck cafe 4 channels sound is crazy | turrican3 | support.WinUAE | 5 | 08 November 2007 15:41 |
help sound 4 channels | turrican3 | support.WinUAE | 37 | 13 April 2007 09:17 |
|
|