-Selecting "special" clips in GUI possible, tested with APC footpedal

This commit is contained in:
Harry van Haaren 2013-12-04 13:07:17 +00:00
parent da92d83c84
commit 59c46e3dfd

View file

@ -272,6 +272,7 @@ int ClipSelector::handle(int event)
{0}, {0},
//{ "Record" }, //{ "Record" },
{ "Use as tempo" }, { "Use as tempo" },
{ "Special select"},
{ "Rename" }, { "Rename" },
{ "Clear" }, { "Clear" },
{ 0 } { 0 }
@ -312,6 +313,17 @@ int ClipSelector::handle(int event)
EventLooperUseAsTempo e (ID, clipNum); EventLooperUseAsTempo e (ID, clipNum);
writeToDspRingbuffer( &e ); writeToDspRingbuffer( &e );
} }
else if ( strcmp(m->label(), "Special select") == 0 )
{
printf("special selected %i, %i\n", ID, clipNum );
// turn on special selection, send note event, turn off selection:
EventGridSelectClipEnable e1(true);
writeToDspRingbuffer( &e1 );
EventGridEvent e2(ID, clipNum, true);
writeToDspRingbuffer( &e2 );
EventGridSelectClipEnable e3(false);
writeToDspRingbuffer( &e3 );
}
else if ( strcmp(m->label(), "Rename") == 0 ) else if ( strcmp(m->label(), "Rename") == 0 )
{ {
const char* name = fl_input( "Clip name: ", clips[clipNum].getName().c_str() ); const char* name = fl_input( "Clip name: ", clips[clipNum].getName().c_str() );