Cabbage Logo
Back to Cabbage Site

Creating a signal diplay

I am trying to create a signal display of a vst synth I am trying to code I’ve set my signal display signal variable(“asig2”) which is tha variable my outs set 2, then at the end of my inst
I’ve set
display asig2, .5, 1
I have midi triggered sound but no display.
Wondering if any one has any ideas cheers

Can you post your full instrument code? Hard yo say what’s going on without seeing it…

form caption("FourSounds") size(600, 300), colour("black"), pluginid("def1")

keyboard bounds(8, 158, 381, 95)

combobox channel("waveform"), bounds(10, 10, 80, 20) increment(1) text("sine", "saw", "square", "pulse") colour(89, 87, 87, 255) items("sine", "saw", "square", "pulse"), channel("waveform"), range(1, 4, 1, 1, 1)

rslider bounds(102, 10, 60, 60) channel("filter") range(0, 20000, 0, 0.5, 0.01), text("filter cutoff"), trackercolour("grey")

rslider channel("resonance"), range(0, .99, 0, 1, 0.01) bounds(164, 10, 60, 60), text("resonance"), trackercolour("grey")

signaldisplay channel("specdisplay") , colour(0, 255, 0, 255),, zoom(-1), , bounds(229, 11, 364, 138) colour:0(0, 255, 0, 255) text("audio signal"), displaytype("spectrogram"), signalvariable("asig2")

</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1
 
;instrument will be triggered by keyboard widget
instr 1
kcf chnget ("filter");cutoff
kres chnget ("resonance");resonance
asig oscili p5, p4, chnget:i("waveform");wave selecting oscilator
  
asig2 moogladder asig, kcf, kres; filter with cutoff and res arguments
  
outs asig2, asig2
 
display asig2, .5, 1;display output signal
 
endin
  
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f1 0 16384 10 1;sine
f2 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111;saw
f3 0 16384 10 1 0 0.3 0 0.2 0 0.14 0 .111 ;square
f4 0 16384 10 1 1 1 1 0.7 0.5 0.3 0.1 ;pulse
f0 z 
</CsScore>
</CsoundSynthesizer>

That’s everything I have at the minute cheers

I formatted your last post. It’s very hard to read code when it’s not formatted correctly. :wink: You can format it by click the </> button. Anyway you are setting the display type to spectrogram but you are using the display opcode which shows a waveform. If you change the displaytype to waveform and change the display line to:

display asig2, .1, 1;display output signal

You had the period set to 5 which was too big.

Still having some problems with the synth I’ve been building certain operations are not going exactly how I hoped possibly csound syntax I’m v new to this would be nice to get some input and or ideas about where I’m going wrong

<Cabbage>

form caption("FourSounds") size(1000, 500), colour("black"), pluginid("def1"), titlebarcolour("grey")

keyboard bounds(8, 160, 381, 93)

;---------------------------------------------------------------------------------------------------------

;Cabbage widgets---------------------------------------------------------------------------------------------------

combobox channel("wave"), bounds(10, 10, 80, 20) text("sine", "saw", "square", "pulse", "off") colour("black") items("sine", "saw", "square", "pulse", "off"), channel("wave"), range(1, 4, 1, 1, 1)

;combobox for wave selection ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

combobox channel("wave2") bounds(10, 40, 80, 20) text("sine", "saw", "square", "pulse", "off"), colour("black") items("sine", "saw", "square", "pulse", "off"), channel("wave2") range(5, 8, 5, 1, 1)

;second combobox for second wave selection ----------------------------------------------------------------------------------------------------------------------------------------------------------

 

rslider colour("black"), bounds(102, 10, 60, 60) channel("filter") range(0, 20000, 20000, 0.5, 0.01), text("filter cutoff"), trackercolour("grey"),

;rotary slider for filter cutoff--------------------------------------------------------------------------------------------------------------------

 

rslider colour("black"), channel("resonance"), range(0, .99, 0, 1, 0.01) bounds(164, 10, 60, 60), text("resonance"), trackercolour("grey")

;rotary slider for filter resonance-----------------------------------------------------------------------------------------------------------------------------------------

 

signaldisplay channel("specdisplay"), colour("grey"), bounds(289, 11, 304, 138) colour:0("palegreen") text("audio signal"), displaytype("waveform"), signalvariable("asig3")

;signal display-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

vslider colour("grey"), channel("gain") range(0, 1, 0.4, 1, 0.01) bounds(230, 10, 50, 140) fontcolour("grey") trackercolour("teal"), text("Gain"), style("legacy")

;v slider for gain control-----------------------------------------------------------------------------------------------------------------------------------------

 

hslider style("legacy") bounds(8, 98, 150, 50), range(1, 1.22, 1, 1, 0.001), channel("detuneone"), text("detune")

;h slider for detune--------------------------------------------------------------------------------------------------

 

rslider bounds(164, 78, 60, 60) range(0, 1, 0, 1, 0.001), colour("silver"), trackercolour("grey"), text("super saw")

;r slider for third detune --YET TO BE COMPLETED-- -----------------------------------------------------------------

 

hslider bounds(8, 60, 150, 50) range(1, 1.22, 1, 1, 0.001), style("legacy"), channel("detunetwo"), text("detune")

;h slider for second detune---------------------------------------------------------------------------------------

 

vslider bounds(610, 10, 50, 150), text("attack"), range(0.1, 5, 0.1, 2, 0.01), channel("attackone")

;v slider for adsr attack--------------------------------------------------------------------------

 

vslider bounds(670, 10, 50, 150), text("decay"), range(0, 1, 0, 1, 0.01), channel("decayone")

;v slider for adsr decay ------------------------------------------------------------------------

 

vslider bounds(730, 10, 50, 150), text("sustain"), range(0, 1, 0, 1, 0.01), channel("sustainone")

;v slider for adsr sustain-------------------------------------------------------------------------

 

vslider bounds(790, 10, 50, 150) text("release"), range(0, 10, 0, 1, 0.01), channel("releaseone")

;v slider for adsr release -----------------------------------------------------------------------

 

</Cabbage>

<CsoundSynthesizer>

<CsOptions>

-n -d -+rtmidi=NULL -M0 -m0d --displays --midi-key-cps=4 --midi-velocity-amp=5

</CsOptions>

<CsInstruments>

; Initialize the global variables.

sr = 44100

ksmps = 64

nchnls = 2

0dbfs = 1

 

;instrument will be triggered by keyboard widget

instr 1

 

;chnget variable------------------------------------

kcf chnget ("filter");cutoff

kres chnget ("resonance");resonance

kg chnget ("gain");gain

kdetune1 chnget ("detuneone")

kdetune2 chnget ("detunetwo")

iattack1 chnget ("attackone")

idecay1 chnget ("decayone")

isustain1 chnget ("sustainone")

irelease1 chnget ("releaseone")

kenv adsr iattack1, idecay1, isustain1, irelease1

;-------------------------------------------------

;----------------------------------------------------

asig oscili p5*kenv, p4*kdetune1, chnget:i("wave");wave selecting oscilator

asigd oscili p5*kenv, p4*kdetune2, chnget:i("wave2");second wave selecting oscilator

 

asig1 = asigd + asig;both oscilator outputs into single output variable

 

asig2 moogladder asig1, kcf, kres; filter with cutoff and res arguments from chnget functions

  

asig3 gain asig2, kg; gain with input var, kg chnget var

  

outs asig3, asig3 ;simple outs 2 x asig3

 

display asig3, .1, 1 ;display output signal

 

endin

  

</CsInstruments>

<CsScore>

;causes Csound to run for about 7000 years...

;gen10 functions for asig oscili

f1 0 16384 10 1;sine

f2 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111;saw

f3 0 16384 10 1 0 0.3 0 0.2 0 0.14 0 .111 ;square

f4 0 16384 10 1 1 1 1 0.7 0.5 0.3 0.1 ;pulse

;gen10 functions for asigd oscili

f5 0 16384 10 1;sine

f6 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111;saw

f7 0 16384 10 1 0 0.3 0 0.2 0 0.14 0 .111 ;square

f8 0 16384 10 1 1 1 1 0.7 0.5 0.3 0.1 ;pulse

f0 z 

 

</CsScore>

</CsoundSynthesizer>

 

Sent from [Mail](https://go.microsoft.com/fwlink/?LinkId=550986) for Windows 10

If you don’t give any details I’m afraid I can’t possibly help. What do you mean when you say certain operations. You need to be far more specific here. I’ve no idea where you are going wrong because I have no idea what you are trying to do :grimacing:

At the moment I’m trying to create a vat synth :thinking:
I don’t know if that helps at all ?

Not vat vst synth sorry

What’s stopped you from exporting your instrument as a synth? It’s all there in the manual. And it’s also covered here. Scroll to the bottom. There is a video there that takes you through the steps outlined in the manual.

Cheers, another question I was going to ask is when the vst is all in shape how does cabbage recommend you sell them? Is there any good examples you can think of of vsts made with cabbyon the market?

Sorry vst instruments on the market?

These are a good example… they sound and look great.