Coder Social home page Coder Social logo

vscode-sonic-pi's Introduction

sonic-pi README

Play Sonic Pi with your favorite editor!

Features

You can play Sonic Pi from VSCode.

  • Send codes to Sonic Pi and run it.
  • Stop playing codes.

Requirements

  • Latest version of Sonic Pi

Usage

  1. Launch a Sonic Pi
  2. Write some Code
  3. Open Command Parrete, and call "Run code on Sonic Pi"

Extension Settings

You could add your own settings to vscode's settings.json.

config sample

{
    "sonicpi.flashBackgroundColor": "rgba(197,97,106,0.5)",
    "sonicpi.flashTextColor": "rgba(236,239,244,0.5)",
}

Known Issues

  • Can't display logs
    • but this is Sonic Pi's issue, so I have to change some codes of Sonic Pi

Release Notes

See CHANGELOG.md.

vscode-sonic-pi's People

Contributors

dependabot[bot] avatar mactkg avatar mogimogitomato avatar yukulele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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

vscode-sonic-pi's Issues

Is there a way to play/stop setting up some shortcuts?

Is there a way to play/stop setting up some shortcuts?

Opening the command palette and typing does not seems to be the best way for Live Performances. And using the "Recently Used" VS Code Editor shortcuts makes difficult when you are constantly switching between STOP/PLAY.

In the case code's comment include multibyte charset, running code failed

In the case code's comment include multibyte charset,

when running code I got error message from sonic-pi.

Runtime Error: [buffer eval, line 777] - ArgumentError
 invalid byte sequence in UTF-8
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/preparser.rb:25:in `gsub!'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/preparser.rb:25:in `block in preparse'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/preparser.rb:22:in `each'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/preparser.rb:22:in `preparse'
/Applications/Sonic Pi.app/app/server/ruby/lib/sonicpi/runtime.rb:777:in `block in __spider_eval'

In sonic-pi, when sending code call force_encoding.
https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/bin/sonic-pi-server.rb#L333

code = args[1].force_encoding("utf-8")

So, I add utf-8 encoding in the extension, and send a pull request.

#4

Best regards.

suggestion: add restart command

when i select "run code on sonic-pi" it play it over currently played.
to avoid it I have to select "stop all sound on sonic-pi" then "run code on sonic-pi", each time.

It could be useful to have a "stop all and run code on sonic-pi" command

Latest SPdev no longer uses port 4557

Recent changes to the source code of SP means that the previous port 4557 is now dynamically allocated at run time, so communicating to port 4557 no longer will work.
FWIW I have looked at the same problem with sonic-pi-cli gem and I have developed a mechanism to detect the dynamic port in use by reading it from the SP logs which might be applied here.
see this PR Widdershin/sonic-pi-cli#21 for details.

Merge with a core team project?

Hi folks,

The topic of a Sonic Pi extension for Visual Studio Code has been discussed recently within the Sonic Pi core team.
Partly as an exercise for several of us in using Javascript/Typescript, a similar project has been started here: https://github.com/llloret/sonic-pi-vscode-editor.

We would love to know if you are open to/interested in shifting over and joining with us on the above project, and optionally merging code from vscode-sonic-pi into the above where relevant.

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.