示例#1
0
void iTimbrePluginDlg::init()
{
	CKXPluginGUI::init();

	// custom dialog initialization here...
	// MAKEUP_DLG(Caption, Width, Height)
	create_dialog(plugin_name(timbre), 240, 220,-1,KXFX_NO_RESIZE);

	// SHOW_VFADER(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Height)
	
	create_vfader(fdrSetVol, SETVOL_ID, "Eq 100%", -120, -1, 5, 12, 60, 170);
	create_vfader(fdrBass, BASS_ID, " Bass"      , -120, 120, 60, 12, 50, 170);
	create_vfader(fdrTreble, TREBLE_ID, " Treble", -120, 120, 105, 12, 50, 170);
	create_vfader(fdrVol, VOL_ID, " Vol"         , -120, 0, 150, 12, 60, 170);
	
	fdrBass.slider.set_page_size(10);
	fdrTreble.slider.set_page_size(10);	
	fdrVol.slider.set_page_size(10);	
	fdrSetVol.slider.set_page_size(10);

	// SHOW_CHECKBOX(CheckBox, Ctrl_ID, Caption, Left, Top, Width)

	controls_enabled = TRUE;

	for (int i = 0; i < TIMBRE_PARAMS_COUNT; i++)
	 sync(i);

        redraw();
}
示例#2
0
/*
 * Load all the plugins in the specified directory.
 * Or when plugin_names is give it has a list of plugins
 * to load from the specified directory.
 */
bool load_plugins(void *binfo,
                  void *bfuncs,
                  alist *plugin_list,
                  const char *plugin_dir,
                  alist *plugin_names,
                  const char *type,
                  bool is_plugin_compatible(Plugin *plugin))
{
   struct stat statp;
   bool found = false;
   POOL_MEM fname(PM_FNAME);
   bool need_slash = false;
   int len;

   Dmsg0(dbglvl, "load_plugins\n");

   len = strlen(plugin_dir);
   if (len > 0) {
      need_slash = !IsPathSeparator(plugin_dir[len - 1]);
   }

   /*
    * See if we are loading certain plugins only or all plugins of a certain type.
    */
   if (plugin_names && plugin_names->size()) {
      char *name;
      POOL_MEM plugin_name(PM_FNAME);

      foreach_alist(name, plugin_names) {
         /*
          * Generate the plugin name e.g. <name>-<daemon>.so
          */
         Mmsg(plugin_name, "%s%s", name, type);

         /*
          * Generate the full pathname to the plugin to load.
          */
         Mmsg(fname, "%s%s%s", plugin_dir, (need_slash) ? "/" : "", plugin_name.c_str());

         /*
          * Make sure the plugin exists and is a regular file.
          */
         if (lstat(fname.c_str(), &statp) != 0 || !S_ISREG(statp.st_mode)) {
            continue;
         }

         /*
          * Try to load the plugin and resolve the wanted symbols.
          */
         if (load_a_plugin(binfo, bfuncs, fname.c_str(), plugin_name.c_str(), type,
                           plugin_list, is_plugin_compatible)) {
            found = true;
         }
      }
void iCross_2_PluginDlg::init()
{	CKXPluginGUI::init(); // this is necessary
	// custom dialog initialization here...
	// (title, Width, Height)
	create_dialog(plugin_name(Crossover_2), 350, 100);
    // you can add any label; the ID should be >PARAM_COUNT
    create_label(label,CROSS_2_PARAMS_COUNT+1,"Crossover freqency: 600 Hz",10,15,320);
	// create_hfader(	Fader,	Ctrl_ID,	Label,			MinVal,		MaxVal,	Left,	Top,	Width,	Label_Width) 
	create_hslider(		freq_1,	FREQ_ID,	"Frequency",	__LowerFreq_Cr2,			__UpperFreq_Cr2,	10,		35,		340,	30);
	controls_enabled = TRUE; // enable updating GUI when the parameters are changed
	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
示例#4
0
void iGainPluginDlg::init()
{
	CKXPluginGUI::init();

	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight)
	create_dialog(plugin_name(gain), 380, 45); //w=275

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(fdrGain, GAIN_ID, "Gain:",1,0x7fffffff, 5, 10, 350, 50,12);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
示例#5
0
void iWavegen2PluginDlg::init()
{
	CKXPluginGUI::init();
	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight = 25)
	create_dialog(plugin_name(wavegen2), 300, 100);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(level		, LEVEL_ID		, "Level (dB):"		,-600,0   , 7, 12, 275, 110);
	create_hfader(frecuency , FRECUENCY_ID	, "Frecuency (Hz):"	,0,20000, 7, 48, 275, 110);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
void iEQ_HighpassPluginDlg::init()
{
	CKXPluginGUI::init();
	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight = 25)
	create_dialog(plugin_name(EQ_Highpass), 420, 100);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(freq, FREQ_ID, "Freq.(Hz):",20,19980, 7, 12, 393, 75);
	create_hfader(band, BAND_ID, "Width (Q):",1, 2000, 7, 48, 393, 75);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
void iCrossfadePluginDlg::init()
{
	CKXPluginGUI::init();

	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight)
	create_dialog(plugin_name(crossfade), 380, 90);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(fdrCross, CROSS_ID, "Cross Mix (%)",-100,100, 15, 10, 350, 40,7);
	create_hfader(fdrGain, GAIN_ID, "Gain (dB)", 0, 100, 15, 50, 350, 40,7);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
示例#8
0
void iPitchPluginDlg::init()
{
	CKXPluginGUI::init(); // this is necessary

	// custom dialog initialization here...
	// (title, Width, Height)
	create_dialog(plugin_name(pitch), 350, 85);

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	
	create_hfader(fdrLevel, LEVEL_ID, "Level (%):",0,100, 7, 12, 283, 110);
	create_hfader(fdrPitch, PITCH_ID, "Pitch (semitones):",-1250,1250, 7, 48, 283, 110);

	controls_enabled = 1; // enable updating GUI when the parameters are changed

	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
示例#9
0
TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, 
                                      const char *name, bool& mysql)
{
  char         key[256];
  uint         k;
//TABLE_LIST   table_list;
  TABLE_SHARE *s;

//table_list.init_one_table(db, strlen(db), name, strlen(name),
//                          NULL, TL_IGNORE);
	k = sprintf(key, "%s", db) + 1;
	k += sprintf(key + k, "%s", name);
  key[++k] = 0;

	if (!(s = alloc_table_share(db, name, key, ++k))) {
    strcpy(g->Message, "Error allocating share\n");
    return NULL;
    } // endif s

//        1           2          4            8 
//flags = GTS_TABLE | GTS_VIEW | GTS_NOLOCK | GTS_FORCE_DISCOVERY;

  if (!open_table_def(thd, s, GTS_TABLE | GTS_VIEW)) {
    if (!s->is_view) {
      if (stricmp(plugin_name(s->db_plugin)->str, "connect")) {
#if defined(MYSQL_SUPPORT)
        mysql = true;
#else   // !MYSQL_SUPPORT
        sprintf(g->Message, "%s.%s is not a CONNECT table", db, name);
        return NULL;
#endif   // MYSQL_SUPPORT
      } else
        mysql = false;

    } else {
      mysql = true;
    } // endif is_view

  } else {
    sprintf(g->Message, "Error %d opening share\n", s->error);
    free_table_share(s);
    return NULL;
  } // endif open_table_def

  return s;
} // end of GetTableShare
void iNoiseGate2TPluginDlg::init()
{
	CKXPluginGUI::init(); // this is necessary

	// custom dialog initialization here...
	// (title, Width, Height)
	create_dialog(plugin_name(NoiseGate2T), 200,164,-1,KXFX_NO_RESIZE);
		
    create_label(THRS,NoiseGate2T_PARAMS_COUNT+1,"Threshold",   14,136,60);
    create_label(ENV,NoiseGate2T_PARAMS_COUNT+1,"Envelope",		106,136,60);
// vertical fader (Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Height)
	create_vfader(THUP, THUP_ID, "ON", 0, 1000,     12,  12, 20, 120);
	create_vfader(THDN, THDN_ID, "OFF", 0, 1000,    42,  12, 35, 120);
	create_vfader(EA,   EA_ID,   "A",   0, 1000,    92, 12, 20, 120);
	create_vfader(HOLD, HOLD_ID, "H", 0, 1000,     122,  12, 20, 120);
	create_vfader(ER,   ER_ID,   "R",   0, 1000,   152, 12, 20, 120);

	controls_enabled = 1; // enable updating GUI when the parameters are changed

	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
void iAPSExpPlusPluginDlg::init()
{
	CKXPluginGUI::init();
	// custom dialog initialization here...

	// create_dialog(Caption, Width, Height, ExtraHeight)
	create_dialog(plugin_name(apsexp_plus), 300, 260); //w=275

	// create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
	create_hfader(fdrAttackTime, ATTACK_TIME_ID, "Attack Time (ms):",0,500, 7, 12, 283, 110); // fader must be declared with plugin dialog class
	create_hfader(fdrReleaseTime, RELEASE_TIME_ID, "Release Time (ms):",50,3000, 7, 48, 283, 110);
	create_hfader(fdrThreshold, POST_GAIN_ID, "Ouput Gain (dB):",-60,60, 7, 84, 283, 110);
	create_hfader(fdrRatio, THRESHOLD_ID, "Threshold (dB):", -60, 0, 7, 120, 283, 110);	
	create_hfader(fdrPostGain, RATIO_ID, "Ratio:", 1, 100, 7, 156, 283, 110);
	create_hfader(fdrPreDelay, PREDELAY_ID, "PreDelay (ms)", 0, 40, 7, 192, 283, 110);
	create_checkbox(sidechain, SIDECHAIN_ID, "  Toggle Side Chain", 40, 228, 180);

	controls_enabled = TRUE;

	sync(EVERYPM_ID);
}
示例#12
0
void iAmpPluginDlg::init()
{
    CKXPluginGUI::init();
    // custom dialog initialization here...

    // create_dialog(Caption, Width, Height, ExtraHeight = 25)
    create_dialog(plugin_name(amp), 300, 120);

    // create_hfader(Fader, Ctrl_ID, Label, MinVal, MaxVal, Left, Top, Width, Label_Width)
    create_hfader(left,  LEFT_LEVEL_ID,  "Left (dB):" ,-600,600, 7, 12, 310, 110);
    create_hfader(right, RIGHT_LEVEL_ID, "Right (dB):",-600,600, 7, 48, 310, 110);
    left.slider.set_tic_freq(120);
    right.slider.set_tic_freq(120);

    // SHOW_CHECKBOX(CheckBox, Ctrl_ID, Caption, Left, Top, Width)
    create_checkbox(chkLock, LOCK_ID, "Lock", 30, 94, 80);

    controls_enabled = TRUE;

    sync(EVERYPM_ID);
}
示例#13
0
static AsbPlugin *
asb_plugin_loader_open_plugin (AsbPluginLoader *plugin_loader,
			       const gchar *filename)
{
	AsbPluginGetNameFunc plugin_name = NULL;
	AsbPluginLoaderPrivate *priv = GET_PRIVATE (plugin_loader);
	AsbPlugin *plugin = NULL;
	GModule *module;
	gboolean ret;

	module = g_module_open (filename, 0);
	if (module == NULL) {
		g_warning ("failed to open plugin %s: %s",
			   filename, g_module_error ());
		return NULL;
	}

	/* get description */
	ret = g_module_symbol (module,
			       "asb_plugin_get_name",
			       (gpointer *) &plugin_name);
	if (!ret) {
		g_warning ("Plugin %s requires name", filename);
		g_module_close (module);
		return NULL;
	}

	/* print what we know */
	plugin = g_slice_new0 (AsbPlugin);
	plugin->enabled = TRUE;
	plugin->ctx = priv->ctx;
	plugin->module = module;
	plugin->name = g_strdup (plugin_name ());
	g_debug ("opened plugin %s: %s", filename, plugin->name);

	/* add to array */
	g_ptr_array_add (priv->plugins, plugin);
	return plugin;
}
示例#14
0
PluginData& find_plugin()
{
    PluginsDataValues* pdv =  tortilla::pluginsData();
    tstring plugin_name(_cp->get(Plugin::FILE));
    int index = -1;
    for (int i = 0, e = pdv->size(); i < e; ++i)
    {
        const PluginData &p = pdv->at(i);
        if (p.name == plugin_name)
        {
            index = i; break;
        }
    }
    if (index == -1)
    {
        PluginData pd;
        pd.name = plugin_name;
        pd.state = _cp->state() ? 1 : 0;
        pdv->push_back(pd);
        index = pdv->size() - 1;
    }
    return pdv->at(index);
}
示例#15
0
void iRevPluginDlg::init()
{
	    // skin status:
        // ------------------------
        // mf=this.kxl [if exists]
        // mf.next=[attached]=kX Mixer's mf
        // mf.priority=1; this.kxl is accessed first

        // process kxefx.kxs now
        TCHAR tmp_str[MAX_PATH];
        efx_skin.get_full_skin_path(_T("kxefx.kxs"),tmp_str);
        efx_skin.set_skin(tmp_str);
        mf.attach_skin(&efx_skin);
        efx_skin.attach_skin(kxmixer_skin);
        efx_skin.set_attach_priority(1);

        // skin status:
        // -------------------------
        // [1] mf=this.kxl
        // [2] mf.next=efx_skin
        // [3] efx_skin=kxefx.kxs
        // [4] efx_skin.next=kxmixer skin
        // [1,2,3,4] -- access order

        CKXPluginGUI::init(); // this is necessary
        // init() should be called -after- skin initialization

//-----------------------------------------------------------------------------------------------
// custom dialog initialization here...
// (title, Width, Height)
create_dialog(plugin_name(rev), 250, 120);
grpbox.hide();//hide useless GUI elements
w_label.hide();

    
    /*LCDs*/
    
    count_inlev.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(65,96),CSize(29,18)), this);
	//count_inlev.SetID(COUNT_INLEV);
	count_inlev.SetBlankPadding(3);//празни полета от ляво
	count_inlev.SetColours(RGB(255,255,255), RGB(0,0,100), RGB(0,0,150));//цифри, блат, слайдер
	count_inlev.SetColourFaded(RGB(98,98,135));
	count_inlev.SetAllowInteraction(false);//не може да се настройва
	count_inlev.SetDraw3DBar(false);//без слайдър
	count_inlev.DisplayInt(true);

	count_erlev.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(316,96),CSize(29,18)), this);
	//count_erlev.SetID(COUNT_ERLEV);
	count_erlev.SetBlankPadding(3);//празни полета от ляво
	count_erlev.SetColours(RGB(255,255,255), RGB(100,80,0), RGB(0,0,150));//цифри, блат, слайдер
	count_erlev.SetColourFaded(RGB(135,126,98));
	count_erlev.SetAllowInteraction(false);//не може да се настройва
	count_erlev.SetDraw3DBar(false);//без слайдър
	count_erlev.DisplayInt(true);

	count_revlev.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(407,96),CSize(29,18)), this);
	//count_revlev.SetID(COUNT_REVLEV);
	count_revlev.SetBlankPadding(3);//празни полета от ляво
	count_revlev.SetColours(RGB(255,255,255), RGB(0,0,0), RGB(0,0,150));//цифри, блат, слайдер
	count_revlev.SetColourFaded(RGB(98,98,135));
	count_revlev.SetAllowInteraction(false);//не може да се настройва
    count_revlev.SetDraw3DBar(false);//без слайдър
	count_revlev.DisplayInt(true);

	count_drylev.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(496,96),CSize(29,18)), this);
	//count_drylev.SetID(COUNT_DRYLEV);
	count_drylev.SetBlankPadding(3);//празни полета от ляво
	count_drylev.SetColours(RGB(255,255,255), RGB(100,0,0), RGB(0,0,150));//цифри, блат, слайдер
	count_drylev.SetColourFaded(RGB(135,98,98));
	count_drylev.SetAllowInteraction(false);//не може да се настройва
	count_drylev.SetDraw3DBar(false);//без слайдър
	count_drylev.DisplayInt(true);
	
	count_band.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(167,97),CSize(44,15)), this);
	//count_band.SetID(COUNT_BAND);
	count_band.SetBlankPadding(5);//празни полета от ляво
	count_band.SetColours(RGB(255,255,255), RGB(0,0,100), RGB(0,0,150));//цифри, блат, слайдер
	count_band.SetColourFaded(RGB(98,98,135));
	count_band.SetAllowInteraction(false);//не може да се настройва
	count_band.SetDraw3DBar(false);//без слайдър
	count_band.DisplayInt(true);

	count_pre.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(65,176),CSize(29,18)), this);
	//count_pre.SetID(COUNT_PRE);
	count_pre.SetBlankPadding(3);//празни полета от ляво
	count_pre.SetColours(RGB(255,255,255), RGB(0,0,100), RGB(0,0,0));//цифри, блат, слайдер
	count_pre.SetColourFaded(RGB(98,98,135));
	count_pre.SetAllowInteraction(false);//не може да се настройва
	count_pre.SetDraw3DBar(false);//без слайдър
	count_pre.DisplayInt(true);

	count_decay.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(169,177),CSize(44,15)), this);
	//count_decay.SetID(COUNT_DECAY);
	count_decay.SetBlankPadding(5);//празни полета от ляво
	count_decay.SetColours(RGB(255,255,255), RGB(0,0,100), RGB(0,0,0));//цифри, блат, слайдер
	count_decay.SetColourFaded(RGB(98,98,135));
	count_decay.SetAllowInteraction(false);//не може да се настройва
	count_decay.SetDraw3DBar(false);//без слайдър
	count_decay.DisplayInt(true);

	count_outlev.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(387,256),CSize(29,18)), this);
	//count_outlev.SetID(COUNT_OUTLEV);
	count_outlev.SetBlankPadding(3);//празни полета от ляво
	count_outlev.SetColours(RGB(255,255,255), RGB(0,0,100), RGB(0,0,0));//цифри, блат, слайдер
	count_outlev.SetColourFaded(RGB(98,98,135));
	count_outlev.SetAllowInteraction(false);//не може да се настройва
	count_outlev.SetDraw3DBar(false);//без слайдър
	count_outlev.DisplayInt(true);

	
	/*for loading the bitmap frames for the knobs*///valid for filenames kx.bmp (e.g. k1.bmp
	for(i=0;i<FRAMES;i++){                        //k2.bmp, k3.bmp etc.) 
	   sprintf(filename, "k%d.bmp", i+1);         //
       bitmaps[i] = mf.load_image(filename);      //
	}                                             //
   /*end*///////////////////////////////////////////

   /*Knobs*/

	knob_inlev.SetBitmaps(bitmaps);
	knob_inlev.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(15,85),CSize(40,40)), this);
    knob_inlev.SetID(INLEV);
	knob_inlev.SetPos(plugin->_params[INLEV]);
	
	knob_erlev.SetBitmaps(bitmaps);
	knob_erlev.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(265,85),CSize(40,40)), this);
    knob_erlev.SetID(ERLEV);
	knob_erlev.SetPos(plugin->_params[ERLEV]);

	knob_revlev.SetBitmaps(bitmaps);
	knob_revlev.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(355,85),CSize(40,40)), this);
    knob_revlev.SetID(REVLEV);
	knob_revlev.SetPos(plugin->_params[REVLEV]);
	
    knob_drylev.SetBitmaps(bitmaps);
	knob_drylev.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(445,85),CSize(40,40)), this);
    knob_drylev.SetID(DRYLEV);
    knob_drylev.SetPos(plugin->_params[DRYLEV]);

	knob_band.SetBitmaps(bitmaps);
	knob_band.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(116,85),CSize(40,40)), this);
    knob_band.SetID(BAND);
	knob_band.SetPos(plugin->_params[BAND]);
	
    knob_pre.SetBitmaps(bitmaps);
	knob_pre.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(15,165),CSize(40,40)), this);
    knob_pre.SetID(PRE);
	knob_pre.SetPos(plugin->_params[PRE]);

	knob_decay.SetBitmaps(bitmaps);
	knob_decay.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(116,165),CSize(40,40)), this);
	knob_decay.SetID(DECAY);
	knob_decay.SetPos(plugin->_params[DECAY]);
	
    knob_diff.SetBitmaps(bitmaps);
	knob_diff.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(362,165),CSize(40,40)), this);
    knob_diff.SetID(DIFF);
	knob_diff.SetPos(plugin->_params[DIFF]);

	knob_damp.SetBitmaps(bitmaps);
	knob_damp.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(287,165),CSize(40,40)), this);
    knob_damp.SetID(DAMP);
	knob_damp.SetPos(plugin->_params[DAMP]);

    knob_outlev.SetBitmaps(bitmaps);
	knob_outlev.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(335,245),CSize(40,40)), this);
    knob_outlev.SetID(OUTLEV);
	knob_outlev.SetPos(plugin->_params[OUTLEV]);

	/////////////////////////////////////////////////////////////

	knob_tap1.SetBitmaps(bitmaps);
	knob_tap1.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(17,255),CSize(40,40)), this);
    knob_tap1.SetID(TAP1);
	knob_tap1.SetPos(plugin->_params[TAP1]);

	knob_tap2.SetBitmaps(bitmaps);
	knob_tap2.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(62,255),CSize(40,40)), this);
    knob_tap2.SetID(TAP2);
	knob_tap2.SetPos(plugin->_params[TAP2]);

	knob_tap3.SetBitmaps(bitmaps);
	knob_tap3.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(107,255),CSize(40,40)), this);
    knob_tap3.SetID(TAP3);
	knob_tap3.SetPos(plugin->_params[TAP3]);

	knob_tap4.SetBitmaps(bitmaps);
	knob_tap4.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(152,255),CSize(40,40)), this);
    knob_tap4.SetID(TAP4);
	knob_tap4.SetPos(plugin->_params[TAP4]);

	knob_tap5.SetBitmaps(bitmaps);
	knob_tap5.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(197,255),CSize(40,40)), this);
    knob_tap5.SetID(TAP5);
	knob_tap5.SetPos(plugin->_params[TAP5]);

	knob_tap6.SetBitmaps(bitmaps);
	knob_tap6.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(242,255),CSize(40,40)), this);
    knob_tap6.SetID(TAP6);
	knob_tap6.SetPos(plugin->_params[TAP6]);


    /*Checkboxes*/
	
	led_pre_x10.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on.bmp"),
		mf.load_image("led_on.bmp"));
	create_checkbox	(led_pre_x10, LED_PRE_X10, "", 56, 183, 150); 
	led_pre_x10.set_method(kMETHOD_TRANS);

	led_decay_x10.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on.bmp"),
		mf.load_image("led_on.bmp"));
	create_checkbox	(led_decay_x10, LED_DECAY_X10, "", 170, 183, 150); 
	led_decay_x10.set_method(kMETHOD_TRANS);

	
	/*VU meter*/
	
	vumeter.set_bitmaps(
		 mf.load_image("vu_off.bmp"),
		 mf.load_image("vu_on.bmp"));
	vumeter.create(rev_name, 484, 161,this,1);
	vumeter.show();

	turn_on(1);
	redraw();
	

	controls_enabled = 1; // enable updating GUI when the parameters are changed

	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
示例#16
0
// Plugin GUI init
//----------------------------------------------------------------------
void iMixyPluginDlg::init()
{
	
	CKXPluginGUI::init();
	smallfont.CreatePointFont(70,"Tahoma"); // creates a small font	
	// custom dialog window  (title, Width, Height)
	create_dialog(plugin_name(mixy), 980, 460);

	for(int i=1; i<10; i++)
	{
		vu[-1+i]=new kPeak;

	// load  bitmaps here 
		switch(plugin->_params[44+i])	
		{	 
		case 0 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my0-24.jpg")),mf.load_image(("my0-24h.jpg")));	 
			break;	 
		case 1 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my0-60.jpg")),mf.load_image(("my0-60h.jpg")));	 
			break;	 
		case 2 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my0-90.jpg")),mf.load_image(("my0-90h.jpg")));	 
			break;	 
		case 3 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my0-120.jpg")),mf.load_image(("my0-120h.jpg")));	 
			break;	 
		case 4 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my12-24.jpg")),mf.load_image(("my12-24h.jpg")));	 
			break;	 
		case 5 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my12-60.jpg")),mf.load_image(("my12-60h.jpg")));	 
			break;	 
		case 6 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my12-90.jpg")),mf.load_image(("my12-90h.jpg")));	 
			break;	 
		case 7 :	 
			vu[-1+i]->set_bitmaps(mf.load_image(("my12-120.jpg")),mf.load_image(("my12-120h.jpg")));	 
			break;	
		}	
	}
	char d[7];
	vutop=75;
	for (int i=1; i<10; i++)
	{
		// show VU meter name,left, top,    mode  		
		vuleft[i-1]=50+105*(i-1); 	
		vu[-1+i]->create(mixy_name,  vuleft[i-1],  vutop, this, 1);	
		vu[-1+i]->show();

		// show VU labels; the ID should be >PARAM_COUNT  left, top, width	
		create_label(vutextl[i-1],MIXY_PARAMS_COUNT+1,"      ",vuleft[i-1]-35,vutop-40,50);	
		vutextl[i-1].ModifyStyle(SS_LEFT,SS_RIGHT,0);
		vutextl[i-1].SetFont(&smallfont,NULL);
		create_label(vutextr[i-1],MIXY_PARAMS_COUNT+1,"      ",vuleft[i-1]+20,vutop-40,50);
		vutextr[i-1].SetFont(&smallfont,NULL);

		// SHOW_VFADER(Fader, Ctrl_ID, Label, MinVal,MaxVal,Left, Top, Width, Height)	//	
		if (i<9) sprintf(d, "Ch%i" , 2*i-1); else sprintf(d, "M1" );
		create_vslider(fdrvol[2*i-1],	2*i-2, d,  -120, 12,	vuleft[i-1]-31,	vutop-31,	25, 290);
		fdrvol[2*i-1].ModifyStyle( TBS_AUTOTICKS,TBS_NOTICKS,0);

		if (i<9) sprintf(d, "Ch%i" , 2*i); else sprintf(d, "M2" );	
		create_vslider(fdrvol[2*i],	2*i-1, d,  -120, 12,	vuleft[i-1]+40,	vutop-30,	25, 290);
		fdrvol[2*i].ModifyStyle( TBS_AUTOTICKS|TBS_RIGHT,TBS_NOTICKS|TBS_LEFT,0);
		// show fdr labels; the ID should be >PARAM_COUNT  left, top, width	
		create_label(fdrtext[2*i-2],MIXY_PARAMS_COUNT+1,"      ",vuleft[i-1]-27,vutop+vu[-1+i]->get_peak_height()-10,50);	
		fdrtext[2*i-2].SetFont(&smallfont,NULL);

		create_label(fdrtext[2*i-1],MIXY_PARAMS_COUNT+1,"      ",vuleft[i-1]+10,vutop+vu[-1+i]->get_peak_height()-10,50);	
		fdrtext[2*i-1].ModifyStyle(SS_LEFT,SS_RIGHT,0);
		fdrtext[2*i-1].SetFont(&smallfont,NULL);

		// SHOW pan sliders(Fader, Ctrl_ID, Label, MinVal,MaxVal,Left, Top, Width, Height)	//	
		if (i<9)
		{ 
			sprintf(d, "Pan %i" , 2*i-1); 
			create_hslider(pan[2*i-2],	2*i+52, d,  -10, 10,	vuleft[i-1]-35,	vutop+vu[-1+i]->get_peak_height()+10,	50, 20);
			pan[2*i-2].ModifyStyle( TBS_AUTOTICKS,TBS_NOTICKS,0);			
			sprintf(d, "Pan %i" , 2*i); 
			create_hslider(pan[2*i-1],	2*i+53, d,  -10, 10,	vuleft[i-1]+15,	vutop+vu[-1+i]->get_peak_height()+10,	50, 20);
			pan[2*i-1].ModifyStyle( TBS_AUTOTICKS,TBS_NOTICKS,0);
			
			create_checkbox(solo[2*i-2], 2*i+68, "Solo", vuleft[i-1]-30, vutop+vu[-1+i]->get_peak_height()+30, 50);			
			solo[2*i-2].SetFont(&smallfont,NULL);
			create_checkbox(solo[2*i-1], 2*i+69, "Solo", vuleft[i-1]+20, vutop+vu[-1+i]->get_peak_height()+30, 50);
			solo[2*i-1].SetFont(&smallfont,NULL);
		}

		//(CheckBox, Ctrl_ID, Caption, Left, Top, Width)	
		create_checkbox(mute[2*i-1], 2*i+16, "Mute", vuleft[i-1]-30, vutop+vu[-1+i]->get_peak_height()+50, 50);
		mute[2*i-1].SetFont(&smallfont,NULL);
		create_checkbox(mute[2*i], 2*i+17, "Mute", vuleft[i-1]+20, vutop+vu[-1+i]->get_peak_height()+50, 50);
		mute[2*i].SetFont(&smallfont,NULL);
		create_checkbox(stlink[i-1], i+35, "Stereo Link", vuleft[i-1]-20, vutop+vu[-1+i]->get_peak_height()+70, 80);
		stlink[i-1].SetFont(&smallfont,NULL);

			// edit text boxes
		edit[i-1] = new CEdit;
		edit[i-1]->Create(WS_CHILD|WS_VISIBLE|WS_BORDER|SS_CENTER,CRect(vuleft[i-1]-20, vutop+390, vuleft[i-1]+61, vutop+405), this, 0x10001+i-1);		
		edit[i-1]->SetFont(&smallfont,NULL);
		//edit[i-1]->SetWindowText(plugin->str_param[i-1]);
		//sprintf(data[i-1],plugin->str_param);
	}

		create_checkbox(monomix, 86, "Mono Mix", vuleft[8]-30, vutop+vu[4]->get_peak_height()+30, 80);
		monomix.SetFont(&smallfont,NULL);

	// show reset button left, top, width
	create_button(p_reset[0],P_RESET1,	"reset", vuleft[0]-5, vutop-58,vu[0]->get_peak_width());	
	create_button(p_reset[1],P_RESET2,	"reset", vuleft[1]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[2],P_RESET3,	"reset", vuleft[2]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[3],P_RESET4,	"reset", vuleft[3]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[4],P_RESET5,	"reset", vuleft[4]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[5],P_RESET6,	"reset", vuleft[5]-5, vutop-58,vu[0]->get_peak_width());	
	create_button(p_reset[6],P_RESET7,	"reset", vuleft[6]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[7],P_RESET8,	"reset", vuleft[7]-5, vutop-58,vu[0]->get_peak_width());
	create_button(p_reset[8],P_RESET9,	"reset", vuleft[8]-5, vutop-58,vu[0]->get_peak_width());
	for (int i=0;i<9;i++)
	{
		p_reset[i].SetFont(&smallfont,NULL);
	}
	//image.create("",0,0, mf.load_image("my12-120.jpg"), this, kMETHOD_TRANS);
	//image.show();

	turn_on(1);
	redraw();
	controls_enabled = 1; // enable updating GUI when the parameters are changed
	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}
示例#17
0
void ifuzzPluginDlg::init()
{
        // skin status:
        // ------------------------
        // mf=this.kxl [if exists]
        // mf.next=[attached]=kX Mixer's mf
        // mf.priority=1; this.kxl is accessed first

        // process kxefx.kxs now
        TCHAR tmp_str[MAX_PATH];
        efx_skin.get_full_skin_path(_T("kxefx.kxs"),tmp_str);
        efx_skin.set_skin(tmp_str);
        mf.attach_skin(&efx_skin);
        efx_skin.attach_skin(kxmixer_skin);
        efx_skin.set_attach_priority(1);

        // skin status:
        // -------------------------
        // [1] mf=this.kxl
        // [2] mf.next=efx_skin
        // [3] efx_skin=kxefx.kxs
        // [4] efx_skin.next=kxmixer skin
        // [1,2,3,4] -- access order

        CKXPluginGUI::init(); // this is necessary
        // init() should be called -after- skin initialization

//-----------------------------------------------------------------------------------------------
// custom dialog initialization here...
// (title, Width, Height)
create_dialog(plugin_name(fuzz), 250, 120);
grpbox.hide();//hide useless GUI elements
w_label.hide();

    /*LCDs*/
    
    count_drive.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(62,86),CSize(29,18)), this);
	//count_drive.SetID(COUNT_DRIVE);
	count_drive.SetBlankPadding(3);//празни полета от ляво
	count_drive.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_drive.SetAllowInteraction(false);//не може да се настройва
	count_drive.SetDraw3DBar(false);//без слайдър
	count_drive.DisplayInt(true);

	count_level_drive.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(187,86),CSize(29,18)), this);
	//count_level_drive.SetID(COUNT_LEVEL_DRIVE);
	count_level_drive.SetBlankPadding(3);//празни полета от ляво
	count_level_drive.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_level_drive.SetAllowInteraction(false);//не може да се настройва
	count_level_drive.SetDraw3DBar(false);//без слайдър
	count_level_drive.DisplayInt(true);

	count_level_clean.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(62,149),CSize(29,18)), this);
	//count_level_clean.SetID(COUNT_LEVEL_CLEAN);
	count_level_clean.SetBlankPadding(3);//празни полета от ляво
	count_level_clean.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_level_clean.SetAllowInteraction(false);//не може да се настройва
    count_level_clean.SetDraw3DBar(false);//без слайдър
	count_level_clean.DisplayInt(true);

	count_o_freq.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(281,92),CSize(32,14)), this);
	//count_o_freq.SetID(COUNT_O_FREQ);
	count_o_freq.SetBlankPadding(4);//празни полета от ляво
	count_o_freq.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_o_freq.SetAllowInteraction(false);//не може да се настройва
	count_o_freq.SetDraw3DBar(false);//без слайдър
	count_o_freq.DisplayInt(true);
	
	count_i_freq.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(381,92),CSize(32,14)), this);
	//count_i_freq.SetID(COUNT_I_FREQ);
	count_i_freq.SetBlankPadding(4);//празни полета от ляво
	count_i_freq.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_i_freq.SetAllowInteraction(false);//не може да се настройва
	count_i_freq.SetDraw3DBar(false);//без слайдър
	count_i_freq.DisplayInt(true);

	/*count_i_width.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(252,145),CSize(29,18)), this);
	count_i_width.SetID(COUNT_I_WID);
	//count_i_width.SetFormatString("%.f2");
	count_i_width.SetBlankPadding(3);//празни полета от ляво
	count_i_width.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_i_width.SetAllowInteraction(false);//не може да се настройва
	count_i_width.SetDraw3DBar(false);//без слайдър
	count_i_width.DisplayInt(true);

	count_o_width.Create("",WS_VISIBLE|SS_NOTIFY,CRect(CPoint(153,145),CSize(29,18)), this);
	count_o_width.SetID(COUNT_O_WID);
	//count_o_width.SetFormatString("%.f2");
	count_o_width.SetBlankPadding(3);//празни полета от ляво
	count_o_width.SetColours(RGB(0,220,0), RGB(0,0,0), RGB(0,0,0));//цифри, блат, слайдер
	count_o_width.SetAllowInteraction(false);//не може да се настройва
	count_o_width.SetDraw3DBar(false);//без слайдър
	count_o_width.DisplayInt(true);*/
	

	
	
	/*for loading the bitmap frames for the knobs*///valid for filenames kx.bmp (e.g. k1.bmp
	for(i=0;i<FRAMES;i++){                        //k2.bmp, k3.bmp etc.) 
	   sprintf(filename, "k%d.bmp", i+1);         //
       bitmaps[i] = mf.load_image(filename);      //
	}                                             //
   /*end*///////////////////////////////////////////

   
	/*Knobs*/

	knob_drive.SetBitmaps(bitmaps);
	knob_drive.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(13,76),CSize(40,40)), this);
    knob_drive.SetID(DRIVE);
	knob_drive.SetPos(plugin->_params[DRIVE]);
	
	knob_level_drive.SetBitmaps(bitmaps);
	knob_level_drive.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(138,76),CSize(40,40)), this);
    knob_level_drive.SetID(LEVEL_DRIVE);
	knob_level_drive.SetPos(plugin->_params[LEVEL_DRIVE]);

	knob_level_clean.SetBitmaps(bitmaps);
	knob_level_clean.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(13,139),CSize(40,40)), this);
    knob_level_clean.SetID(LEVEL_CLEAN);
	knob_level_clean.SetPos(plugin->_params[LEVEL_CLEAN]);
	
    knob_tone.SetBitmaps(bitmaps);
	knob_tone.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(333,80),CSize(40,40)), this);
    knob_tone.SetID(I_FREQ);
	knob_tone.SetPos(plugin->_params[I_FREQ]);

	knob_i_width.SetBitmaps(bitmaps);
	knob_i_width.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(355,133),CSize(40,40)), this);
    knob_i_width.SetID(I_WID);
	knob_i_width.SetPos(plugin->_params[I_WID]);
	
    knob_polish.SetBitmaps(bitmaps);
	knob_polish.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(235,80),CSize(40,40)), this);
    knob_polish.SetID(O_FREQ);
	knob_polish.SetPos(plugin->_params[O_FREQ]);

	knob_o_width.SetBitmaps(bitmaps);
	knob_o_width.Create("",WS_CHILD| WS_VISIBLE|SS_NOTIFY, CRect(CPoint(256,133),CSize(40,40)), this);
    knob_o_width.SetID(O_WID);
	knob_o_width.SetPos(plugin->_params[O_WID]);

    
    /*Checkboxes*/
	
	led_clean.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on.bmp"),
		mf.load_image("led_on.bmp"));
	create_checkbox	(led_clean, LED_DC, ""	, 73, 47, 150); 
	led_clean.set_method(kMETHOD_TRANS);

	led_norm.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on.bmp"),
		mf.load_image("led_on.bmp"));
	create_checkbox	(led_norm, LED_X2, ""	, 73, 110, 150); 
	led_norm.set_method(kMETHOD_TRANS);

	led_bps1.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on_red.bmp"),
		mf.load_image("led_on_red.bmp"));
	create_checkbox	(led_bps1, LED_BPS1, ""	, 238, 109, 150); 
	led_bps1.set_method(kMETHOD_TRANS);

	led_bps2.set_bitmaps(
		mf.load_image("led_off.bmp"),
		mf.load_image("led_off.bmp"),
		mf.load_image("led_on_red.bmp"),
		mf.load_image("led_on_red.bmp"));
	create_checkbox	(led_bps2, LED_BPS2, ""	, 337, 109, 150); 
	led_bps2.set_method(kMETHOD_TRANS);

	sw_st.set_bitmaps(
		mf.load_image("switch_up.bmp"),
		mf.load_image("switch_up.bmp"),
		mf.load_image("switch_down.bmp"),
		mf.load_image("switch_down.bmp"));
	create_checkbox	(sw_st, SW_ST, ""	, 106, 57, 150); 
	sw_st.set_method(kMETHOD_TRANS);

	sw_oc.set_bitmaps(
		mf.load_image("switch_up.bmp"),
		mf.load_image("switch_up.bmp"),
		mf.load_image("switch_down.bmp"),
		mf.load_image("switch_down.bmp"));
	create_checkbox	(sw_oc, SW_OC, ""	, 151, 118, 150); 
	sw_oc.set_method(kMETHOD_TRANS);
	

	
	controls_enabled = 1; // enable updating GUI when the parameters are changed

	sync(EVERYPM_ID); // update all 'GUI' elements to the preset plugin parameters
}