SCVim with Auto completion and Snippets

The nicest part of using vim for me is to use the window management. It gives an opportunity to work in a clean environment that windows are not floating around, no need to search for a window behind another.

The second part that I discovered is to use all the functionality on Vim. I love vim more and more everyday. At the beginning, it was too difficult to know all the shorcuts and function keys, but after some time forcing myself to use them more and more and putting some ‘postits’ with some cheat-notes on the frame of my monitor, I think it is a powerful tool.

I would like to introduce some of powerful sides of using vim for SuperColliding. (it works in both Linux and OSX)

Snippets

I use the snippet plugin that you can download from vim website. It is called ‘snipMate‘ and you can also see the screencast.

Download the zip file into ~/.vim and unzip it, then you can find ‘snippets’ folder too. There, you can create your own snippets for any language (that vim supports) you are using.

Here, since I installed scvim, I will give you an example of how this snippets work.

Create a file on ~/.vim/snippets/supercollider/example.snippet
The file name is an important element because you are going to call the snippet with the file name.
In this case, when you edit vim, you are going to write ‘example’ and then tab key.
Here I will write a SynthDef snippet since I make SynthDef a lot.

Here is the example.

(
  SynthDef("${1:synthname}",
  {
  arg ${2:arg1};
  var ${3:var1};
  $3 = ${4:write};
  Out.ar(${5:outbus},${6:output})
  }).store;
 )

In this way, you created a snippet. I named it as ‘syndef’

When you call, you will see this

Because we setup the synth name as an argument by doing ${number:name}, your cursor will stop at the first argument.
After you fill up the synth name, and click ‘TAB’ button, then it will move to the second argument, in this case ‘arg1.’

The best part of this is that the name of argument becomes flexible. In this example, ‘var1’ is used in two places. If you fix one of ‘var1’ name, then the other one will follow. You don’t need to go down to the name and try to fix it!!

This is a simple example. I don’t use a lot of snippet, but some that save lots of time for me.

 

Auto Completion

For auto completion, I use ‘AutoComplPop‘ plugin.

If you have installed correctly, you will find those files ‘sc_object_completion’ and ‘supercollider_objects.vim.’ in ~/.scvim folder. Those files are going to be used to create auto completion.
If you don’t get it successfully, copy those two files into ~/.vim folder. Then when you type in, you will see this :

That’s quite easy!!

I am still exploring what could be useful for coding. I will post when I discover something useful. Hope you enjoy!

Supercollider 3.5 Beta Second!

After one week of releasing SC3.5 beta, the second version of 3.5 beta was released at 21st of Jan.

I haven’t tried yet, but there are the bug lists fixed.

Here is the information;

one week after the first beta, we’ve uploaded a second beta release. is
contains some fixes to bugs. please test this release as good as possible and
report bugs to the sc-dev list or to the bug tracker at
https://sourceforge.net/tracker/?group_id=54622.

source tarballs:
http://sourceforge.net/projects/supercollider/files/Source/3.5-
beta2/SuperCollider-3.5-beta2-Source-linux.tar.bz2
http://sourceforge.net/projects/supercollider/files/Source/3.5-
beta2/SuperCollider-3.5-beta2-Source.tar.bz2

osx package (ia32/x86_64, requires at least 10.5):
http://sourceforge.net/projects/supercollider/files/Mac%20OS%20X/3.5-
beta2/SuperCollider-3.5-beta2-10.5.dmg

git repository (3.5 branch):
git://supercollider.git.sourceforge.net/gitroot/supercollider/supercollider

 

changes since beta1:

Jakob Leben (4):
sclang: convert libsclang into a static library
qtcollider: define primitives without the use of static initialization
qtcollider: declare factories without the use of static initialization
class library: enhance GUI redirection

James Harkins (1):
Fix Ppar and many other patterns that change ~delta in the output event

Jonatan Liljedahl (6):
fix .app bundling on non-Qt builds on OSX
MIDIIn.schelp: fix broken links to UsingMIDI     (cherry picked from
commit 04f754b7cee3abb987f460de3c2edf92746cfd
SCDoc: avoid some uses of pseudo-methods     (cherry picked from commit
621d485f2c4edc0229ba9ff5949203d2956712e0)
Boolean: fix help file, add asInteger and binaryValue
subclassResponsibility
Improve setting of current SC version.
Add 10.5 compatible DS_Store to DMG (thanks redFrik)

Julian Rohrhuber (1):
iprove ProxySpace helpfile

Miguel Negrão (1):
class library: fix Font bug

Scott Wilson (3):
Bugfix for MIDIFunc
Doc correction
Workaround for HelpBrowser find in Cocoa

Tim Blechmann (13):
class library: osx – use cocoa gui if available, qt otherwise
class library: osx – evaluate startup files before generating gui
windows
external libraries: update submodule (sse2 bugfix)
class library: fix deprecated Panner and XFade methods
Help: fix typo
cmake build system: default to RelWithDebInfo
Help: fix softclip example
class library: improve error handling of binary operators
trivial: remove trailing whitespaces from class library and help source
class library: PlusFreqScope – fix *response for shm scope
class library: Filter-scopeResponse – improve cleanup
class library: Filter-scopeResponse – improve server initialization
class library: Filter-scopeResponse – remove debug messages

crucialfelix (1):
moving qt extensions files from Common to QtCollider

redFrik (2):
iphone: File.exists temporary fix for failing primitive, fixed shared
memory, removed string extension loadPath
iphone: a few fixes to the xcode projects

 

SuperCollider 3.5 Beta Released

After 2 years of Supercollider 3.4, finally the beta version of SuperCollider 3.5 was released yesterday.

I have been compiling SC3 for a while, so that I have known what has been changed. But for the official version users, this might be fresh to experience.

The most noticeable change is the gui. (surely noticeable)

Now this gui is QT based, not cocoa based.

For instance, this is the help brower (Help.gui, or cmd+d in osx)

I personally dislike the white background, but now it can be fixed by correcting css file. This might be very comfortable for a user to search for their need. Especially when searching for a UGen, it also gives you all class definition and examples below, of course together with the description(explanation) of the Ugen itself.

Another nice part of the help browser is the auto-completion. When you type something on the search window, it will show the result of what you are typing in. It might be an easier for a person like me who forgets the name of the ugen or class name very often.

The startup file on ~/Library/Application Support/SuperCollider/ should be changed to ‘startup.scd’ if you have ‘startup.rtf’ file.

I don’t remember by heart what important changes are there for now.

After I use this beta version for a while, I will update the post.

 

Oh, this is the download links and comment from the mailing list.

if you find a bug, please report to the mailing lists and/or file a bug report
at https://sourceforge.net/tracker/?group_id=54622. the better the description
and the easier it is to fix the bug, so providing a simple reproducer or a
minimal test case will help a lot.

source tarballs:
http://sourceforge.net/projects/supercollider/files/Source/3.5beta1/SuperCollider-3.5beta1-
Source-linux.tar.bz2
http://sourceforge.net/projects/supercollider/files/Source/3.5beta1/SuperCollider-3.5beta1-
Source.tar.bz2

osx package (ia32/x86_64, requires at least 10.5):
http://sourceforge.net/projects/supercollider/files/Mac%20OS%20X/3.5beta1/SuperCollider-3.5beta1-10.5.dmg

git repository (3.5 branch):
git://supercollider.git.sourceforge.net/gitroot/supercollider/supercollider