scel icon indicating copy to clipboard operation
scel copied to clipboard

Utility functions for scope, meter, etc.

Open julianrubisch opened this issue 4 years ago • 2 comments

I don't know if this project takes pull requests, but I've written myself some simple utility functions that could be handy for others too:

(defun jr/sclang-nodetree ()
  "Open scsynth nodeTree."
  (interactive)
  (sclang-eval-string "s.plotTree;"))

(defun jr/sclang-meter ()
  "Open scsynth meter."
  (interactive)
  (sclang-eval-string "s.meter;"))

(defun jr/sclang-scope ()
  "Open scsynth scope."
  (interactive)
  (sclang-eval-string "s.scope;"))

(defun jr/sclang-freqscope ()
  "Open scsynth freqscope."
  (interactive)
  (sclang-eval-string "FreqScope.new;"))

Let me know if that is of interest...

julianrubisch avatar Dec 13 '20 16:12 julianrubisch

Perhaps a section in README showing that it's trivial to add these features to a personal config would be a nice alternative.

TatriX avatar Dec 15 '20 10:12 TatriX

This is gold, thank you! I'm getting into emacs after years of vimming, and this is exactly the kind of stuff I need...

Here are my contributions:

(defun kf/sclang-japa () 
 "Open Japa. Linux only. Requires japa and the linuxutils quark: 
https://github.com/madskjeldgaard/linuxutils-quark."
  (interactive)
  (sclang-eval-string "Japa.new"))

(defun kf/sclang-record ()
  "Toggle recording. The file name is constructed by the git hash and a 
timestamp, and puts into a directory called rec in the current process directory. 
If the directory does not exist, it will be created."
  (interactive)
  (sclang-eval-expression "if(s.isRecording){s.stopRecording}{s.record(\"rec\"+/+Git(thisProcess.nowExecutingPath.dirname).sha[0..5]++\"_\"++Date.localtime.stamp++\".wav\", numChannels: s.options.numOutputBusChannels)}"))

kflak avatar Jul 28 '24 06:07 kflak