Giter VIP home page Giter VIP logo

atom-supercollider's Introduction

SuperCollider for Atom

A SuperCollider development environment for Atom.io

apm install supercollider

SuperCollider is a programming language for real time audio synthesis and algorithmic composition.

https://supercollider.github.io


  1. SuperCollider comes with a cross platform IDE (OS X/Linux/Windows) which communicates with the language interpreter.

  2. The language interpreter runs in a separate process (sclang) and includes comprehensive bindings for making Qt based GUIs. sclang compiles and executes SuperCollider code, manages event schedulers (for making music) and creates GUIs. It can also send and receive OSC (Open Sound Control) and MIDI.

  3. The SuperCollider synthesis server (scsynth) runs in a separate process or even on a separate machine so it is ideal for realtime networked music. It just makes music, its quite efficient and the audio quality is very high. Communication between sclang and scsynth is via OSC (Open Sound Control).

SuperCollider Atom is an alternative to the IDE. Atom is free, open source and very hackable.

Features

Quarks and classlib automatically added to your project

If you add Quarks (class library extensions) they are added to your project when you recompile. You can turn this feature off in settings if you want.

Lookup classes and methods using shift-cmd-R

Use atom-ctags and

Clear readable call stacks for errors

Clicking on one of the debug frames will open the source code in the left pane. You can click on any classname to open it's source code.

Click to see contents of objects in Args or Vars

The formatting strives to have a high data-ink ratio by removing extraneous and useless information from the callstack.

The call stack in atom-supercollider includes more information than the standard supercollider call stack does. Each variable and function is included and even the contents of each member variable of each object shown. Click the triangles to open deeper detail when you need it.

Syntax errors in your code are highlighted

System/Growl notifications on error

Very useful if you are busy making music in another window or another application and want to know why the music just stopped.

Uses system notification on OS X 10.8+ Earlier OS X versions, Linux and Windows can install Growl:

https://github.com/visionmedia/node-growl


Installation

1. Install this package:

using Atom's 'Install Packages', search for "supercollider"

2. Download and install SuperCollider:

https://supercollider.github.io

3. It should work

If you've installed SuperCollider in a non-standard place or have a development build, then you can set that path in the settings. (Settings View: Open)

See also "Preferences" below.

4. Open an .scd file in an Atom project, and then open a post window (shift-cmd-k)

Commands

Open commands in Atom with command-shift-P and type superc to filter by supercollider commands.

  • 'supercollider:recompile'
  • 'supercollider:open-post-window'
  • 'supercollider:clear-post-window'
  • 'supercollider:cmd-period'
  • 'supercollider:eval'
  • 'supercollider:boot-server'
  • 'supercollider:quit-server'
  • 'supercollider:kill-all-servers'
  • 'supercollider:open-help-file'
  • 'supercollider:manage-quarks'

Some commands are also available if you right-click on a word and check the context menu.

REPL

key command
shift-cmd-K Compile library (open window if needed)
shift-enter Evaluate selection or current line
shift-cmd-C Clear post window
shift-alt-b Boot the default server
shift-alt-q Quit the default server
cmd-. Panic ! Stop all music
ctrl-shift-h Open SuperCollider help file for selected text

You may customize these in your own Keymap file.

Lookup classes and methods with shift-cmd-r

Lookup is done using Atom's Symbol View which is powered by the venerable ctags. Its quite fast and uses fuzzy finder.

When you recompile supercollider all compile paths including the SCClassLibrary and all of your quarks are added to your current atom project as folders. atom-ctags will then run ctags on all of the .sc sourcecode files so that lookup and auto-complete work.

I also recommend the https://atom.io/packages/atom-ctags package with autocomplete-plus.

Install ctags if you need to:

os x

brew install ctags

ubuntu

sudo apt-get install exuberant-ctags

windows

http://ctags.sourceforge.net/

Add support for the supercollider language by making a file called ~/.ctags

--langdef=supercollider
--langmap=supercollider:.sc
--regex-supercollider=/^([A-Z]{1}[a-zA-Z0-9_]*)[ \[]{1}/\1/c,class/
--regex-supercollider=/^[[:space:]]*(\*[a-z]{1}[a-zA-Z0-9_]*) \{/\1/m,method/
--regex-supercollider=/^[[:space:]]*([a-z]{1}[a-zA-Z0-9_]*) \{/\1/m,method/
  • Select a classname, alt-cmd-down_arrow to go to the definition You can also right-click and "Go to definition"

GUI

SuperCollider has a comprehensive Qt based gui toolkit. GUIs in SuperCollider Atom work just as they do with the SCIDE: they run in the separate language process.

Server.default.makeWindow

Help files:

Select a class name and cmd-shift-p and type "help file"

Or use the context menu (right-click) on the class name or method name to lookup.

The help browser will open in a new window.

(TODO: open help files directly in Atom)

Preferences

See the settings in Atom settings > Packages > Supercollider

You can set the path to sclang (the supercollider language interpreter) if it is in a non-standard place or if you want to use a custom build.

You can also set the path to your sclang_config.yaml file which stores the compile paths including which Quarks you have installed.

If you have a .supercollider.yaml in your current atom project root or in your home directory (~/.supercollider.yaml) that will override the Atom settings. This allows you to have different settings for each project you work on. These files are how you configure supercollider.js projects which can be run outside of atom-supercollider.

See the supercollider.js configuration documentation

Default paths:

OS X

"/Applications/SuperCollider/SuperCollider.app/Contents/Resources/sclang"

Linux

"/usr/local/bin/sclang"

Windows

"C:\Program Files\SuperCollider\sclang.exe"

Themes

A couple SuperCollider-specific themes have been created to add symbol colorization, argument tags, argument parameters in pipes, and function names when using functional notation: Woolgathering Light Syntax and Woolgathering Dark Syntax.

Missing Features

Built in server window

s = Server.default;

// but its easy to make a server window
s.makeWindow

Native Auto-complete

There are many Atom packages for auto-complete. However they use text matching and not direct introspection. It would be possible to dump the class/method interface to a JSON file and then load that into auto-complete-plus. This would provide pretty good auto-complete with argument names and everything.

Support

Gitter

Issues and pull requests welcome.

atom-supercollider's People

Contributors

crucialfelix avatar diegovdc avatar gusano avatar ssfrr avatar woolgathering 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

atom-supercollider's Issues

3.7 alpha sclang location change

I just upgraded from OS X 3.6 to 3.7 alpha. The previous expected location for sclang is Resources/sclang, but it is now MacOS/sclang.

I saw the ability to create a .yaml to point to the different path, but I thought I would open an issue. Would it be possible to check in both locations for sclang, so that it will work out of the box with 3.6 and 3.7?

Also, thanks so much for this package! I can see this eventually replacing sc-ide for me.

Errors related to parenthesis matching?

Hi Chris, I'm evaluating the following func from a project I wrote.
The func is syntactically correct and gets interpreted in standard IDE.
When I evaluate it in Atom I get a syntax error: expecting '}'

~readAndRaw = {|sourceName|

var bpm = 60 ;
var grid, maxDur ;
// 1: read and filter
var sourceFile = File(sourceName, "r") ;

var score = sourceFile.readAllString.split($\n)
.collect{|i| i.split($ )}
.select{|i| i.size > 1} ;
sourceFile.close ;
score = score
// comments, any not instr is rejected
.reject{|i| ~instr.includes(i[0].asSymbol).not}
.flop;
// 2: convert data
score = [
score[0].collect{|i|
~instr.indexOf(
i.asSymbol
)}, // names, already clean
score[1].collect{|i|
if (i.includes($/)) {i.interpret.asFloat_4_(60/bpm)}
{i.asFloat}
},
score[2].collect{|i|
if (i.includes($/)) {i.interpret.asFloat_4_(60/bpm)}
{i.asFloat}
},
score[3].asFloat, score[4].asFloat
].flop ;

}

ctags

Hi Chris, back to Atom SC.
I installed homebrew and ctags.
Then I symlinked to my working dir, and installed Symbol gen.
To symlink I did this (if I'm getting it):

  • went to SCClassLib into SC app
  • created an aliases
  • copied it into my dir

When I run cmd shift r, I'm generating the tag file but it's empty.
What am I doing wrong?

6to5 (babel) is blocking atom-supercollider from being activated

6to5 is run on all source files to transpile ES 6 to ES 5

Something inside of express is causing an error with unsafe javascript eval.
But atom-supercollider does not even use that functionality from supercolliderjs at all.

Maybe I have to factor out the server stuff into a separate package, or maybe I just need to add some flags somewhere.

/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_mโ€ฆ:414 wrapfunction/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_mโ€ฆ:156 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/utโ€ฆ:16 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/apโ€ฆ:15 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/exโ€ฆ:7 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/index.โ€ฆ:2 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/lib/nodejs/bridge.js:39 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/index.js:6 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/lib/repl.coffee:14 (anonymous function)/Users/spasmo/.atom/packages/supercollider/lib/repl.coffee:271 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-โ€ฆ:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/lib/controller.coffee:7 (anonymous function)/Users/spasmo/.atom/packages/supercollider/lib/controller.coffee:395 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-โ€ฆ:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 requiresupercollider.coffee:3 (anonymous function)supercollider.coffee:3 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-โ€ฆ:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:651 module.exports.Package.requireMainModule/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:251 module.exports.Package.activateConfig/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:232 module.exports.Package.activateNow/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:710 (anonymous function)/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82 module.exports.Emitter.emit/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:224 module.exports.CommandRegistry.handleCommandEvent/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:3 (anonymous function)/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:156 module.exports.CommandRegistry.dispatch/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/window-event-handler.js:69 (anonymous function)events.js:116 emit
/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:241 Failed to activate package named 'supercollider' EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

    at Function.wrapfunction (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_modules/depd/index.js:414:5)
    at Object.<anonymous> (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_modules/send/index.js:156:47)
    at Module._compile (module.js:475:26)
    at Object.loadFile [as .js] (/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138:21)
    at Module.load (module.js:370:32)
    at Function.Module._load (module.js:325:12)
    at Module.require (module.js:380:17)
    at require (module.js:399:17)
    at Object.<anonymous> (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/utils.js:16:12)
    at Module._compile (module.js:475:26)

Package.getStylesheetsPath is deprecated.

Store package style sheets in the styles/ directory instead of stylesheets/ in the supercollider package

Package.getStylesheetsPath (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:460:9)
Package.getStylesheetPaths (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:471:32)
Package.loadStylesheets (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:453:38)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:183:19)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)

Quarks not recognised in Atom environment

Hello,

just looked at atom-supercollider again, gets better and better, and I'll eventually very sure to use it as my regular IDE soon :)
One thing I now noticed is that Quarks (from the git system) are not recognised, although I download them through atom-sc via Quarks.gui. Even after a restart, they are not visible...

Use API for better call-response REPL

Optional if "Use API" is checked

REPL can use the better call-response system where errors result in error responses (flashing red), and associated with the input text.

Standard I/O repl doesn't know if an O has anything to do with the I

This also enables flashing the input text red on an error.

Bonus: you can connect to remote machines including headless devices. This is why the post window is identified by a URI

Selection by parentheses

(sorry, maybe it's me).
One of the traditional SC feature is that you can select blocks of code surrounded by parentheses. Is this possible? I haven't been able to do it

thisProcess

I'm using a lot as a reference to my file structure

thisProcess.nowExecutingPath

it doesn't work in Atom (it returns nil), I guess it depends on thread relationship

After update to 0.3.2 server seems not to boot anymore

Hi,

I was just trying to work out how to use sc-atom and sc-ide togeter when you pushed the 0.3.2 update that allows for an independent use. That's very cool.

Unfortunately things don't work anymore. I can eval s.boot, or do postwindow-open and the classes will compile as expected - no life sign of the server, and after the end of this process key combinations like shift-enter or cmd-shift-k are dead. Cmd-shift-p still works, calling the help-system never works.

The startup-process posts this:

init_OSC
empty
compiling class library...
NumPrimitives = 704
compiling dir: '/Users/rainer/Library/Application Support/SuperCollider/Extensions'
excluding dir: '/Users/rainer/Library/Application Support/SuperCollider/Extensions/classes'
excluding dir: '/Users/rainer/Library/Application Support/SuperCollider/Extensions/quarks'
compiling dir: '/Users/rainer/Projects/supercollider/atom'
excluding dir: '/Users/rainer/Projects/supercollider/atom/ExtClasses/sc3-plugins/LadspaUGen'
compiling dir: '/Users/rainer/.atom/packages/supercollider/node_modules/supercolliderjs/lib/sc-classes'
pass 1 done
numentries = 1565340 / 26488640 = 0.059
7015 method selectors, 3776 classes
method table size 26189856 bytes, big table size 211909120
Number of Symbols 17608
Byte Code Size 591296
compiled 659 files in 1.79 seconds

Info: 15 methods are currently overwritten by extensions. To see which, execute:
MethodOverride.printAll

compile done
Class tree inited in 0.03 seconds
Cleaning up temp synthdefs...

*** Welcome to SuperCollider 3.7alpha0. *** For help type cmd-d.

My .supercollider.yaml looks like this:

sclang: /Users/rainer/Applications/SuperCollider/SuperCollider.app/Contents/Resources/sclang
scsynth: /Users/rainer/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth
debug: true
echo: true
stdin: true
langPort: 57120
serverPort: 57110
host: 127.0.0.1
protocol: udp
websocketPort: 4040
includePaths:
- ~/Projects/supercollider/atom
- ~/Library/Application Support/SuperCollider/Extensions/plugins
excludePaths:
- ~/Library/Application Support/SuperCollider/Extensions/classes
- ~/Library/Application Support/SuperCollider/Extensions/quarks
- ~/Library/Application Support/SuperCollider/Extensions/scide_scel
- ~/Applications/SuperCollider/SuperCollider.app/Contents/Resources/SCClassLibrary
- ~/Projects/supercollider/atom/ExtClasses/sc3-plugins/DEINDUGens/faust_src
- ~/Projects/supercollider/atom/ExtClasses/sc3-plugins/LadspaUGen
postInlineWarnings: false

Its on OSX 10.9.5

Best
.r.

Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

  1. open atom from terminal with file
    2a. (method one) packages > supercollider > open post window
    2b. (method two) simply shift enter on the first line in the file (which happens to be "o = ServerOptions.new;"), which results in this same error.

Atom Version: 0.177.0
System: linux 3.16.0-30-generic
Thrown From: supercollider package, v0.3.5

Stack Trace

Uncaught TypeError: undefined is not a function

At /home/cta/.atom/packages/supercollider/lib/rendering.coffee:306

TypeError: undefined is not a function
  at Object.cleanStdout (/home/cta/.atom/packages/supercollider/lib/rendering.coffee:306:9)
  at SCLang.<anonymous> (/home/cta/.atom/packages/supercollider/lib/repl.coffee:107:21)
  at SCLang.emit (events.js:116:17)
  at ChildProcess.<anonymous> (/home/cta/.atom/packages/supercollider/node_modules/supercolliderjs/lib/nodejs/sclang.js:376:10)
  at ChildProcess.emit (events.js:116:17)
  at Process.ChildProcess._handle.onexit (child_process.js:1070:12)
  at child_process.js:1142:20
  at process._tickCallback (node.js:364:11)

Commands

     -0:41.6 supercollider:eval (atom-text-editor.editor)
     -0:01.1 supercollider:open-post-window (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "zenburn"
    ]
  }
}

Installed Packages

# User
autocomplete-plus, v2.0.12
file-icons, v1.4.8
supercollider, v0.3.5
zenburn, v1.0.2

# Dev
No dev packages

/cc @atom/core

Package.getActivationCommands is deprecated.

Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:

  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)

Object.Object.defineProperty.get is deprecated.

Requiring $ from atom is no longer supported.
If you are using space-pen, please require $ from atom-space-pen-views. Otherwise require jquery instead:
{$} = require 'atom-space-pen-views'
or
$ = require 'jquery'
Add "atom-space-pen-views": "^2.0.3" to your package dependencies.
Or add "jquery": "^2" to your package dependencies.

Object.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app.asar/exports/atom.js:48:11)
Object.<anonymous> (/Users/rainer/.atom/packages/supercollider/lib/post-window.coffee:2:1)
Object.<anonymous> (/Users/rainer/.atom/packages/supercollider/lib/post-window.coffee:102:4)
Module._compile (module.js:452:26)
Object.requireCoffeeScript (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/coffee-cash/lib/coffee-cash.js:85:19)
Module.load (module.js:347:32)

Add optional API enabled features

If you have the API quark installed then many more features are possible. This uses the OSC bridge.

This will be a "[x] Use API" setting

Workspace.getActiveEditor is deprecated.

Call ::getActiveTextEditor instead

Workspace.getActiveEditor (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:1022:12)
Controller.editorIsSC (/Users/rainer/.atom/packages/supercollider/lib/controller.coffee:137:28)
Controller.eval (/Users/rainer/.atom/packages/supercollider/lib/controller.coffee:166:19)
atom-workspace.<anonymous> (/Users/rainer/.atom/packages/supercollider/lib/controller.coffee:26:31)
CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)

forwarding of symbols broken?

Hey Felix,

first of all nice editor addition, love it!

here is something weird:
Evaluation

[\b, \b, \sdf];

// returns
null11:39:16.908
[\b, b, sdf];
[\b, \b];
// returns
[ b, nil ]

???

nothing working after updating to 0.2

Hello,
I just updated to 0.2 using atom 0.124 on OSX 10.8.5. Everything was working well using atom-supercollider 0.13.

I also installed supercolliderjs globally since the last time I used atom-supercollider. I don't know if this makes a difference.

I love the work you are doing. Thank you!

Provide sclang services for other Atom packages to use to interpret

See Interacting With Other Packages Via Services
https://atom.io/docs/v0.186.0/creating-a-package

This would allow other packages the ability to call supercollider code using the currently active interpreter.

This could be used for tooling (introspection, method lookups) or for live coding mini-languages that compile to sc.

There has already been one project that wanted this. He found it easiest to just fork this package, but it would've been much easier just to call the service

thisProcess.nowExecutingPath remains nil

again trying Atom-SuperCollider as my primary IDE which means it has to work as a playground as well.
It really (still and increasingly at the same time) looks amazing, a lot of features I really like, here.

However, I noticed that

thisProcess.nowExecutingPath

returns nil always. This is a feature I am heavily relying on to remotely load script files (with loadRelative )

I am guessing this is due to the absence of Document support for now?

let it shine on!

Avoid having to remove \n from evaluated text

Some versions of sclang were choking on any newlines, and always demand a final newline.

Fredrik's 3.7 alpha choked, my 3.7 alpha did not. The 3.6.6 stable release does choke.

So I removed all newlines from evaluated text and appended one at the end.

But now any syntax error message coming back from the interpreter will be useless. It will just be one line. "error on line 1"

Solve why it chokes and find a better way to pipe

Working on Windows?

I am just opening an issue here for the Windows support issue in general. I have a testbuild of SC3.7 that runs with the default IDE (but where the qt-based communication between IDE and sclang is seriously hampered for the time being).

With Atom I get to this point:

  • when evaluating SC code in the editor the post window is opened
  • under a heading config the path to .supercollider.yaml is displayed
  • the (custom) path to sclang is displayed (but with a different path syntax than the one I used in the config - file (\ instead of /))
  • the heading 'booting' is displayed but nothing happens.

If I copy the path to sclang.exe from the postwindow to a command-shell, sclang is booted successfully, so I think there is no typo in the path. There is also no empty space in the path.

I just wanted to give it a try, didn't have much hope anyways: it seems Atom-sc depends on the Readline interface to work? On Mac I get the sc3> prompt occasionally? Readline is broken on sc3.7, so even if the path to sclang worked it would probably bork later...
Maybe something for a later time...

Uncaught Error: ENOENT: no such file or directory, uv_chdir

[Enter steps to reproduce below:]

  1. Create a new file and switch the syntax to SuperCollider
  2. cmd-shift-K

Atom Version: 1.0.0
System: Mac OS X 10.10.3
Thrown From: supercollider package, v0.5.5

Stack Trace

Uncaught Error: ENOENT: no such file or directory, uv_chdir

At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/babel-core/node_modules/regenerator/node_modules/commoner/node_modules/graceful-fs/polyfills.js:14

Error: ENOENT: no such file or directory, uv_chdir
  at Error (native)
  at process.chdir (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/babel-core/node_modules/regenerator/node_modules/commoner/node_modules/graceful-fs/polyfills.js:14:9)
  at Repl.module.exports.Repl.startSCLang (/Users/mac/.atom/packages/supercollider/lib/repl.coffee:53:15)
  at /Users/mac/.atom/packages/supercollider/lib/controller.coffee:47:12
  at Workspace.module.exports.Workspace.openURIInPane (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:442:22)
  at Workspace.module.exports.Workspace.open (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:375:19)
  at Controller.module.exports.Controller.openPostWindow (/Users/mac/.atom/packages/supercollider/lib/controller.coffee:118:22)
  at Controller.module.exports.Controller.recompile (/Users/mac/.atom/packages/supercollider/lib/controller.coffee:131:8)
  at atom-workspace.<anonymous> (/Users/mac/.atom/packages/supercollider/lib/controller.coffee:18:38)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:70:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

     -1:45.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:33.4.0 grammar-selector:show (atom-text-editor.editor)
     -0:28.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:28.3.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:12.9.0 grammar-selector:show (atom-text-editor.editor)
     -0:09.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:02.5.0 supercollider:recompile (a.inline-block)

Config

{
  "core": {
    "projectHome": "/Users/mac/Desktop/",
    "disabledPackages": [
      "language-supercollider"
    ]
  }
}

Installed Packages

# User
supercollider, v0.5.5

# Dev
No dev packages

manage class paths - include .

generate a sclang conf.yaml when booting the interpreter and pass this to sclang using -l

By default it would include the project root "."

So any classes you write are automatically included. No need to make a quark or worry about where you put the class file or on what OS you are and where is this extensions folder (and will I break something?) .

This makes it more enabling for users and makes it trivial to write classes that are only used for a specific project.

Also then quarks can be installed to your local working folder rather than always globally in Extensions/quarks

Additional class paths could be specified in your .supercolliderc

"Library is not compiled": JS-YAML: unacceptable kind of an object to dump [object Undefined]

running in OS X. i am using latest supercollider (3.7) and some files have been moved (sclang, scsynth) so i created a .supercollider.yaml preferences file and tried setting paths but no luck. i'm not quite sure what to put in the yaml file. i tried this:

sclang: /Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang
scsynth: /Applications/SuperCollider/SuperCollider.app/Contents/MacOS/scsynth

and in post window Atom says:

config
configFile: /Users/jeffblanding/.supercollider.yaml
sclang: /Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang
booting

so it seems to only catch the sclang reference from yaml. if i try shift-return in a scd code block i get the error "Library is not compiled". same if i try cntrl-click for Evaluate Selection.

the section on Preferences for Atom only mentions sclang.

Package.activateConfig is deprecated.

Use a config schema instead. See the configuration section
of https://atom.io/docs/latest/hacking-atom-package-word-count and
https://atom.io/docs/api/latest/Config for more details

Package.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:263:11)
PackageDetailView.activate (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:163:26)
PackageDetailView.initialize (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:146:12)
PackageDetailView.View (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:184:25)
new PackageDetailView (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:38:54)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/settings-view.js:255:22)

Uncaught Error: EBADF, write

From @s8 on February 17, 2015 22:32

[Enter steps to reproduce below:]

  1. cmd-shift-p
  2. supercollider
  3. open post window

Atom Version: 0.179.0
System: Mac OS X 10.10.2
Thrown From: Atom Core

Stack Trace

Uncaught Error: EBADF, write

At fs.js:82

Error: EBADF, write
  at Error (native)

Commands

     -0:35.5 command-palette:toggle (atom-text-editor.editor)
     -0:33.6 core:confirm (atom-text-editor.editor.mini)
     -0:33.6 tree-view:show (atom-text-editor.editor)
     -0:30.7 core:backspace (atom-text-editor.editor)
     -0:30.0 command-palette:toggle (atom-text-editor.editor)
  5x -0:26.5 core:move-down (atom-text-editor.editor.mini)
     -0:23.7 core:confirm (atom-text-editor.editor.mini)
     -0:23.7 supercollider:clear-post-window (atom-text-editor.editor)
  2x -0:22.6 core:close (atom-text-editor.editor)
     -0:12.6 application:new-file (div.markdown-preview.native-key-bindings)
     -0:11.5 core:close (atom-text-editor.editor)
     -0:08.9 application:new-file (atom-text-editor.editor)
     -0:06.0 command-palette:toggle (atom-text-editor.editor)
  4x -0:03.5 core:move-down (atom-text-editor.editor.mini)
     -0:00.6 core:confirm (atom-text-editor.editor.mini)
     -0:00.6 supercollider:open-post-window (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "editor": {
    "invisibles": {}
  }
}

Installed Packages

# User
supercollider, v0.3.5

# Dev
No dev packages

Copied from original issue: atom/atom#5597

Style elements within text editors using the `atom-text-editor::shadow` selector or the `.atom-text-editor.less` file extension.If you want to target overlay elements, target them directly or as descendants of `atom-overlay` elements.

In stylesheets/supercollider.less: Style elements within text editors using the atom-text-editor::shadow selector or the .atom-text-editor.less file extension.
If you want to target overlay elements, target them directly or as descendants of atom-overlay elements.

LanguageConfig

Hi hi again, does the LanguageConfig class work in atom? I am trying to include some classes with the .addIIncludePath() & .store() methods which compile but after recompiling the library these paths aren't added.

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.