Re: did some more @ mac

From: John Lazzaro (lazzaro@cs.berkeley.edu)
Date: Sat Feb 10 2001 - 13:44:15 EST


> visited your
>
> http://www.cs.berkeley.edu/~lazzaro/sa/book/index.html
>
> but was tolded that i'm not allowed to get in

Things should be working again, we had networking problems
for a few hours ...

> but what can i do
> if i want to work with multiple sample files required

Oh, there's a misunderstanding here -- the way SAOL handles
reading in sample files to do playback is not via the
"-ain " sfront flag stuff. Instead, if you look in, for
example, examples/perc/perc.saol, you'll see:

  
  table kick( sample , - 1, "bd.wav"); // sample 0
  table snare( sample , - 1, "sd.wav"); // sample 1
  table lotom( sample , - 1, "lt.wav"); // sample 2
  [...]

These are "sample" wavetable generators being use to
initialize tables. Each WAV file is read into its own
table name. These are later put into a tablemap:

  tablemap drumset(kick,snare,lotom,midtom,hitom,loconga,
                   midconga,hiconga,rimshot,claves,clap,
                   maracas,cowbell,ride,crash,hhopen, hhclosed);

And this line selects the right file to play out for this
drum-machine example:

samp = scale*doscil(drumset[pmap]);

See:

http://www.cs.berkeley.edu/~lazzaro/sa/book/saol/wave/index.html

For the whole story. Meanwhile, the "-ain" on the sfront
command line is about the special "input_bus" in SAOL, which
you can use to process (multi-channel) audio input. See the
examples/in for a simple example using this, although note
that you need to run "beat" first to create its input file.
Also see:

http://www.cs.berkeley.edu/~lazzaro/sa/book/saol/bus/index.html#system

for more on the input bus in SAOL, and

http://www.cs.berkeley.edu/~lazzaro/sa/sfman/user/use/index.html#input
http://www.cs.berkeley.edu/~lazzaro/sa/sfman/user/use/index.html#rt

For using -ain in sfront to feed input_bus.

--------------

So it looks like:

> sfront -orc elpelele.saol -sco elpelele.sasl
>
> and it gave a crash

May be a case of [1] sfront bug or [2] sfront running out of
memory before it can write the sa.c file out (I'm assuming it
actually crashed sfront, not the compiled sa.c when you ran
it). Note that:

sfront -orc elpelele.saol -sco elpelele.sasl -midi elpelele.mid

Is actually what you'd want to do here, since the notes are
in the MIDI file. You might try

[1] Editing elpelele.sasl and changing the end line to be:

5 end

[2] Running:

sfront -aout output.wav -orc elpelele.saol -sco elpelele.sasl -midi elpelele.mid

and seeing how far you can get -- this results in a few seconds
of sound in the 367628 byte output.wav file for me, a few
piano notes. If it crashes, you might try rebooting and trying
again, to test the theory that we're seeing Mac memory management
issues at work here.

Finally, the fact that you were able to get beat.saol to run and
make audio seems to suggest that just generating large output.wav
files isn't going to be a problem -- that example is a minute of
stereo CD-quality sound, which should have crashed a setup that
couldn't handle big output files.

-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:42 EST