Thinking about the big picture of sound on the IIGS [message #24] |
Thu, 18 September 2014 15:16 |
mcpderez
Messages: 12 Registered: August 2014
|
Contributor |
|
|
This question is probably one I could spend some time looking up an answer to, but perhaps it is easier to just ask someone experienced.
I did not have a IIGS until recently and am not very knowledgable about how its sound works.
To try to get a conceptual framework, in the context of writing code that includes sound, I am wondering if you can load a sample into the sound hardware and then let it manage the playback, or do you have to process sound in the same time you are trying to update graphics as the frames are drawn? I am thinking more along the lines of background music as it seems like any event driven sound effects would be initiated along with collision detection for instance.
If the answer is yes, the sound hardware can take a clip and run with it, what format do those sounds take, usually?
If the answer is no, is there a customary place in the code where it makes sense to do the sound?
|
|
|
Re: Thinking about the big picture of sound on the IIGS [message #26 is a reply to message #24] |
Fri, 19 September 2014 14:55 |
Dagen
Messages: 27 Registered: August 2014 Location: United States
|
Member |
|
|
There are two main ways to access the sound, programming the sound hardware (specifically the Ensoniq DOC) directly or using Toolbox Calls. There are official Apple tools to play single sounds or midi sequence sounds, and there are third-party sound Tool sets to play music files that are like Amiga MODs, the SoundSmith and NoiseTracker tools (219&220).
Basically, either one works like this, 1) you load sounds into the 64k DOC RAM and 2) you trigger something to have the doc play your note(s).
So generally speaking, there is not much, if any overhead to playing many samples at once. NoiseTracker allows you to use more than 64KB of samples by swapping sample data in and out. That's probably going to eat some CPU.
I'm sorry for the general answer. I don't have enough background in sound programming to give detail to the response, but I do know that if you have a sample in DOC RAM, you can get the DOC to play it back and the CPU doesn't incur any load.
|
|
|
|
|
|
|
Re: Thinking about the big picture of sound on the IIGS [message #72 is a reply to message #35] |
Wed, 29 October 2014 20:20 |
kumele
Messages: 3 Registered: August 2014
|
Poster |
|
|
Would anyone mind if I took the suggestion and just did the whole thing? I found Olivier's suggestion to be a timely opportunity to learn, an interesting exercise, and a welcome distraction.
So I've created two documents. An OCR'd (and cleaned up) French version and an English version.
While the English version is probably good enough to use as it is, be aware that it likely isn't defect-free. If speakers of either language would care to help proofread and offer feedback, I will make a final version available at a later date. Some attention to technical accuracy between the versions is quite welcome, as I wasn't 100% certain at all times. As a secondary concern, the fidelity of the OCR to the original printed French might also benefit from a review.
Some notes:
These are plain text files, and were translated line-for-line in as practical a manner possible. This means that the line of code on line 2115 in the French version is the same code on line 2115 in English. This makes for a very easy side by side comparison, which aided greatly in the translation effort. The drawback is sometimes the English paragraphs have odd line lengths. This is just the nature of translating incongruent sentence structures, plus in a few places I've made slight additions for clarity.
For French speakers: I'm not an expert on French orthography (which sometimes gives me the impression of being less stable and less agreed-upon than English - although it is just an impression and could be untrue). There were some obvious errors in the original, and then some other things that just didn't look right. I tried to correct these in the French OCR version, but probably messed up some things and missed others. Please forgive me. My basic approach was to usually incorporate whatever made the spell-checker calm down, while also including some Google translate suggestions, all quite inconsistently.
So, to the files:
http://www.thunderheadbay.com/gs/IIgsEpluche_SoundAndMusic_F r.txt
http://www.thunderheadbay.com/gs/IIgsEpluche_SoundAndMusic_E n.txt
-Don
|
|
|
|
Re: Thinking about the big picture of sound on the IIGS [message #74 is a reply to message #73] |
Sun, 09 November 2014 00:18 |
kumele
Messages: 3 Registered: August 2014
|
Poster |
|
|
Thanks Olivier!
I did not keep notes on what didn't look right going from the original PDF to OCR-French. When I was unsure of the French, I just made a decision and kept on going. These questions were mostly about spelling and typos, and are probably inconsequential.
When going from French to English, there were a few parts I made notes about. For example, the paragraph on lines 188-193 was a significant one; the French proved difficult for me, so I resorted to checking the GS schematic. Having no previous experience using that hardware, I took a best guess, and remain uncertain.
I had several French speaking friends which were able to provide enough confidence to eliminate the rest of my notes. One of those conversations was the use of UNCOUP as a label. As best I can tell, it required idiomatic knowledge of French, plus flexibility of understanding context. That was beyond my abilities. As you can see, I translated it as the technically correct but uninspired WHICHONE.
I'd guess Dany would prefer a more UNCOUP-ish English label. Please suggest one!
-Don
|
|
|