Please be advised that due to scheduled infrastructure maintenance, we anticipate downtimes for the Native Instruments websites and Native Access on February 28, 2024 starting at 06:00 CET. For more details, click here.

Issues with Wave alphas

Lovechld2000
Lovechld2000 Member Posts: 29 Member

Can't seem to achieve full transparency on the background with this code, and can't seem to cause any change in the opacity of the waveform itself at all with this code. Am I doing something wrong?


on init
  set_ui_height_px(290)
  make_perfview
  declare ui_slider opacity (0,255)
  declare ui_waveform $Waveform(6,6)
  attach_zone ($Waveform,find_zone("Test"),0)
end on

on ui_control (opacity)
  message(opacity)
  set_control_par(get_ui_id($Waveform), CONTROL_PAR_WAVE_ALPHA,opacity)
  set_control_par(get_ui_id($Waveform), CONTROL_PAR_BG_ALPHA,opacity)
end on   

Comments

  • EvilDragon
    EvilDragon Moderator Posts: 1,019 mod

    Try hiding the background as well.

  • Lovechld2000
    Lovechld2000 Member Posts: 29 Member

    thanks ED. that makes the background go up to fully transparent with the slider. It leaves the waveform there. Is there a way to make the waveform partially transparent with the slider as well without actually hiding it?


    on init
      set_ui_height_px(290)
      make_perfview
      declare ui_slider opacity (0,255)
      declare ui_waveform $Waveform(6,6)
      attach_zone ($Waveform,find_zone("Test"),0)  
      set_control_par(get_ui_id($Waveform), CONTROL_PAR_HIDE,HIDE_PART_BG)
    end on   
    
    
    on ui_control (opacity)
      message(opacity)
      set_control_par(get_ui_id($Waveform), CONTROL_PAR_WAVE_ALPHA,opacity)
      set_control_par(get_ui_id($Waveform), CONTROL_PAR_BG_ALPHA,opacity)
    end on   
    


  • EvilDragon
    EvilDragon Moderator Posts: 1,019 mod

    I think $CONTROL_PAR_WAVE_ALPHA is only for ui_wavetable, it doesn't work for ui_waveform.

  • Lovechld2000
    Lovechld2000 Member Posts: 29 Member

    thanks for your help ED

  • Cal545
    Cal545 Member Posts: 1 Member

    Hi, Just wondering if you can help, I've added ui_waveform got the waveform to show and made everything hidden etc

    This is a bit of a two fold question

    Due to the nature of my sample there is a line through the centre on the image, it has extra space at the start so I can change the start position, I'm also using offset but it doesn't give the different start positions I require hence moving the start position as well

    Is there anyway to trim the image so there's less of a line or adapt the sample image?

    If not

    Is the only way to deal with a starting position, by moving the start of the sample and or Offset of the sample.... or is there another way to make the start of a sample more flexible?


    Thanks

    Cal


  • EvilDragon
    EvilDragon Moderator Posts: 1,019 mod

    There is no way to visually trim the image. It would only be trimmed if you physically trim the sample you're loading.

Back To Top