diff options
Diffstat (limited to 'Bus/IvyProbe')
-rw-r--r-- | Bus/IvyProbe/IvyProbeDlg.cpp | 140 |
1 files changed, 64 insertions, 76 deletions
diff --git a/Bus/IvyProbe/IvyProbeDlg.cpp b/Bus/IvyProbe/IvyProbeDlg.cpp index 4a891d9..3ecc751 100644 --- a/Bus/IvyProbe/IvyProbeDlg.cpp +++ b/Bus/IvyProbe/IvyProbeDlg.cpp @@ -76,26 +76,25 @@ void CTestDlg::DoDataExchange(CDataExchange* pDX) //{{AFX_DATA_MAP(CTestDlg)
DDX_Control(pDX, IDC_REGEXP, m_expr);
DDX_Control(pDX, IDC_MSG, m_msg);
- DDX_Control(pDX, IDC_SLIDER7, m_slider7);
- DDX_Control(pDX, IDC_SLIDER6, m_slider6);
- DDX_Control(pDX, IDC_SLIDER5, m_slider5);
- DDX_Control(pDX, IDC_SLIDER4, m_slider4);
- DDX_Control(pDX, IDC_SLIDER3, m_slider3);
- DDX_Control(pDX, IDC_SLIDER2, m_slider2);
- DDX_Control(pDX, IDC_SLIDER1, m_slider1);
- DDX_Control(pDX, IDC_SLIDER0, m_slider0);
DDX_Text(pDX, IDC_BUSNUMBER, m_busnumber);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestDlg, MyDialog)
//{{AFX_MSG_MAP(CTestDlg)
- ON_WM_SYSCOMMAND()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_START, OnStart)
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_SEND, OnSend)
ON_BN_CLICKED(IDC_BIND, OnBind)
+ ON_BN_CLICKED(IDC_CLOCK_FAST_BACKWARD, OnClockFastBackward)
+ ON_BN_CLICKED(IDC_CLOCK_BACKWARD, OnClockBackward)
+ ON_BN_CLICKED(IDC_CLOCK_PAUSE, OnClockPause)
+ ON_BN_CLICKED(IDC_CLOCK_START, OnClockStart)
+ ON_BN_CLICKED(IDC_CLOCK_FORWARD, OnClockForward)
+ ON_BN_CLICKED(IDC_CLOCK_FAST_FORWARD, OnClockFastForward)
+ ON_WM_SYSCOMMAND()
+ ON_BN_CLICKED(IDC_CLOCK_RATE, OnClockRate)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -139,14 +138,13 @@ BOOL CTestDlg::OnInitDialog() << item ( IDC_TEXT, GREEDY )
<< ( pane( HORIZONTAL, ABSOLUTE_VERT )
<< item( paneNull, GREEDY )
- << item( IDC_SLIDER0, NORESIZE )
- << item( IDC_SLIDER1, NORESIZE )
- << item( IDC_SLIDER2, NORESIZE )
- << item( IDC_SLIDER3, NORESIZE )
- << item( IDC_SLIDER4, NORESIZE )
- << item( IDC_SLIDER5, NORESIZE )
- << item( IDC_SLIDER6, NORESIZE )
- << item( IDC_SLIDER7, NORESIZE )
+ << item( IDC_CLOCK_FAST_BACKWARD, NORESIZE )
+ << item( IDC_CLOCK_BACKWARD, NORESIZE )
+ << item( IDC_CLOCK_PAUSE, NORESIZE )
+ << item( IDC_CLOCK_START, NORESIZE )
+ << item( IDC_CLOCK_RATE, NORESIZE )
+ << item( IDC_CLOCK_FORWARD, NORESIZE )
+ << item( IDC_CLOCK_FAST_FORWARD, NORESIZE )
<< item( paneNull, GREEDY )
)
<< ( pane( HORIZONTAL, ABSOLUTE_VERT )
@@ -164,23 +162,6 @@ BOOL CTestDlg::OnInitDialog() // extra initialization here
m_text.SubclassDlgItem (IDC_TEXT, this);
- m_slider0.SetRange( 0, 127);
- m_slider1.SetRange( 0, 127);
- m_slider2.SetRange( 0, 127);
- m_slider3.SetRange( 0, 127);
- m_slider4.SetRange( 0, 127);
- m_slider5.SetRange( 0, 127);
- m_slider6.SetRange( 0, 127);
- m_slider7.SetRange( 0, 127);
-
- m_slider0.SetWindowText( TEXT("MIDICS10:fader0 value=") );
- m_slider1.SetWindowText( TEXT("MIDICS10:fader1 value=") );
- m_slider2.SetWindowText( TEXT("MIDICS10:fader2 value=") );
- m_slider3.SetWindowText( TEXT("MIDICS10:fader3 value=") );
- m_slider4.SetWindowText( TEXT("MIDICS10:fader4 value=") );
- m_slider5.SetWindowText( TEXT("MIDICS10:fader5 value=") );
- m_slider6.SetWindowText( TEXT("MIDICS10:fader6 value=") );
- m_slider7.SetWindowText( TEXT("MIDICS10:fader7 value=") );
// parse command Line Info
TestParseCmdLine cmd;
@@ -191,8 +172,6 @@ BOOL CTestDlg::OnInitDialog() bus = new Ivy( "TEST NT","TEST NT READY",this,FALSE);
- bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
- bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
// bus->BindMsg("(.*)", BUS_CALLBACK_OF(CTestDlg, IvyCallback ));
//bus->BindMsg("^S( A=([0-9]+))?( B=([0-9]+))?",cb);
@@ -254,46 +233,6 @@ void CTestDlg::IvyCallback(IvyApplication *app, int argc, const char **argv) }
-void CTestDlg::FaderCallback(IvyApplication *app, int argc, const char **argv)
-{
-int fader;
-int value;
-if ( argc != 2 )
- {
- TRACE(TEXT("bad Fader call back\n"));
- return;
- }
- fader = atoi( argv[0] );
- value = atoi( argv[1] );
- switch ( fader ) {
- case 0:
- m_slider0.SetPos( value );
- break;
- case 1:
- m_slider1.SetPos( value );
- break;
- case 2:
- m_slider2.SetPos( value );
- break;
- case 3:
- m_slider3.SetPos( value );
- break;
- case 4:
- m_slider4.SetPos( value );
- break;
- case 5:
- m_slider5.SetPos( value );
- break;
- case 6:
- m_slider6.SetPos( value );
- break;
- case 7:
- m_slider7.SetPos( value );
- break;
-}
-//UpdateData(FALSE);
-
-}
void CTestDlg::OnDirectMessage(IvyApplication *app, int id, const char *arg)
{
@@ -359,3 +298,52 @@ void CTestDlg::OnBind() WriteMessage( "Binding to %s", CONVSTR(buffer) );
m_expr.Clear();
}
+
+void CTestDlg::OnClockFastBackward()
+{
+ CString buffer = "SetClock Rate=-9.0" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockBackward()
+{
+ CString buffer = "SetClock Rate=-1.0" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockPause()
+{
+ CString buffer = "ClockPause" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockStart()
+{
+ CString buffer = "ClockStart" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockForward()
+{
+ CString buffer = "SetClock Rate=9.0" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockFastForward()
+{
+ CString buffer = "SetClock Rate=100.0" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
+
+void CTestDlg::OnClockRate()
+{
+ CString buffer = "SetClock Rate=1.0" ;
+ int count = bus->SendMsg( CONVSTR(buffer) );
+ WriteMessage( "Sending %d message %s",count,CONVSTR(buffer) );
+}
|