iGetIt! Music

Online music education courseware for non-musicians who want to learn how to write their own rock songs.

My Photo
Name: Jim Plamondon
Location: Austin, Texas, United States

This blog documents the development of JIMS iGetIt! Music System (JIMS). JIMS' goal is to help you Understand Music in 24 Hours™, if you are (a) a non-musician (b) who wants to learn how to write your own rock songs. Requiring no instrument other than your own computer, and without using traditional notation, JIMS is being designed to deliver a deep understanding of tonal structure...in just 24 hours.

Tuesday, December 8, 2009

Sound synthesis problem

I spent the last month packing and moving, but I'm now back online (at last!).

Why doesn't this code work?



Here's what works:
  1. Click either "Play" button; a note will sound, and the button's name will change to "Stop".
  2. Click the same button again to silence the note; the button's name will change back to "Play."
  3. Click the other "Play" button; a different note will sound (an octave higher than the first note); click it again to silence it.
So far, so good.  :-)

Here's what doesn't work:
  1. Click on either "Play" button, sounding a first note.
  2. Click on the other "Play" button, sounding a second note while the first button is still sounding.
Bad things now happen.  The sounds do not blend (as one would expect octaves to do), but instead grate against each other in a nasty alternating, overlapping grind.  Also, the application's performance slows to a crawl. Click on either button, to silence its note, and you'll see that it takes forever for the button to respond to the click.

I'm not sure how to fix this.  The code seems to be working as intended. The flaw seems to be in how I'm using Flex/Flash's sound architecture -- that is, my tactics are correct, but my strategy's wrong.

Comments welcome.  :-)

Labels: , ,

1 Comments:

Blogger John said...

Absolutely no problems on this end Jim, except for maybe a little unpleasantness in the octaves, maybe related to the high registers of both tones? They're both kind of annoying even on their own which could be due to some inharmonicity in the timbre, then explaining the octave dissonance, but why would the sounds you be using be inharmonic?
I'm not getting any more lag stopping the tones than starting them, and I'm on a terribly slow machine to start with xP
Good luck solving this!
John

December 9, 2009 9:35 PM  

Post a Comment

Links to this post:

Create a Link

<< Home