Next: , Previous: Entry points, Up: Top


How to (simply) ... ?

Here are a few examples of use of Surmulot, in the form of basic tasks (basic from a composer point of view only since their actual underlying implementation can be quite complex).

Each example can be evaluated straight away if you're reading this in Emacs with command `C-x C-e' (see (emacs)Lisp Eval). It is followed by a few explanations and pointers to set you on the way to further exploration.


How to (simply) have more documentation

     (muo-doc "scales")

Here we have a piece of MuO documentation be displayed in a dedicated Squeak image.


How to (simply) hear some notes

     ($: "a,e,f" kmusic fractal play)

Here we have MuO compute and play a musical phrase, using its default MIDI synthesizer for playing.


How to (simply) generate a sound file

     ($: "a,e,f" kmusic fractal asWAVFile edit)

Same example as above, only the musical phrase is being converted to a WAV file which is then opened with Surmulot sound editor. The conversion is done by MuO default MIDI synthesizer for WAV rendering (it is not necessarily the same as the default synth for playing).


How to (simply) create an envelope

     (setq envelope-editor (surmulot-make-widget "EnvelopeEditor new"))

Tweak the envelope graphically to your liking (see Envelope editor.), then get it in a suitable format from the editor with something like

     (surmulot-widget-do envelope-editor
       "Widget music asGen7Table: 1 size: 1024")

see Widgets.


How to (simply) play tabla bols

     ($: TablaBolPlayer new play:
         "dha- gerenaga taka terekita dha dha
          ta- kerenaka taka terekita ta ta")
     ($: TablaBolPlayer new vilambitPlay: "TRKTTKTRKTTKT")
     ($: TablaBolPlayer new play:
         "(dha-dha tete gena)2x
          tre kre dhine dhina gena")

How to (simply) start a csound composition

Start from scratch with

     (csound-csd-new)

or directly code a composition in Emacs Lisp like this:

     (setq my-composition
       (csound-composition
         :instr 1 '(out (bamboo p4 0.01))
         :i-stream
         (i-be 1 0 1 0)
         (loop for amplitude in '(20000 30000 14000 25000)
               for duration in '(1 2 3 1)
               do (+i :p4 amplitude :p3 duration))))

You can then either play it with

     (csl-play-composition my-composition)

or use it as a draft and further edit it with

     (csl-edit-composition my-composition)

see (Csound-x)Csound Elisp.


How to (simply) find the usage of a csound opcode

Get the documentation with

     (csound-opcode-doc "linseg")

see (Csound-x)Integrated documentation.

Find all its occurences in the orchestra library with

     (csound-search-exact-word "linseg")

see (Csound-x)Libraries and repositories.