 |
Welcome to the Natami / Amiga ForumThis forum is for AMIGA fans interested in the new NATAMI platform.
Please read the forum usage manual.
|
Do you have questions about the Natami? Post it here and we will answer it!
|
| Back to the Sound | page 1 2
|
|---|
|
|---|
SID Hervé France
| | Posts 663 31 Oct 2010 16:11
| Hello Because Paula has been updated and the historical (16, I believe) sound effects of soundtrackers are become, de facto, standard : the idea is to integrate them into Paula. The first consequences (or benefits or extensions), that I see, would be:The IFF sounds could be extended to contain the parameters used, The programs using this sound could be lightened, The OS could support any future expansion effects as datatypes. Would it be hard, usefull, unnecessary to do it ? Thank
| |
Samuel D Crow USA
| | (Natami Team) Posts 1295 01 Nov 2010 01:06
| IFF 8SVX is too old. Use IFF AIFF files instead if you want CD quality reflected in them. MilkyTracker and the FastTracker 2 file format it uses support 32 voices and OctaMed SoundStudio uses 64 in mix-mode. Hardware mixing via SIMD unit would be sufficient though. The datatypes for AROS and AfaOS should help bring us above and beyond the OS 3.x limitations. It shouldn't be necessary to hard-code the tracker file format into a music player. I've written a music compiler for Protracker mods. (Ok half written.) It uses a coroutine in C to contain all of the musical score information which compiles to a jump-table. Does this answer your questions?
| |
SID Hervé France
| | Posts 663 01 Nov 2010 12:02
| No, the topic concerns the relevance of an addition to the sound coprocessor and not about the sound sampling quality, soundtrackers or number of voices, sorry. Here are some effects (given by Protracker, list not hexaustive) that could be materially supported: arpeggio, slide up and down, portamento, vibrato, tremolo, volumeSlide, etc... During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload. Audio file formats could be extended to include these new settings, and, if they are initialized, it could give a new type of instrument file. The system should benefit from this extension and the list of effects may be increased (but I am not sure of the realism of this possibility) in the same way than AHI or DataTypes. Thanks
| |
Gunnar von Boehn Germany
| | (Moderator) Posts 5775 01 Nov 2010 22:59
| SID Hervé wrote:
| During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload.
|
How much workload is this to the CPU - can we quantisize this? How much workload was this on a 7Mhz clocked 68000? How much workload will it be on a 68K which is hundred times faster?
| |
Samuel D Crow USA
| | (Natami Team) Posts 1295 02 Nov 2010 00:35
| SID Hervé wrote:
| | Here are some effects (given by Protracker, list not hexaustive) that could be materially supported: arpeggio, slide up and down, portamento, vibrato, tremolo, volumeSlide, etc... During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload. Audio file formats could be extended to include these new settings, and, if they are initialized, it could give a new type of instrument file. The system should benefit from this extension and the list of effects may be increased (but I am not sure of the realism of this possibility) in the same way than AHI or DataTypes. Thanks
|
The most computationally intense part of a mod player is the mixing. The playback is small by comparison. A datatype could be built around my music compiler technology to reduce the CPU load caused by the interpreter but there is no other way to speed up the mixing than to add an SPU (or something similar) to do it for the processor. For example an arpeggio in C-like pseudo code:
timeindex=(timeindex+1)%3; switch (timeindex) { case 0: set_frequency(note0); break; case 1: set_frequency(note1); break; case 2: set_frequency(note2); break; default: error("the impossible happened during an arpeggio command/n"); break; }
This is only about 16 lines of code! It can't be done any simpler than this whether in hardware or software. Someday I'll write another music compiler and base it on some existing code or something. This will decrease the CPU load slightly but ultimately, this is a solution waiting for a problem. The timers of the music scores update at the same time as the effects do so adding hardware playback functions to the Paula won't do anything useful.
| |
Erik Bauer Italy
| | Posts 301 02 Nov 2010 07:47
| Gunnar von Boehn wrote:
|
SID Hervé wrote:
| During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload. |
How much workload is this to the CPU - can we quantisize this? How much workload was this on a 7Mhz clocked 68000? How much workload will it be on a 68K which is hundred times faster?
|
The problem, Gunnar is IMHO different: if you have a coprocessor that handles these things you can't have situations where the CPU is iverloaded and can't apply the effects wit the correct timing (and we all know timing is crucial when talking about audio). So, a coprocessor is maybe of no use if you just evaluate the workload, but it becomes very useful when you talk about timing and parallel workload (think about copper).
| |
Gunnar von Boehn Germany
| | (Moderator) Posts 5775 02 Nov 2010 08:07
| Erik Bauer wrote:
| The problem, Gunnar is IMHO different: if you have a coprocessor that handles these things you can't have situations where the CPU is iverloaded and can't apply the effects wit the correct timing (and we all know timing is crucial when talking about audio).
|
But isn't this the reasons why you put a mod-player in a interrupt? When you run a moc-player in an interrupt it will always have the correct timing - even on an 100% loaded system.
| |
Erik Bauer Italy
| | Posts 301 02 Nov 2010 09:12
| But what if there are several overloading "interrupt driven" applications? Concept is: the more overload you keep away from the main CPU the better it is. And AFAIK, that was the original philosophy of Amiga.
| |
Gunnar von Boehn Germany
| | (Moderator) Posts 5775 02 Nov 2010 13:18
| Erik Bauer wrote:
| But what if there are several overloading "interrupt driven" applications?
|
Don't worry. Your fear is unbased. The way that I described is the basis of the AMIGA multitasking. Interrupts means that they are a priority schema. Your audio player itself has little CPU load. But you want that your audio player will be executed reliable at certain execution times to guarantee the smooth audio playback. Therefore you use the interrupts to do this. This is exactly why the AMIGA has its interrupts as they are.
| |
Cesare Di Mauro Italy
| | Posts 526 02 Nov 2010 15:11
| But audio hadn't the highest priority on the Amiga. :P
| |
Erik Bauer Italy
| | Posts 301 02 Nov 2010 17:36
| Exactly... What if I want my audio to be perfectly synchronized with something else and other things that need synchronizations too are running in multitasking? (G.E: MAME 68k running in multitasking while a DVD burner is burning data while formatting a floppy disk and while saving the MAME output to an AVI file. Ok, that's just an example, maybe not the perfect one, but you see that different timing demanding tasks are overloading the CPU and one or more of them are going to loose the timing) With such a CPU overload you could have sound glitches and other tasks loosing synchronization too. Demanding the various tasks to coprocessors is an elagant way of unloading the CPU.
| |
Cesare Di Mauro Italy
| | Posts 526 02 Nov 2010 18:44
| OK, but what happens if coprocessor haven't enough resources to handle audio? They may be lacked out from memory access if the CPU or other devices are taking all available slots. Another point is coprocessors coordination. If the CPU isn't able do dispatch the requests to the audio coprocessor to let it take the job asynchronously, you'll get glitches anyway. So there are two questions that need to be resolved. First, audio interrupts need to be served at the highest level possible. Secondly, the coprocessors must have the highest priority if they need to access to the chip and/or fast mem.
| |
SID Hervé France
| | Posts 663 02 Nov 2010 22:32
| Gunnar von Boehn wrote:
| How much workload is this to the CPU - can we quantisize this?
|
I suppose it is mainly relative to the complexity of the effect (and the writing of its code).
How much workload was this on a 7Mhz clocked 68000?
|
I remember the sound do not always like floppies access.
How much workload will it be on a 68K which is hundred times faster?
|
For future heavy multimedia application (eg use of combined 3D core, video playback, user interaction, the increased number of channels and the samples resolution), I think the CPU usage should help only for real time complex effects. For very complex effects like DSP (sound and or picture), then the CPU must be used. More generally, and unlike the Amiga coprocessors that offloads the CPU, I think that your work and its expected performances should intend the CPU to assist and not to replace the coprocessors. And I think this should not prevent programmers to exercise. But there is the risk that some oversized applications appear. This does not apply to Samuel whose project is interesting.
| |
Samuel D Crow USA
| | (Natami Team) Posts 1295 03 Nov 2010 06:45
| SID Hervé wrote:
|
Gunnar von Boehn wrote:
| How much workload was this on a 7Mhz clocked 68000?
|
I remember the sound do not always like floppies access.
|
That's because trackdisk.device used the blitter to decode the sectors of the floppy disk. Since the blitter is about 200 times faster than the original blitter, this will probably no longer be an issue.
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 03 Nov 2010 09:18
| Samuel D Crow wrote:
|
SID Hervé wrote:
| Here are some effects (given by Protracker, list not hexaustive) that could be materially supported: arpeggio, slide up and down, portamento, vibrato, tremolo, volumeSlide, etc... During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload.
|
|
The CPU load for these effects are minimal. Even a 6502 did these effects easily in the vertical blank interrupt, even more so the 68K could and can do that without any further trouble.Samuel D Crow wrote:
| The most computationally intense part of a mod player is the mixing. The playback is small by comparison.
|
Indeed. Mixing, however, is only required if you want to play more instruments simultaneously than you have DMA channels available. The problem becomes smaller with more DMA channels available (I'm suggesting about 32 of them which should be sufficient for a while) as downmixing can be done then in hardware. The software effort for the effects are, as you say correctly, not even minimal, they are diminishingly small and no need to worry about. As said, a 6502 can do that with ease.What might be helpful is some additional logic to autmatically reload DMA channels, i.e. include an attack-decay-sustain-release cycle somewhere in the DMA logic using separate samples for each of the cycles, and having a control register available that controls the cycle. Reloading of the Paula DMA registers was always a bit hairy and the state-chart of Paula was rarely understood correctly. The early mod-trackers used mostly an incorrect method to re-load Paula channels and hence broke on fast mem. So long, Thomas
| |
SID Hervé France
| | Posts 663 03 Nov 2010 22:26
| By proposing the idea of a reduced sound effects included in Paula, I hoped to prevent potential problems. Despite the performance of the memory part and may be the old OS system interrups, would there be a risk induced by a large volume of data generated by the activities of a multi-cores CPU, the 3D core, Super AGA and expansion of audio ?
| |
Samuel D Crow USA
| | (Natami Team) Posts 1295 03 Nov 2010 23:49
| On a modern system, AHI uses a callback hook to trigger the music player routines at a fixed number of samples. This avoids interrupts completely unless you use the DMA driver. Having a datatype-based music player would allow the Robin core to handle all of the music playback in addition to the mixing.
| |
Wojtek P Poland
| | Posts 1597 08 Dec 2010 13:04
| Gunnar von Boehn wrote:
|
SID Hervé wrote:
| During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload. |
How much workload is this to the CPU - can we quantisize this?
|
close to zero.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3976 08 Dec 2010 13:08
| Wojtek P wrote:
|
Gunnar von Boehn wrote:
| SID Hervé wrote:
| During playback, Paula could directly apply effects on the sample, which could unload programs, programmers and the CPU of this workload. |
How much workload is this to the CPU - can we quantisize this? |
close to zero.
|
This still depends on the software implementation.
| |
Louis Dias USA
| | Posts 217 08 Dec 2010 13:51
| Samuel D Crow wrote:
|
SID Hervé wrote:
| Gunnar von Boehn wrote:
| How much workload was this on a 7Mhz clocked 68000? |
I remember the sound do not always like floppies access. |
That's because trackdisk.device used the blitter to decode the sectors of the floppy disk. Since the blitter is about 200 times faster than the original blitter, this will probably no longer be an issue.
|
Can I quote you on Amiga.org? :)
| |
|
|
|
|