
#!!
1. Set sampler player for track
2. Add a note
3. Add sample position automation
4. play / stop
6. copy track
7. new song
8. paste track
9. play / stop
10. add system out automation
11. play / stop
12. new song
13. crash

(define (play-a-little)
  (<ra> :play-block-from-start)
  (<ra> :msleep 1000)
  (<ra> :play-stop))

(define id-instrument (<ra> :create-audio-instrument "Sample Player" "Sample Player"))
(<ra> :set-instrument-for-track id-instrument 0)
(<ra> :add-note2 60 40000 0 0 1 50 0 1)
(define fx-num (<ra> :create-fx 0.2 0 "Start Position" 0))
(play-a-little)
(<ra> :copy-track)
(<ra> :reset-undo)
(<ra> :new-song)
(<ra> :paste-track)
(define fx-num2 (<ra> :create-fx 0.8 0 "Sustain" 0))
(play-a-little)
(<ra> :new-song)

!!#



(define-macro (outermacro)

  (define-macro (innermacro)
    (c-display "Shouldn't this text be printed only once?")
    #f)
  
  (innermacro))

(define (function)
  (outermacro))

(function)

(macroexpand (lazy2 60))

(pretty-print (macroexpand (define-match transform-lazy-code
                              (define-lazy) :> #f
                              _____________ :> #f)))




#!!
(lazy2 5)

(macroexpand (lazy 60))

(test (let ((val 0))
        (lazy
         (define-lazy a (begin
                          (set! val (+ val 1))
                          val))
         (+ a a a)))
      3)

(test (lazy
        (define-lazy a 5)
        (define-lazy b a)
        b)
      5)
!!#

(define-macro (create-hello-function)
  (display "Shouldn't this text be printed only once?")
  (newline)
  '(define (hello)
     #f))
  
(define-macro (outermacro)
  (create-hello-function)
  (hello))

(define (function)
  (outermacro))

(function)


(define-expansion (create-hello-function)
  (display "Shouldn't this text be printed only once?")
  (newline)
  '(define (hello)
     100))

(define-expansion (macro2)
  (create-hello-function)
  (hello))

(define (function3)
  (macro2))

(function3)

(function2)


(let ((id (<ra> :create-audio-instrument-from-description (<ra> :request-load-preset-instrument-description)))) (when (not (= -1 id)) (<ra> :autoposition-instrument id) (<ra> :connect-audio-instrument-to-main-pipe id)))



