void PR_add_plugin_type(SoundPluginType *type){
  PR_add_plugin_type_no_menu(type);

  if(!strcmp(type->type_name,"Faust")){
    if(!strcmp(type->name,"System Eq"))
      return;
    if(!strcmp(type->name,"System Lowpass"))
      return;
    if(!strcmp(type->name,"System Lowshelf"))
      return;
    if(!strcmp(type->name,"System Highshelf"))
      return;
    if(!strcmp(type->name,"System Delay"))
      return;
  }

  if(!strcmp(type->type_name,"Bus"))
    return;

  PR_add_menu_entry(PluginMenuEntry::normal(type));
}
Exemple #2
0
static SoundPluginType *create_plugin_type(const char *name, int uid, const wchar_t *file_or_identifier, SoundPluginTypeContainer *container){ //, const wchar_t *library_file_full_path){
  printf("b02 %s\n",STRING_get_chars(file_or_identifier));
  fflush(stdout);
  //  return;

  SoundPluginType *plugin_type = (SoundPluginType*)calloc(1,sizeof(SoundPluginType));

  TypeData *typeData = (TypeData*)calloc(1, sizeof(TypeData));

  typeData->file_or_identifier = wcsdup(file_or_identifier);
  typeData->uid = uid;

  //typeData->library_file_full_path = wcsdup(library_file_full_path);  
  
  typeData->wrapper_type = AudioProcessor::wrapperType_VST;

  plugin_type->data = typeData;

  plugin_type->type_name = "VST";
  plugin_type->name      = strdup(name);

  plugin_type->container = container;

  plugin_type->is_instrument = true; // we don't know yet, so we set it to true.
  
  plugin_type->buffer_size_is_changed = buffer_size_is_changed;

  plugin_type->RT_process = RT_process;
  plugin_type->create_plugin_data = create_plugin_data;
  plugin_type->cleanup_plugin_data = cleanup_plugin_data;

  plugin_type->gui_is_visible = gui_is_visible;
  plugin_type->show_gui = show_gui;
  plugin_type->hide_gui = hide_gui;
  
  plugin_type->play_note       = play_note;
  plugin_type->set_note_volume = set_note_volume;
  plugin_type->stop_note       = stop_note;
  plugin_type->send_raw_midi_message = send_raw_midi_message;
  
  plugin_type->get_effect_value = get_effect_value;
  plugin_type->set_effect_value = set_effect_value;
  
  plugin_type->get_display_value_string=get_display_value_string;
  plugin_type->get_effect_name=get_effect_name;
  plugin_type->get_effect_description=get_effect_description;

  plugin_type->create_state = create_state;
  plugin_type->recreate_from_state = recreate_from_state;

  plugin_type->get_num_presets = get_num_presets;
  plugin_type->get_current_preset = get_current_preset;
  plugin_type->set_current_preset = set_current_preset;
  plugin_type->get_preset_name = get_preset_name;
  plugin_type->set_preset_name = set_preset_name;

  printf("\n\n\nPopulated %s/%s\n",plugin_type->type_name,plugin_type->name);
  PR_add_plugin_type_no_menu(plugin_type);

  return plugin_type;
}