Weird code copying


#1

I’ve seen this happen 3 times in my classes this week. A whole bunch of code is randomly copied into the same buffer. Since I couldn’t verify exactly what keystrokes the students had just used, I can’t locate the cause. But it happened last year as well.

Has anyone ever seen this happen? I’m using 2.7 on the Pi.

Help!
Bob Irving


#2

Could you share which code was added?


#3

Unfortunately, she doesn’t remember exactly what code she added, but she said it was something very simple. If this helps, here is her code, post-doubling and cleanup:

live_loop :beats do
sleep 0.25
sleep 0.25
sample :tabla_ghe3
sample :elec_wood, cutoff: 90
sleep 0.25
end
use_bpm 20
live_loop :pop do
sample :elec_plip, amp: 2
sleep 0.25
end
live_loop :drums do
sample :elec_wood, cutoff: 90
sleep 0.25
sample :elec_tick
sleep 0.25
end
live_loop :continuing do
use_bpm 10
sample :loop_mika, amp: 0.3
sleep 0.75
end
live_loop :chords do
#stop
use_synth :piano
sync :pop
sleep 0.1
play chord(:a4, :major), release: 0.5, amp: 0.3
end

live_loop :chords2 do
#stop
use_synth :piano
sync :pop
sleep 0.25
play chord(:c5, :major), release: 0.5, amp: 0.4
sleep 0.75
end


#4

I have noticed (probably) the same behaviour. While working with several live_loops I suddenly had a copy of these in the same buffer (I did notice this because at sometime there was an additional sound which confused me as all live_loops except one were on hold).

I will try to figure out if I can find something reproducable but this seems to be quite difficult.

I am currently running a selfcompiled Sonic Pi 3.2 on Linux.


#5

So I’m not crazy…:smiley:


#6

Well, that’s still to be confirmed… maybe we are both crazy :wink:


#7

I do it on the Pi in my class, though I use Windows 10. I’ve never seen it happen in Windows but it happens with some regularity on the Pi. Hmm…