Next Chapter
Previous Chapter
Table of Contents

Importing and Recording

This chapter examines two more ways to create material.

Import

Import is essentially the opposite of write-it reads a score file and creates musical events that, when processed, will recreate the score file. Import currently supports CSound, Music Kit and MIDI output syntaxes.

In the next example we import "noodle.midi" (located in the same directory as this tutorial)

Stella [Top-Level]: import
File to import: /Lisp/cm/doc/tutoriasl/stella/noodle.midi
Stella [Top-Level]: list
Top-Level:
      1.    #<THREAD: Pulse>
      2.    #<ALGORITHM: Sinus>
      3.    #<THREAD: Pulse2>
      4     #<THREAD: Rec1>
      5.    #<THREAD: From-Noodle>
Stella [Top-Level]: rename 5 nood
Stella [Top-Level]: list nood[1]
Nood:
      1.    #<MIDI-NOTE | C4| 0.500| 0.500| 0.09| 0>    
Stella [Top-Level]: mix nood
Start time offset: (<cr>=None) 
Stella [Top-Level]: 

Receive

The receive command is a general midi input utility. Several different operations can be performed on received data depending on the arguments specified to the command. The first argument to receiveshould either be the name of a function to recieve all incoming MIDI messsages and times, or one of three system "receive modes". Through causes received data to be sent directly back to the midi output device,record captures MIDI data in a new thread, and print simply prints each MIDI message and the time it is received.

In Lisp implementations that support multiprocessing (MCL 3.0, ACL), receive operates asynchronously in its own process. To stop receiving, simply type the receive command again without arguments. In Lisp implementations that do not support multiprocessing you should specify an ending condition to stop receiving as an additional argument to the command. Four conditions are possible: duration stops stops receiving if the specified keynumer is received, stop-if stops if the function specified returns true, and stop-if-not stops if the function specified returns false.

[This example assumes that you are using a multiprocess Lisp]

Stella [Top-Level]: receive record
Type <cr> to begin receiving messages:<cr>

Start playing, when you are done proceed with the next command.

Stella [Top-Level]: receive

Stella [Top-Level]: list
Top-Level:
      1.    #<THREAD: Pulse>
      2.    #<ALGORITHM: Sinus>
      3.    #<THREAD: Pulse2>
      4.    #<THREAD: Thread-1>
Stella [Top-Level]: mix 2,4
Start time offset: (<cr>=None) <cr>
Stella [Top-Level]:
Next Chapter
Previous Chapter
Table of Contents