An open API service indexing awesome lists of open source software.

https://github.com/khtdr/glicol-mode

An Emacs major mode for the Glicol audio programming language.
https://github.com/khtdr/glicol-mode

audio emacs glicol

Last synced: 6 months ago
JSON representation

An Emacs major mode for the Glicol audio programming language.

Awesome Lists containing this project

README

          

# Glicol Mode for Emacs

An Emacs major mode for the [Glicol](https://glicol.org) audio programming language.

## Features

- Syntax highlighting for Glicol code
- Smart code completion with documentation
- Integration with glicol-cli
- Built-in commands for controlling the Glicol server
- Doom Emacs integration
- Real-time documentation lookup
- Intelligent context-aware suggestions
- Dedicated Glicol-CLI buffer shows status and errors

![Screenshot](./screenshot.png "Emacs screenshot")

![Screenshot](./completion.png "Company completion")

![Screenshot](./modeline.png "Doom integration")

![Screenshot](./status.png "Status display")

![Screenshot](./errors.png "Error display")

## Installation

### Prerequisites

- Emacs 26.1 or later
- [glicol-cli](https://github.com/glicol/glicol-cli) installed and available in your PATH
- Sample audio files from the [Glicol repository](https://github.com/chaosprint/glicol/tree/main/js/assets)

After downloading the samples, you need to set the `GLICOL_CLI_SAMPLES_PATH` environment variable to point to your samples directory:

```bash
# Add to your shell configuration file (.bashrc, .zshrc, config.fish, etc):
export GLICOL_CLI_SAMPLES_PATH="/path/to/your/samples"
```

### Manual Installation

Clone this repository:

```bash
git clone https://github.com/khtdr/glicol-mode.git
```

Add to your `init.el`:

```elisp
(add-to-list 'load-path "/path/to/glicol-mode")
(require 'glicol-mode)
```

### With straight.el

```elisp
(straight-use-package
'(glicol-mode :type git :host github :repo "khtdr/glicol-mode"))
```

### With use-package

```elisp
(use-package glicol-mode
:load-path "/path/to/glicol-mode"
:mode "\\.glicol\\'")
```

### Doom Emacs Users

Add to your `packages.el`:

```elisp
(package! glicol-mode
:recipe (:host github :repo "khtdr/glicol-mode"))
```

## Usage

Files with the `.glicol` extension will automatically open in Glicol mode.

### Key Bindings

- `C-c C-s` - Start the Glicol server
- `C-c C-q` - Quit the Glicol server
- `C-c C-c` - Check server status
- `C-c C-r` - Restart the server
- `C-c C-b` - Set BPM (beats per minute)

For Doom Emacs users, the modeline will show the Glicol server status with clickable buttons to start/stop the server.

### Customization

You can customize the path to the glicol-cli executable:

```elisp
;; Set the path to glicol-cli:
(setq glicol-cli-command "/path/to/glicol-cli")

;; Set the default BPM (beats per minute):
(setq glicol-bpm 120)
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.