Edit, visualize, build and run Faust code
Faustine allows the edition of Faust (http://faust.grame.fr) code.
- Faust code syntax hightlighting and indentation
- Project-based (inter-linked Faust files)
- Build/compile with output window
- Graphic diagrams generation and vizualisation in the (default) browser
- Browse generated C++ code inside Emacs
- Inter-linked files/buffers :
- From "component" to Faust file
- From "include" to Faust library file
- From error to file:line number
- From function name to online documentation
- Fully configurable (build type/target/architecture/toolkit, keyboard shortcuts, etc.)
- Automatic keyword completion (if Auto-Complete is installed)
- Automatic objets (functions, operators, etc.) template insertion with default sensible values (if Yasnippet is installed)
- Modeline indicator of the state of the code
- Install it from MELPA.
- Copy/clone this repository in
load-path
- Copy/clone Faust-mode in
load-path
- Add
(require 'faust-mode)
(require 'faustine)
to your init file
Oh, and of course install the latest Faust and ensure it's in the PATH.
Those package are not required, but Faustine makes good use of them, and they will make your life better anyway ; They are all available in MELPA, snapshot and stable.
Use faustine-mode
; Optionally, add something like this to your init file:
(add-to-list 'auto-mode-alist
'("\\.dsp\\'" . faustine-mode))
to put any new Faust file in the mode.
Every interactive command is documented in the README file.
Faustine introduces 2 major modes, detailed below.
A mode to allow the edition of Faust code.
Syntax highlighting of all the Faust commands and operators, as well as indentation rules, using faust-mode.
Every referenced ("component") file is linked, and can be opened by clicking on it or by pressing ‘RET’ over it ; Imported library files are linked too.
The code is checked at each save ; The state of the last check is displayed in the modeline as a green bug icon when it compiles without error or warning, and a red bug when it doesn’t. This icon is also the main Faustine menu.
An "output buffer" is provided to display information about the Faust command output, you can toggle its visibility with ‘faustine-toggle-output-buffer’ ; see ‘faustine-output-mode’ documentation for details about interaction in said buffer.
Several commands allow the editing of Faust code, they are all available in the menu or as a key binding, and described below.
Key | Binding |
---|---|
C-c C-b |
faustine-build |
C-c C-c |
faustine-syntax-check |
C-c C-d |
faustine-diagram |
C-c C-h |
faustine-online-doc |
C-c RET |
faustine-mdoc |
C-c C-o |
faustine-toggle-output-buffer |
C-c C-s |
faustine-source-code |
C-c r |
faustine-run |
C-c C-S-b |
faustine-build-all |
C-c C-S-d |
faustine-diagram-all |
C-M-q |
prog-indent-sexp |
(faustine-build &optional BUILD-ALL)
Build the current buffer/file executable(s). If BUILD-ALL is set, build all Faust files referenced by this one.
‘faustine.el’.
(faustine-syntax-check)
Check if Faust code buffer compiles. Run at load and save time.
(faustine-diagram &optional BUILD-ALL)
Generate the Faust diagram of the current file. If BUILD-ALL is set, build all Faust files referenced by this one.
(faustine-online-doc START END)
View online documentation for the selected (or under point) string on faust.grame.fr. Build a button/link from START to END.
(faustine-mdoc &optional BUILD-ALL)
Generate Mdoc of the current file, display it in a buffer. If BUILD-ALL is set, build all Faust files referenced by this one.
‘faustine.el’.
(faustine-toggle-output-buffer)
Show/hide the Faust output buffer.
(faustine-source-code)
Generate the Faust C++ code of the current faust file and display it in a buffer.
(faustine-run &optional BUTTON)
Run the executable generated by the current Faust code buffer or passed by from the output buffer BUTTON click.
(faustine-build-all)
Build executable of all the files referenced by his one using the ‘faustine-build-backend’.
(faustine-diagram-all)
Build diagram of all the files referenced by his one. Construct a minimal HTML page and display it in the default browser.
(prog-indent-sexp &optional DEFUN)
Indent the expression after point. When interactively called with prefix, indent the enclosing defun instead.
The Faust output buffer mode. The output buffer displays the result of the commands with their time stamps and status.
- A click on an error opens the buffer at the error line
- A click on an executable name runs it.
Key | Binding |
---|---|
q |
delete-window |
It is bound to C-x 0.
(delete-window &optional WINDOW)
Delete WINDOW. WINDOW must be a valid window and defaults to the selected one. Return nil.
If the variable ‘ignore-window-parameters’ is non-nil or the ‘delete-window’ parameter of WINDOW equals t, do not process any parameters of WINDOW. Otherwise, if the ‘delete-window’ parameter of WINDOW specifies a function, call that function with WINDOW as its sole argument and return the value returned by that function.
Otherwise, if WINDOW is part of an atomic window, call ‘delete-window’ with the root of the atomic window as its argument. Signal an error if WINDOW is either the only window on its frame, the last non-side window, or part of an atomic window that is its frame’s root window.
README.md made on 2017-11-22 at 12:02:18 with doc-a-mode