# Auto-Pan effect with skript



## gmet (Oct 4, 2007)

Chris,

Here is a script that alternates each played note. If you set the CC# to 10 then it will alternate panning between the set values (0-127) or randomly between values (with the random button on). When the CC# is set to -1 it is switched off.

Hope it helps,

Justin



> *on init*
> ``_{Midi Alternate}_
> ``*declare* $j := 0
> ``*declare* ui_value_edit $ctrl1 (-1,127,1)
> ...


----------



## Nickie Fønshauge (Oct 4, 2007)

What exactly are you trying to achieve? Oscillation of the Panning? If that is the case, why not modulate Pan with an LFO and control the LFO from the script?


----------



## MCChris (Oct 4, 2007)

Thanks for your help!

Yes, I want to have this classic Alternation of a mono signal (center) between the left and right speaker/channel. I like both versions. But how can I have this effect depending on a knob sayin "on/off"? 

Chris


----------



## Nickie Fønshauge (Oct 4, 2007)

If you use the LFO you can bypass/engage it with


```
_set_engine_par ($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan, <group>, <slot>, <assignment>)
```
where $Auto_pan is the name of your ON/OFF button. You put the _set_engine_par in the ui_control($Auto_pan) block, one for each group, you want to affect (for multiple groups you can use a "for" or "while" loop).


----------



## MCChris (Oct 4, 2007)

Thanks - but to be honest, I did not really get the last one. Maybe this helps to understand what I am wanting to do.

I just assigned the LFO to all groups, chose sin wave and let the LFO control the pan - this is quite simple and already the more or less result I wanted to have.

For my special purpose I wanted to include some more UI-elements to make it "user-friendly".

Anyway - I created a button and two knobs which are

declare ui_button $Vibrato_on_off

declare ui_knob $speed (1,100,1)

declare ui_knob $depth (1,100;1)

The Vibrato_on_off should be the on/off button to activate or bypass the LFO. The first knob shall increase/decrease the LFO speed (but only a small part of its original range, lets say from 1kHz to 6kHz in 100 small steps) and the second one shall decide the mix between the original mono-sound (LFO turned off) and Auto-Pan-sound, e.g. 1 is like "LFO off" and 100 is "LFO 100%".

I am sorry for my confusing description, but I my Kontakt skript knowledge is very limited. Maybe you can help me with it.


----------



## Nickie Fønshauge (Oct 5, 2007)

Try this script (it is in NL Editor format):

*on init*
``*declare* group
``*declare* slot
``*declare* ui_button $Auto_pan_on_off
``*declare* !on_off_text[2]
``on_off_text[0] := "Auto pan OFF"
``on_off_text[1] := "Auto pan ON"
``set_text($Auto_pan_on_off, on_off_text[$Auto_pan_on_off])
``set_Auto_pan()
``*declare* ui_knob $speed (0,100,1)
``set_knob_unit($speed, KNOB_UNIT_HZ)
``*declare* *const* MIN_SPEED := 424000
``*declare* *const* MAX_SPEED := 616000
``set_Speed()
``*declare* ui_knob $depth (0,100,1)
``set_knob_unit($depth, KNOB_UNIT_PERCENT)
``set_Depth()
*end on*

*function* set_Auto_pan
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, group, slot, 0)
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Auto_pan}_

*function* set_Speed
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_set_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, MIN_SPEED + (MAX_SPEED - MIN_SPEED)*speed/100, group, slot, 0)
````````set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, group, slot, 0))
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Speed}_

*function* set_Depth
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_set_engine_par(ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, group, slot, 0)
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Depth}_

*on ui_control* ($Auto_pan_on_off)
``set_text($Auto_pan_on_off, on_off_text[$Auto_pan_on_off])
``set_Auto_pan()
*end on*

*on ui_control* (speed)
``set_Speed()
*end on*

*on ui_control* ($depth)
``set_Depth()
*end on*

The same in regular K2 format;

```
on init
  declare $group
  declare $slot
  declare ui_button $Auto_pan_on_off
  declare !on_off_text[2]
  !on_off_text[0] := "Auto pan OFF"
  !on_off_text[1] := "Auto pan ON"
  set_text($Auto_pan_on_off, !on_off_text[$Auto_pan_on_off])
  {begin set_Auto_pan}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Auto_pan}
  declare ui_knob $speed (0,100,1)
  set_knob_unit($speed, $KNOB_UNIT_HZ)
  declare const $MIN_SPEED := 424000
  declare const $MAX_SPEED := 616000
  {begin set_Speed}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, $MIN_SPEED + ($MAX_SPEED - $MIN_SPEED)*$speed/100, $group, $slot, 0)
          set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Speed}
  declare ui_knob $depth (0,100,1)
  set_knob_unit($depth, $KNOB_UNIT_PERCENT)
  {begin set_Depth}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Depth}
end on

on ui_control ($Auto_pan_on_off)
  set_text($Auto_pan_on_off, !on_off_text[$Auto_pan_on_off])
  {begin set_Auto_pan}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Auto_pan}
end on

on ui_control ($speed)
  {begin set_Speed}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, $MIN_SPEED + ($MAX_SPEED - $MIN_SPEED)*$speed/100, $group, $slot, 0)
          set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Speed}
end on

on ui_control ($depth)
  {begin set_Depth}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Depth}
end on
```

It assumes at most one LFO for each group. You can change the frequency range by adjusting the MIN_SPEED and MAX_SPEED constants (0-1000000).


----------



## gmet (Oct 5, 2007)

Nickie,

I have tried your script (for interest and to get to know KSP better) but how do you modulate Pan with the LFO? There doesn't seem to be a way to specify pan.

Justin


----------



## Nickie Fønshauge (Oct 5, 2007)

In Edit Mode, right click Pan knob (in Amplifier module) and select Sine. Make sure to check all relevant groups first.


----------



## gmet (Oct 5, 2007)

Thanks Nickie - I was trying to do it in the Source modulation instead of the Amplifier modulation - it works great!. Would there be a way of adding to this script so that it only effects specific notes as it would be nice to use on percussion instruments but not all notes. maybe something like:

if ($Chosen_Note(s) = $EVENT_NOTE)
_allow script_
else
_disallow script_
end if

Thanks in advance,

Justin


----------



## MCChris (Oct 5, 2007)

Thank you Nickie so much (and to the others as well) - this is really working well. Anyway, I did actually take the regular kontakt skript because the compiled NL skript showed some errors, e.g. for "set_Auto_pan()" 

Anyway - I'd like to know where to improve my skript language knowledge. I can't say where to find more information about this than in my kontakt 2 manual. There seems to be much more than I know, e.g. "_set_engine_par" and many others.

As for the knobs and buttons - is it possible to have them included in the start-up module (without having to open the instruments options)?


----------



## Nickie Fønshauge (Oct 5, 2007)

Justin M @ 5th October 2007 said:


> Thanks Nickie - I was trying to do it in the Source modulation instead of the Amplifier modulation - it works great!. Would there be a way of adding to this script so that it only effects specific notes as it would be nice to use on percussion instruments but not all notes. maybe something like:
> 
> if ($Chosen_Note(s) = $EVENT_NOTE)
> _allow script_
> ...


Not by adding to the script, Justin. The LFO affects all zones in the group; so does turning it on or off. But, you can divide the notes/zones on different groups and only add the LFO to the groups, you want to be affected by auto-panning.


----------



## Nickie Fønshauge (Oct 5, 2007)

Btw, there was a slight error in the first version. I had forgotten, that the modulation intensity is logarithmic; the depth knob readout is incorrect.

It is correct in:

*on init*
``*declare* group
``*declare* slot
``*declare* ui_button $Auto_pan_on_off
``*declare* !on_off_text[2]
``on_off_text[0] := "Auto pan OFF"
``on_off_text[1] := "Auto pan ON"
``set_text($Auto_pan_on_off, on_off_text[$Auto_pan_on_off])
``set_Auto_pan()
``*declare* ui_knob $speed (0,100,1)
``set_text($speed, "Speed")
``set_knob_unit($speed, KNOB_UNIT_HZ)
``*declare* *const* MIN_SPEED := 424000
``*declare* *const* MAX_SPEED := 616000
``set_Speed()
``*declare* ui_knob $depth (0,100,1)
``set_text($depth, "Depth")
``set_knob_unit($depth, KNOB_UNIT_PERCENT)
``set_Depth()
*end on*

*function* set_Auto_pan
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, group, slot, 0)
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Auto_pan}_

*function* set_Speed
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_saet_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, MIN_SPEED + (MAX_SPEED - MIN_SPEED)*speed/100, group, slot, 0)
````````set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, group, slot, 0))
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Speed}_

*function* set_Depth
``*for* group := 0 *to* NUM_GROUPS-1
````slot := 0
````*while* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) # INTMOD_TYPE_NONE
``````*if* _get_engine_par(ENGINE_PAR_INTMOD_TYPE, group, slot, 0) = INTMOD_TYPE_LFO
````````_set_engine_par(ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, group, slot, 0)
````````set_knob_label($depth, _get_engine_par_disp(ENGINE_PAR_INTMOD_INTENSITY, group, slot, 0))
``````*end if*
``````inc(slot)
````*end while*
``*end for*
*end function* _{set_Depth}_

*on ui_control* ($Auto_pan_on_off)
``set_text($Auto_pan_on_off, on_off_text[$Auto_pan_on_off])
``set_Auto_pan()
*end on*

*on ui_control* (speed)
``set_Speed()
*end on*

*on ui_control* ($depth)
``set_Depth()
*end on*


```
on init
  declare $group
  declare $slot
  declare ui_button $Auto_pan_on_off
  declare !on_off_text[2]
  !on_off_text[0] := "Auto pan OFF"
  !on_off_text[1] := "Auto pan ON"
  set_text($Auto_pan_on_off, !on_off_text[$Auto_pan_on_off])
  {begin set_Auto_pan}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Auto_pan}
  declare ui_knob $speed (0,100,1)
  set_text($speed, "Speed")
  set_knob_unit($speed, $KNOB_UNIT_HZ)
  declare const $MIN_SPEED := 424000
  declare const $MAX_SPEED := 616000
  {begin set_Speed}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, $MIN_SPEED + ($MAX_SPEED - $MIN_SPEED)*$speed/100, $group, $slot, 0)
          set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Speed}
  declare ui_knob $depth (0,100,1)
  set_text($depth, "Depth")
  set_knob_unit($depth, $KNOB_UNIT_PERCENT)
  {begin set_Depth}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, $group, $slot, 0)
          set_knob_label($depth, _get_engine_par_disp($ENGINE_PAR_INTMOD_INTENSITY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Depth}
end on

on ui_control ($Auto_pan_on_off)
  set_text($Auto_pan_on_off, !on_off_text[$Auto_pan_on_off])
  {begin set_Auto_pan}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_BYPASS, 1 - $Auto_pan_on_off, $group, $slot, 0)
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Auto_pan}
end on

on ui_control ($speed)
  {begin set_Speed}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_FREQUENCY, $MIN_SPEED + ($MAX_SPEED - $MIN_SPEED)*$speed/100, $group, $slot, 0)
          set_knob_label($speed, _get_engine_par_disp($ENGINE_PAR_INTMOD_FREQUENCY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Speed}
end on

on ui_control ($depth)
  {begin set_Depth}
    $group := 0
    while ($group < $NUM_GROUPS)
      $slot := 0
      while (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) # $INTMOD_TYPE_NONE)
        if (_get_engine_par($ENGINE_PAR_INTMOD_TYPE, $group, $slot, 0) = $INTMOD_TYPE_LFO)
          _set_engine_par($ENGINE_PAR_INTMOD_INTENSITY, 500000 + 500000*$depth/100, $group, $slot, 0)
          set_knob_label($depth, _get_engine_par_disp($ENGINE_PAR_INTMOD_INTENSITY, $group, $slot, 0))
        end if
        inc($slot)
      end while
      inc($group)
    end while
  {end set_Depth}
end on
```


----------



## Tod (Oct 5, 2007)

Hi MCChris,



MCChris @ Fri Oct 05 said:


> Thank you Nickie so much (and to the others as well) - this is really working well. Anyway, I did actually take the regular kontakt skript because the compiled NL skript showed some errors, e.g. for "set_Auto_pan()"


Hmm, compileing it in Nils Editor worked fine here first time.



> Anyway - I'd like to know where to improve my skript language knowledge. I can't say where to find more information about this than in my kontakt 2 manual. There seems to be much more than I know, e.g. "_set_engine_par" and many others.


There's a *read me* file in the NI folder that has some important info on these commands. 


The script works good Nikie and I learned a few things from it. It never dawned on this lame brain of mine to use a simple "1 - Button" to reverse it. :o :roll: 

I also liked the way you find the groups that have the osc. :wink: I haven't been in a position to need that yet but I know I will and I know first hand that K2 can crash if you don't get the "Slot" right. o/~ 

Thanks,


----------



## Nickie Fønshauge (Oct 5, 2007)

MCChris @ 5th October 2007 said:


> Thank you Nickie so much (and to the others as well) - this is really working well. Anyway, I did actually take the regular kontakt skript because the compiled NL skript showed some errors, e.g. for "set_Auto_pan()"


You are not using the latest version 1.24.2 of Nils' editor?



MCChris @ 5th October 2007 said:


> Anyway - I'd like to know where to improve my skript language knowledge. I can't say where to find more information about this than in my kontakt 2 manual. There seems to be much more than I know, e.g. "_set_engine_par" and many others.


Nils wrote a tutorial on K2 scripts and he is working on documentation on his editor.

And there is of course the *Kontakt Script Language Manual*, that came with K2, plus the various Manual Addendums, that came with the updates.



MCChris @ 5th October 2007 said:


> As for the knobs and buttons - is it possible to have them included in the start-up module (without having to open the instruments options)?


Yes, if you add *make_perfview* to the _init_ block.


----------



## Nickie Fønshauge (Oct 5, 2007)

Tod @ 5th October 2007 said:


> I know first hand that K2 can crash if you don't get the "Slot" right. o/~


Really? I didn't know that. Thanks for the warning, Tod.  

Btw, a word of caution: if you have more than one LFO in a group, they will all be affected by the script in its present form.


----------



## Tod (Oct 5, 2007)

Nickie Fønshauge @ Fri Oct 05 said:


> Tod @ 5th October 2007 said:
> 
> 
> > I know first hand that K2 can crash if you don't get the "Slot" right. o/~
> ...



Yes for me anyway. Useing

*set_knob_label($Knob, _get_engine_par_disp($ENGINE_PAR_ATK_CURVE, $group, $Wrong-Slot, 0))*

will crash me every time requireing a reboot. :(


----------



## Big Bob (Oct 5, 2007)

Hey Nickie,

I haven't read any of the posted code (I've just been skimming this thread) but I just picked up on what Tod said about your method of toggling a boolean (0,1 type of course) by using 1 - x. That is indeed clever. I think I have been using something clumsy like:

.not. x .and. 1 
or (x + 1) .and. 1

(since exclusive or isn't provided). Anyway, I'll have to remember to use 1 - x next time, its simpler and more sophisticated. 8) 

Kudos

Bob


----------



## MCChris (Oct 5, 2007)

Thanks Nickie,

I didn't notice that NL editor has already changed its version. I still used an old version. 

Can you explain how to include the "make_perfview" function into this skript to make all three buttons work on the frontpanel of my patch?

Some other things - do you have any experience in adjusting some graphics for the front panel (skins)? Is it possible to change the instrument icon from one of the standard icons into one of your own?


----------



## Tod (Oct 5, 2007)

MCChris @ Fri Oct 05 said:


> Can you explain how to include the "make_perfview" function into this skript to make all three buttons work on the frontpanel of my patch?


Hi MCChris,

All you have to do is type in "*make_perfview*" just above the "*end on*" in the "*on init*" call back.


----------



## Nickie Fønshauge (Oct 5, 2007)

Big Bob @ 5th October 2007 said:


> method of toggling a boolean (0,1 type of course) by using 1 - x.


He, he, Bob. I did simplify it a little in this script. Normally I would have written *TRUE - x* :wink:

@MCChris: I suppose you mean the icon below the wrench? I am afraid you are stuck with the standard set. There's no way to edit it. :cry:


----------



## gmet (Oct 6, 2007)

Thanks Nickie - I have learnt a lot from messing about with this script.

Justin


----------

