26 December 2014, 17:48 | #41 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,030
|
This is software limit, 7MHz 68000 can't mix more than 4 channels with good quality. Good 4 channels in 1 channel mixing routine using all 8 data registers and all 9 address registers. Original Hippel's mixing routine used also self modyfying code.
|
19 January 2015, 17:14 | #42 |
Registered User
Join Date: Apr 2013
Location: paris
Posts: 133
|
Hi,
I think 7 is both because of ATARI and AMIGA Jochen Hippel wrote tons of ATARI code, and his demo group ( TEX ) was one of the first playing "AMIGA" like digital music on ATARI. ( cf AMIGA Demo ). On ATARI, software mixing routines has 4 voices "because" of AMIGA hardware! ( but the CPU is able to mix more than 4 voices). Then, when Jochen wanted to add voices to AMIGA, I guess he re-use its 4 voices software mixer from ATARI, play the result though one AMIGA hardware voice. So there is 3 hardware channels left. You get the "magic" 3+4=7 value. |
19 August 2015, 16:33 | #43 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
I am glad I got the chance to talk with him a (very) little bit at this occasion, he is a very nice, soft spoken, friendly and modest person who is super accessible. A very nice human being in addition to being an Amiga legend. |
|
19 August 2015, 23:04 | #44 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
the strange thing is, although Huelsbeck back-ported the 4-channel mixing to the Amiga to get 7 channels in total, the Turrican II theme on the Atari ST still seems to have 7 channels, at least i don't hear anything obviously missing. I asked Chris about this on Twitter and he seemed not to actually know the answer...
|
19 August 2015, 23:52 | #45 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,448
|
Chris probably didnt back port anything from Atari to Amiga. As well as their musician Jochen was Thalion's Amiga programmer. He ported all of Thalion's Atari games in the first year to the Amiga pretty much on his own. He had his own 7 voice Amiga music too
|
20 August 2015, 12:49 | #46 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Chris wrote TFMX didn't he?
|
20 August 2015, 16:53 | #47 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,448
|
Just saying the Jochen had 7 voice songs working on the Amiga at the same time he licensed / gave his mixer code to Chris for their collaboration
|
21 August 2015, 05:36 | #48 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
He could have mentioned it was a collaboration but that is not the impression I got. |
|
21 August 2015, 06:24 | #49 |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
About sample interleaving:
Only if you are a cat! Let's say you interleave samples from different sounds while playing at 28khz: each sample from the first of the sound essentially is played as a max volume impulse followed by a zero volume one with a frequency of 28/2 = 14kHz. That's already at the limit of human audition so unlikely to be perceived but since you are interleaving the sample of two sounds you are also playing another 14kHz signal with exact opposite phase so they can end up canceling each other out. The cancellation is not complete because the samples of each sound obviously differ so you probably end up with a low volume 14khz signal when both sounds have similar volumes/dynamics. When they have highly different (opposed) mostly constant volumes is when the 14kHz signal will be the most perceptible. This said, if you interleave samples it means that these have already been prepared somewhat in advance so you could as well add them together with clipping: snd1spl1, snd1spl1 + snd2spl1, snd1spl2 + snd2spl1, snd1spl2 + snd2spl2, etc. The clipping artifacts are probably preferable to the 14kHz whine overall. |
21 August 2015, 09:54 | #50 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
|
21 August 2015, 22:37 | #51 | |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
Quote:
That's the horizontal scan frequency and it is around 15kHz and I do recall hearing it very finely when I was younger. These days I can notice it faintly when switching the monitor on but after a second or two I cannot distinguish it from the background noise anymore. So yup, indeed, it would probably be quite noticeable to young ears. Although it would not be constant and vary quite a bit as samples are played which may or may not be a good thing. I will test it when that reaches the top of my priority list. |
|
22 August 2015, 01:03 | #52 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
|
22 August 2015, 04:21 | #53 |
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 852
|
Many many summers ago I tested doing this. I can't really remember what it sounded like, but IIRC it wasn't bad with high enough samplerate playback. I think it did sound bad on lower rates. (Kinda metallic sounding?)
|
22 August 2015, 14:39 | #54 |
Code Kitten
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
|
|
22 August 2015, 15:35 | #55 |
Amiga Nuts!
Join Date: Sep 2006
Location: Le Mayet d'Ecole, 03800, FRANCE
Posts: 176
|
there was oktalyser that could do up to 32 channels on a 060 amiga with (plenty of) ram by real time mixing the samples ^^)
|
22 August 2015, 20:58 | #56 |
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 852
|
I'll take aim at my mouth with my foot, but sound mixing is a pretty well known exercise in signal handling / processing. It is basically (open mouth wide) stretching/skipping the source samples until they fit the target playback frequency, adding all the values together, and then dividing by the number of samples you just added. Making it sound good is the magic part (and you have to be careful about overflow and rounding).
Even the original Amiga is mixing two signals together in each left and right channel, however much that might be done with analog circuits; the theory is still the same. |
22 August 2015, 21:42 | #57 | |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Quote:
Obviously the "mixing" is simply addition, but there is also resampling and volume-multiplying to be done. Easy in theory, getting it to output in real-time on a stock A500 maybe not so easy in practice. |
|
23 August 2015, 00:12 | #58 | |
WinUAE end user
Join Date: Jan 2014
Location: Bremen
Age: 44
Posts: 649
|
Quote:
I never tried 64 channel mods but at least up to 16 channels work fine on 040+ Amigas. It's not what I would call HiFi quality and you have to turn the volume up a little more but it works. I also remember getting a "You need more CPU power" requester from Musicline editor with a basic A1200 when playing some 8 channel mods. Many of them played fine on Delitracker. |
|
27 October 2015, 12:17 | #59 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,352
|
Mixing channels without interpolation is an easy task, actually.
You have to bring all channels to the same replay frequency and volume levels, then make an average (i.e. add then shift back). This is done by upsampling/downsampling the sound accordingly (just skip or repeat samples), and the volume level is made not with multiplies (too slow !), but with a table lookup (a 256x64 entry table is small enough and easily built at startup). A 68000 can do something like 4 channel mixing at 25khz, and 8 channel at half that rate. A 68030 can do 32 channel mixing with interpolation. Use the 14bit Noteplayer for Delitracker2, the one made by Chris Hodges - awesome quality you get there, especially with calibrated 14bit output. I would love to see the actual routine for its 16:16 infinite oversampling mixing mode ! |
27 October 2015, 14:36 | #60 |
Banned
Join Date: Jan 2012
Location: Serbia
Posts: 275
|
I must ask something that is not related strictly to topic but 14bit sound on Amiga is achieved by combining two 8 bit channels but Amiga still have 8bit DAC at output? right? So internally (in memory and CPU) you work with 14bit but at output you have 8bit OR Amiga have 4 separate 8bit DAC connected to stereo output chinches?
|
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 |
|
|