=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- APPLE II MUSIC & SOUND FORUM CONFERENCE LOG August 7, 1991 10 PM ET Topic: Using Sounds in Your Programs Forum Leader: Joyce Madden (AFL JoyceM), Forum Assistant: Gene Koh (AFA Gene) Forum Consultants: Greg Dib (ELECTMUSIC), Ed Rosenblatt (AFC Eddie), Lindsay Hough (LindsayGS) Copyright (c) 1991 America Online All Rights Reserved =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- AFA Gene Welcome to tonight's Apple Music Forum Conference. Tonight's topic is Using Sound In and With Your Programs. We will be discussing all aspects of this except for the programming aspect (i.e. we won't get too techie :) if anyone is interested in the more technical aspect of this topic, use keyword ADV. :) Well, basically there are two avenues of sound use in programs. One is the use of digitized sounds, each played back at the same frequency every time. Common uses include gun blasts, "death" screams, etc. in arcade type games. There used to be a time when all these sound effects were synthesized. The advantage to synthesizing the sounds as opposed to digitizing them is that you save a LOT of disk space and memory... remember that digitized sounds always ends up in memory in binary form, and this can quickly take up a lot of memory if you use a high sample rate (for more information on digitizing, visit our Articles & Transcripts software library). However, whether one uses digitized or synthesized sound effects, one enjoys the benefits of SPEED either way. Since the Ensoniq chip inside the IIgs contains 64K of its own DOC RAM, one never has to worry about shuffling around RAM to accomodate sound effects. Christain Can I ask a question in general AFA Gene GA Christain Christain OK...I've beemn wanting to learn to program my IIgs REAL BAD like, but I get a bunch of different answers on what to learn to program with You guys have any suggestions on what to start on? AFA Gene Well, first thing I'd do is use keyword ADV. America Online offers an entire forum devoted to programming and development. There are MANY ways to start programming on the GS... it depends what you want to do with the machine. McKinsey Merlin 16+ & Roger's Book. That's all you need.# AFA Gene McKinsey just mentioned Merlin 16+ from Roger Wagner Publishing and a book from COMPUTE! Publications written by Roger Wagner. Forgot the exact title. JayJ 89 Attend a ADV no-specific topic, and ask there, they'll debate it out with you AFL Floyd I always recommend Pascal as a first programming language. Christain Thats cool..I get either ORCA/C or Pascal as answers. Thanks for the input; Seems like an odd question to ask at a Music forum, but I think you guys know what you are doing. AFA Gene Okay, now on with tonight's topic.... the second aspect is using music in programs. The only difference between playing sampled sound effects and playing back-ground music in programs is that you are playing samples of musical instruments rather than samples of sound effects. Different musical pitches are obtained by playing these samples at difference speeds. There are three common ways of going about this: The first is to use your own music driver, programmed from scratch. This is the toughest route but in the end can result in a very efficent driver that does exactly what you want. The difference between this and the sampled sound effects discussed before is that you have to keep in memory a data table of when to play the instrument samples, and at what pitch... a musical sequence. This is just like the musical sequence file that any music program creates (such as Music Studio or SoundSmith) when one saves a file to disk. Creating your own music driver from scratch means that you can design the format of these sequence files in any fashion you want. An example of the use of custom music drivers is any one of Pangea Software's games, such as Xenocide, Cosmocade, Senseless Violence, etc. Brian Greenstone wrote his own music drivers from scratch and the results were worth it. :) However, most programmers don't have the time to create custom music drivers like this. These programmers opt to use a driver that will play a common music file format. Now, back in 1983, a teenager named Will Harvey wrote the Music Construction Set. In 1986 when the IIgs was released, a GS version of this software was released too (we still maintain a vast library of music sequence files for this program). Will also wrote two games for the GS called Zany Golf and the Immortal.This is just speculation on my part, but I have a feeling that he used a music driver that would have been in Deluxe Music Construction Set GS (had EA not axed it) in both Zany Golf and the Immortal. Well anyway, there is a definite connection between the sound in these games and the sound in MCS. The sound files are not directly compatible... but... one can use a program such as AudioZap (demo and beta versions available in our software libraries) to investigate these sounds. An example: take audiozap, and Open into your Immortal Graphics Disk. There is a folder called INSTS on the disk. Open it, and you'll find digitized instrument files labeled INST1, 2, etc. AudioZap can load in these files, and you can play them! In fact, you can even Save these files back into an ASIF/Soundsmith format for use in Soundsmith! (You can't upload these commercial instruments anywhere, tho.) Zany Golf also has an INSTS folder... it's quite interesting to experiment with. There are a few bugs in AudioZap, however, so not all the sounds play perfectly, but it's still interesting. Other more common ways that programmers get music into their programs is by using drivers that will play Soundsmith songfiles. McKinsey ugh... :) AFA Gene hehehe Chris.... :) ELECTMUSIC Comment... AFA Gene The easiest way to jump into this arena is to use FTA's Tool219...(GA Greg) McKinsey Parik Rao wrote a simliar toolset. It's available online, and it's American. :) ELECTMUSIC I have found listening to sound files from other programs also helpful in getting ideas for digitizing my own files Elie2 What about importing MIDIsynth into programs? AFA Gene Yes, absolutely Greg.... Elie, one second, some real interesting stuff about MIDI synth... Elie2 ok :) AFA Gene Chris (Mckinsey) is correct, AFA Parik also wrote his own toolset (in fact, I believe he wrote it before FTA released Tool219). Whichever toolset you use, it makes things easier due to the fact that you're using a tool. McKinsey speak o the devil! AFL Marty What's the difference between the two? ELECTMUSIC His ears must have been ringing :) AFA Gene Marty, Parik's tool has better legs. :-) AFL JoyceM And, what is the name of Parik's tool set? AFL Marty Patterned after Jane Lee's, no doubt. AFA Parik my tool has english source code, FTA's doesn't (assuming talking about ss toolset) AFA Gene Seriously, the only difference between Parik's code and Tool219 is that it's easier to get at because it's all right here on America Online. AFA Parik its better not to use a toolset tho AFA Parik oh, mine also loads in the ASIF file-thingies. AFA Gene I know, it's in this forum, Parik. :) Just meant that all the documentation is in english and the author of the tool is online here too. :) AFL Marty And FTA's doesn't load in ASIF file-thingies? (whatever they are) AFA Gene Do you mean the Soundsmith .D files, Parik? AFA Parik yeah, it requires the bank-wave file thingie (tech term :-) AFA Parik TOOL219 *requires* the ".d" (.w, etc) file. My tool will use the .D or the asif file ($D8) McKinsey It's american made, dangit! :) AFA Parik loading in ASIF instruments is a b****, actually sorting them in DOC ram is. Took over 5 weeks! Ugh. AFL Marty Thanks. AFA Parik I wonder whatever happened to Soundsmith 1.0. That was supposed to solve that problem. :( AFA Gene Yep... an example of a program that uses Tool219 is the new Hover Blade, by MCX. A demo with music is available in our library. Notice how the music seems to slow down and play erratically (this has been discussed in the game forum) ... this is due to the fact that the music plays using interrupts. AFA Parik (reminder: HoverBlade >is< shipping, you can buy it now for $28. plugplugplug) AFA Gene Many programmers turn off interrupts in order to make their graphics really nice, but then music suffers because it can't play perfectly if the interrupts are turned off every once in awhile. AFL Marty Is that bad? McKinsey all good music plays using interrupts. AFA Gene I said we wouldn't get techie earlier, so we won't go further into this except to say that there ARE ways to get around this and there might just be a game out in a few months demonstrating that fact. :) McKinsey There are ways to fix that problem, btw. AFA Parik ohh! I wonder who the author of this game might be. AFA Parik Are you learning how to compose songs in Soundsmith, gene? AFA Gene That leads me to the last part of our discussion. Parik, I've learned :-) Bill Heineman, being the GS mega-dude he is, was the very first programmer to release a major commercial game using the new Apple MIDI Synth Toolset. This is supposed to be the granddaddy of 'em all, right? The best sound?# AFA Parik and the second... and the third... the only in fact. :( AFA Gene The most fantastic production? Nope... in fact the MIDI Synth Tool pretty much stinks if you want to use it to play background music in a game. DangardAce He may not be putting out too many more, though. :I AFA Gene Remember the talk about interrupts before while we were discussing Soundsmith? McKinsey Well, don't be too harsh. AFA Gene Well, MIDI Synth is even more interrupt-reliant than Soundsmith, so much so that most programmers are opting for Soundsmith over MIDI Synth just because of this fact. AFA Parik lol DangardAce If Apple had wanted to score big kudos with a zillion people, they should have done what IBM did- donated two computers to run multimedia expos at the Baseball Hall of Fame. AFL Marty There's no way around that? AFA Parik maybe your co-author should write a MIDI->Soundsmith translator...nudge, nudge. AFA Parik Bill Heineman claims to have sped up the MidiSynth play routines, marty. dunno. McKinsey Parik: Yes has. I've seen it. AFL Marty I assume that was done by hacking the tool itself? ELECTMUSIC and might that be fixed in the new updates for MidiTool 35? AFA Gene A certain fellow here claims to have sped up his soundsmith driver to be 35% faster than Soundsmith itself. :) AFA Parik Why didn't you get it from him. :) McKinsey Marty: Disassembled it. The code wasn't that efficient. Lots of macro usage, probably originally written in MPW. AFL Marty What comes from Apple these days that isn't (written in MPW)? AFA Gene Yeah Chris, why didn't you get it from him? :-P :) AFL JoyceM :) McKinsey And do what with it? AFA Parik well... use it. McKinsey I can't publish a game the uses it. Apple'd kill me. AFA Parik you can imbed the tool into your program, use _TSSetPtr (whatever), and Apple would never know. muhahahaha. AFL JoyceM If one is not a programmer and wants to listen to music while, say using AppleWorks, what program could they use? McKinsey For your information, The SoundSmith Master Sound Interrupt routine is sloppy and slow. AFL Marty Don't tell them :) AFA Parik (after all, there isn't a MPW Disassembler.) AFA Gene You mean the one in Soundsmith itself, chris? McKinsey Yes. AFA Gene McKinsey There are portions in there, that store values in tables, and those tables are NEVER read again. AFL Marty Well... you could put on a Van Halen tape, Joyce. :) McKinsey It amazes me how sloopy the code is. AFL JoyceM True, Marty :) ELECTMUSIC The use of the Hypermedia (Hypercard and HyperStudio) uses the new MidiTool. AFA Parik i agree w/ marty joyce... a cd sounds much better than Euro-Pop. AFL Marty I think BG Sound will do that Joyce. Written by some AOL dude. AFA Parik and sorely needs an update. :( AFL JoyceM What about SysBeep? can't that be used in AppleWorks as the 'beep'? AFL Marty If you update it I'll pay for it. AFL JoyceM For sounds, that is. AFA Parik If you can give me a extra 4 hours a day, I'll update it. ;) McKinsey Have an entire song as a SysBeep. ELECTMUSIC Question... Gene whats your opinion of composing using Soundsmith? AFA Parik most IIe programs directly access a softswitch Joyce, and not use the tools for the beep. AFL Marty If I get an extra 4 hours a day I'm keeping them for myself! AFA Gene People used to do that, didn't they? That's how Background Music CDA came into being. McKinsey Huibert would do stuff like this: lda tax lda table,x AFA Gene Greg.... to be blunt, it stinks, etc.. :) AFL Marty Yes it can, Joyce. SuperPatch 8.0 will let AppleWorks use the Sysbeep sound from a GS. AFA Parik has your respect for the FTA musician(s) increased dramatically? ;) AFA Gene Not really, Parik.... I'll tell you why too... AFL JoyceM As will Companion Plus, etc. ELECTMUSIC If SSmith works well, why isn't version 1.0 finally released? McKinsey Because it still doesn't have Midi input. AFA Gene Soundsmith is set up PERFECTLY for composing music in 4/4 time with many repeated phrases AFA Parik chris kept telling huibert that he can't write assembly code, so huibert ran away to the yukon. McKinsey Parik, admit it. You know his code stinks. AFA Gene Soundsmith works well from a programmer's standpoint, but from a musician's standpoint, you are basically limited to 4/4 dance music. Inputting anything else means using lots of NXTs and such which is a pain to edit (since you can old move around the spreadsheet in certain ways in the SS editor. ELECTMUSIC Without the Midi hook, SSmith is not accessible to the average musician. AFA Parik I think its good for two year old code... I don't see ChrisSmith v1.0. :P JayJ 89 ack! AFA Parik pfft. DangardAce Electric Duet GS. coming to a GS near France.# AFL Marty I thought about entering a SS tune once...until I saw the directions on how to do it. AFA Parik <-- taking a music class this fall... will finally learn how to play my midi keyboard! yipee. AFC SteveB <-(Playing 'Apple "21"' on my IIc+, IM me if you need me :)) AFL JoyceM As I did, Marty - too much work. AFA Gene You know, I have this neat little Soundsmith tune called "End of Time...." ;) AFL Marty Talk about taking away enthusiasm. AFA Gene Parik, I remember when you took the online music class! LOL! :) AFA Parik eeeek. don't remind me. AFA Gene (no offense to the Academic center online, it's great, Parik just isn't the Academic center type student. :) AFA Parik I got an F in the class, and I was truant 99% of the time. Sorta like college I guess. AFL Marty Nonsense :) AFA Gene Anyway, just to wrap up, what you've just heard in the last hour is, in a nutshell, what using music and sound in programs is all about. AFL JoyceM Gene, what do you think we can expect in music programs in the future - add-ons to what we have? McKinsey Nothing will ever beat midisynth. AFA Gene As far as the GS is concerned, I see soundsmith becoming the standard for use in programs and MIDI File Format the standard for "real music." Hopefully there will be a MIDI Synth sequencer someday. For now we have to live with MIDIMate's 7-track limit. ELECTMUSIC (interesting, Gene) both noncompatable AFL JoyceM But if inputing with SS is so tedious (boring and hard) why would you say that? AFA Gene Well, as I stated before, SS is the best from a PROGRAMMER's standpoint, and thus it will rule in programs... but from a MUSICIAN's standpoint, MIDI and its related forms (MIDI Synth) etc. will be the most flexible. McKinsey (Not really, I hate the format. It stinks) McKinsey I wonder if that Huibert guy knows what a time stamp is.... :) AFA Gene I maintain that I hate Soundsmith's spreadsheet input. :) AFA Parik chris is the programmer, and hates SS. Gene is the musician, and hates SS. hmmmm. AFA Gene Well you chose it over MIDI Synth, didn't you Chris? McKinsey Gene: MidiSynth is easier to play music than SoundSmith. McKinsey Gene: not because I wanted to. Because I had to. ELECTMUSIC Why, Chris? McKinsey I wonder what Bevan thinks about SoundSmith..... AFA Parik Why didn't you do the same thing that Brian Greenstone did? His music wasn't too bad. AFA Gene Right..... thus it is better from the programmer's standpoint! I'm not talking about clean code. AFL JoyceM I am surprized someone hasn't written a utility or tool to make inputing in SS easier. AFA Gene Parik, Brian's editor wasn't the greatest to compose in, either. AFA Parik the best songs require the most blood. McKinsey I don't know Parik, what did Mr Greenstone do? AFA Parik He wrote his own music editor, and used basic instrument as building blocks. (loses the versatility of SS, but good for speed.) AFA Gene AWESOME for speed :) McKinsey Sheeshh.. Brian writing fast code? That I gotta see... AFA Gene LOL Chris :) McKinsey I remember when he thought MVNs were the fastest way to do updates.. I think Parik set him straight on that. :) AFA Gene Well, if there are no more questions, I think we can wrap it up for tonight. AFL JoyceM Gene, Thank you and an excellent discussion - even I learned some things :) Thank you. ELECTMUSIC Thanks Gene AFL JoyceM Parik, will we see an update to Background Sound - I have just allocated you 4 hours to do it :) McKinsey Too bad he left. :) AFL JoyceM oops.....he's gone :( AFL Marty Thanks Gene. AFA Gene No problem folks, well, gotta go.... see y'all next week! :) AFL JoyceM Next week our discussion will be on how to convert MIDI files from other platforms. Night, Gene. Thanks AFL JoyceM -------log off -----------