Commit 1eaf6543 authored by unless's avatar unless
Browse files

clean up unused variables

parent c0971352
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
RACK_DIR ?= ../..


FLAGS += -w
# FLAGS += -w
# Add .cpp and .c files to the build
# SOURCES += $(wildcard src/dep/*.cpp)
SOURCES += $(wildcard src/*.cpp)
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ struct Avoider : Module {
  std::vector<float> available_notes;
  void output_pls(){
    available_notes.clear();
    int chord_channels = inputs[CHORD_CV_INPUT].getChannels();
    // int chord_channels = inputs[CHORD_CV_INPUT].getChannels();
    if(params[KEEP_CHORD_PARAM].getValue() > 0.1f){
      for(int k = 0; k < cc; k++){
        if(!avoid_it_chord(k))
+0 −1
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ struct CellButton : Switch {
    if(e.button == GLFW_MOUSE_BUTTON_LEFT && e.action == GLFW_PRESS){
      e.consume(this);
      e.stopPropagating();
      ParamQuantity *p = getParamQuantity();
      start_drag(1.0f - getParamQuantity()->getScaledValue());
    }else{
      Switch::onButton(e);
+18 −18
Original line number Diff line number Diff line
@@ -420,8 +420,8 @@ struct PianoidPanel : _less::Widget {
  }
  void render() override{
    float y = 378.0f;
    float h = 32.5f;
    float w = 35.0f;
    // float h = 32.5f;
    // float w = 35.0f;
    float r = 5.0f;
    fill(theme.shadow);
    stretch_round_rect(0.0f, 0.0f, width, y + 2.0f, r * 1.5f, FILL);
@@ -429,8 +429,8 @@ struct PianoidPanel : _less::Widget {
    fill(lerp(theme.input, theme.bg, 0.52f));
    stretch_round_rect(0.0f, 0.0f, width, y, r, FILL);

    NVGcolor ic = lerp(theme.input, theme.bg, 0.6f);
    NVGcolor oc = lerp(theme.output, theme.bg, 0.5f);
    // NVGcolor ic = lerp(theme.input, theme.bg, 0.6f);
    // NVGcolor oc = lerp(theme.output, theme.bg, 0.5f);

    translate(center.x, 0.0f);
    fill(theme.fg);
@@ -526,7 +526,7 @@ struct PianoidDisplay : _less::Widget {
    }
  }
  void draw_black_keys(const std::vector<KeyPiece*> &ks, const NVGcolor &a, const NVGcolor &b, const float &offset, const float &count){
    const float pad = 0.0f;
    // const float pad = 0.0f;
    Vec s = ks.at(0)->box.size.mult(Vec(width, 1.0f));
    float corner = 0.2f;
    for(auto k : ks){
@@ -536,7 +536,7 @@ struct PianoidDisplay : _less::Widget {
        break;
      Vec p = k->box.pos.mult(Vec(width, 1.0f));
      if(k->pressed){
        float bs = 0.02f;
        // float bs = 0.02f;
        fill(theme.shadow);
        round_rect(p.minus(Vec(0.0f, 0.01f)), s, corner * 2.0f);
        fill(b);
@@ -606,7 +606,7 @@ struct PianoidDisplay : _less::Widget {


    float mc = module ? module->color : 0.223776728f;
    float t = 0.5f;
    // float t = 0.5f;
    NVGcolor ic = theme.rainbow_color(mc);
    NVGcolor oc = theme.rainbow_color(mc + 0.1f);

@@ -633,13 +633,13 @@ struct PianoidDisplay : _less::Widget {
    pop();

    stroke(theme.output);
    const float o = scroll_param * (1.0f - range);
    // const float o = scroll_param * (1.0f - range);
    stroke_width(5.0f);
    // round_cap();
    const float p = 1.0f;
    // const float p = 1.0f;
    float x = 1.0f;
    float x2 = x * 0.5f;
    float hh = height - p * 2.0f;
    // float hh = height - p * 2.0f;

    // FRAME

@@ -670,16 +670,16 @@ struct PianoidDisplay : _less::Widget {

  void render_lights() override{
    float range = 0.2818f;
    float count = range * 75.0f;
    float offset = 0.52f * (75.0f - count);
    // float count = range * 75.0f;
    // float offset = 0.52f * (75.0f - count);
    float scroll_param = 0.0f;
    float browser_fix = 1.0f;
    // float browser_fix = 1.0f;
    if(module){
      browser_fix = 0.0f;
      // browser_fix = 0.0f;
      range = range_param->getParamQuantity()->getValue();
      count = range * 75.0f;
      // count = range * 75.0f;
      scroll_param = offset_param->getParamQuantity()->getValue();
      offset = (1.0f - scroll_param) * (75.0f - count);
      // offset = (1.0f - scroll_param) * (75.0f - count);
    }


@@ -692,7 +692,7 @@ struct PianoidDisplay : _less::Widget {

    // MINIMAP
    stroke_width(2.0f);
    float w = 0.0f;
    // float w = 0.0f;
    fill(theme.white);
    for(auto i : pressed_ids){
      if(keys[i].pressed){
@@ -730,7 +730,7 @@ struct PianoidDisplay : _less::Widget {
  int held_note = -1;
  void onDragStart(const event::DragStart& e) override{
    if(held_note != -1){
    float scroll_param = 0.0f;
    // float scroll_param = 0.0f;
      module->press_key(held_note);
      buffer->set_dirty();
    }
+3 −4
Original line number Diff line number Diff line
@@ -399,10 +399,9 @@ struct TowersPanel : _less::Widget {
    rect(0,0,box.size.x, box.size.y);
    fill(theme.fg);

    Vec p = Vec(RACK_GRID_WIDTH, 30.0f);

    float W = (width - p.x * 2);
    float w = W / FADERS;
    // Vec p = Vec(RACK_GRID_WIDTH, 30.0f);
    // float W = (width - p.x * 2);
    // float w = W / FADERS;

    float o = -18.0f;
    float y = art->inputs[0].box.pos.y + o;;