cider behaving funny

57 views
Skip to first unread message

Bill Allen

unread,
Oct 24, 2019, 8:19:56 PM10/24/19
to over...@googlegroups.com
Hi, I've been away from clojure and overtone for a couple of years, but I've got some time to get back into it.

I've got a clean emacs install:
GNU Emacs 26.3 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511))
 of 2019-09-02

with cider installed from package-install.

I've got lein: 

Leiningen 2.9.1 on Java 1.8.0_66 Java HotSpot(TM) 64-Bit Server VM


I've created a small project with a simple instrument:


(ns overtone-tut2.core
  (:require [overtone.live :refer :all]))
 
(definst bass [freq 110]
  (-> freq
      saw
      (rlpf (line:kr (* freq 10) freq 1))
      (* (env-gen:ar (perc 0.1 0.4) :action FREE))))


When I start lein repl at command line, this instrument works as expected. 


But if instead I start emacs, go into the directory and do m-x cider-jack-in, the bass sounds as it should, but in addition I get around 8800 lines of code that looks like the internal instrument definition printed in the cider-repl buffer:


overtone-tut2.core> (bass)
{:synth "overtone-tut2.core/bass",
 :id 41,
 :target 34,
 :position :tail,
 :args {"freq" 110.0},
 :sdef
 {:name "overtone-tut2.core/bass",
  :constants [0.0 0 2.0 10.0 16.0 1.0 -4 0.1 0.4 1 2 5 -99],

...


         :action 2},
        :orig-args
        ([0 2 -99 -99 1 0.1 5 -4 0 0.4 5 -4] :action 2)})}),
    :outputs (),
    :inputs ({:src -1, :index 4} {:src 6, :index 0})})},
 :status #<Atom@55612c57: :destroyed>,
 :loaded? #<Promise@7a86ea4: true>}



Any idea why cider is is printing this and how to stop it. It really makes cider unusable since it does that for every instrument sound I play.


Regards,

Bill

Karl Thorssen

unread,
Nov 4, 2019, 9:39:12 AM11/4/19
to Overtone
Hi Bill,

You're not the first person to have this issue - I believe there's a ticket on the github page for it as well. Personally I have noticed it doesn't happen when I use `cider-eval-defun-at-point` or `cider-eval-last-sexp` to evaluate code in the .clj file rather than in the repl.

You could also use something like `(do (bass) nil)` as a workaround in the repl. Sorry there's not a better answer at the moment.
Reply all
Reply to author
Forward
0 new messages