Coder Social home page Coder Social logo

csound-vscode-plugin's Introduction

CSOUND

Version 6.18.0

Build Status

A sound and music computing system.

Csound is copyright (c) 1991-2020 The Csound Developers, see CONTRIBUTORS

Csound is free software; you can redistribute them and/or modify them under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Csound is distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

GETTING STARTED

This repository contains the code for the core Csound library, the interfaces library, and the command-line interface frontend. It also contains specific code for ports to various embedded, mobile and web platforms.

For general project information, please look at http://csound.com, where all details about Csound, what it does, its history, music made with it, and many other things can be found.

The Csound Reference Manual can be found online at http://docs.csound.com.

The Csound API application programming interface reference may be found online at http://csound.github.io/docs/api/index.html.

Information on how to build Csound on various platforms is given in the BUILD.md file at the top level directory of this repository.

Information about build pipelines with Azure and Github actions is given in DockerFiles/Readme.md.

CONTRIBUTORS

Csound contains contributions from musicians, scientists, and programmers from around the world. They include (but are not limited to):

  • Allan Lee
  • Andres Cabrera
  • Anthony Kozar
  • Barry Vercoe
  • Bill Gardner
  • Bill Verplank
  • Dan Ellis
  • David Macintyre
  • Ed Costello
  • Eli Breder
  • Fabio P. Bertolotti
  • Felipe Sataler
  • François Pinot
  • Gabriel Maldonado
  • Greg Sullivan
  • Hans Mikelson
  • Henri Manson
  • Ian McCurdy
  • Istvan Varga
  • Jean Piché
  • Joachim Heintz
  • John Ramsdell
  • John ffitch
  • Marc Resibois
  • Mark Dolson
  • Matt Ingalls
  • Max Mathews
  • Michael Casey
  • Michael Clark
  • Michael Gogins
  • Mike Berry
  • Nate Whetsell
  • Paris Smaragdis
  • Perry Cook
  • Peter Neubäcker
  • Peter Nix
  • Rasmus Ekman
  • Richard Dobson
  • Richard Karpen
  • Rob Shaw
  • Robin Whittle
  • Rory Walsh
  • Sean Costello
  • Stephen Kyne
  • Steven Yi
  • Tito Latini
  • Tom Erbe
  • Victor Lazzarini
  • Ville Pulkki

csound-vscode-plugin's People

Contributors

dependabot[bot] avatar forrcaho avatar kunstmusik avatar muraca avatar nwhetsell avatar ryanjeffares avatar stekyne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csound-vscode-plugin's Issues

"--port=10000" is missing from the csound.playArgs

By default the csound.playArgs only contain "-odac", which means the ctrl + enter command is not able to send any code to the running csound process. This is confusing for new users and should either be changed (add "--port=10000" to the default settings) or mentioned in the documentation.

Evaluating code not working

cmd+enter doesn't have any effect for me

This is on Monterey 12.0.1, Silicon. VSCode 1.64.2, plugin v0.5.0

Conflicting port?

cheers

Problems with CSound output in the VSCode output panel

Hello,

I am running into problems with the csound output: The output in the output panel shows up in chucks instead of in realtime, some output does not show up at all, and sometimes it only shows up after the csound program has terminated. I can't really make any sense of it. Is there any way to get the same output one would get running csound from the command line?

Language Server Features

I thought I'd write down the possible features that could be implemented in VSCode and the extension API (using the language server protocol). This way we can divide it up into work items and anyone can work on it if they want and also keep track of the progress.

Editor Features

More info here: https://code.visualstudio.com/docs/extensionAPI/language-support

  • Syntax highlighting
    • Partially there already
  • Source code snippets
    • Inject templated code to save typing common constructs
    • E.g for Csound, new instr definition
  • Hover symbol support
    • Hover the mouse of a symbol to get a popup with info
    • Eg. Could be used to show an opcodes documentation
  • Code Completion
    • Nate already has this implemented in the Atom plugin. There is a compiled list of all opcodes and their arguments that can be reused.
    • This works but any unknown opcode will not work obviously. It would be nice to have a more dynamic approach. That would probably mean altering Csound though.
  • Provide Diagnostics
    • Parse Csound script for any errors in real-time. e.g. spelling mistakes / syntax errors
    • Not sure how capable the parser is in Csound for this currently
  • Opcode/function completion help
    • As the user types an opcode, a balloon pops up showing the current/remaining arguments to enter
  • Symbol features: Jump to definition, find all references, hightlight all occurences etc
    • Possibly not as useful for Csound which is normally in a single document. Might be helpful for large documents. If modules/projects/imports are ever introduced in Csound, it would make more sense.
  • Actions on Errors/Warnings
    • Provide solutions to errors or warnings e.g. add missing syntax, warn against known poor practice
  • Code lens
    • "Provide the user with actionable, contextual information that is displayed interspersed with the source code."
    • No real ideals for Csound yet but very powerful
  • Rename symbols
  • Format document/selection
    • For Csound, could align opcodes to a specific tabbing as is commonly done.

Server Implementation

https://code.visualstudio.com/docs/extensions/example-language-server

It still has to be determined how the language server would interact with Csound. The server itself can be written in a few languages so that would have an effect on it. It could be written in Python and use the bindings for that. It might also be better to use a socket to reduce any dependency on platform.

Debugger

https://code.visualstudio.com/docs/extensions/example-debuggers

VSCode supplies a generic API to adapt a concrete debugger to the UI essentially. This means the Csound Debugger could be interfaced into VSCode via an adapter.

Styling / Formatting

Would it be possible to add some sort of formatting on command or save to this plugin? I'm happy to work on this, just not sure of the contributing guidelines...

Internationalized quotes issue?

Hey Steven!

I'm not a user of vscode, but I'm trying to get to the bottom of a problem that may or may not involve this plugin... either way, it's a great first step in the search for a solution ;)

In the process of refreshing the csound manual, I noticed some of the example drafts @AsterixMusic was posting didn't compile when I tried. I tracked it down to this line:
ain1 diskin “fox.wav”, 1, 0

Which works fine if I delete the quote marks and retype them, so it now reads:
ain1 diskin "fox.wav", 1, 0

The first example Stefano created using an international layout keyboard, and is running them through vscode and this plugin to test (hence why I'm starting here).

I thought perhaps the editor itself is sanitizing the text before sending it to the api, so the plugin and csound itself has no idea the difference quotes ever existed! My other thought is that perhaps csound on the console behaves different than api, and I test on console whereas Stefano uses vscode and the plugin which I think is using api. But both of those are wild guesses, and I could be completely wrong.

Either way... just trying to figure out why this is happening, and whether or not a csound issue is relevant requesting that csound treat both style of quotes as the same (no idea if that has other implications tho).

Syntax Highlighting Improvements

Thought it might be useful to put down the ideas we'd like for the syntax highlighting. I've been looking at the docs a lot more but haven't really added much in terms of features yet.

The direct translation of Nate's grammar files has been a great help but the look is not translating 100%. I would also like to change some things from a taste point of view. That's my main reason for starting this discussion.

https://user-images.githubusercontent.com/14102861/28718447-0bafd418-7374-11e7-9848-3eef56a213fb.png

The image above shows the Atom version. Some things I'd like to see different.

  1. The high-level document sections (eg. CsOptions, CsInstruments) have the same colour as variables which have the same colours as opcodes and opcode arguments. I don't think this is a good use of colour(s) and doesn't make it more readable.

  2. The variables (i, a, k etc) highlight the start character only and all have the same colour. This is a taste thing I guess but it can be hard to see the highlight when it's only character wide. I think I'd prefer the whole token to get highlighted to make it clearer. Also, maybe have different colours based on what type of signal/rate the variable is. This could mean too much colour(s)/visual noise though so I guess there would need to be a balance. I definitely see a benefit to contrasting i, a and k-rates though.

  3. Instr keyword (I think other keywords as well) and operator colouring are the same, should be different.

Any ideas/comments? I'm going to experiment with the above 3 things and make a prototype to see how it looks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.