External synth has distorted lissajous art rendering

Also, one more thing to try if you have a sound card with more than 2 outputs is to use the sound_out_stereo FX to output to channels 3 and 4 as that currently doesn’t have a global mixer in its signal chain:

with_fx :sound_out_stereo, output: 3 do
  # play sound here
end

Ah ok, I currently don’t have a linux machine set up as I don’t currently have the resources to support linux at this stage. Sorry.

I’m sorry, I am working on my laptop here which has only got 2 channel audio, my Clavinova too.
I could route the audio from SonicPi outputs 3 and 4 to my main out with jack audio but then I guess I could not use the lissajous view in SP any more.
I just attach my oscilloscope for you and check whats going on on audio 3 and 4.
The problem may also not be a linux specific problem but please try on Windows or MacOS even if it’s a little bit harder to build.

I just tried it out:
On Audio 3/4 a little bit better (at least there’s hope :smile:)


But directly from Supercollider it looks like this:

1 Like

OK, that suggests the global mixer is having an effect on the output - even with the bypassing options set. I suspect there’s more work I can do to bypass it.

However, it’s odd that using the :sound_out_stereo FX still produces quirks as it should be piping your synth straight to the sound card’s output.

Here’s the design for that FX and you can see it just routes the audio with no modifications at all:

I just remembered, that I had forgotten to disconnect audio channels 1 and 2 from my stereo output, when trying to use the :sound_out_stereo fx. Therefore, the output from the fx still being passed through to the main context (, because I did not set mix: 0 on the fx,) may have influenced the waveform on my oscilloscope.
I will do some further testing having channels 1 and 2 completely disconnected from any output as soon as I passed my university exam today :wink: .

1 Like

Good luck with your exam!!! :slight_smile:

Sorry for my late response, I had a couple of things to do these weeks.
I just tried with the :sound_out_stereo on channels 3, 4 which worked perfectly when having SonicPi outputs 1 and 2 disconnected from my sound card or with

with_fx :sound_out_stereo, output: 3, amp: 0 do
  play 40
end

I suggest the problem is the main mixer, as I described in my last post.
By the way, do you think there might be problems building the latest SonicPi on Linux?
And did you already think about some changes concerning the global mixer bypass opts?
Another question: Is it possible to select channels 3 and 4 (or any other) to be rendered in the lissajous art view?

As far as other linux are concerned I have SP 3.2 running successfully on both Raspberry Pi and ubuntu 18.04.4 The build process is getting easier with new cmake scripts coming on board, although not fully documented or finalised yet.
I have a Raspberry Pi binary .deb file under development.

2 Likes

I do have Lubuntu 18.04 and SP 3.1 which is running. Do I have to update any of aubio, osmid, QScintilla, supercollider to work with SP 3.2? As far as I understood all I have to do to install SP 3.2 is to run

cd app/gui/qt
../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
../../server/ruby/bin/qt-doc.rb -o ruby_help.h
lrelease SonicPi.pro
qmake -o Makefile SonicPi.pro
make

However I can not find ruby_help.tmpl anywhere.

You will need to update both ruby and cmake on Ubuntu18.04.4
I used rvm and installed ruby 2.6.3-dev from that.
I also updated cmake with the latest avialble binary.
ruby_help.tmpl is now located in qt/utils folder.The whole layoiut has changed and previous install scripts will not work. Look at the ubuntu 18.04.4 threads on this site and I have posted some details there. I am on a train at present so cant update further just now.

Thank you for your instructions, probably I will update somewhen else when I have plenty of time, I guess just for now you can not update ‘quickly’ :wink:.

Not quite but I’m working on it.

1 Like

Do you know about any possibility to switch the channels shown in the Lissajous art rendering?

So also with version v3.2.2 it remains the question whether it is possible to further bypass the global mixer or to switch the channels displayed by the lissajous art view?

I today did some more experiments in v3.2.2, the problem is now, that in addition to the unsolved problems, the lissajous art renderer renders the image upside down.
Was there a recent change in the code of the lissajous art renderer leading to such behaviour?

Oooh, the issue of upside down rendering is likely to be because we have completely new scope code which has quite likely managed to get the y axis inverted. This should be a pretty simple fix.

I’m also still very interested in figuring out a good way of getting this working properly on all channels.

1 Like

Actually one problem, that is that the graph is sheared, can easily be reproduced by something like

(
var syn = SynthDef("circle",{arg out_bus=0, amp=1, note=60, sustain = 1;
	var freq = note.midicps;
	o = Out.ar(out_bus,  SinOsc.ar([freq, freq],[0,pi/2]) * Line.kr(amp,amp,sustain,doneAction: 2), 0.0);
});
syn.add;
syn.writeDefFile("/opt/sonicpi/sc_plugins_sinan/synthdefs");
)

in Supercollider IDE and

load_synthdefs "/opt/sonicpi/sc_plugins_sinan/synthdefs"
synth :circle

in Sonic Pi, I’ll just grab my oscilloscope and check there.
EDIT: There was some mistake in the sclang code.
EDIT2: And of course you can not see, when a circle is sheared, in a second I will makesomething different like a square or so.

1 Like

Better this:

(
var syn = SynthDef("squares",{arg out_bus=0, amp=1, note=60, sustain = 1;
	var freq = note.midicps;
	o = Out.ar(out_bus,  [LFTri.ar(freq), LFPulse.ar(freq,0.25)] * Line.kr(amp,amp,sustain,doneAction: 2), 0.0);
});
syn.add;
syn.writeDefFile("/opt/sonicpi/sc_plugins_sinan/synthdefs");
)

and basically the same:

load_synthdefs "/opt/sonicpi/sc_plugins_sinan/synthdefs"
synth :squares

EDIT: I did this:

set_mixer_control! hpf_bypass: 1, lpf_bypass: 1, limiter_bypass: 1, lead_dc_bypass: 1

load_synthdefs "/opt/sonicpi/sc_plugins_sinan/synthdefs"
synth :squares   #(2)

sleep 5

with_fx :sound_out_stereo, output: 3 do
  synth :squares      #(3)
end

The result looks like (1) when doing Synth(\squares) in sclang,
and first like (2) and then like (3) from the SonicPi code.
(I did not take a photo because this is tricky and too much here).


EDIT: Nr. 3 again was my fault, I did not disconnect channels 1 and 2 from the output and therefore the signal from 1/2 mixed up with 3/4 which made (3) look a bit rotated, when disconnecting 1/2 from the sound output this should be OK.
@samaaron wouldn’t it be possible to introduce a flag which disables the global mixer completely and a variable for the scope which channels to render? I wouldn’t mind having a look at the code and proposing something if you told me the files I had to look at.