From: <pst...@us...> - 2008-04-06 02:21:00
|
Revision: 410 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=410&view=rev Author: pstieber Date: 2008-04-05 19:20:52 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Renamed the dialogs directory to a temporary name. I just want to change the case of the directory name, but since some OSs are case insensitive (Windows) I have to do this in two steps. Added Paths: ----------- trunk/jazz/src/DialogsTemporary/ trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.cpp trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.h trunk/jazz/src/DialogsTemporary/copyDialog.cpp trunk/jazz/src/DialogsTemporary/copyDialog.h trunk/jazz/src/DialogsTemporary/copyright.cpp trunk/jazz/src/DialogsTemporary/copyright.h trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp trunk/jazz/src/DialogsTemporary/metronomeSettings.h trunk/jazz/src/DialogsTemporary/midiDelay.xrc trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp trunk/jazz/src/DialogsTemporary/midiThruDialog.h trunk/jazz/src/DialogsTemporary/midiTiming.cpp trunk/jazz/src/DialogsTemporary/midiTiming.h trunk/jazz/src/DialogsTemporary/sequenceLength.xrc trunk/jazz/src/DialogsTemporary/songSettings.cpp trunk/jazz/src/DialogsTemporary/songSettings.h trunk/jazz/src/DialogsTemporary/synthSettings.cpp trunk/jazz/src/DialogsTemporary/synthSettings.h trunk/jazz/src/DialogsTemporary/velocity.xrc trunk/jazz/src/DialogsTemporary/windowSettings.xrc Removed Paths: ------------- trunk/jazz/src/DialogsTemporary/copyDialog.cpp trunk/jazz/src/DialogsTemporary/copyDialog.h trunk/jazz/src/DialogsTemporary/copyright.cpp trunk/jazz/src/DialogsTemporary/copyright.h trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp trunk/jazz/src/DialogsTemporary/metronomeSettings.h trunk/jazz/src/DialogsTemporary/midiDelay.xrc trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp trunk/jazz/src/DialogsTemporary/midiThruDialog.h trunk/jazz/src/DialogsTemporary/midiTiming.cpp trunk/jazz/src/DialogsTemporary/midiTiming.h trunk/jazz/src/DialogsTemporary/sequenceLength.xrc trunk/jazz/src/DialogsTemporary/songSettings.cpp trunk/jazz/src/DialogsTemporary/songSettings.h trunk/jazz/src/DialogsTemporary/synthSettings.cpp trunk/jazz/src/DialogsTemporary/synthSettings.h trunk/jazz/src/DialogsTemporary/velocity.xrc trunk/jazz/src/DialogsTemporary/windowSettings.xrc trunk/jazz/src/dialogs/ Copied: trunk/jazz/src/DialogsTemporary (from rev 401, trunk/jazz/src/dialogs) Copied: trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.cpp (from rev 409, trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp) =================================================================== --- trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.cpp (rev 0) +++ trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,110 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 Peter J. Stieber, all rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +//***************************************************************************** + +#include "WxWidgets.h" + +#include "MetronomeSettingsDialog.h" + +#include "../Metronome.h" +#include "../Knob.h" + +using namespace std; + +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZMetronomeSettingsDialog::JZMetronomeSettingsDialog(wxWindow* pParent) + : wxDialog(pParent, wxID_ANY, wxString("Metronome Settings")), + mpSynthesizerListbox(0), + mpStartListbox(0) +{ + JZKnob* pKnob = new JZKnob(this, wxID_ANY, 100, 0, 128); + + mpSynthesizerListbox = new wxListBox(this, wxID_ANY); + + int Selection = 0; + int Index = 0; + for ( + vector<pair<string, int> >::const_iterator iPair = gSynthesizerTypes.begin(); + iPair != gSynthesizerTypes.end(); + ++iPair, ++Index) + { + mpSynthesizerListbox->Append(iPair->first.c_str()); + if (strcmp(iPair->first.c_str(), gpConfig->StrValue(C_SynthType)) == 0) + { + Selection = Index; + } + } + mpSynthesizerListbox->SetSelection(Selection); + + mpStartListbox = new wxListBox(this, wxID_ANY); + + mpStartListbox->Append("Never"); + mpStartListbox->Append("Song Start"); + mpStartListbox->Append("Start Play"); + + mpStartListbox->SetSelection(gpConfig->GetValue(C_SendSynthReset)); + + wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK"); + wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel"); + wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help"); + pOkButton->SetDefault(); + + wxBoxSizer* pTopSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* pListControlSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL); + + wxBoxSizer* pLeftSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* pRightSizer = new wxBoxSizer(wxVERTICAL); + + pLeftSizer->Add(pKnob, 0, wxALL, 2); + + pLeftSizer->Add( + new wxStaticText(this, wxID_ANY, "Synthesizer Type"), + 0, + wxALL, + 2); + pLeftSizer->Add(mpSynthesizerListbox, 0, wxGROW | wxALL, 2); + + pRightSizer->Add( + new wxStaticText(this, wxID_ANY, "Send MIDI Reset"), + 0, + wxALL, + 2); + pRightSizer->Add(mpStartListbox, 0, wxALL, 2); + + pListControlSizer->Add(pLeftSizer, 0, wxALL, 3); + pListControlSizer->Add(pRightSizer, 0, wxALL, 3); + + pTopSizer->Add(pListControlSizer, 0, wxCENTER); + + pButtonSizer->Add(pOkButton, 0, wxALL, 5); + pButtonSizer->Add(pCancelButton, 0, wxALL, 5); + pButtonSizer->Add(pHelpButton, 0, wxALL, 5); + + pTopSizer->Add(pButtonSizer, 0, wxALIGN_CENTER | wxBOTTOM, 6); + + SetAutoLayout(true); + SetSizer(pTopSizer); + + pTopSizer->SetSizeHints(this); + pTopSizer->Fit(this); +} Copied: trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.h (from rev 409, trunk/jazz/src/dialogs/MetronomeSettingsDialog.h) =================================================================== --- trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.h (rev 0) +++ trunk/jazz/src/DialogsTemporary/MetronomeSettingsDialog.h 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,45 @@ +//***************************************************************************** +// The JAZZ++ Midi Sequencer +// +// Copyright (C) 2008 Peter J. Stieber, all rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +//***************************************************************************** + +#ifndef JZ_METRONOMESETTINGDIALOG_H +#define JZ_METRONOMESETTINGDIALOG_H + +class JZMetronomeInfo; + +//***************************************************************************** +//***************************************************************************** +class JZMetronomeSettingsDialog : public wxDialog +{ + public: + + JZMetronomeSettingsDialog( + wxWindow* pParent, + JZMetronomeInfo& MetronomeInfo); + + private: + + JZMetronomeInfo& mMetronomeInfo; + + wxListBox* mpSynthesizerListbox; + + wxListBox* mpStartListbox; +}; + +#endif // !defined(JZ_METRONOMESETTINGDIALOG_H) Deleted: trunk/jazz/src/DialogsTemporary/copyDialog.cpp =================================================================== --- trunk/jazz/src/dialogs/copyDialog.cpp 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/copyDialog.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -1,43 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#include "copyDialog.h" - -#ifndef __PORTING - -void tCopyDlg::OnHelp() -{ - HelpInstance->ShowTopic("Replicate"); -} - - -void tCopyDlg::EditForm(wxPanel *panel) -{ - Add(wxMakeFormBool("Erase Destin", &cp->EraseDestin)); - Add(wxMakeFormBool("Repeat Copy", &cp->RepeatCopy)); - Add(wxMakeFormNewLine()); - Add(wxMakeFormBool("Erase Source", &cp->EraseSource)); - Add(wxMakeFormBool("Insert Space", &cp->InsertSpace)); - AssociatePanel(panel); -} - -#endif // Porting Copied: trunk/jazz/src/DialogsTemporary/copyDialog.cpp (from rev 409, trunk/jazz/src/dialogs/copyDialog.cpp) =================================================================== --- trunk/jazz/src/DialogsTemporary/copyDialog.cpp (rev 0) +++ trunk/jazz/src/DialogsTemporary/copyDialog.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,43 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#include "copyDialog.h" + +#ifndef __PORTING + +void tCopyDlg::OnHelp() +{ + HelpInstance->ShowTopic("Replicate"); +} + + +void tCopyDlg::EditForm(wxPanel *panel) +{ + Add(wxMakeFormBool("Erase Destin", &cp->EraseDestin)); + Add(wxMakeFormBool("Repeat Copy", &cp->RepeatCopy)); + Add(wxMakeFormNewLine()); + Add(wxMakeFormBool("Erase Source", &cp->EraseSource)); + Add(wxMakeFormBool("Insert Space", &cp->InsertSpace)); + AssociatePanel(panel); +} + +#endif // Porting Deleted: trunk/jazz/src/DialogsTemporary/copyDialog.h =================================================================== --- trunk/jazz/src/dialogs/copyDialog.h 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/copyDialog.h 2008-04-06 02:20:52 UTC (rev 410) @@ -1,46 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#ifndef COPYDIALOG -#define COPYDIALOG - -#include "../commands/copyCommand.h" - -#ifndef __PORTING - -class tCopyDlg : public wxForm -{ - tCopyCommand *cp; - - public: - tCopyDlg(tCopyCommand *c) - : wxForm( USED_WXFORM_BUTTONS ) { cp = c; } - void OnOk() { cp->OnOk(); wxForm::OnOk(); } - void OnCancel() { cp->OnCancel(); wxForm::OnCancel(); } - void OnHelp(); - void EditForm(wxPanel *panel); -}; - -#endif // Porting - -#endif // COPYDIALOG - Copied: trunk/jazz/src/DialogsTemporary/copyDialog.h (from rev 409, trunk/jazz/src/dialogs/copyDialog.h) =================================================================== --- trunk/jazz/src/DialogsTemporary/copyDialog.h (rev 0) +++ trunk/jazz/src/DialogsTemporary/copyDialog.h 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,46 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#ifndef COPYDIALOG +#define COPYDIALOG + +#include "../commands/copyCommand.h" + +#ifndef __PORTING + +class tCopyDlg : public wxForm +{ + tCopyCommand *cp; + + public: + tCopyDlg(tCopyCommand *c) + : wxForm( USED_WXFORM_BUTTONS ) { cp = c; } + void OnOk() { cp->OnOk(); wxForm::OnOk(); } + void OnCancel() { cp->OnCancel(); wxForm::OnCancel(); } + void OnHelp(); + void EditForm(wxPanel *panel); +}; + +#endif // Porting + +#endif // COPYDIALOG + Deleted: trunk/jazz/src/DialogsTemporary/copyright.cpp =================================================================== --- trunk/jazz/src/dialogs/copyright.cpp 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/copyright.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -1,59 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#include "copyright.h" -#include "song.h" - -//////////////////////////////////////////////////////////////////////////////// -// ****************************************************************** -// Copyright dialog -// ****************************************************************** - -tCopyrightDlg::tCopyrightDlg(tSong* song):tPropertyListDlg("Music Copyright") -{ - this->song=song; -} - -void tCopyrightDlg::AddProperties() -{ - copyrightProp=new wxProperty("Copyright notice","string","string"); - char *cs = song->GetTrack(0)->GetCopyright(); - - - if ( cs && strlen(cs) ) - { - String = copystring( cs ); - } - else - { - String = copystring( "Copyright (C) <year> <owner>" ); - } - - copyrightProp->SetValue(wxPropertyValue(String)); - sheet->AddProperty(copyrightProp); - } - -bool tCopyrightDlg::OnClose(){ - song->GetTrack(0)->SetCopyright(copyrightProp->GetValue().StringValue() ); - return FALSE; -} - Copied: trunk/jazz/src/DialogsTemporary/copyright.cpp (from rev 409, trunk/jazz/src/dialogs/copyright.cpp) =================================================================== --- trunk/jazz/src/DialogsTemporary/copyright.cpp (rev 0) +++ trunk/jazz/src/DialogsTemporary/copyright.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,59 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#include "copyright.h" +#include "song.h" + +//////////////////////////////////////////////////////////////////////////////// +// ****************************************************************** +// Copyright dialog +// ****************************************************************** + +tCopyrightDlg::tCopyrightDlg(tSong* song):tPropertyListDlg("Music Copyright") +{ + this->song=song; +} + +void tCopyrightDlg::AddProperties() +{ + copyrightProp=new wxProperty("Copyright notice","string","string"); + char *cs = song->GetTrack(0)->GetCopyright(); + + + if ( cs && strlen(cs) ) + { + String = copystring( cs ); + } + else + { + String = copystring( "Copyright (C) <year> <owner>" ); + } + + copyrightProp->SetValue(wxPropertyValue(String)); + sheet->AddProperty(copyrightProp); + } + +bool tCopyrightDlg::OnClose(){ + song->GetTrack(0)->SetCopyright(copyrightProp->GetValue().StringValue() ); + return FALSE; +} + Deleted: trunk/jazz/src/DialogsTemporary/copyright.h =================================================================== --- trunk/jazz/src/dialogs/copyright.h 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/copyright.h 2008-04-06 02:20:52 UTC (rev 410) @@ -1,42 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#ifndef COPYRIGHTDIALOG -#define COPYRIGHTDIALOG - -#include "proplistdlg.h" - -/** new tCopyrightDlg using new baseclass tPropertyListDlg*/ -class tCopyrightDlg : public tPropertyListDlg -{ -public: - tCopyrightDlg(tSong* song); - virtual void AddProperties(); - virtual bool OnClose(); - -protected: - tSong* song; - wxProperty* copyrightProp; - char* String; -}; - -#endif //COPYRIGHTDIALOG Copied: trunk/jazz/src/DialogsTemporary/copyright.h (from rev 409, trunk/jazz/src/dialogs/copyright.h) =================================================================== --- trunk/jazz/src/DialogsTemporary/copyright.h (rev 0) +++ trunk/jazz/src/DialogsTemporary/copyright.h 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,42 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#ifndef COPYRIGHTDIALOG +#define COPYRIGHTDIALOG + +#include "proplistdlg.h" + +/** new tCopyrightDlg using new baseclass tPropertyListDlg*/ +class tCopyrightDlg : public tPropertyListDlg +{ +public: + tCopyrightDlg(tSong* song); + virtual void AddProperties(); + virtual bool OnClose(); + +protected: + tSong* song; + wxProperty* copyrightProp; + char* String; +}; + +#endif //COPYRIGHTDIALOG Deleted: trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp =================================================================== --- trunk/jazz/src/dialogs/metronomeSettings.cpp 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -1,129 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#include "metronomeSettings.h" - -#ifndef __PORTING - - -tMetronomeSettingsDlg::tMetronomeSettingsDlg(tEventWin *w) -: wxForm( USED_WXFORM_BUTTONS ) -{ - EventWin = w; - IsAccented = ((tTrackWin*)EventWin)->MetronomeInfo.IsAccented; - KeyAcc = ((tTrackWin*)EventWin)->MetronomeInfo.KeyAcc; - KeyNorm = ((tTrackWin*)EventWin)->MetronomeInfo.KeyNorm; - Veloc = ((tTrackWin*)EventWin)->MetronomeInfo.Veloc; - - numNames = 0; - for (int i = 0; Config.DrumName(i).Name; i++) - { - if (Config.DrumName(i).Name[0]) - { - index2Pitch[numNames] = Config.DrumName(i).Value - 1; - pitch2Index[Config.DrumName(i).Value - 1] = numNames; - index2Name[numNames++] = Config.DrumName(i).Name; - } - } - KeyAccName = copystring( index2Name[ pitch2Index[ KeyAcc ] ] ); - KeyNormName = copystring( index2Name[ pitch2Index[ KeyNorm ] ] ); -} - - -void tMetronomeSettingsDlg::OnHelp() -{ - HelpInstance->ShowTopic("Metronome Settings"); -} - - -void tMetronomeSettingsDlg::OnCancel() -{ - EventWin->DialogBox = 0; - wxForm::OnCancel(); -} - - -void tMetronomeSettingsDlg::OnOk() -{ - ((tTrackWin*)EventWin)->MetronomeInfo.IsAccented = IsAccented; - int i; - for (i = 0; i < numNames; i++) - { - if ( !strcmp(index2Name[i], KeyNormName) ) - break; - } - if (i < numNames) - ((tTrackWin*)EventWin)->MetronomeInfo.KeyNorm = index2Pitch[i]; - for (i = 0; i < numNames; i++) - { - if (!strcmp( index2Name[i], KeyAccName ) ) - break; - } - if (i < numNames) - ((tTrackWin*)EventWin)->MetronomeInfo.KeyAcc = index2Pitch[i]; - ((tTrackWin*)EventWin)->MetronomeInfo.Veloc = Veloc; - EventWin->Redraw(); - EventWin->DialogBox = 0; - wxForm::OnOk(); -} - - - -void tMetronomeSettingsDlg::EditForm(wxPanel *panel) -{ - Add(wxMakeFormBool( "Accented", &IsAccented )); - Add(wxMakeFormNewLine()); - Add(wxMakeFormShort( " Velocity:", &Veloc, wxFORM_DEFAULT, - new wxList(wxMakeConstraintRange(0.0, 127.0), 0))); - Add(wxMakeFormNewLine()); - Add(wxMakeFormString( "Normal click:", - &KeyNormName, - wxFORM_DEFAULT, - new wxList(wxMakeConstraintStrings( - index2Name[ pitch2Index[ 37 ] ], - index2Name[ pitch2Index[ 42 ] ], - index2Name[ pitch2Index[ 56 ] ], - 0 ), 0), - NULL, - wxVERTICAL - ) - ); - Add(wxMakeFormNewLine()); - Add(wxMakeFormString( "Accented click:", - &KeyAccName, - wxFORM_DEFAULT, - new wxList(wxMakeConstraintStrings( - index2Name[ pitch2Index[ 36 ] ], - index2Name[ pitch2Index[ 38 ] ], - index2Name[ pitch2Index[ 54 ] ], - 0 ), 0), - NULL, - wxVERTICAL - ) - ); - AssociatePanel(panel); -} - - - -#endif // Porting - Copied: trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp (from rev 409, trunk/jazz/src/dialogs/metronomeSettings.cpp) =================================================================== --- trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp (rev 0) +++ trunk/jazz/src/DialogsTemporary/metronomeSettings.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,129 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#include "metronomeSettings.h" + +#ifndef __PORTING + + +tMetronomeSettingsDlg::tMetronomeSettingsDlg(tEventWin *w) +: wxForm( USED_WXFORM_BUTTONS ) +{ + EventWin = w; + IsAccented = ((tTrackWin*)EventWin)->MetronomeInfo.IsAccented; + KeyAcc = ((tTrackWin*)EventWin)->MetronomeInfo.KeyAcc; + KeyNorm = ((tTrackWin*)EventWin)->MetronomeInfo.KeyNorm; + Veloc = ((tTrackWin*)EventWin)->MetronomeInfo.Veloc; + + numNames = 0; + for (int i = 0; Config.DrumName(i).Name; i++) + { + if (Config.DrumName(i).Name[0]) + { + index2Pitch[numNames] = Config.DrumName(i).Value - 1; + pitch2Index[Config.DrumName(i).Value - 1] = numNames; + index2Name[numNames++] = Config.DrumName(i).Name; + } + } + KeyAccName = copystring( index2Name[ pitch2Index[ KeyAcc ] ] ); + KeyNormName = copystring( index2Name[ pitch2Index[ KeyNorm ] ] ); +} + + +void tMetronomeSettingsDlg::OnHelp() +{ + HelpInstance->ShowTopic("Metronome Settings"); +} + + +void tMetronomeSettingsDlg::OnCancel() +{ + EventWin->DialogBox = 0; + wxForm::OnCancel(); +} + + +void tMetronomeSettingsDlg::OnOk() +{ + ((tTrackWin*)EventWin)->MetronomeInfo.IsAccented = IsAccented; + int i; + for (i = 0; i < numNames; i++) + { + if ( !strcmp(index2Name[i], KeyNormName) ) + break; + } + if (i < numNames) + ((tTrackWin*)EventWin)->MetronomeInfo.KeyNorm = index2Pitch[i]; + for (i = 0; i < numNames; i++) + { + if (!strcmp( index2Name[i], KeyAccName ) ) + break; + } + if (i < numNames) + ((tTrackWin*)EventWin)->MetronomeInfo.KeyAcc = index2Pitch[i]; + ((tTrackWin*)EventWin)->MetronomeInfo.Veloc = Veloc; + EventWin->Redraw(); + EventWin->DialogBox = 0; + wxForm::OnOk(); +} + + + +void tMetronomeSettingsDlg::EditForm(wxPanel *panel) +{ + Add(wxMakeFormBool( "Accented", &IsAccented )); + Add(wxMakeFormNewLine()); + Add(wxMakeFormShort( " Velocity:", &Veloc, wxFORM_DEFAULT, + new wxList(wxMakeConstraintRange(0.0, 127.0), 0))); + Add(wxMakeFormNewLine()); + Add(wxMakeFormString( "Normal click:", + &KeyNormName, + wxFORM_DEFAULT, + new wxList(wxMakeConstraintStrings( + index2Name[ pitch2Index[ 37 ] ], + index2Name[ pitch2Index[ 42 ] ], + index2Name[ pitch2Index[ 56 ] ], + 0 ), 0), + NULL, + wxVERTICAL + ) + ); + Add(wxMakeFormNewLine()); + Add(wxMakeFormString( "Accented click:", + &KeyAccName, + wxFORM_DEFAULT, + new wxList(wxMakeConstraintStrings( + index2Name[ pitch2Index[ 36 ] ], + index2Name[ pitch2Index[ 38 ] ], + index2Name[ pitch2Index[ 54 ] ], + 0 ), 0), + NULL, + wxVERTICAL + ) + ); + AssociatePanel(panel); +} + + + +#endif // Porting + Deleted: trunk/jazz/src/DialogsTemporary/metronomeSettings.h =================================================================== --- trunk/jazz/src/dialogs/metronomeSettings.h 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/metronomeSettings.h 2008-04-06 02:20:52 UTC (rev 410) @@ -1,61 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#ifndef METRONOMESETTINGS -#define METRONOMESETTINGS - -#include "../eventwin.h" -#include "../trackwin.h" - -#ifndef __PORTING - -// ****************************************************************** -// Metronome-Settings Dialog -// ****************************************************************** - -class tMetronomeSettingsDlg : public wxForm -{ - public: - tEventWin *EventWin; - int IsAccented; - int KeyAcc; - int KeyNorm; - int Veloc; - - char *index2Name[130]; - int index2Pitch[130]; - int pitch2Index[130]; - int numNames; - char *KeyAccName; - char *KeyNormName; - - tMetronomeSettingsDlg(tEventWin *w); - void EditForm(wxPanel *panel); - virtual void OnOk(); - virtual void OnCancel(); - virtual void OnHelp(); -}; - -#endif // Porting - -#endif // MetronomeSettings - Copied: trunk/jazz/src/DialogsTemporary/metronomeSettings.h (from rev 409, trunk/jazz/src/dialogs/metronomeSettings.h) =================================================================== --- trunk/jazz/src/DialogsTemporary/metronomeSettings.h (rev 0) +++ trunk/jazz/src/DialogsTemporary/metronomeSettings.h 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,61 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#ifndef METRONOMESETTINGS +#define METRONOMESETTINGS + +#include "../eventwin.h" +#include "../trackwin.h" + +#ifndef __PORTING + +// ****************************************************************** +// Metronome-Settings Dialog +// ****************************************************************** + +class tMetronomeSettingsDlg : public wxForm +{ + public: + tEventWin *EventWin; + int IsAccented; + int KeyAcc; + int KeyNorm; + int Veloc; + + char *index2Name[130]; + int index2Pitch[130]; + int pitch2Index[130]; + int numNames; + char *KeyAccName; + char *KeyNormName; + + tMetronomeSettingsDlg(tEventWin *w); + void EditForm(wxPanel *panel); + virtual void OnOk(); + virtual void OnCancel(); + virtual void OnHelp(); +}; + +#endif // Porting + +#endif // MetronomeSettings + Deleted: trunk/jazz/src/DialogsTemporary/midiDelay.xrc =================================================================== --- trunk/jazz/src/dialogs/midiDelay.xrc 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/midiDelay.xrc 2008-04-06 02:20:52 UTC (rev 410) @@ -1,123 +0,0 @@ -<?xml version="1.0" ?> -<resource> - <object class="wxDialog" name="midiDelay"> - <title>Midi Delay</title> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxVERTICAL</orient> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>MIDI Delay</label> - <font> - <size>12</size> - <style>default</style> - <weight>bold</weight> - <family>normal</family> - <underlined>0</underlined> - </font> - </object> - </object> - <object class="sizeritem"> - <object class="wxStaticText"> - <label>The Midi Delay allows you to simulate an echo -by copying a set of events repeatedly and -scale the velocity for each repeat. - -The delay can also be used unorthodoxly to just -generate a number of copies(with scale=100), -and to generate weird effects -(with negative clock values, or scale > 100) -</label> - </object> - </object> - <object class="sizeritem"> - <object class="wxFlexGridSizer"> - <cols>2</cols> - <rows>3</rows> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Repeats</label> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxSlider" name="repeat"> - <value></value> - <min></min> - <max>100</max> - <size>100,10</size> - <style>wxSL_AUTOTICKS|wxSL_LABELS</style> - <tooltip>How many times the selected events should be repeated</tooltip> - </object> - <flag>wxLEFT</flag> - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Scale</label> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxSlider" name="scale"> - <value></value> - <min></min> - <max>100</max> - <tooltip>The velocity scaling factor in percent for each repetition</tooltip> - <size>100,10</size> - <style>wxSL_AUTOTICKS|wxSL_LABELS</style> - </object> - <flag>wxLEFT</flag> - <border>10</border> - </object> - <object class="sizeritem"> - <object class="wxStaticText" name=""> - <label>Delay in Clocks</label> - </object> - <flag>wxALIGN_CENTRE_VERTICAL</flag> - </object> - <object class="sizeritem"> - <object class="wxSlider" name="clockDelay"> - <value></value> - <min></min> - <max>100</max> - <size>100,10</size> - <tooltip>How many clock ticks each new repetition should be moved</tooltip> - <style>wxSL_AUTOTICKS|wxSL_LABELS</style> - </object> - <flag>wxLEFT</flag> - <border>10</border> - </object> - </object> - </object> - <object class="sizeritem"> - <object class="wxBoxSizer"> - <orient>wxHORIZONTAL</orient> - <object class="sizeritem"> - <object class="wxButton" name="wxID_OK"> - <label>OK</label> - <default>1</default> - </object> - <flag>wxALL</flag> - <border>5</border> - </object> - <object class="sizeritem"> - <object class="wxButton" name="wxID_CANCEL"> - <label>Cancel</label> - </object> - <flag>wxALL</flag> - <border>5</border> - </object> - </object> - <flag>wxTOP</flag> - <border>20</border> - </object> - </object> - <flag>wxALL</flag> - <border>15</border> - </object> - </object> - </object> -</resource> Copied: trunk/jazz/src/DialogsTemporary/midiDelay.xrc (from rev 409, trunk/jazz/src/dialogs/midiDelay.xrc) =================================================================== --- trunk/jazz/src/DialogsTemporary/midiDelay.xrc (rev 0) +++ trunk/jazz/src/DialogsTemporary/midiDelay.xrc 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,123 @@ +<?xml version="1.0" ?> +<resource> + <object class="wxDialog" name="midiDelay"> + <title>Midi Delay</title> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxVERTICAL</orient> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>MIDI Delay</label> + <font> + <size>12</size> + <style>default</style> + <weight>bold</weight> + <family>normal</family> + <underlined>0</underlined> + </font> + </object> + </object> + <object class="sizeritem"> + <object class="wxStaticText"> + <label>The Midi Delay allows you to simulate an echo +by copying a set of events repeatedly and +scale the velocity for each repeat. + +The delay can also be used unorthodoxly to just +generate a number of copies(with scale=100), +and to generate weird effects +(with negative clock values, or scale > 100) +</label> + </object> + </object> + <object class="sizeritem"> + <object class="wxFlexGridSizer"> + <cols>2</cols> + <rows>3</rows> + <object class="sizeritem"> + <object class="wxStaticText" name=""> + <label>Repeats</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxSlider" name="repeat"> + <value></value> + <min></min> + <max>100</max> + <size>100,10</size> + <style>wxSL_AUTOTICKS|wxSL_LABELS</style> + <tooltip>How many times the selected events should be repeated</tooltip> + </object> + <flag>wxLEFT</flag> + <border>10</border> + </object> + <object class="sizeritem"> + <object class="wxStaticText" name=""> + <label>Scale</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxSlider" name="scale"> + <value></value> + <min></min> + <max>100</max> + <tooltip>The velocity scaling factor in percent for each repetition</tooltip> + <size>100,10</size> + <style>wxSL_AUTOTICKS|wxSL_LABELS</style> + </object> + <flag>wxLEFT</flag> + <border>10</border> + </object> + <object class="sizeritem"> + <object class="wxStaticText" name=""> + <label>Delay in Clocks</label> + </object> + <flag>wxALIGN_CENTRE_VERTICAL</flag> + </object> + <object class="sizeritem"> + <object class="wxSlider" name="clockDelay"> + <value></value> + <min></min> + <max>100</max> + <size>100,10</size> + <tooltip>How many clock ticks each new repetition should be moved</tooltip> + <style>wxSL_AUTOTICKS|wxSL_LABELS</style> + </object> + <flag>wxLEFT</flag> + <border>10</border> + </object> + </object> + </object> + <object class="sizeritem"> + <object class="wxBoxSizer"> + <orient>wxHORIZONTAL</orient> + <object class="sizeritem"> + <object class="wxButton" name="wxID_OK"> + <label>OK</label> + <default>1</default> + </object> + <flag>wxALL</flag> + <border>5</border> + </object> + <object class="sizeritem"> + <object class="wxButton" name="wxID_CANCEL"> + <label>Cancel</label> + </object> + <flag>wxALL</flag> + <border>5</border> + </object> + </object> + <flag>wxTOP</flag> + <border>20</border> + </object> + </object> + <flag>wxALL</flag> + <border>15</border> + </object> + </object> + </object> +</resource> Deleted: trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp =================================================================== --- trunk/jazz/src/dialogs/midiThruDialog.cpp 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -1,94 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#include "midiThruDialog.h" - -#ifndef __PORTING - -tMidiThruDlg::tMidiThruDlg(tEventWin *w) -: wxForm( USED_WXFORM_BUTTONS ), - InputDeviceChoice("Input Device", Midi->GetInputDevices().AsNamedValue(), &InputDevice), - OutputDeviceChoice("Output Device", Midi->GetOutputDevices().AsNamedValue(), &OutputDevice) -{ - EventWin = w; - InputDevice = Midi->GetThruInputDevice(); - OutputDevice = Midi->GetThruOutputDevice(); -} - - -void tMidiThruDlg::OnHelp() -{ - HelpInstance->ShowTopic("Midi Thru"); -} - - -void tMidiThruDlg::OnCancel() -{ - EventWin->DialogBox = 0; - wxForm::OnCancel(); -} - - -void tMidiThruDlg::OnOk() -{ - InputDeviceChoice.GetValue(); - OutputDeviceChoice.GetValue(); - Config(C_ThruInput) = InputDevice; - Config(C_ThruOutput) = OutputDevice; - Midi->SetSoftThru(Config(C_SoftThru), InputDevice, OutputDevice); - Midi->SetHardThru(Config(C_HardThru), InputDevice, OutputDevice); - EventWin->Redraw(); - EventWin->DialogBox = 0; - wxForm::OnOk(); -} - - - -void tMidiThruDlg::EditForm(wxPanel *panel) -{ - if (Midi->SupportsMultipleDevices()) { - Add(InputDeviceChoice.mkFormItem(300, 50)); - Add(wxMakeFormNewLine()); - Add(OutputDeviceChoice.mkFormItem(300, 50)); - Add(wxMakeFormNewLine()); - } -#ifdef wx_msw - Add(wxMakeFormBool( "Software MIDI thru", &Config(C_SoftThru) )); - Add(wxMakeFormNewLine()); -#else - int driver = Config(C_MidiDriver); - if (driver == C_DRV_OSS || driver == C_DRV_ALSA) - { - Add(wxMakeFormBool( "Software MIDI thru", &Config(C_SoftThru) )); - Add(wxMakeFormNewLine()); - } - else - { - Add(wxMakeFormBool( "Hardware MIDI thru", &Config(C_HardThru) )); - Add(wxMakeFormNewLine()); - } -#endif - AssociatePanel(panel); -} - -#endif //Porting - Copied: trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp (from rev 409, trunk/jazz/src/dialogs/midiThruDialog.cpp) =================================================================== --- trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp (rev 0) +++ trunk/jazz/src/DialogsTemporary/midiThruDialog.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,94 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#include "midiThruDialog.h" + +#ifndef __PORTING + +tMidiThruDlg::tMidiThruDlg(tEventWin *w) +: wxForm( USED_WXFORM_BUTTONS ), + InputDeviceChoice("Input Device", Midi->GetInputDevices().AsNamedValue(), &InputDevice), + OutputDeviceChoice("Output Device", Midi->GetOutputDevices().AsNamedValue(), &OutputDevice) +{ + EventWin = w; + InputDevice = Midi->GetThruInputDevice(); + OutputDevice = Midi->GetThruOutputDevice(); +} + + +void tMidiThruDlg::OnHelp() +{ + HelpInstance->ShowTopic("Midi Thru"); +} + + +void tMidiThruDlg::OnCancel() +{ + EventWin->DialogBox = 0; + wxForm::OnCancel(); +} + + +void tMidiThruDlg::OnOk() +{ + InputDeviceChoice.GetValue(); + OutputDeviceChoice.GetValue(); + Config(C_ThruInput) = InputDevice; + Config(C_ThruOutput) = OutputDevice; + Midi->SetSoftThru(Config(C_SoftThru), InputDevice, OutputDevice); + Midi->SetHardThru(Config(C_HardThru), InputDevice, OutputDevice); + EventWin->Redraw(); + EventWin->DialogBox = 0; + wxForm::OnOk(); +} + + + +void tMidiThruDlg::EditForm(wxPanel *panel) +{ + if (Midi->SupportsMultipleDevices()) { + Add(InputDeviceChoice.mkFormItem(300, 50)); + Add(wxMakeFormNewLine()); + Add(OutputDeviceChoice.mkFormItem(300, 50)); + Add(wxMakeFormNewLine()); + } +#ifdef wx_msw + Add(wxMakeFormBool( "Software MIDI thru", &Config(C_SoftThru) )); + Add(wxMakeFormNewLine()); +#else + int driver = Config(C_MidiDriver); + if (driver == C_DRV_OSS || driver == C_DRV_ALSA) + { + Add(wxMakeFormBool( "Software MIDI thru", &Config(C_SoftThru) )); + Add(wxMakeFormNewLine()); + } + else + { + Add(wxMakeFormBool( "Hardware MIDI thru", &Config(C_HardThru) )); + Add(wxMakeFormNewLine()); + } +#endif + AssociatePanel(panel); +} + +#endif //Porting + Deleted: trunk/jazz/src/DialogsTemporary/midiThruDialog.h =================================================================== --- trunk/jazz/src/dialogs/midiThruDialog.h 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/midiThruDialog.h 2008-04-06 02:20:52 UTC (rev 410) @@ -1,57 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#ifndef MIDITHRUDIALOG -#define MIDITHRUDIALOG - -#include "proplistdlg.h" -#include "../eventwin.h" -#include "../trackwin.h" - -#ifndef __PORTING - - -// ****************************************************************** -// Midi thru dialog -// ****************************************************************** - -class tMidiThruDlg : public wxForm -{ - public: - tEventWin *EventWin; - tMidiThruDlg(tEventWin *w); - void EditForm(wxPanel *panel); - virtual void OnOk(); - virtual void OnCancel(); - virtual void OnHelp(); - - tNamedChoice InputDeviceChoice; - tNamedChoice OutputDeviceChoice; - long InputDevice; - long OutputDevice; -}; - -#endif //Porting - -#endif // MIDITHRUDIALOG - - Copied: trunk/jazz/src/DialogsTemporary/midiThruDialog.h (from rev 409, trunk/jazz/src/dialogs/midiThruDialog.h) =================================================================== --- trunk/jazz/src/DialogsTemporary/midiThruDialog.h (rev 0) +++ trunk/jazz/src/DialogsTemporary/midiThruDialog.h 2008-04-06 02:20:52 UTC (rev 410) @@ -0,0 +1,57 @@ +/* +** Alacrity Midi Sequencer +** +** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. +** I don't know why it says "All Rights Reserved" and then is licensed GPL +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +** +*/ + +#ifndef MIDITHRUDIALOG +#define MIDITHRUDIALOG + +#include "proplistdlg.h" +#include "../eventwin.h" +#include "../trackwin.h" + +#ifndef __PORTING + + +// ****************************************************************** +// Midi thru dialog +// ****************************************************************** + +class tMidiThruDlg : public wxForm +{ + public: + tEventWin *EventWin; + tMidiThruDlg(tEventWin *w); + void EditForm(wxPanel *panel); + virtual void OnOk(); + virtual void OnCancel(); + virtual void OnHelp(); + + tNamedChoice InputDeviceChoice; + tNamedChoice OutputDeviceChoice; + long InputDevice; + long OutputDevice; +}; + +#endif //Porting + +#endif // MIDITHRUDIALOG + + Deleted: trunk/jazz/src/DialogsTemporary/midiTiming.cpp =================================================================== --- trunk/jazz/src/dialogs/midiTiming.cpp 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/src/DialogsTemporary/midiTiming.cpp 2008-04-06 02:20:52 UTC (rev 410) @@ -1,263 +0,0 @@ -/* -** Alacrity Midi Sequencer -** -** Some Code Copyright (C) 1994-2000 Andreas Voss and Per Sigmond, all rights reserved. -** I don't know why it says "All Rights Reserved" and then is licensed GPL -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -** -*/ - -#include "midiTiming.h" - -#ifndef __PORTING - -void tTimingDlg::OkFunc( tMidiButton& button, wxCommandEvent& event ) -{ - button.OnOk(); -} - -void tTimingDlg::CancelFunc( tMidiButton& button, wxCommandEvent& event ) -{ - button.OnCancel(); -} - -void tTimingDlg::HelpFunc( tMidiButton& button, wxCommandEvent& event ) -{ - button.OnHelp(); -} - -void tTimingDlg::MtcRecFunc( tMidiButton& button, wxCommandEvent& event ) -{ - if ( !strcmp( button.GetLabel(), "Start" ) ) - { - button.OnInitRec(); - button.SetLabel( "Freeze" ); - } - else - { - button.OnFreezeRec(); - button.SetLabel( "Start" ); - } -} - -void tTimingDlg::MtcInitRec() -{ -#ifdef wx_msw - if (Config(C_ClockSource) != CsMtc) - { - delete Midi; - Config(C_ClockSource) = CsMtc; - ClkSrcListBox->SetStringSelection( ClkSrcArray[ Config(C_ClockSource) ] ); - Midi = new tWinMtcPlayer(EventWin->Song); - if (!Midi->Installed()) - { - wxMessageBox("no midi driver installed", "Error", wxOK); - Midi = new tNullPlayer(EventWin->Song); - } - } -#endif - Midi->InitMtcRec(); -} - -void tTimingDlg::MtcFreezeRec() -{ - tMtcTime *offs = Midi->FreezeMtcRec(); - if (offs) - { - char str[80]; - offs->ToString( str ); - MtcTypeListBox->SetStringSelection( MtcTypeArray[ offs->type ] ); - delete offs; - MtcOffsetEntry->SetValue( str ); - } -} - -tTimingDlg::tTimingDlg(tEventWin *w) -: wxForm( USED_WXFORM_BUTTONS ) -{ - EventWin = w; - ClkSrcArray[CsInt] = "INTERNAL"; - ClkSrcArray[CsFsk] = "FSK"; - ClkSrcArray[CsMidi] = "SONG PTR"; - ClkSrcArray[CsMtc] = "MTC"; - MtcTypeArray[Mtc24] = "24 fm/sec"; - MtcTypeArray[Mtc25] = "25 fm/sec"; - MtcTypeArray[Mtc30Df] = "30 drop"; - MtcTypeArray[Mtc30Ndf] = "30 non-drop"; - ClkSrcListBox = 0; - MtcTypeListBox = 0; - RealTimeCheckBox = 0; - MtcOffsetEntry = 0; -} - -void tTimingDlg::CloseWindow() -{ - EventWin->DialogBox->Show( FALSE ); - delete EventWin->DialogBox; - EventWin->DialogBox = 0; - DELETE_THIS(); -} - - -void tTimingDlg::OnOk() -{ - int i; - char *str = copystring( ClkSrcListBox->GetStringSelection() ); - for (i = 0; i < 4; i++) { - if (!strcmp(str,ClkSrcArray[i])) { - break; - } - } - delete str; - if (i > 3) - i = CsInt; - - if (i != Config(C_ClockSource)) - { - Config(C_ClockSource) = (tClockSource) i; -#ifdef wx_msw - // Re-install the midi device - delete Midi; - - // create new player - switch (Config(C_ClockSource)) - { - case CsMidi: - Midi = new tWinMidiPlayer(EventWin->Song); - break; - case CsMtc: - Midi = new tWinMtcPlayer(EventWin->Song); - break; - case CsFsk: - case CsInt: - default: - Midi = new tWinAudioPlayer(EventWin->Song); - break; - } - if (!Midi->Installed()) - { - wxMessageBox("no midi driver installed", "Error", wxOK); - Midi = new tNullPlayer(EventWin->Song); - } -#endif - } - - tMtcType MtcType; - str = copystring( MtcTypeListBox->GetStringSelection() ); - for (i = 0; i < 4; i++) { - if (!strcmp(str,MtcTypeArray[i])) { - MtcType = (tMtcType) i; - break; - } - } - delete str; - if (i > 3) - MtcType = Mtc30Ndf; - tMtcTime *offs = new tMtcTime( MtcOffsetEntry->GetValue(), MtcType ); - EventWin->Song->GetTrack(0)->SetMtcOffset( offs ); - delete offs; - - Config(C_RealTimeOut) = RealTimeCheckBox->GetValue(); - EventWin->Redraw(); - CloseWindow(); -} - -void tTimingDlg::OnHelp() -{ - HelpInstance->ShowTopic("Timing"); -} - - - -void tTimingDlg::EditForm(wxPanel *panel) -{ - - (void) new tMidiButton( this, panel, (wxFunction) OkFunc, "Ok" ); - (void) new tMidiButton( this, panel, (wxFunction) CancelFunc, "Cancel" ); - (void) new tMidiButton( this, panel, (wxFunction) HelpFunc, "Help" ); - panel->NewLine(); - - panel->SetLabelPosition(wxVERTICAL); - ClkSrcListBox = new wxListBox( panel, - NULL, - "Clock Source", - wxSINGLE|wxALWAYS_SB, - -1, -1, -1, -1 ); - -#ifdef wx_msw - ClkSrcListBox->Append( ClkSrcArray[CsInt]... [truncated message content] |