Having trouble scripting in scheme, ra:* functions not defined
Posted: 28 Apr 2023 19:12
I've been trouble shooting this for a bit now, and I think it is time to just ask. Just for your information, I'm not an experienced scheme programmer, so I'm learning as I go.
Anyway, here is my current situation. I'm having trouble doing basic radium functions with a custom radium script.
Here is my config file:
Here is "~/exportMxl.scm"
Here is the output from the messaging window after I open radium:
And here is the out put from the messages window after I hit Ctrl-Shift-E
Also, in case it is of any use, I'm using Arch Linux.
Anyway, here is my current situation. I'm having trouble doing basic radium functions with a custom radium script.
Here is my config file:
Code: Select all
C CTRL_L SHIFT_L ALT_L FOCUS_SEQUENCER : ra.evalScheme "(duplicate-seqblock-and-block)"
B ALT_L FOCUS_EDITOR : ra.markRange
V ALT_L FOCUS_EDITOR : ra.pasteRange
0R2 CTRL_L SHIFT_L FOCUS_SEQUENCER : ra.evalScheme "(delete-all-pauses-in-seqtrack)"
S CTRL_L SHIFT_L ALT_L FOCUS_EDITOR FOCUS_MIXER FOCUS_SEQUENCER : ra.saveWithEmbeddedSamples
D SHIFT_L FOCUS_EDITOR : ra.generalTransposeRangeDown
*
ra.evalScheme('(load "~/exportMxl.scm")')
*
E CTRL_L SHIFT_L: ra.evalScheme "(exportMxl \"~/tmp.mxl\")"
Code: Select all
(define (exportMxl whereToExport)
( (define exportFile (ra:openFileForWriting whereToExport))
(define whatToWrite "")
(set! whatToWrite (string-append whatToWrite "this is a test"))
(ra:writeToFile exportFile whatToWrite)
)
)
Code: Select all
2023-04-28 11:46:50:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined in function call (ra:openFileForWriting whereToExport)=========
2023-04-28 11:46:50:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined when parsing atom=========
2023-04-28 11:46:50:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined in function call (ra:writeToFile exportFile whatToWrite)=========
2023-04-28 11:46:50:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined when parsing atom=========
2023-04-28 11:46:52:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined in function call (ra:openFileForWriting whereToExport)=========
2023-04-28 11:46:52:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined when parsing atom=========
2023-04-28 11:46:52:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined in function call (ra:writeToFile exportFile whatToWrite)=========
2023-04-28 11:46:52:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined when parsing atom=========
2023-04-28 11:46:55:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined in function call (ra:openFileForWriting whereToExport)=========
2023-04-28 11:46:55:
========== READER Warning: ~/exportMxl.scm: 8: "ra:openFileForWriting" has not been defined when parsing atom=========
2023-04-28 11:46:55:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined in function call (ra:writeToFile exportFile whatToWrite)=========
2023-04-28 11:46:55:
========== READER Warning: ~/exportMxl.scm: 8: "ra:writeToFile" has not been defined when parsing atom=========
Code: Select all
2023-04-28 12:10:18:
error: unbound-variable unbound variable ra:openFileForWriting in ((define exportFile (ra:openFileForWriting whereToExport)) (define whatToWrite "") (set! whatToWrite (string-append whatToWrite "this is a test")) (ra:writeToFile exportFile whatToWrite))
error-code: ((define exportFile (ra:openFileForWriting whereToExport)) (define whatToWrite "") (set! whatToWrite (string-append whatToWrite "this is a test")) (ra:writeToFile exportFile whatToWrite))
error-file/line: /home/miles/exportMxl.scm[683]
error-history:
"((define exportFile (ra:openFileForWriting whereToExport)) (define whatToWrite "") (set! whatToWrite (string-append whatToWrite "this is a test")) (ra:writeToFile exportFile whatToWrite))"
1:
"((define exportFile (ra:openFileForWriting whereToExport)) (define whatToWrite "") (set! whatToWrite (string-append whatToWrite "this is a test")) (ra:writeToFile exportFile whatToWrite))"
;/home/miles/exportMxl.scm[3]
2:
"(exportMxl "~/tmp.mxl")"
3:
"(exportMxl "~/tmp.mxl")"
4:
"(apply func args)"
;scheme/init.scm[322]
6:
"(FROM-C-catch-all-errors-and-display-backtrace-automatically eval-string "(exportMxl \\"~/tmp.mxl\\")")"
(whereToExport . "~/tmp.mxl")