Active Essays on Computer Music

Mike Roberts mike at mjr104.co.uk
Wed Aug 15 23:23:47 PDT 2001


>Mark Guzdial wrote
> <snip>
>For me, the issue hasn't been a comprehensive text, but finding one 
>that's accessible.  

I understand.  Even if you are one of

>a musician, an electrical engineer, a 
>physicist, nor a mathematician

...the texts still need to be accessible.  I'm a bit of a musician (hobby)
and a bit of an electronic engineer (historical). I have sometimes read
books where I'm expected to fit into the assumed background but for
whatever reason I don't and it's frustrating.  I can see how it must be
frustrating if you want to read about a subject of interest where there is
no reason why it can't be explained in terms one understands but there is a
barrier that you have to cross.  Particularly with computer music, I can
see no reason why it can't be explained at a more accessible level.  

I guess one problem, in writing a book like Dodge&Jerse, is how much do you
assume the reader understands.  I readily agree that the subject lends
itself well to an active essay format.  I think this could be true for the
explanation of a lot of signal processing techniques, for example.  This
could make signal processing techniques, like filtering or compression for
example, much more accessible to people without having to have such
pre-requisite knowledge.

I presented a seminar to a uni group, about 3 years ago (with a friend), on
perceptual audio compression techniques.  We talked about MPEG 1 Audio and
another pair independently talked about the Mini-Disc scheme (AC3?). A lot
of the reference material, at the time, presented purely mathematical
explanations of how the scheme worked.  This was frustrating because it
presented an enourmous barrier to my entry of understanding.  It looked so
boring but by the end we knew it was very cool.  We had to first understand
it and then derive our own way of explaining it in a format where we could
get the fundamentals across in 15 minutes or so; especially keeping the
maths to a minimum.  We were really excited by how MPEG worked but only
after we got to the point where it 'clicked' in our heads.  We felt it was
important to get the excitement across so that our audience might take up
more of an interest in it afterwards.  We managed it with moderate success
but it could have been much better with an active essay to work through
afterwards.  We were only providing an overview so the light information we
provided was 'fair enough'.  You wouldn't then want to find that to
'really' explain it you had to enter a realm where you lost the fun aspects
and the accessibility.  People with different levels of interest could then
maybe work through an active essay at different speeds.  Maybe you could
write it such that you could take a 'demo' path through such that you see a
demonstration of the subject but not a lot of depth.  And then for keener
people they could be led through in more depth.

Thinking about it, it might be a fun direction to head in once I start
playing with Squeak.

>The Dodge and Jerse book is the 
>best I've found, but even there, with no actual implementations, I'm 
>not sure if I grokked it right.  For example, it's important for an 
>oscillator unit generator to accept negative amplitudes and 
>frequencies, but they don't quite understand what you're supposed to 
>do with them.  I'm not sure that I implemented that right.

I'm hesitant to offer opinion because I haven't had time (a common theme)
to play with your essays yet.  I did read through D&J last night though and
found the section on Frequency Modulation which discusses negative
frequencies.  I'm going to make lots of guesses here but my explanation
might help.  I'm not sure which bits you don't understand, so i'm sorry if
I'm covering obvious ground, but I'll have a go anyway and I can see what
you think.

Let's say that you have a sine-wave unit generator.  It's a simple table
based one and you have stored say 50 values of a whole cycle.  We start by
making it fixed in frequency so we only allow stepping through the entries
one at a time.  If you then start the generator, you get a sine wave as
expected.  

You could give your unit generator a direction input that could be
'forwards' or 'backwards'.  If forwards was selected, you would read
through the table in a forwards direction.  This would output the normal
looking sine wave.  If, however, you selected 'backwards' you would start
reading the (circular) table backwards.  This would start outputting the
negative half of the cycle first and then the positive half.

If you could view both directions of the waveform at the same time, such as
an oscilloscope would provide, you could see that you get a figure-of-eight
pattern on its side (if you lay them on top of each other).  If you added
these two signals together, you would get a flat response as they cancel
each other out.  They are said to be 180 degrees out of phase.

If you give your sine generator a frequency input, then this controls how
you step through the table giving different frequency outputs.  If you
allowed this figure to go negative, as in negative frequency, then you
would read the table in same manner but in reverse.  This allows you to
produce varying frequencies that are in and (directly) out of phase.  

To get more subtle phase variations you would include a phase input which
you could implement by offsetting the starting point in the table.  For 180
phase you would start half way through the table and this would have the
same effect as reading the table in reverse.  A 360 degree phase starting
at the end of the table would be the same as starting at the start and this
essentially completes the forward options for phase.  I guess that for a
negative value of phase you would just implement the offset in a reverse
direction.

In the spectral response diagrams (amplitude versus frequency) they show
(positive) frequencies with negative amplitudes.  From the explanation, I
think, they denote this to mean 180 degree phase; but it allows you to see
it in the positive side of the spectrum.  You can see these components with
positive magnitude if you 'wrap' them around 0 Hz with a polarity switch.
Or if you alreadly have a spectrum with positive amplitudes but including
negative frequencies, you can go the other way around and take the negative
frequencies on the diagram and place them all in the positive frequency
space with negated amplitudes.  You perform supperposition on any
frequencies that are incident on each other and add them together.  I think
the reason we can do this is because in a spectrum we are effectively
looking at the power of the frequencies and we make sure that they are in
correct phase (on the diagram) before we add them.  

What they then do (Figure 4.5c) which stumped me for a while until I read
it a few times is that they then just take the magnitude of it and show you
all the components with positive amplitude.  (This doesn't though give any
indication of the phase of the signal.)

Regards,

Mike
:-)



More information about the Squeakland mailing list