home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Snippets / PlayRiffs 1.0.2 / Read Me < prev   
Encoding:
Text File  |  1995-12-01  |  2.3 KB  |  55 lines  |  [TEXT/ttxt]

  1. This is another "patchwork" but there are plenty of parts of it
  2. that I created.  I did the interface and the editing.  And if I
  3. didn't know *something* about programming it wouldn't work!
  4.  
  5. The heart of it is the Play_The_Riffs routine, linking the call
  6. backs and bumping the buffer pointers around.
  7.  
  8. I got lots of help, via IM and snippets from knowledgable
  9. programmers.  One in particular, who knows who he is.  I won't
  10. tell you who and you won't pester him.  You can pester to me,
  11. though.   : )
  12.  
  13. It uses two sound channels - one for the key hit sounds (creating
  14. it and getting the resource on the fly) and one for the riffs
  15. ("riff" is a musician's equivalent to a "fragment" in programming:
  16. a short passage of music).
  17.  
  18. This is also only ONE way of doing this.  You can play a series of
  19. sound from a 'for' loop, a 'while' loop, from 'if' statements,
  20. from a repeatedly called routine that just plays them with
  21. stop-gap timing included - all sorts of ways.  You can also have
  22. various numbers of sounds for your riffs, of varying lengths and
  23. played in a certain sequence under varying conditions, for a
  24. multitude of effects.
  25.  
  26. Look at Dan Sydow's animation sequencer 'for' loop.  Take out the 
  27. limiter, use Do_The_Sound instead of DrawPicture, etc.  I tried it
  28. and it worked.
  29.  
  30. The riffs are from "Are You Experienced" played backward, which is
  31. actually forward because Jimi Hendrix recorded it backwards.  It's
  32. not finely edited and you can spot the glitches.  I just wanted to
  33. make a demo - not a masterpiece - but it's not *too* shabby! You
  34. can get the idea.
  35.  
  36. "Miss Patty's" voice is from the DylanTalk source (a MacHack
  37. thing) - the "Fred's Neighbor" voices.  I just tossed that in to
  38. demonstrate a mouseDown played sound conjunction with a picture
  39. draw.  MouseUp plays another sound and puts the rectangle back
  40. like it was.
  41.  
  42. The screen area was fun to play with.  Anyone else notice "shades
  43. of *3 in Three*" in the way it acts?  Since the window is screen
  44. bounds, the 'ppat' is drawn starting at topLeft.  So any rects
  45. drawn over it will land in the right spot no matter what size
  46. screen (hopefully).
  47.  
  48. The intention, here, is to give novice programmers an avenue of
  49. approach for incorporating these "sound possibilities" in the
  50. programs they may want to create which needs such effects.
  51.  
  52. Enjoy!  (And learn.)
  53.  
  54. kenlong@netcom.com
  55.