Folks -
I just tweaked the PluckedSound timbre so it sounds better (*). Also now if
you have a keyboard (ie synthesizer) in your world, you can evaluate
AbstractSound.bachFugueOn(PluckedSound.default()).play()
to play a 4- part Bach fugue in stereo.
- Dan
(*) The PluckedSound algorithm is incredibly simple: It just fills a buffer
with random numbers (ie white noise) and then, while it plays the buffer it
also repeatedly averages adjacent samples. This has the effect of a low-pass
filter, so the white noise quickly settles down to the lower harmonics, and
eventually settles down to just the fundamental note. The problem, which you
might have heard if you played around with it, is that the higher notes damp
out too quickly and sound less like a plucked string and more like tapping on a
tin can.
This morning i woke up with the realization that at higher frequencies we
should not just average adjacent samples (makes the note die down too quickly),
but instead should do something more like a 10-to-1 blend. It did in fact make
the higher notes sound better, so I now have added a factor (this.damp) that is
scaled to the pitch of the note for frequencies above 400 Hz. Check it out.
-------------
On Feb 17, 2012, at 3:36 PM, Daniel Ingalls wrote:
> Yayy! I think I'm done for a while. Stereo separation works now, and the
> sounds are much better.
>
> The PluckedString algorithm is inherently noisy so now we can move on to FM.
>
> But, hey, check out the sounds now, still at...
>
> http://lively-kernel.org/repository/webwerkstatt/users/Dan/SoundTest3.xhtml
>
> - Dan
>
> PS Alan: The lower voices are given higher volume in the score, so that is
> explained as well.
_______________________________________________
lively-kernel mailing list
[email protected]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel