Beispiel #1
0
//!WANT_LOCALIZE_1ST_STRING_BEGIN:sws_actions
void GrooveCommands::Init()
{
    RprCommand::registerCommand("SWS/FNG: Apply groove to selected media items (within 16th)", "FNG_APPLY_GROOVE",&ApplyGroove, 16, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Apply groove to selected media items (within 32nd)", "FNG_APPLY_GROOVE_32", &ApplyGroove, 32, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Apply groove to selected MIDI notes in active MIDI editor (within 16th)", "FNG_APPLY_MIDI_GROOVE_16", &ApplyGrooveInMidiEditor, 16, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Apply groove to selected MIDI notes in active MIDI editor (within 32nd)", "FNG_APPLY_MIDI_GROOVE_32", &ApplyGrooveInMidiEditor, 32, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Get groove from selected media items", "FNG_GET_GROOVE", &GetGrooveFromItems, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Get groove from selected MIDI notes in active MIDI editor", "FNG_GET_GROOVE_MIDI", &GetGrooveFromMIDIEditor, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Save groove template to file", "FNG_SAVE_GROOVE", &SaveGrooveToFile, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Load groove template from file", "FNG_LOAD_GROOVE",&LoadGrooveFromFile, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Show current groove template", "FNG_SHOW_GROOVE", &ShowGroove, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Toggle groove markers", "FNG_GROOVE_MARKERS", &MarkGroove, 1, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Toggle groove markers 2x", "FNG_GROOVE_MARKERS_2", &MarkGroove, 2, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Toggle groove markers 4x", "FNG_GROOVE_MARKERS_4", &MarkGroove, 4, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Toggle groove markers 8x", "FNG_GROOVE_MARKERS_8", &MarkGroove, 8, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Set groove marker start to edit cursor", "FNG_GROOVE_MARKER_START_CUR", &MarkGrooveStart, (int)GrooveTemplateHandler::EDITCURSOR,     NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Set groove marker start to current bar", "FNG_GROOVE_MARKER_START_BAR", &MarkGrooveStart, (int)GrooveTemplateHandler::CURRENTBAR,     NO_UNDO);
    RprCommand::registerToggleCommand("SWS/FNG: Show groove tool", "FNG_GROOVE_TOOL",&ShowGrooveDialog, IsGrooveDialogOpen, NO_UNDO);

	// BR: rather crude (not following how Fingers did it, but is simple, works and should be easily changeable in case Fingers decides to upgrade his RprCommand class)
	static COMMAND_T g_commandTable[] =
	{
		{ { DEFACCEL, "SWS/FNG: Apply groove to selected MIDI notes (within 16th)" }, "FNG_ME_APPLY_MIDI_GROOVE_16",  NULL, NULL, 16, NULL, 32060, ApplyGrooveInMidiEditor},
		{ { DEFACCEL, "SWS/FNG: Apply groove to selected MIDI notes (within 32nd)" }, "FNG_ME_APPLY_MIDI_GROOVE_32",  NULL, NULL, 32, NULL, 32060, ApplyGrooveInMidiEditor},
		{ {}, LAST_COMMAND, },
	};
	SWSRegisterCommands(g_commandTable);
}
Beispiel #2
0
int EditCursorInit()
{
	SWSRegisterCommands(g_commandTable);
	if (!plugin_register("projectconfig",&g_projectconfig))
		return 0;
	return 1;
}
Beispiel #3
0
int PadreInit()
{
	midiNoteRandomizer = new MidiItemProcessor("MIDI Note Position Randomize");
	midiNoteRandomizer->addFilter(new MidiFilterRandomNotePos());
	//midiNoteRandomizer->addFilter(new MidiFilterShortenEndEvents());

	return SWSRegisterCommands(g_commandTable);
}
Beispiel #4
0
int MarkerActionsInit()
{
	SWSRegisterCommands(g_commandTable);

	g_bMAEnabled = GetPrivateProfileInt("SWS", "MarkerActionsEnabled", 1, get_ini_file()) ? true : false;
	if (g_bMAEnabled) plugin_register("timer", (void*)MarkerActionTimer);
	return 1;
}
Beispiel #5
0
int TrackListInit()
{
	if (!plugin_register("projectconfig",&g_projectconfig))
		return 0;

	SWSRegisterCommands(g_commandTable);

	g_pList = new SWS_TrackListWnd;

	return 1;
}
Beispiel #6
0
int ProjPrefsInit()
{
	SWSRegisterCommands(g_commandTable);

	g_prevautoxfade = *(int*)GetConfigVar("autoxfade");

	// Get saved default fade length
	char str[64];
	char strDef[64];
	sprintf(strDef, "%.8f", *(double*)GetConfigVar("deffadelen"));
	GetPrivateProfileString(SWS_INI, SAVED_DEF_FADE_LEN_KEY, strDef, str, 64, get_ini_file());
	g_dDefFadeLen = atof(str);

	return 1;
}
Beispiel #7
0
int ProjectMgrInit()
{
	SWSRegisterCommands(g_projMgrCmdTable);

	// Save the index of OpenRelatedProject() for later
	g_iORPCmdIndex = -1;
	while (g_projMgrCmdTable[++g_iORPCmdIndex].doCommand != OpenRelatedProject);

	if (!plugin_register("projectconfig",&g_projectconfig))
		return 0;

	if (!plugin_register("hookcustommenu", (void*)menuhook))
		return 0;

	return 1;
}
Beispiel #8
0
//!WANT_LOCALIZE_1ST_STRING_BEGIN:sws_actions
void MiscCommands::Init()
{
    RprCommand::registerCommand("SWS/FNG: Apply MIDI hardware emulation to selected midi takes", "FNG_MIDI_HW_EMULATION_APPLY", &EmulateMidiHardware, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: MIDI hardware emulation settings", "FNG_MIDI_HW_EMULATION_SETTINGS", &GetEmulationSettings, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Select muted MIDI notes in active MIDI editor", "FNG_SELECT_MUTED", &SelectMutedMidiNotes, NO_UNDO);
    RprCommand::registerCommand("SWS/FNG: Quantize item positions and MIDI note positions to grid", "FNG_QUANTIZE_TO_GRID", &QuantizeAllToGrid, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Select notes nearest edit cursor in active MIDI editor", "FNG_SELECT_NOTES_NEAR_EDIT_CURSOR", &SelectAllNearestEditCursor, UNDO_STATE_ITEMS);

	// BR: rather crude (not following how Fingers did it, but is simple, works and should be easily changeable in case Fingers decides to upgrade his RprCommand class)
	static COMMAND_T g_commandTable[] =
	{
		{ { DEFACCEL, "SWS/FNG: Select muted MIDI notes" }, "FNG_ME_SELECT_MUTED",  NULL, NULL, 0, NULL, 32060, SelectMutedMidiNotes},
		{ { DEFACCEL, "SWS/FNG: Select notes nearest edit cursor" }, "FNG_ME_SELECT_NOTES_NEAR_EDIT_CURSOR",  NULL, NULL, 1, NULL, 32060, SelectAllNearestEditCursor},
		{ {}, LAST_COMMAND, },
	};
	SWSRegisterCommands(g_commandTable);
}
Beispiel #9
0
//!WANT_LOCALIZE_1ST_STRING_BEGIN:sws_actions
void MidiLaneCommands::Init()
{
    RprCommand::registerCommand("SWS/FNG: Cycle through CC lanes in active MIDI editor", "FNG_CYCLE_CC_LANE", &CycleThroughMidiLanes, 0, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Cycle through CC lanes in active MIDI editor (keep lane heights constant)", "FNG_CYCLE_CC_LANE_KEEP_HEIGHT", &CycleThroughMidiLanes, 1, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Show only used CC lanes in active MIDI editor", "FNG_SHOW_USED_CC_LANES", &ShowUsedCCLanes, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Hide unused CC lanes in active MIDI editor", "FNG_HIDE_UNUSED_CC_LANES", &HideUnusedCCLanes, UNDO_STATE_ITEMS);
    RprCommand::registerCommand("SWS/FNG: Show only top CC lane in active MIDI editor", "FNG_TOP_CC_LANE", &ShowOnlyTopCCLane, UNDO_STATE_ITEMS);

	// BR: rather crude (not following how Fingers did it, but is simple, works and should be easily changeable in case Fingers decides to upgrade his RprCommand class)
	static COMMAND_T g_commandTable[] =
	{
		{ { DEFACCEL, "SWS/FNG: Cycle through CC lanes" }, "FNG_ME_CYCLE_CC_LANE",  NULL, NULL, 0, NULL, 32060, CycleThroughMidiLanes},
		{ { DEFACCEL, "SWS/FNG: Cycle through CC lanes (keep lane heights constant)" }, "FNG_ME_CYCLE_CC_LANE_KEEP_HEIGHT",  NULL, NULL, 1, NULL, 32060, CycleThroughMidiLanes},
		{ { DEFACCEL, "SWS/FNG: Show only used CC lanes" }, "FNG_ME_SHOW_USED_CC_LANES",  NULL, NULL, 0, NULL, 32060, ShowUsedCCLanes},
		{ { DEFACCEL, "SWS/FNG: Hide unused CC lanes" }, "FNG_ME_HIDE_UNUSED_CC_LANES",  NULL, NULL, 0, NULL, 32060, HideUnusedCCLanes},
		{ { DEFACCEL, "SWS/FNG: Show only top CC lane" }, "FNG_ME_TOP_CC_LANE",  NULL, NULL, 0, NULL, 32060, ShowOnlyTopCCLane},
		{ {}, LAST_COMMAND, },
	};
	SWSRegisterCommands(g_commandTable);

}
Beispiel #10
0
int ColorInit()
{
	SWSRegisterCommands(g_commandTable);
	srand((UINT)time(NULL));

	if (!plugin_register("hookcustommenu", (void*)menuhook))
		return 0;

	// Load color gradients from the INI file
	// Restore state
	char str[256];
	GetPrivateProfileString(SWS_INI, GRADIENT_COLOR_KEY, "0 16777215", str, 256, get_ini_file());
	LineParser lp(false);
	if (!lp.parse(str))
	{
		g_crGradStart = lp.gettoken_int(0);
		g_crGradEnd = lp.gettoken_int(1);
	}
	g_bRecRedRuler = GetPrivateProfileInt(SWS_INI, RECREDRULER_KEY, g_bRecRedRuler, get_ini_file()) ? true : false;
	if (g_bRecRedRuler) plugin_register("timer", (void*)ColorTimer);

	return 1;
}
Beispiel #11
0
int ItemSelInit()
{
	SWSRegisterCommands(g_commandTable);

	return 1;
}
Beispiel #12
0
int AnalysisInit()
{
	SWSRegisterCommands(g_commandTable);
	return 1;
}
Beispiel #13
0
int TrackParamsInit()
{
	SWSRegisterCommands(g_commandTable);
	return 1;
}
Beispiel #14
0
int ContextInit()
{
	SWSRegisterCommands(g_commandTable);

	return 1;
}
Beispiel #15
0
int RecordCheckInit()
{
	SWSRegisterCommands(g_commandTable);
	g_bEnRecInputCheck =  GetPrivateProfileInt(SWS_INI, RECINPUTCHECK_KEY, 1, get_ini_file()) ? true : false;
	return 1;
}
Beispiel #16
0
int PlaylistImportInit()
{
	SWSRegisterCommands(g_commandTable);

	return 1;
}