Skip to content

Quick start: snd‐s7 (stdio)

Russ Tokuyama edited this page Feb 15, 2024 · 2 revisions

Snd is a sound editor created by Bill Schottstaedt bil@ccrma.stanford.edu of the Center for Computer Research in Music and Acoustics (CCRMA). It can be scripted or extended using the S7 Scheme interpreter built into it. In this document, snd-s7 is used to refer to the program which is named snd.

Conjure lets you interact with the snd-s7 program in a REPL just as if you running it directly. Since S7 is a Scheme language, you will be working with .scm files. You can evaluate S7 Scheme files and forms (send pieces of code to the REPL).

Prerequisites

Before you start, configure this:

You can do this in the Neovim command mode or put the equivalent in your config file.

  • :let g:conjure#filetype#scheme = "conjure.client.snd-s7.stdio"

If you want to start up snd-s7 using a command other than snd, you can set this:

  • :lua vim.g["conjure#client#snd-s7#stdio#command"] = "your command"

Conjure will automatically start a REPL when you open the first .scm file but you may not want it do that just yet. To delay the start of the REPL, set this global variable to false.

  • :let g:conjure#client_on_load = v:false

After opening your *.scm file, you can start the REPL using <LocalLeader>cs. If the REPL appears unresponsive, you can interrupt it using <LocalLeader>ei.

When you are done or when you want to, you can stop the REPL using <LocalLeader>cS.

You don't need to worry about g:conjure#client#snd-s7#stdio#prompt_pattern because it is not used by this client.

Open and edit!

You should now be able to open any .scm file and evaluate as you would normally.

If you're unsure how to evaluate things with Conjure, please refer to :help conjure, :help conjure-client-scheme-stdio and :ConjureSchool (an interactive tutorial).