You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
(58) |
Apr
(100) |
May
(92) |
Jun
(12) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(26) |
Dec
(29) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(31) |
Feb
(20) |
Mar
(1) |
Apr
|
May
(5) |
Jun
(10) |
Jul
|
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(36) |
May
(10) |
Jun
|
Jul
(38) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(56) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(13) |
Dec
(2) |
2013 |
Jan
(30) |
Feb
|
Mar
(43) |
Apr
(28) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(10) |
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pst...@us...> - 2008-04-06 18:52:29
|
Revision: 421 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=421&view=rev Author: pstieber Date: 2008-04-06 11:52:27 -0700 (Sun, 06 Apr 2008) Log Message: ----------- Removed obsolete metronome dialog. Removed Paths: ------------- trunk/jazz/src/Dialogs/metronomeSettings.cpp trunk/jazz/src/Dialogs/metronomeSettings.h Deleted: trunk/jazz/src/Dialogs/metronomeSettings.cpp =================================================================== --- trunk/jazz/src/Dialogs/metronomeSettings.cpp 2008-04-06 18:26:26 UTC (rev 420) +++ trunk/jazz/src/Dialogs/metronomeSettings.cpp 2008-04-06 18:52:27 UTC (rev 421) @@ -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 - Deleted: trunk/jazz/src/Dialogs/metronomeSettings.h =================================================================== --- trunk/jazz/src/Dialogs/metronomeSettings.h 2008-04-06 18:26:26 UTC (rev 420) +++ trunk/jazz/src/Dialogs/metronomeSettings.h 2008-04-06 18:52:27 UTC (rev 421) @@ -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 - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 18:26:28
|
Revision: 420 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=420&view=rev Author: pstieber Date: 2008-04-06 11:26:26 -0700 (Sun, 06 Apr 2008) Log Message: ----------- 1. Changed tHelp to JZHelp. 2. Removed the global help instance from Help.cpp/.h and placed it in the global modules. 2. Changed the metronome class and dialog so that it records changes. Modified Paths: -------------- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h trunk/jazz/src/Globals.cpp trunk/jazz/src/Globals.h trunk/jazz/src/GuitarFrame.cpp trunk/jazz/src/Help.cpp trunk/jazz/src/Help.h trunk/jazz/src/Metronome.cpp trunk/jazz/src/Metronome.h Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 18:26:26 UTC (rev 420) @@ -28,7 +28,7 @@ #include "../Knob.h" #include "../Resources.h" -#include <vector> +#include <iostream> #include <sstream> using namespace std; @@ -41,6 +41,8 @@ EVT_KNOB_CHANGED(IDC_KB_VOLUME, JZMetronomeSettingsDialog::OnVolumeChange) + EVT_BUTTON(wxID_HELP, JZMetronomeSettingsDialog::OnHelp) + END_EVENT_TABLE() //----------------------------------------------------------------------------- @@ -50,12 +52,42 @@ JZMetronomeInfo& MetronomeInfo) : wxDialog(pParent, wxID_ANY, wxString("Metronome Settings")), mMetronomeInfo(MetronomeInfo), + mIndexToName(), + mIndexToPitch(), + mPitchToIndex(), + mKeyNormalName(), + mKeyAccentedName(), mpVelocityKnob(0), mpVelocityValue(0), mpAccentedCheckBox(0), mpNormalListbox(0), mpAccentedListbox(0) { + int Index = 0; + const vector<pair<string, int> >& DrumNames = gpConfig->GetDrumNames(); + for ( + vector<pair<string, int> >::const_iterator iDrumName = DrumNames.begin(); + iDrumName != DrumNames.end(); + ++iDrumName) + { + const string& DrumName = iDrumName->first; + const int& Value = iDrumName->second; + + if (!DrumName.empty()) + { + mIndexToName.push_back(DrumName); + mIndexToPitch.push_back(Value - 1); + mPitchToIndex.insert(make_pair(Value - 1, Index++)); + } + } + + mKeyNormalName = + mIndexToName[mPitchToIndex[mMetronomeInfo.GetKeyNormal()]]; + + + mKeyAccentedName = + mIndexToName[mPitchToIndex[mMetronomeInfo.GetKeyAccented()]]; + mpVelocityKnob = new JZKnob(this, IDC_KB_VOLUME, 100, 0, 127); mpVelocityValue = new wxStaticText(this, wxID_ANY, "127"); @@ -64,29 +96,18 @@ mpNormalListbox = new wxListBox(this, wxID_ANY); - int Selection = 0; - int Index = 0; + mpAccentedListbox = new wxListBox(this, wxID_ANY); + for ( - vector<pair<string, int> >::const_iterator iPair = gSynthesizerTypes.begin(); - iPair != gSynthesizerTypes.end(); - ++iPair, ++Index) + vector<string>::const_iterator iName = mIndexToName.begin(); + iName != mIndexToName.end(); + ++iName) { - mpNormalListbox->Append(iPair->first.c_str()); - if (strcmp(iPair->first.c_str(), gpConfig->StrValue(C_SynthType)) == 0) - { - Selection = Index; - } + const string& DrumName = *iName; + mpNormalListbox->Append(DrumName.c_str()); + mpAccentedListbox->Append(DrumName.c_str()); } - mpNormalListbox->SetSelection(Selection); - mpAccentedListbox = new wxListBox(this, wxID_ANY); - - mpAccentedListbox->Append("Never"); - mpAccentedListbox->Append("Song Start"); - mpAccentedListbox->Append("Start Play"); - - mpAccentedListbox->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"); @@ -149,6 +170,41 @@ { mpVelocityKnob->SetValueWithEvent(mMetronomeInfo.GetVelocity()); mpAccentedCheckBox->SetValue(mMetronomeInfo.IsAccented()); + + int Selection, Index; + + Selection = 0; + Index = 0; + for ( + vector<string>::const_iterator iName = mIndexToName.begin(); + iName != mIndexToName.end(); + ++iName, ++Index) + { + const string& DrumName = *iName; + if (DrumName == mKeyNormalName) + { + Selection = Index; + break; + } + } + mpNormalListbox->SetSelection(Selection); + + Selection = 0; + Index = 0; + for ( + vector<string>::const_iterator iName = mIndexToName.begin(); + iName != mIndexToName.end(); + ++iName, ++Index) + { + const string& DrumName = *iName; + if (DrumName == mKeyAccentedName) + { + Selection = Index; + break; + } + } + mpAccentedListbox->SetSelection(Selection); + return true; } @@ -159,6 +215,21 @@ mMetronomeInfo.SetVelocity(static_cast<unsigned char>( mpVelocityKnob->GetValue())); mMetronomeInfo.SetIsAccented(mpAccentedCheckBox->GetValue()); + + int Selection; + + Selection = mpNormalListbox->GetSelection(); + if (Selection != wxNOT_FOUND) + { + mMetronomeInfo.SetKeyNormal(mIndexToPitch[Selection]); + } + + Selection = mpAccentedListbox->GetSelection(); + if (Selection != wxNOT_FOUND) + { + mMetronomeInfo.SetKeyAccented(mIndexToPitch[Selection]); + } + return true; } @@ -171,3 +242,10 @@ Oss << Value; mpVelocityValue->SetLabel(Oss.str().c_str()); } + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZMetronomeSettingsDialog::OnHelp(wxCommandEvent& Event) +{ +// gpHelpInstance->ShowTopic("Metronome Settings"); +} Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 18:26:26 UTC (rev 420) @@ -25,6 +25,10 @@ class JZKnob; class JZKnobEvent; +#include <vector> +#include <string> +#include <map> + //***************************************************************************** //***************************************************************************** class JZMetronomeSettingsDialog : public wxDialog @@ -43,10 +47,22 @@ void OnVolumeChange(JZKnobEvent& Event); + void OnHelp(wxCommandEvent& Event); + private: JZMetronomeInfo& mMetronomeInfo; + std::vector<std::string> mIndexToName; + + std::vector<int> mIndexToPitch; + + std::map<int, int> mPitchToIndex; + + std::string mKeyNormalName; + + std::string mKeyAccentedName; + JZKnob* mpVelocityKnob; wxStaticText* mpVelocityValue; Modified: trunk/jazz/src/Globals.cpp =================================================================== --- trunk/jazz/src/Globals.cpp 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Globals.cpp 2008-04-06 18:26:26 UTC (rev 420) @@ -39,7 +39,7 @@ JZPlayer* gpMidiPlayer = 0; -tHelp* HelpInstance = 0; +JZHelp* gpHelpInstance = 0; vector<pair<string, int> > gLimitSteps; Modified: trunk/jazz/src/Globals.h =================================================================== --- trunk/jazz/src/Globals.h 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Globals.h 2008-04-06 18:26:26 UTC (rev 420) @@ -33,7 +33,7 @@ class JZSong; class JZSynth; class JZPlayer; -class tHelp; +class JZHelp; class JZProject; class JZTrackFrame; class JZTrackWindow; @@ -49,7 +49,7 @@ extern JZSong* gpSong; extern JZSynth* gpSynth; extern JZPlayer* gpMidiPlayer; -extern tHelp* HelpInstance; +extern JZHelp* gpHelpInstance; extern std::vector<std::pair<std::string, int> > gLimitSteps; extern std::vector<std::pair<std::string, int> > gModes; extern const int gScaleChromatic; Modified: trunk/jazz/src/GuitarFrame.cpp =================================================================== --- trunk/jazz/src/GuitarFrame.cpp 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/GuitarFrame.cpp 2008-04-06 18:26:26 UTC (rev 420) @@ -113,7 +113,7 @@ //----------------------------------------------------------------------------- void JZGuitarFrame::OnHelp(wxCommandEvent& event) { -// HelpInstance->ShowTopic("Guitar board"); +// gpHelpInstance->ShowTopic("Guitar board"); } //----------------------------------------------------------------------------- Modified: trunk/jazz/src/Help.cpp =================================================================== --- trunk/jazz/src/Help.cpp 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Help.cpp 2008-04-06 18:26:26 UTC (rev 420) @@ -25,36 +25,46 @@ #include "wx/html/helpctrl.h" #include "Help.h" +#include "Globals.h" #include <iostream> using namespace std; -tHelp* gpHelpInstance = 0; - -tHelp::tHelp(const char* pHelpFleName) +//***************************************************************************** +// Description: +// This is the help class definition. +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZHelp::JZHelp(const char* pHelpFleName) : mpHelp(0), mHelpFile(pHelpFleName) { mpHelp = new wxHtmlHelpController(); mpHelp->Initialize(mHelpFile); - cout << "tHelp::tHelp " << mHelpFile << endl; + cout << "JZHelp::JZHelp " << mHelpFile << endl; } -tHelp::~tHelp() +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZHelp::~JZHelp() { delete mpHelp; } -void tHelp::ShowTopic(const char* pTopic) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZHelp::ShowTopic(const char* pTopic) { mpHelp->LoadFile(mHelpFile.c_str()); mpHelp->KeywordSearch(pTopic); } -void tHelp::DisplayContents() +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZHelp::DisplayContents() { mpHelp->LoadFile(mHelpFile.c_str()); mpHelp->DisplayContents(); } - Modified: trunk/jazz/src/Help.h =================================================================== --- trunk/jazz/src/Help.h 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Help.h 2008-04-06 18:26:26 UTC (rev 420) @@ -25,14 +25,18 @@ class wxHtmlHelpController; -// a wrapper around the wx help classes. -class tHelp +//***************************************************************************** +// Description: +// This is the help class definition. This class implements a wrapper +// around the wxWidgets help classes. +//***************************************************************************** +class JZHelp { public: - tHelp(const char* pHelpFleName); + JZHelp(const char* pHelpFleName); - ~tHelp(); + ~JZHelp(); void ShowTopic(const char* pTopic); @@ -45,6 +49,4 @@ wxString mHelpFile; }; -extern tHelp* gpHelpInstance; - #endif // !defined(JZ_HELP_H) Modified: trunk/jazz/src/Metronome.cpp =================================================================== --- trunk/jazz/src/Metronome.cpp 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Metronome.cpp 2008-04-06 18:26:26 UTC (rev 420) @@ -115,6 +115,20 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +void JZMetronomeInfo::SetKeyNormal(unsigned char KeyNormal) +{ + mKeyNormal = KeyNormal; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZMetronomeInfo::SetKeyAccented(unsigned char KeyAccented) +{ + mKeyAccented = KeyAccented; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZMetronomeInfo::SetVelocity(unsigned char Velocity) { mVelocity = Velocity; Modified: trunk/jazz/src/Metronome.h =================================================================== --- trunk/jazz/src/Metronome.h 2008-04-06 05:44:50 UTC (rev 419) +++ trunk/jazz/src/Metronome.h 2008-04-06 18:26:26 UTC (rev 420) @@ -41,6 +41,14 @@ void ReadFromConfiguration(); + unsigned char GetKeyNormal() const; + + void SetKeyNormal(unsigned char KeyNormal); + + unsigned char GetKeyAccented() const; + + void SetKeyAccented(unsigned char KeyAccented); + unsigned char GetVelocity() const; void SetVelocity(unsigned char Velocity); @@ -71,6 +79,18 @@ }; inline +unsigned char JZMetronomeInfo::GetKeyNormal() const +{ + return mKeyNormal; +} + +inline +unsigned char JZMetronomeInfo::GetKeyAccented() const +{ + return mKeyAccented; +} + +inline unsigned char JZMetronomeInfo::GetVelocity() const { return mVelocity; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 05:44:52
|
Revision: 419 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=419&view=rev Author: pstieber Date: 2008-04-05 22:44:50 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Started recording data from the metronome dialog. Modified Paths: -------------- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h trunk/jazz/src/Metronome.cpp trunk/jazz/src/Metronome.h trunk/jazz/src/Project.cpp trunk/jazz/src/Project.h trunk/jazz/src/TrackFrame.cpp Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 05:44:50 UTC (rev 419) @@ -145,10 +145,29 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +bool JZMetronomeSettingsDialog::TransferDataToWindow() +{ + mpVelocityKnob->SetValueWithEvent(mMetronomeInfo.GetVelocity()); + mpAccentedCheckBox->SetValue(mMetronomeInfo.IsAccented()); + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZMetronomeSettingsDialog::TransferDataFromWindow() +{ + mMetronomeInfo.SetVelocity(static_cast<unsigned char>( + mpVelocityKnob->GetValue())); + mMetronomeInfo.SetIsAccented(mpAccentedCheckBox->GetValue()); + return true; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZMetronomeSettingsDialog::OnVolumeChange(JZKnobEvent& Event) { int Value = Event.GetValue(); ostringstream Oss; Oss << Value; mpVelocityValue->SetLabel(Oss.str().c_str()); -} \ No newline at end of file +} Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 05:44:50 UTC (rev 419) @@ -37,6 +37,10 @@ private: + virtual bool TransferDataToWindow(); + + virtual bool TransferDataFromWindow(); + void OnVolumeChange(JZKnobEvent& Event); private: Modified: trunk/jazz/src/Metronome.cpp =================================================================== --- trunk/jazz/src/Metronome.cpp 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Metronome.cpp 2008-04-06 05:44:50 UTC (rev 419) @@ -27,6 +27,8 @@ #include "Globals.h" #include "Events.h" +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- JZMetronomeInfo::JZMetronomeInfo() : mKeyNormal(37), mKeyAccented(36), @@ -36,6 +38,42 @@ { } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZMetronomeInfo& JZMetronomeInfo::operator = (const JZMetronomeInfo& Rhs) +{ + if (this != &Rhs) + { + mKeyNormal = Rhs.mKeyNormal; + mKeyAccented = Rhs.mKeyAccented; + mVelocity = Rhs.mVelocity; + mIsOn = Rhs.mIsOn; + mIsAccented = Rhs.mIsAccented; + } + return *this; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZMetronomeInfo::operator == (const JZMetronomeInfo& Rhs) const +{ + return + mKeyNormal == Rhs.mKeyNormal && + mKeyAccented == Rhs.mKeyAccented && + mVelocity == Rhs.mVelocity && + mIsOn == Rhs.mIsOn && + mIsAccented == Rhs.mIsAccented; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +bool JZMetronomeInfo::operator != (const JZMetronomeInfo& Rhs) const +{ + return !operator == (Rhs); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZMetronomeInfo::ReadFromConfiguration() { mIsAccented = (gpConfig->GetValue(C_MetroIsAccented) != 0); @@ -44,11 +82,15 @@ mKeyAccented = gpConfig->GetValue(C_MetroAccentedClick); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZMetronomeInfo::ToggleIsOn() { mIsOn = !mIsOn; } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tKeyOn* JZMetronomeInfo::CreateNormalEvent(int Clock) const { return new tKeyOn( @@ -59,6 +101,8 @@ 15); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tKeyOn* JZMetronomeInfo::CreateAccentedEvent(int Clock) const { return new tKeyOn( @@ -69,3 +113,16 @@ 15); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZMetronomeInfo::SetVelocity(unsigned char Velocity) +{ + mVelocity = Velocity; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZMetronomeInfo::SetIsAccented(bool IsAccented) +{ + mIsAccented = IsAccented; +} Modified: trunk/jazz/src/Metronome.h =================================================================== --- trunk/jazz/src/Metronome.h 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Metronome.h 2008-04-06 05:44:50 UTC (rev 419) @@ -33,12 +33,24 @@ JZMetronomeInfo(); + JZMetronomeInfo& operator = (const JZMetronomeInfo& Rhs); + + bool operator == (const JZMetronomeInfo& Rhs) const; + + bool operator != (const JZMetronomeInfo& Rhs) const; + void ReadFromConfiguration(); + unsigned char GetVelocity() const; + + void SetVelocity(unsigned char Velocity); + bool IsOn() const; bool IsAccented() const; + void SetIsAccented(bool IsAccented); + void ToggleIsOn(); tKeyOn* CreateNormalEvent(int Clock) const; @@ -59,6 +71,12 @@ }; inline +unsigned char JZMetronomeInfo::GetVelocity() const +{ + return mVelocity; +} + +inline bool JZMetronomeInfo::IsOn() const { return mIsOn; Modified: trunk/jazz/src/Project.cpp =================================================================== --- trunk/jazz/src/Project.cpp 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Project.cpp 2008-04-06 05:44:50 UTC (rev 419) @@ -581,13 +581,22 @@ // Description: // Returns a constant reference to the metronome. //----------------------------------------------------------------------------- -const JZMetronomeInfo& JZProject::GetMetronomeInfo() +const JZMetronomeInfo& JZProject::GetMetronomeInfo() const { return mMetronomeInfo; } //----------------------------------------------------------------------------- // Description: +// Sets the metronome data. +//----------------------------------------------------------------------------- +void JZProject::SetMetronomeInfo(const JZMetronomeInfo& MetronomeInfo) +{ + mMetronomeInfo = MetronomeInfo; +} + +//----------------------------------------------------------------------------- +// Description: // Toggles the "is on" state of the metronome. //----------------------------------------------------------------------------- void JZProject::ToggleMetronome() Modified: trunk/jazz/src/Project.h =================================================================== --- trunk/jazz/src/Project.h 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/Project.h 2008-04-06 05:44:50 UTC (rev 419) @@ -69,9 +69,13 @@ // Description: // Returns a constant reference to the metronome. - const JZMetronomeInfo& GetMetronomeInfo(); + const JZMetronomeInfo& GetMetronomeInfo() const; // Description: + // Sets the metronome data. + void SetMetronomeInfo(const JZMetronomeInfo& MetronomeInfo); + + // Description: // Toggles the "is on" state of the metronome. void ToggleMetronome(); Modified: trunk/jazz/src/TrackFrame.cpp =================================================================== --- trunk/jazz/src/TrackFrame.cpp 2008-04-06 05:11:03 UTC (rev 418) +++ trunk/jazz/src/TrackFrame.cpp 2008-04-06 05:44:50 UTC (rev 419) @@ -550,8 +550,10 @@ this, MetronomeInfo); if ( - MetronomeSettingsDialog.ShowModal() == wxID_OK) + MetronomeSettingsDialog.ShowModal() == wxID_OK && + MetronomeInfo != gpProject->GetMetronomeInfo()) { + gpProject->SetMetronomeInfo(MetronomeInfo); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 05:11:11
|
Revision: 418 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=418&view=rev Author: pstieber Date: 2008-04-05 22:11:03 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added a resource ID for the knob in the metronome dialog. Modified Paths: -------------- trunk/jazz/src/Resources.h Modified: trunk/jazz/src/Resources.h =================================================================== --- trunk/jazz/src/Resources.h 2008-04-06 05:10:26 UTC (rev 417) +++ trunk/jazz/src/Resources.h 2008-04-06 05:11:03 UTC (rev 418) @@ -67,4 +67,6 @@ #define MEN_CLEAR wxID_HIGHEST + 110 #define MEN_SETTINGS wxID_HIGHEST + 120 +#define IDC_KB_VOLUME wxID_HIGHEST + 1000 + #endif // !defined(JZ_RESOURCES_H) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 05:10:28
|
Revision: 417 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=417&view=rev Author: pstieber Date: 2008-04-05 22:10:26 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Started using the events generated by the knob control. Modified Paths: -------------- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 05:09:36 UTC (rev 416) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 05:10:26 UTC (rev 417) @@ -26,8 +26,10 @@ #include "../Configuration.h" #include "../Globals.h" #include "../Knob.h" +#include "../Resources.h" #include <vector> +#include <sstream> using namespace std; @@ -35,18 +37,33 @@ //***************************************************************************** //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +BEGIN_EVENT_TABLE(JZMetronomeSettingsDialog, wxDialog) + + EVT_KNOB_CHANGED(IDC_KB_VOLUME, JZMetronomeSettingsDialog::OnVolumeChange) + +END_EVENT_TABLE() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- JZMetronomeSettingsDialog::JZMetronomeSettingsDialog( wxWindow* pParent, JZMetronomeInfo& MetronomeInfo) : wxDialog(pParent, wxID_ANY, wxString("Metronome Settings")), mMetronomeInfo(MetronomeInfo), - mpSynthesizerListbox(0), - mpStartListbox(0) + mpVelocityKnob(0), + mpVelocityValue(0), + mpAccentedCheckBox(0), + mpNormalListbox(0), + mpAccentedListbox(0) { - JZKnob* pKnob = new JZKnob(this, wxID_ANY, 100, 0, 128); + mpVelocityKnob = new JZKnob(this, IDC_KB_VOLUME, 100, 0, 127); - mpSynthesizerListbox = new wxListBox(this, wxID_ANY); + mpVelocityValue = new wxStaticText(this, wxID_ANY, "127"); + mpAccentedCheckBox = new wxCheckBox(this, wxID_ANY, "Use Accented Click"); + + mpNormalListbox = new wxListBox(this, wxID_ANY); + int Selection = 0; int Index = 0; for ( @@ -54,21 +71,21 @@ iPair != gSynthesizerTypes.end(); ++iPair, ++Index) { - mpSynthesizerListbox->Append(iPair->first.c_str()); + mpNormalListbox->Append(iPair->first.c_str()); if (strcmp(iPair->first.c_str(), gpConfig->StrValue(C_SynthType)) == 0) { Selection = Index; } } - mpSynthesizerListbox->SetSelection(Selection); + mpNormalListbox->SetSelection(Selection); - mpStartListbox = new wxListBox(this, wxID_ANY); + mpAccentedListbox = new wxListBox(this, wxID_ANY); - mpStartListbox->Append("Never"); - mpStartListbox->Append("Song Start"); - mpStartListbox->Append("Start Play"); + mpAccentedListbox->Append("Never"); + mpAccentedListbox->Append("Song Start"); + mpAccentedListbox->Append("Start Play"); - mpStartListbox->SetSelection(gpConfig->GetValue(C_SendSynthReset)); + mpAccentedListbox->SetSelection(gpConfig->GetValue(C_SendSynthReset)); wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK"); wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel"); @@ -79,24 +96,34 @@ wxBoxSizer* pListControlSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL); + pTopSizer->Add( + new wxStaticText(this, wxID_ANY, "Velocity"), + 0, + wxCENTER | wxALL, + 2); + + pTopSizer->Add(mpVelocityKnob, 0, wxCENTER | wxALL, 2); + + pTopSizer->Add(mpVelocityValue, 0, wxCENTER | wxALL, 2); + + pTopSizer->Add(mpAccentedCheckBox, 0, wxCENTER | wxALL, 2); + 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"), + new wxStaticText(this, wxID_ANY, "Normal Click"), 0, wxALL, 2); - pLeftSizer->Add(mpSynthesizerListbox, 0, wxGROW | wxALL, 2); + pLeftSizer->Add(mpNormalListbox, 0, wxGROW | wxALL, 2); pRightSizer->Add( - new wxStaticText(this, wxID_ANY, "Send MIDI Reset"), + new wxStaticText(this, wxID_ANY, "Accented Click:"), 0, wxALL, 2); - pRightSizer->Add(mpStartListbox, 0, wxALL, 2); + pRightSizer->Add(mpAccentedListbox, 0, wxALL, 2); pListControlSizer->Add(pLeftSizer, 0, wxALL, 3); pListControlSizer->Add(pRightSizer, 0, wxALL, 3); @@ -115,3 +142,13 @@ pTopSizer->SetSizeHints(this); pTopSizer->Fit(this); } + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void JZMetronomeSettingsDialog::OnVolumeChange(JZKnobEvent& Event) +{ + int Value = Event.GetValue(); + ostringstream Oss; + Oss << Value; + mpVelocityValue->SetLabel(Oss.str().c_str()); +} \ No newline at end of file Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 05:09:36 UTC (rev 416) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.h 2008-04-06 05:10:26 UTC (rev 417) @@ -22,6 +22,8 @@ #define JZ_METRONOMESETTINGDIALOG_H class JZMetronomeInfo; +class JZKnob; +class JZKnobEvent; //***************************************************************************** //***************************************************************************** @@ -35,11 +37,23 @@ private: + void OnVolumeChange(JZKnobEvent& Event); + + private: + JZMetronomeInfo& mMetronomeInfo; - wxListBox* mpSynthesizerListbox; + JZKnob* mpVelocityKnob; - wxListBox* mpStartListbox; + wxStaticText* mpVelocityValue; + + wxCheckBox* mpAccentedCheckBox; + + wxListBox* mpNormalListbox; + + wxListBox* mpAccentedListbox; + + DECLARE_EVENT_TABLE(); }; #endif // !defined(JZ_METRONOMESETTINGDIALOG_H) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 05:09:40
|
Revision: 416 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=416&view=rev Author: pstieber Date: 2008-04-05 22:09:36 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added events for the knob control. Modified Paths: -------------- trunk/jazz/src/Knob.cpp trunk/jazz/src/Knob.h Modified: trunk/jazz/src/Knob.cpp =================================================================== --- trunk/jazz/src/Knob.cpp 2008-04-06 02:37:34 UTC (rev 415) +++ trunk/jazz/src/Knob.cpp 2008-04-06 05:09:36 UTC (rev 416) @@ -29,6 +29,47 @@ //***************************************************************************** // Description: +// This is the knob control event class definition. +//***************************************************************************** +//----------------------------------------------------------------------------- +// Define the knob control event types. +// I think the following insures the event IDs are unique. +//----------------------------------------------------------------------------- +DEFINE_EVENT_TYPE(wxEVT_KNOB_CHANGED) + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(JZKnobEvent, wxCommandEvent) + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZKnobEvent::JZKnobEvent() + : wxCommandEvent(), + mValue(0) +{ +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZKnobEvent::JZKnobEvent( + JZKnob* pKnobCtrl, + wxEventType Type) + : wxCommandEvent(Type, pKnobCtrl->GetId()), + mValue(0) +{ + mValue = pKnobCtrl->GetValue(); +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +JZKnobEvent::JZKnobEvent(JZKnob* pKnobCtrl, int Value, wxEventType Type) + : wxCommandEvent(Type, pKnobCtrl->GetId()), + mValue(Value) +{ +} + +//***************************************************************************** +// Description: // This is the knob class definition. //***************************************************************************** //----------------------------------------------------------------------------- @@ -109,8 +150,8 @@ SetInitialSize(Size); - mMin = MinValue; - mMax = MaxValue; + mMinValue = MinValue; + mMaxValue = MaxValue; Range %= 360; MinAngle %= 360; mMaxAngle = (MinAngle + 360 - Range) % 360; @@ -125,9 +166,9 @@ { if (MinValue < MaxValue) { - mMin = MinValue; - mMax = MaxValue; - SetValue(mSetting); + mMinValue = MinValue; + mMaxValue = MaxValue; + SetValueWithEvent(mSetting); } } @@ -135,13 +176,13 @@ //----------------------------------------------------------------------------- int JZKnob::SetValue(int Value) { - if (Value < mMin) + if (Value < mMinValue) { - Value = mMin; + Value = mMinValue; } - if (Value > mMax) + if (Value > mMaxValue) { - Value = mMax; + Value = mMaxValue; } if (Value != mSetting) @@ -155,6 +196,19 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +int JZKnob::SetValueWithEvent(int Value) +{ + int ActualValue = SetValue(Value); + + JZKnobEvent Event(this, ActualValue, wxEVT_KNOB_CHANGED); + Event.SetEventObject(this); + GetEventHandler()->ProcessEvent(Event); + + return ActualValue; +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZKnob::OnSize(wxSizeEvent& Event) { int Width, Height; @@ -181,7 +235,8 @@ wxSize Size = GetSize(); double Theta = gDegreesToRadians * - (mMaxAngle + (((double)mMax - mSetting) / (mMax - mMin)) * mRange); + (mMaxAngle + + (((double)mMaxValue - mSetting) / (mMaxValue - mMinValue)) * mRange); double DeltaX = cos(Theta); @@ -241,14 +296,14 @@ if (Event.GetWheelRotation() < 0) { - SetValue(GetValue() - 1); + SetValueWithEvent(GetValue() - 1); Event.Skip(); return; } if (Event.GetWheelRotation() > 0) { - SetValue(GetValue() + 1); + SetValueWithEvent(GetValue() + 1); Event.Skip(); return; } @@ -278,9 +333,10 @@ { return; } - int NewValue = int(mMax - (DeltaTheta / mRange) * (mMax - mMin)); + int NewValue = int( + mMaxValue - (DeltaTheta / mRange) * (mMaxValue - mMinValue)); - SetValue(NewValue); + SetValueWithEvent(NewValue); if (Event.Dragging() || Event.ButtonUp()) { if (Event.ButtonUp()) Modified: trunk/jazz/src/Knob.h =================================================================== --- trunk/jazz/src/Knob.h 2008-04-06 02:37:34 UTC (rev 415) +++ trunk/jazz/src/Knob.h 2008-04-06 05:09:36 UTC (rev 416) @@ -21,8 +21,62 @@ #ifndef JZ_KNOB_H #define JZ_KNOB_H +class JZKnobEvent; +class JZKnob; + //***************************************************************************** // Description: +// Declare knob control event types and macros for handling them. +//***************************************************************************** +//----------------------------------------------------------------------------- +// Description: +// The second argument to DECLARE_EVENT_TYPE is unused. wxWidgets assigns a +// unique evant ID at run time. +//----------------------------------------------------------------------------- +BEGIN_DECLARE_EVENT_TYPES() + DECLARE_EVENT_TYPE(wxEVT_KNOB_CHANGED, 1) +END_DECLARE_EVENT_TYPES() + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +typedef void (wxEvtHandler::*wxKnobEventFunction)(JZKnobEvent&); + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +#define EVT_KNOB_CHANGED(Id, Function) \ + DECLARE_EVENT_TABLE_ENTRY( \ + wxEVT_KNOB_CHANGED, \ + Id, \ + -1, \ + (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) \ + (wxKnobEventFunction)& Function, \ + (wxObject *) NULL), + +//***************************************************************************** +// Description: +// This is the knob control event class declaration. +//***************************************************************************** +class JZKnobEvent : public wxCommandEvent +{ + public: + + JZKnobEvent(); + + JZKnobEvent(JZKnob* pKnobCtrl, wxEventType Type); + + JZKnobEvent(JZKnob* pKnobCtrl, int Value, wxEventType Type); + + int GetValue() const; + + private: + + int mValue; + + DECLARE_DYNAMIC_CLASS(JZKnobEvent) +}; + +//***************************************************************************** +// Description: // This is the knob class declaration. This is a custom control that looks // like a mixer knob. //***************************************************************************** @@ -79,6 +133,8 @@ int SetValue(int Value); + int SetValueWithEvent(int Value); + private: void GetCenter(int& x, int& y) const; @@ -93,9 +149,9 @@ private: - int mMin; + int mMinValue; - int mMax; + int mMaxValue; int mSetting; @@ -110,6 +166,18 @@ //***************************************************************************** // Description: +// These are the knob control event inline member functions. +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +inline +int JZKnobEvent::GetValue() const +{ + return mValue; +} + +//***************************************************************************** +// Description: // These are the knob inline member functions. //***************************************************************************** //----------------------------------------------------------------------------- @@ -117,7 +185,7 @@ inline int JZKnob::GetMin() const { - return mMin; + return mMinValue; } //----------------------------------------------------------------------------- @@ -125,7 +193,7 @@ inline int JZKnob::GetMax() const { - return mMax; + return mMaxValue; } //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:37:39
|
Revision: 415 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=415&view=rev Author: pstieber Date: 2008-04-05 19:37:34 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added the metronome setting dialog. Modified Paths: -------------- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj =================================================================== --- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-06 02:36:22 UTC (rev 414) +++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-06 02:37:34 UTC (rev 415) @@ -817,6 +817,18 @@ > </File> </Filter> + <Filter + Name="Dialog Source Files" + > + <File + RelativePath="..\src\Dialogs\MetronomeSettingsDialog.cpp" + > + </File> + <File + RelativePath="..\src\Dialogs\MetronomeSettingsDialog.h" + > + </File> + </Filter> </Files> <Globals> </Globals> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:36:30
|
Revision: 414 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=414&view=rev Author: pstieber Date: 2008-04-05 19:36:22 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added the metronome settings dialog. Modified Paths: -------------- trunk/jazz/src/Makefile.am Modified: trunk/jazz/src/Makefile.am =================================================================== --- trunk/jazz/src/Makefile.am 2008-04-06 02:34:32 UTC (rev 413) +++ trunk/jazz/src/Makefile.am 2008-04-06 02:36:22 UTC (rev 414) @@ -18,6 +18,7 @@ DeprecatedWx/prop.cpp \ DeprecatedWx/propform.cpp \ DeprecatedWx/proplist.cpp \ +Dialogs/MetronomeSettingsDialog.cpp \ Dialogs.cpp \ DynamicArray.cpp \ ErrorMessage.cpp \ @@ -92,6 +93,7 @@ DeprecatedWx/propform.h \ DeprecatedWx/proplist.h \ DeprecatedStringUtils.h \ +Dialogs/MetronomeSettingsDialog.cpp \ Dialogs.h \ DynamicArray.h \ ErrorMessage.h \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:34:39
|
Revision: 413 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=413&view=rev Author: pstieber Date: 2008-04-05 19:34:32 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added the metronome setting dialog source. Modified Paths: -------------- trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj Modified: trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj =================================================================== --- trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-06 02:29:47 UTC (rev 412) +++ trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-06 02:34:32 UTC (rev 413) @@ -818,6 +818,18 @@ > </File> </Filter> + <Filter + Name="Dialog Source Files" + > + <File + RelativePath="..\src\Dialogs\MetronomeSettingsDialog.cpp" + > + </File> + <File + RelativePath="..\src\Dialogs\MetronomeSettingsDialog.h" + > + </File> + </Filter> </Files> <Globals> </Globals> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:29:52
|
Revision: 412 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=412&view=rev Author: pstieber Date: 2008-04-05 19:29:47 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Made some changes to get the code compiling. This is a WIP. Modified Paths: -------------- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 02:22:31 UTC (rev 411) +++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-06 02:29:47 UTC (rev 412) @@ -23,16 +23,23 @@ #include "MetronomeSettingsDialog.h" #include "../Metronome.h" +#include "../Configuration.h" +#include "../Globals.h" #include "../Knob.h" +#include <vector> + using namespace std; //***************************************************************************** //***************************************************************************** //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -JZMetronomeSettingsDialog::JZMetronomeSettingsDialog(wxWindow* pParent) +JZMetronomeSettingsDialog::JZMetronomeSettingsDialog( + wxWindow* pParent, + JZMetronomeInfo& MetronomeInfo) : wxDialog(pParent, wxID_ANY, wxString("Metronome Settings")), + mMetronomeInfo(MetronomeInfo), mpSynthesizerListbox(0), mpStartListbox(0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:22:38
|
Revision: 411 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=411&view=rev Author: pstieber Date: 2008-04-05 19:22:31 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Renamed DialogsTemporary to Dialogs to finally get the case change I want. Added Paths: ----------- trunk/jazz/src/Dialogs/ Removed Paths: ------------- trunk/jazz/src/DialogsTemporary/ Copied: trunk/jazz/src/Dialogs (from rev 410, trunk/jazz/src/DialogsTemporary) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |
From: <pst...@us...> - 2008-04-06 02:18:52
|
Revision: 409 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=409&view=rev Author: pstieber Date: 2008-04-05 19:18:50 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Getting ready for the metronome settings dialog. WARNING: This will break the build for a short period of time. Modified Paths: -------------- trunk/jazz/src/TrackFrame.cpp trunk/jazz/src/TrackFrame.h Modified: trunk/jazz/src/TrackFrame.cpp =================================================================== --- trunk/jazz/src/TrackFrame.cpp 2008-04-06 02:17:53 UTC (rev 408) +++ trunk/jazz/src/TrackFrame.cpp 2008-04-06 02:18:50 UTC (rev 409) @@ -35,6 +35,7 @@ #include "Globals.h" #include "Configuration.h" #include "Harmony.h" +#include "Dialogs/MetronomeSettingsDialog.h" #include "SynthesizerSettingsDialog.h" #include "AboutDialog.h" @@ -90,6 +91,8 @@ EVT_MENU(ID_TOOLS_HARMONY_BROWSER, JZTrackFrame::OnToolsHarmonyBrowser) + EVT_MENU(ID_SETTINGS_METRONOME, JZTrackFrame::OnSettingsMetronome) + EVT_MENU(ID_SETTINGS_SYNTH, JZTrackFrame::OnSettingsSynthesizerType) EVT_MENU(wxID_HELP_CONTENTS, JZTrackFrame::OnHelpContents) @@ -324,7 +327,9 @@ pSettingMenu->Append(MEN_FILTER, "&Filter..."); pSettingMenu->Append(MEN_TWSETTING, "&Window..."); pSettingMenu->Append(MEN_SONG, "&Song..."); - pSettingMenu->Append(MEN_METRONOME, "&Metronome..."); +#endif + pSettingMenu->Append(ID_SETTINGS_METRONOME, "&Metronome..."); +#if 0 pSettingMenu->Append(MEN_EFFECTS, "&Effects..."); pSettingMenu->Append(MEN_TIMING, "&Timing..."); pSettingMenu->Append(MEN_MIDI_THRU, "&Midi Thru..."); @@ -538,6 +543,20 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- +void JZTrackFrame::OnSettingsMetronome(wxCommandEvent& Event) +{ + JZMetronomeInfo MetronomeInfo = gpProject->GetMetronomeInfo(); + JZMetronomeSettingsDialog MetronomeSettingsDialog( + this, + MetronomeInfo); + if ( + MetronomeSettingsDialog.ShowModal() == wxID_OK) + { + } +} + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZTrackFrame::OnSettingsSynthesizerType(wxCommandEvent& Event) { JZSynthesizerDialog SynthesizerDialog(this); Modified: trunk/jazz/src/TrackFrame.h =================================================================== --- trunk/jazz/src/TrackFrame.h 2008-04-06 02:17:53 UTC (rev 408) +++ trunk/jazz/src/TrackFrame.h 2008-04-06 02:18:50 UTC (rev 409) @@ -84,6 +84,8 @@ void OnToolsHarmonyBrowser(wxCommandEvent& Event); + void OnSettingsMetronome(wxCommandEvent& Event); + void OnSettingsSynthesizerType(wxCommandEvent& Event); void OnHelpContents(wxCommandEvent& Event); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:17:56
|
Revision: 408 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=408&view=rev Author: pstieber Date: 2008-04-05 19:17:53 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Updated the copyright line and removed the knob. Modified Paths: -------------- trunk/jazz/src/SynthesizerSettingsDialog.cpp trunk/jazz/src/SynthesizerSettingsDialog.h Modified: trunk/jazz/src/SynthesizerSettingsDialog.cpp =================================================================== --- trunk/jazz/src/SynthesizerSettingsDialog.cpp 2008-04-06 02:17:20 UTC (rev 407) +++ trunk/jazz/src/SynthesizerSettingsDialog.cpp 2008-04-06 02:17:53 UTC (rev 408) @@ -1,7 +1,7 @@ //***************************************************************************** // The JAZZ++ Midi Sequencer // -// Copyright (C) 2008 Peter J. Stieber +// 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 @@ -23,7 +23,6 @@ #include "SynthesizerSettingsDialog.h" #include "Configuration.h" #include "Globals.h" -#include "Knob.h" using namespace std; @@ -36,8 +35,6 @@ mpSynthesizerListbox(0), mpStartListbox(0) { - JZKnob* pKnob = new JZKnob(this, wxID_ANY, 100, 0, 128); - mpSynthesizerListbox = new wxListBox(this, wxID_ANY); int Selection = 0; @@ -75,8 +72,6 @@ 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, Modified: trunk/jazz/src/SynthesizerSettingsDialog.h =================================================================== --- trunk/jazz/src/SynthesizerSettingsDialog.h 2008-04-06 02:17:20 UTC (rev 407) +++ trunk/jazz/src/SynthesizerSettingsDialog.h 2008-04-06 02:17:53 UTC (rev 408) @@ -1,7 +1,7 @@ //***************************************************************************** // The JAZZ++ Midi Sequencer // -// Modifications Copyright (C) 2008 Peter J. Stieber +// 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 @@ -36,4 +36,4 @@ wxListBox* mpStartListbox; }; -#endif // !defined() +#endif // !defined(JZ_SYNTHESIZERSETTINGDIALOG_H) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:17:22
|
Revision: 407 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=407&view=rev Author: pstieber Date: 2008-04-05 19:17:20 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Added a metronome settings resource ID and did some renumbering. Modified Paths: -------------- trunk/jazz/src/Resources.h Modified: trunk/jazz/src/Resources.h =================================================================== --- trunk/jazz/src/Resources.h 2008-04-06 02:16:39 UTC (rev 406) +++ trunk/jazz/src/Resources.h 2008-04-06 02:17:20 UTC (rev 407) @@ -33,38 +33,38 @@ #define ID_EXPORT_MIDI wxID_HIGHEST + 1 #define ID_EXPORT_SELECTION_AS_MIDI wxID_HIGHEST + 2 -#define ID_SETTINGS_SYNTH wxID_HIGHEST + 3 +#define ID_SETTINGS_METRONOME wxID_HIGHEST + 10 +#define ID_SETTINGS_SYNTH wxID_HIGHEST + 11 -#define ID_TRIM wxID_HIGHEST + 4 -#define ID_QUANTIZE wxID_HIGHEST + 5 -#define ID_SHIFT_LEFT wxID_HIGHEST + 6 -#define ID_SHIFT_RIGHT wxID_HIGHEST + 7 -#define ID_SNAP_8 wxID_HIGHEST + 8 -#define ID_SNAP_8D wxID_HIGHEST + 9 -#define ID_SNAP_16 wxID_HIGHEST + 10 -#define ID_SNAP_16D wxID_HIGHEST + 11 -#define ID_MIXER wxID_HIGHEST + 12 -#define ID_PIANOWIN wxID_HIGHEST + 13 -#define ID_METRONOME_TOGGLE wxID_HIGHEST + 14 +#define ID_TRIM wxID_HIGHEST + 30 +#define ID_QUANTIZE wxID_HIGHEST + 31 +#define ID_SHIFT_LEFT wxID_HIGHEST + 32 +#define ID_SHIFT_RIGHT wxID_HIGHEST + 33 +#define ID_SNAP_8 wxID_HIGHEST + 34 +#define ID_SNAP_8D wxID_HIGHEST + 35 +#define ID_SNAP_16 wxID_HIGHEST + 36 +#define ID_SNAP_16D wxID_HIGHEST + 37 +#define ID_MIXER wxID_HIGHEST + 38 +#define ID_PIANOWIN wxID_HIGHEST + 39 +#define ID_METRONOME_TOGGLE wxID_HIGHEST + 40 -#define ID_PLAY wxID_HIGHEST + 15 -#define ID_PLAY_LOOP wxID_HIGHEST + 16 -#define ID_RECORD wxID_HIGHEST + 17 -#define ID_METRONOME wxID_HIGHEST + 18 +#define ID_PLAY wxID_HIGHEST + 50 +#define ID_PLAY_LOOP wxID_HIGHEST + 51 +#define ID_RECORD wxID_HIGHEST + 52 -#define ID_SELECT wxID_HIGHEST + 19 +#define ID_SELECT wxID_HIGHEST + 60 -#define ID_CHANGE_LENGTH wxID_HIGHEST + 20 +#define ID_CHANGE_LENGTH wxID_HIGHEST + 70 -#define ID_EVENT_DIALOG wxID_HIGHEST + 21 -#define ID_CUT_PASTE_EVENTS wxID_HIGHEST + 22 -#define ID_SHOW_ALL_EVENTS_FROM_ALL_TRACKS wxID_HIGHEST + 23 +#define ID_EVENT_DIALOG wxID_HIGHEST + 81 +#define ID_CUT_PASTE_EVENTS wxID_HIGHEST + 82 +#define ID_SHOW_ALL_EVENTS_FROM_ALL_TRACKS wxID_HIGHEST + 83 -#define ID_TOOLS_HARMONY_BROWSER wxID_HIGHEST + 25 +#define ID_TOOLS_HARMONY_BROWSER wxID_HIGHEST + 95 -#define ID_HELP_PIANO_WINDOW wxID_HIGHEST + 40 +#define ID_HELP_PIANO_WINDOW wxID_HIGHEST + 100 -#define MEN_CLEAR wxID_HIGHEST + 50 -#define MEN_SETTINGS wxID_HIGHEST + 60 +#define MEN_CLEAR wxID_HIGHEST + 110 +#define MEN_SETTINGS wxID_HIGHEST + 120 #endif // !defined(JZ_RESOURCES_H) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:16:41
|
Revision: 406 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=406&view=rev Author: pstieber Date: 2008-04-05 19:16:39 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Removed an unused resource ID. Modified Paths: -------------- trunk/jazz/src/gui/trackwinEnum.h Modified: trunk/jazz/src/gui/trackwinEnum.h =================================================================== --- trunk/jazz/src/gui/trackwinEnum.h 2008-04-06 02:15:03 UTC (rev 405) +++ trunk/jazz/src/gui/trackwinEnum.h 2008-04-06 02:16:39 UTC (rev 406) @@ -101,7 +101,6 @@ MEN_SAVE_SYNTH=79, MEN_SYNTH_SETTINGS =80, MEN_PIANOWIN=81, - MEN_METRONOME=82, MEN_PLAY =83, MEN_SAVE_METRO=84, MEN_METRO_ON=85, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 02:15:05
|
Revision: 405 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=405&view=rev Author: pstieber Date: 2008-04-05 19:15:03 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Started a metronome setting dialog. Added Paths: ----------- trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp trunk/jazz/src/dialogs/MetronomeSettingsDialog.h Added: trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp =================================================================== --- trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp (rev 0) +++ trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp 2008-04-06 02:15:03 UTC (rev 405) @@ -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); +} Property changes on: trunk/jazz/src/dialogs/MetronomeSettingsDialog.cpp ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/jazz/src/dialogs/MetronomeSettingsDialog.h =================================================================== --- trunk/jazz/src/dialogs/MetronomeSettingsDialog.h (rev 0) +++ trunk/jazz/src/dialogs/MetronomeSettingsDialog.h 2008-04-06 02:15:03 UTC (rev 405) @@ -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) Property changes on: trunk/jazz/src/dialogs/MetronomeSettingsDialog.h ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 01:48:10
|
Revision: 404 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=404&view=rev Author: pstieber Date: 2008-04-05 18:48:08 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Got toggling the metronome in the track frame working. Modified Paths: -------------- trunk/jazz/src/Metronome.cpp trunk/jazz/src/Metronome.h trunk/jazz/src/Player.cpp trunk/jazz/src/Project.cpp trunk/jazz/src/Project.h trunk/jazz/src/Resources.h trunk/jazz/src/Song.cpp trunk/jazz/src/Song.h trunk/jazz/src/TrackFrame.cpp trunk/jazz/src/TrackFrame.h Modified: trunk/jazz/src/Metronome.cpp =================================================================== --- trunk/jazz/src/Metronome.cpp 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Metronome.cpp 2008-04-06 01:48:08 UTC (rev 404) @@ -27,31 +27,45 @@ #include "Globals.h" #include "Events.h" -tMetronomeInfo::tMetronomeInfo() - : KeyAcc(36), - KeyNorm(37), - Veloc(127), - IsOn(0), - IsAccented(1) +JZMetronomeInfo::JZMetronomeInfo() + : mKeyNormal(37), + mKeyAccented(36), + mVelocity(127), + mIsOn(false), + mIsAccented(true) { } -tKeyOn* tMetronomeInfo::Normal(int clock) +void JZMetronomeInfo::ReadFromConfiguration() { + mIsAccented = (gpConfig->GetValue(C_MetroIsAccented) != 0); + mVelocity = gpConfig->GetValue(C_MetroVelocity); + mKeyNormal = gpConfig->GetValue(C_MetroNormalClick); + mKeyAccented = gpConfig->GetValue(C_MetroAccentedClick); +} + +void JZMetronomeInfo::ToggleIsOn() +{ + mIsOn = !mIsOn; +} + +tKeyOn* JZMetronomeInfo::CreateNormalEvent(int Clock) const +{ return new tKeyOn( - clock, + Clock, gpConfig->GetValue(C_DrumChannel) - 1, - KeyNorm, - Veloc, + mKeyNormal, + mVelocity, 15); } -tKeyOn* tMetronomeInfo::Accented(int clock) +tKeyOn* JZMetronomeInfo::CreateAccentedEvent(int Clock) const { return new tKeyOn( - clock, + Clock, gpConfig->GetValue(C_DrumChannel) - 1, - KeyAcc, - Veloc, + mKeyAccented, + mVelocity, 15); } + Modified: trunk/jazz/src/Metronome.h =================================================================== --- trunk/jazz/src/Metronome.h 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Metronome.h 2008-04-06 01:48:08 UTC (rev 404) @@ -25,21 +25,49 @@ class tKeyOn; -class tMetronomeInfo +//***************************************************************************** +//***************************************************************************** +class JZMetronomeInfo { public: - tMetronomeInfo(); + JZMetronomeInfo(); - tKeyOn* Normal(int clock); + void ReadFromConfiguration(); - tKeyOn* Accented(int clock); + bool IsOn() const; - unsigned char KeyAcc; - unsigned char KeyNorm; - unsigned char Veloc; - int IsOn; - int IsAccented; + bool IsAccented() const; + + void ToggleIsOn(); + + tKeyOn* CreateNormalEvent(int Clock) const; + + tKeyOn* CreateAccentedEvent(int Clock) const; + + private: + + unsigned char mKeyNormal; + + unsigned char mKeyAccented; + + unsigned char mVelocity; + + bool mIsOn; + + bool mIsAccented; }; +inline +bool JZMetronomeInfo::IsOn() const +{ + return mIsOn; +} + +inline +bool JZMetronomeInfo::IsAccented() const +{ + return mIsAccented; +} + #endif // !defined(JZ_METRONOME_H) Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Player.cpp 2008-04-06 01:48:08 UTC (rev 404) @@ -166,7 +166,7 @@ From, mStopClock, buf, - &gpProject->mMetronomeInfo, + gpProject->GetMetronomeInfo(), Delta, Mode); @@ -181,7 +181,7 @@ From, From + Size, buf, - &gpProject->mMetronomeInfo, + gpProject->GetMetronomeInfo(), Delta, Mode); } Modified: trunk/jazz/src/Project.cpp =================================================================== --- trunk/jazz/src/Project.cpp 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Project.cpp 2008-04-06 01:48:08 UTC (rev 404) @@ -141,10 +141,7 @@ mNumBars = 0; - mMetronomeInfo.IsAccented = mpConfig->GetValue(C_MetroIsAccented); - mMetronomeInfo.Veloc = mpConfig->GetValue(C_MetroVelocity); - mMetronomeInfo.KeyNorm = mpConfig->GetValue(C_MetroNormalClick); - mMetronomeInfo.KeyAcc = mpConfig->GetValue(C_MetroAccentedClick); + mMetronomeInfo.ReadFromConfiguration(); if (mpConfig->StrValue(C_SynthType)) { @@ -581,14 +578,34 @@ } //----------------------------------------------------------------------------- +// Description: +// Returns a constant reference to the metronome. //----------------------------------------------------------------------------- -tMetronomeInfo JZProject::GetMetronome() +const JZMetronomeInfo& JZProject::GetMetronomeInfo() { return mMetronomeInfo; } //----------------------------------------------------------------------------- // Description: +// Toggles the "is on" state of the metronome. +//----------------------------------------------------------------------------- +void JZProject::ToggleMetronome() +{ + mMetronomeInfo.ToggleIsOn(); +} + +//----------------------------------------------------------------------------- +// Description: +// Returns the "is on" state of the metronome. +//----------------------------------------------------------------------------- +bool JZProject::IsMetronomeOn() const +{ + return mMetronomeInfo.IsOn(); +} + +//----------------------------------------------------------------------------- +// Description: // Returns a constant pointer to the internal RecInfo member. //----------------------------------------------------------------------------- JZRecordingInfo* JZProject::GetRecInfo() Modified: trunk/jazz/src/Project.h =================================================================== --- trunk/jazz/src/Project.h 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Project.h 2008-04-06 01:48:08 UTC (rev 404) @@ -67,12 +67,18 @@ // Not yet sure what this does JZFilter* Filter; - // Stores metrome information - tMetronomeInfo mMetronomeInfo; + // Description: + // Returns a constant reference to the metronome. + const JZMetronomeInfo& GetMetronomeInfo(); - // Returns the internal pointer to the metronome - tMetronomeInfo GetMetronome(); + // Description: + // Toggles the "is on" state of the metronome. + void ToggleMetronome(); + // Description: + // Returns the "is on" state of the metronome. + bool IsMetronomeOn() const; + // Number of bars int mNumBars; @@ -169,6 +175,9 @@ JZRecordingInfo* mpRecInfo; + // Stores metronome information. + JZMetronomeInfo mMetronomeInfo; + bool mChanged; bool mIsPlaying; Modified: trunk/jazz/src/Resources.h =================================================================== --- trunk/jazz/src/Resources.h 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Resources.h 2008-04-06 01:48:08 UTC (rev 404) @@ -45,7 +45,7 @@ #define ID_SNAP_16D wxID_HIGHEST + 11 #define ID_MIXER wxID_HIGHEST + 12 #define ID_PIANOWIN wxID_HIGHEST + 13 -#define ID_METRONOME_ON wxID_HIGHEST + 14 +#define ID_METRONOME_TOGGLE wxID_HIGHEST + 14 #define ID_PLAY wxID_HIGHEST + 15 #define ID_PLAY_LOOP wxID_HIGHEST + 16 Modified: trunk/jazz/src/Song.cpp =================================================================== --- trunk/jazz/src/Song.cpp 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Song.cpp 2008-04-06 01:48:08 UTC (rev 404) @@ -181,15 +181,17 @@ int FrClock, int ToClock, tEventArray *Destin, - tMetronomeInfo *MetronomeInfo, + const JZMetronomeInfo& MetronomeInfo, int delta, int mode) { int i; // Make metronome - if (MetronomeInfo->IsOn) - MakeMetronome( FrClock, ToClock, Destin, MetronomeInfo, delta ); + if (MetronomeInfo.IsOn()) + { + MakeMetronome(FrClock, ToClock, Destin, MetronomeInfo, delta); + } // Find Solo-Tracks int solo = 0; @@ -305,7 +307,7 @@ int FrClock, int ToClock, tEventArray *Destin, - tMetronomeInfo *MetronomeInfo, + const JZMetronomeInfo& MetronomeInfo, int delta) { JZBarInfo BarInfo( this ); @@ -329,13 +331,13 @@ } // Insert normal click always - Destin->Put( MetronomeInfo->Normal(clk + delta) ); + Destin->Put(MetronomeInfo.CreateNormalEvent(clk + delta)); // On a bar? - if ( (count == 1) && (MetronomeInfo->IsAccented) ) + if (count == 1 && MetronomeInfo.IsAccented()) { // Insert accented click also - Destin->Put( MetronomeInfo->Accented(clk + delta) ); + Destin->Put(MetronomeInfo.CreateAccentedEvent(clk + delta)); } clk += BarInfo.TicksPerBar / BarInfo.CountsPerBar; Modified: trunk/jazz/src/Song.h =================================================================== --- trunk/jazz/src/Song.h 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/Song.h 2008-04-06 01:48:08 UTC (rev 404) @@ -27,7 +27,7 @@ #include "Configuration.h" #include "Globals.h" -class tMetronomeInfo; +class JZMetronomeInfo; class JZSong; class JZBarInfo @@ -64,7 +64,7 @@ int FrClock, int ToClock, tEventArray *Destin, - tMetronomeInfo* MetronomeInfo, + const JZMetronomeInfo& MetronomeInfo, int delta = 0); public: @@ -103,7 +103,7 @@ int FrClock, int ToClock, tEventArray *Destin, - tMetronomeInfo* MetronomeInfo, + const JZMetronomeInfo& MetronomeInfo, int DeltaClock = 0, int mode = 0); Modified: trunk/jazz/src/TrackFrame.cpp =================================================================== --- trunk/jazz/src/TrackFrame.cpp 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/TrackFrame.cpp 2008-04-06 01:48:08 UTC (rev 404) @@ -82,7 +82,7 @@ EVT_MENU(ID_PIANOWIN, JZTrackFrame::OnPianoWindow) - EVT_MENU(ID_METRONOME_ON, JZTrackFrame::OnMetroOn) + EVT_MENU(ID_METRONOME_TOGGLE, JZTrackFrame::OnMetroOn) EVT_MENU(wxID_ZOOM_IN, JZTrackFrame::OnZoomIn) @@ -134,11 +134,6 @@ // "Piano", // wxDefaultPosition, // wxSize(640, 480)); - - MetronomeInfo.IsAccented = gpConfig->GetValue(C_MetroIsAccented); - MetronomeInfo.Veloc = gpConfig->GetValue(C_MetroVelocity); - MetronomeInfo.KeyNorm = gpConfig->GetValue(C_MetroNormalClick); - MetronomeInfo.KeyAcc = gpConfig->GetValue(C_MetroAccentedClick); } //----------------------------------------------------------------------------- @@ -164,10 +159,10 @@ { ID_MIXER, false, mixer_xpm, "mixer" }, { ID_PIANOWIN, false, pianowin_xpm, "show piano window" }, { JZToolBar::eToolBarSeparator }, - { ID_PLAY, false, play_xpm, "start play"}, - { ID_PLAY_LOOP, false, playloop_xpm, "loop play"}, - { ID_RECORD, false, record_xpm, "record"}, - { ID_METRONOME, true, metro_xpm, "metronome" }, + { ID_PLAY, false, play_xpm, "start play"}, + { ID_PLAY_LOOP, false, playloop_xpm, "loop play"}, + { ID_RECORD, false, record_xpm, "record"}, + { ID_METRONOME_TOGGLE, true, metro_xpm, "metronome" }, { JZToolBar::eToolBarSeparator }, { wxID_ZOOM_IN, false, zoomin_xpm, "zoom in" }, { wxID_ZOOM_OUT, false, zoomout_xpm, "zoom out"}, @@ -517,7 +512,7 @@ //----------------------------------------------------------------------------- void JZTrackFrame::OnMetroOn(wxCommandEvent& Event) { - MetronomeInfo.IsOn = !MetronomeInfo.IsOn; + gpProject->ToggleMetronome(); } //----------------------------------------------------------------------------- Modified: trunk/jazz/src/TrackFrame.h =================================================================== --- trunk/jazz/src/TrackFrame.h 2008-04-06 01:46:32 UTC (rev 403) +++ trunk/jazz/src/TrackFrame.h 2008-04-06 01:48:08 UTC (rev 404) @@ -54,8 +54,6 @@ // Overridden tButtonLabelInterface finction. virtual void ButtonLabelDisplay(const wxString& Text, bool IsButtonDown); - tMetronomeInfo MetronomeInfo; - private: void OnMetroOn(wxCommandEvent& Event); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 01:46:35
|
Revision: 403 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=403&view=rev Author: pstieber Date: 2008-04-05 18:46:32 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Made cosmetic changes. Modified Paths: -------------- trunk/jazz/src/Configuration.cpp Modified: trunk/jazz/src/Configuration.cpp =================================================================== --- trunk/jazz/src/Configuration.cpp 2008-04-06 00:15:00 UTC (rev 402) +++ trunk/jazz/src/Configuration.cpp 2008-04-06 01:46:32 UTC (rev 403) @@ -174,28 +174,28 @@ Names[C_BankControlNumber] = new tConfigEntry(".bank_control_number", 0); // Controller2 for bank select with two commands - Names[C_BankControlNumber2] = new tConfigEntry(".bank_2nd_control_number",32); + Names[C_BankControlNumber2] = new tConfigEntry(".bank_2nd_control_number", 32); // Max number of entries in bank table (two commands) - Names[C_MaxBankTableEntries] = new tConfigEntry(".max_bank_table_entries",256); + Names[C_MaxBankTableEntries] = new tConfigEntry(".max_bank_table_entries", 256); // Number of columns to draw in Parts dialogs - Names[C_PartsColumnsMax] = new tConfigEntry(".parts_columns_max",4); + Names[C_PartsColumnsMax] = new tConfigEntry(".parts_columns_max", 4); // Draw tracknames on the right too? - Names[C_PartsTracknamesRight] = new tConfigEntry(".parts_tracknames_right",1); + Names[C_PartsTracknamesRight] = new tConfigEntry(".parts_tracknames_right", 1); // Maximum number of voice names in .jazz - Names[C_MaxVoiceNames] = new tConfigEntry(".max_voice_names",317); + Names[C_MaxVoiceNames] = new tConfigEntry(".max_voice_names", 317); // Use two-command bank select? Names[C_UseTwoCommandBankSelect] = new tConfigEntry(".use_two_command_bank_select", 0); // Metronome settings - Names[C_MetroIsAccented] = new tConfigEntry(".metronome_is_accented",1); - Names[C_MetroVelocity] = new tConfigEntry(".metronome_velocity",127); - Names[C_MetroNormalClick] = new tConfigEntry(".metronome_normal_click",37); - Names[C_MetroAccentedClick] = new tConfigEntry(".metronome_accented_click",36); + Names[C_MetroIsAccented] = new tConfigEntry(".metronome_is_accented", 1); + Names[C_MetroVelocity] = new tConfigEntry(".metronome_velocity", 127); + Names[C_MetroNormalClick] = new tConfigEntry(".metronome_normal_click", 37); + Names[C_MetroAccentedClick] = new tConfigEntry(".metronome_accented_click", 36); // Window geometry settings. Names[C_TrackWinXpos] = new tConfigEntry(".trackwin_xpos", 10); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 00:15:02
|
Revision: 402 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=402&view=rev Author: pstieber Date: 2008-04-05 17:15:00 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Removed --install. Modified Paths: -------------- trunk/jazz/bootstrap Modified: trunk/jazz/bootstrap =================================================================== --- trunk/jazz/bootstrap 2008-04-06 00:02:09 UTC (rev 401) +++ trunk/jazz/bootstrap 2008-04-06 00:15:00 UTC (rev 402) @@ -1,2 +1,2 @@ #! /bin/sh -autoreconf --install --verbose +autoreconf --verbose This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-06 00:02:10
|
Revision: 401 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=401&view=rev Author: pstieber Date: 2008-04-05 17:02:09 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Updating the end-of-line styles to native for a bunch of files. Modified Paths: -------------- trunk/jazz/src/Bitmaps/JazzLogo.xpm trunk/jazz/src/Project.cpp trunk/jazz/src/Project.h trunk/jazz/src/RecordingInfo.cpp trunk/jazz/src/RecordingInfo.h trunk/jazz/src/mswin/WindowsMidiInterface.cpp trunk/jazz/src/mswin/WindowsMidiInterface.h trunk/jazz/src/mswin/WindowsPlayer.cpp trunk/jazz/src/mswin/WindowsPlayer.h Property Changed: ---------------- trunk/jazz/src/Bitmaps/JazzLogo.xpm trunk/jazz/src/Bitmaps/accept.xpm trunk/jazz/src/Bitmaps/alea.xpm trunk/jazz/src/Bitmaps/analyze.xpm trunk/jazz/src/Bitmaps/cancel.xpm trunk/jazz/src/Bitmaps/cut.xpm trunk/jazz/src/Bitmaps/cutpaste.xpm trunk/jazz/src/Bitmaps/delchord.xpm trunk/jazz/src/Bitmaps/delete.xpm trunk/jazz/src/Bitmaps/dialog.xpm trunk/jazz/src/Bitmaps/evnts.xpm trunk/jazz/src/Bitmaps/harscale.xpm trunk/jazz/src/Bitmaps/haunsch.xpm trunk/jazz/src/Bitmaps/help.xpm trunk/jazz/src/Bitmaps/ionscale.xpm trunk/jazz/src/Bitmaps/length.xpm trunk/jazz/src/Bitmaps/majscale.xpm trunk/jazz/src/Bitmaps/melscale.xpm trunk/jazz/src/Bitmaps/metro.xpm trunk/jazz/src/Bitmaps/mixer.xpm trunk/jazz/src/Bitmaps/new.xpm trunk/jazz/src/Bitmaps/note16.xpm trunk/jazz/src/Bitmaps/note163.xpm trunk/jazz/src/Bitmaps/note8.xpm trunk/jazz/src/Bitmaps/note83.xpm trunk/jazz/src/Bitmaps/open.xpm trunk/jazz/src/Bitmaps/panic.xpm trunk/jazz/src/Bitmaps/piano.xpm trunk/jazz/src/Bitmaps/pianowin.xpm trunk/jazz/src/Bitmaps/play.xpm trunk/jazz/src/Bitmaps/playloop.xpm trunk/jazz/src/Bitmaps/quantize.xpm trunk/jazz/src/Bitmaps/record.xpm trunk/jazz/src/Bitmaps/redo.xpm trunk/jazz/src/Bitmaps/repl.xpm trunk/jazz/src/Bitmaps/rrgadd.xpm trunk/jazz/src/Bitmaps/rrgdel.xpm trunk/jazz/src/Bitmaps/rrgdown.xpm trunk/jazz/src/Bitmaps/rrggen.xpm trunk/jazz/src/Bitmaps/rrgup.xpm trunk/jazz/src/Bitmaps/same0.xpm trunk/jazz/src/Bitmaps/same1.xpm trunk/jazz/src/Bitmaps/same2.xpm trunk/jazz/src/Bitmaps/same3.xpm trunk/jazz/src/Bitmaps/same4.xpm trunk/jazz/src/Bitmaps/sameb.xpm trunk/jazz/src/Bitmaps/sameh.xpm trunk/jazz/src/Bitmaps/save.xpm trunk/jazz/src/Bitmaps/select.xpm trunk/jazz/src/Bitmaps/shiftl.xpm trunk/jazz/src/Bitmaps/shiftr.xpm trunk/jazz/src/Bitmaps/std251.xpm trunk/jazz/src/Bitmaps/transpos.xpm trunk/jazz/src/Bitmaps/tritone.xpm trunk/jazz/src/Bitmaps/undo.xpm trunk/jazz/src/Bitmaps/zoomin.xpm trunk/jazz/src/Bitmaps/zoomout.xpm trunk/jazz/src/Project.cpp trunk/jazz/src/Project.h trunk/jazz/src/RecordingInfo.cpp trunk/jazz/src/RecordingInfo.h trunk/jazz/src/dialogs/copyDialog.cpp trunk/jazz/src/dialogs/copyDialog.h trunk/jazz/src/dialogs/copyright.cpp trunk/jazz/src/dialogs/copyright.h trunk/jazz/src/dialogs/metronomeSettings.cpp trunk/jazz/src/dialogs/metronomeSettings.h trunk/jazz/src/dialogs/midiDelay.xrc trunk/jazz/src/dialogs/midiThruDialog.cpp trunk/jazz/src/dialogs/midiThruDialog.h trunk/jazz/src/dialogs/midiTiming.cpp trunk/jazz/src/dialogs/midiTiming.h trunk/jazz/src/dialogs/sequenceLength.xrc trunk/jazz/src/dialogs/songSettings.cpp trunk/jazz/src/dialogs/songSettings.h trunk/jazz/src/dialogs/synthSettings.cpp trunk/jazz/src/dialogs/synthSettings.h trunk/jazz/src/dialogs/velocity.xrc trunk/jazz/src/dialogs/windowSettings.xrc trunk/jazz/src/gui/trackwinEnum.h trunk/jazz/src/mswin/WindowsMidiInterface.cpp trunk/jazz/src/mswin/WindowsMidiInterface.h trunk/jazz/src/mswin/WindowsPlayer.cpp trunk/jazz/src/mswin/WindowsPlayer.h trunk/jazz/src/mswin/jazz.rc trunk/jazz/src/stamp-h.in Modified: trunk/jazz/src/Bitmaps/JazzLogo.xpm =================================================================== --- trunk/jazz/src/Bitmaps/JazzLogo.xpm 2008-04-05 23:49:12 UTC (rev 400) +++ trunk/jazz/src/Bitmaps/JazzLogo.xpm 2008-04-06 00:02:09 UTC (rev 401) @@ -1,201 +1,201 @@ -/* XPM */ -static const char* JazzLogo_xpm[] = { -/* width height ncolors chars_per_pixel */ -"450 67 127 2", -/* colors */ -" c black", -" . c #1919FD", -" X c #FA0402", -" o c #CF5126", -" O c #416AD4", -" + c #FA9546", -" @ c #FB3116", -" # c #8D8D8D", -" $ c #8FD5FF", -" % c #D8411E", -" & c #004DAE", -" * c #2E2EAA", -" = c #0068BB", -" - c #0808E8", -" ; c #2C91FA", -" : c #E4E4AD", -" > c #0C0DCE", -" , c #E0E06A", -" < c #BF8840", -" 1 c #CECEAB", -" 2 c #BD843E", -" 3 c #2788D7", -" 4 c #757578", -" 5 c #7777FB", -" 6 c #9A411F", -" 7 c #F5D564", -" 8 c #FAAF52", -" 9 c #CE0100", -" 0 c #FAE76C", -" q c #0B0DA8", -" w c #CBCBCC", -" e c #668DC2", -" r c #0071F9", -" t c #0035F6", -" y c #4B80C5", -" u c #3E4CC9", -" i c #5555AE", -" p c #DEDE71", -" a c #3636D5", -" s c #2B2BE8", -" d c #CBD272", -" f c #7272B3", -" g c #F2C65D", -" h c #9D4821", -" j c #D4AC50", -" k c #A4411E", -" l c #AA5327", -" z c #E8E86D", -" x c #0035A9", -" c c #FC5025", -" v c #FCEE70", -" b c #FF411E", -" n c #303096", -" m c #7B7B3A", -" M c #AFAFA2", -" N c #0E0E99", -" B c #3472CB", -" V c #013799", -" C c #5050FE", -" Z c #51ADFB", -" A c #686831", -" S c #B3B3D4", -" D c #E8E873", -" F c #C8C878", -" G c #FEFE78", -" H c #909076", -" J c #7BB2F6", -" K c #00459B", -" L c #3049BD", -" P c #922F15", -" I c #ACD7FE", -" U c #D8D866", -" Y c #018EF1", -" T c #B00201", -" R c #3174FC", -" E c #0037CC", -" W c #B0B08E", -" Q c #AFAF58", -" ! c #FB6E33", -" ~ c #78A3DB", -" ^ c #1B1BEA", -" / c #D0D08C", -" ( c #518EFA", -" ) c #9DE0FF", -" _ c #35A8F2", -" ` c #B2B254", -" ' c #8888CD", -" ] c #545490", -" [ c #8F8FF8", -" { c #CD833D", -" } c #D6D66D", -" | c #CF7235", -". c #8C8C42", -".. c #AEB1F5", -".X c #84ADDC", -".o c #C6C65D", -".O c #6895FC", -".+ c #89AFF8", -".@ c #A6A64E", -".# c #D12F16", -".$ c #E6E686", -".% c #EFEF71", -".& c #B8B866", -".* c #AFE7FF", -".= c #CFCF62", -".- c #8E0402", -".; c #B47034", -".: c #6F6FC7", -".> c #790201", -"., c #C0C0F2", -".< c #4A74FF", -".1 c #8F8FAE", -".2 c #BCBC59", -".3 c #C99345", -".4 c #0071CD", -".5 c #C8C868", -".6 c #008ADA", -".7 c #9A9A48", -".8 c #71C7FD", -".9 c #4F4FCF", -".0 c #71718D", -".q c #0051CD", -".w c #0153F9", -".e c #FA833D", -".r c #4D4D24", -".t c #AC3418", -".y c #0002FF", -/* pixels */ -".y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y", -".y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G f.:.: f G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G /.:.:.:.1 G G G G G G G G G M '.:.: f / G G G G G G G G.1.:.:.:.:.:.:.:.:.:.:.:.: f W G G.1.:.:.:.:.:.:.:.:.:.:.:.: f W G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G /.:.: f W G G G G G G G G G G G G G.1.:.: f.$ G G M.:.: f / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G.$ f G G G G.$.y r r s G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.1 r r.4.9 G G G G G G G G.$ s Y.w r.q f G G G G G G G G . r r r r r r r r r r r r.q M G G ^ r r r r r r r r r r r r.q.1 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.: r r.q M G G G G G G G G G G G G G . r r q G G G.9 r r x / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G M C n G G G G W r Y &.0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.9 Y Y & # G G G G G G G G ' ;.6 x Y & ] G G G G G G G /.w & & & & & & & & & x &.4 x p G D.w & & & & & & & & & x &.4 x / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.9 Y.4 x p G G G G G G G G G G G G /.w Y & n G G G . Y.4 q G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G / 5 (.4 ] G G G G.1 r Y & # G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ^ Y.4 & / G G G G G G G / R ; & E Y.4 * G G G G G G G W * * * * * * * *...:.. ; & N G G W * * * * * * * *...:.. _ & N G G G G G G.$ M M W G G G G G G G G G G G G G M M W / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G a s * n G G G G G G G G G G G G G M r Y &.0 G G.$ s s * ] G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G.1 ; Y & # G G G G.9 Y.4 x / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.$.w Y.4 q G G G G G G G G.: ;.6 V s r.4 q G G G G G G G G G G G G G G G G w.* _ & N F G G G G G G G G G G G w.* Z & N W G G G G G G.1 r r.q.$ G G G G G G G G G G G G.y r.w.1 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.: r.6 & W G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.$ M.1.1.1 W G G G G G G G G G G G M.1.1 M G G G G G G G G G G G W.1.1 / G G G.$.$.$.$ G G G.$.$.$.$ G G G G G.$.$.$.$ G G G G G G G / M.1.1 / G G G G G G G G.$.$.$.$ G G / M.1 M G G G G G G G G G G / M.1.1 / G G G G G G G G G G.$ M.1.1 W G G G G G G G G.$.$.$ G G G M.1 W G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G.$.$ a Y.4 x W / D G G . Y.4 q G G.$ M.1 M.$ G G G G G G G G G /.1.1.1 / G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G W r Y & n G G G G G G G / R Y & n.: r.6 x p G G G G G G G G G G G G G G w I Z = V W G G G G G G G G G G G w I Z = V # G G G G G G G.1 r.6 x D G G G G G G G G G G G G.y Y & # G G G G G G G G G G G G G G G G G G G G G G G G G G G.$.$.$ G G G M.1 M.$ G G G G / M.1 M G G G G G G G / / / D G G G G G G /.1.1 M D G G a Y.4 x p G G.$ / / / G G G G G G G G G G G G G G G G G G G G G G.$.:.w r r r r r -.1 G G G G G G.$.:.w r r r r -.1 G G G G G G G 1 s r r r.w a.$ W.w.w.w.1 G G G s.w.w > G G G G /.w.w.w.9 G G G G G / C.w r r r r a W G G G G G W.w.w.w f.$.:.w r r r > / G G G G G G 1 C.w r r r r a W G G G G G G /.:.w r r r r ^ W G G G G G M.w.w.q M.$ 5 r r q.$ G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G s.w.w.w.w E.w.q.1 G.$.w Y & n.$.:.y r r r - W G G G G G G M s r r r r.w.9.$ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G f r Y & ] G G G G G G G C ;.4 V W.1 r Y & W G G G G G G G G G G G G G 1 I.8 = V # G G G G G G G G G G G 1 I.8.4 V.0 G G G G G G G G.1 r.6 x D G G G G G G G G G G G G.y Y & # G G G G G G G G G G G G G G G G G G G G G G G G G G f.w.w.q / M . r r r - M G.$.:.w r r r > / G G G G.:.w.w.q M G G G G.$ 5 r r r r -.1 G.y Y = N G G G.9.w.w.q / G G G G G G G G G G G G G G G G G G G G.$.. Z.4 & & &.4.4 Y.w f G G G G.$., (.4 & & &.4 Y.q f G G G G G w $ Z.4 & &.q.4 a f r Y & / G G.$.w Y.4 n G G G G.1 r Y & # G G G G :.. ;.4 & &.q r r > / G G G G.1 r Y &.9 [ B &.q.4 Y.4 * G G G G G w.O Y.4 & &.q r r.q W G G G G :.. Z.4 & &.q.4 r.q W G G G G.: r.4 x W I Z.4 K.0 G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G.$.y.4.w r r.4.4 x p G M r Y & n [ B &.q.4 Y.4 > D G G G G w J Y & & &.q Y r a D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.9 Y.6 & # G G G G G G M R Y & n D W r Y & # G G G G G G G G D D D D 1 I.8.4 V ] D D D G G G D D D D D / I $.4 V ] D D D G G G G G G.1 r.6 x D G G G G G G G G G G G G.y Y & # G G G G G G G G G G G G G G G G G G G G G G G G G G.9 r.4 q ] J &.q.4 Y.4 > W.. B &.q.4 Y.4 * G G G G a r.4 x p G G G.$.. Z Y & & &.4.q f.w Y & ] G G G.y Y.4 q D G G G G G G G G G G G G G G G G G G G G C Z & N.0 # # *.q.4.q E / G G.$ [.* = V ] # f > r r.q / G G G 1 $.8 & N ].0 *.q.q - Y.4 q G G G M r Y &.0 G G G G.9 Y.6 & / G G G 1 I.8 K N.0 # i.w r.4 * G G G G.9 Y.4 q.. V ] # i.w Y.6 & / G G G w.* Z & N ].0 *.q r.4 q G G G.$.+ $ & N.0 # i > Y.4 > G G G G s Y.4 q.9 y x x q D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G W s q t Y q q * ] G G f r.6 q [ N ] # f - Y Y & # G G G S I Z V n # # a.w Y.q f G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G . Y.4 x.& D D G G G G C ;.4 V.& p F.w Y & ] G G G G G G G D D p } /.. $.4 K n } } } D D D D D p } } /.. $.6 K n.5 } p D D D D D D D.1 r.6 x p G G G G G G G G G G G G.y Y &.0 G G G G G G G G G G G G G G G G G G G G G G G G G G . Y &.: e n # f - Y.6 & [ q ] # i.w Y.6 x D G G G.y Y = q D D D.$ 5 $.4 V n.0 i >.4 > r Y &.0 D D /.w Y & n D D G G G G G G G G G G G G G G G G G G /.w Y &.0 G G G G.0 q ].0 / G G.: Z.6 V # G G G W.w Y &.0 G G G s _ = N W G G G.9.w t Y & n G G G f r.6 & # G G G G ^ Y.4 q G G G G C.8 = N F G G G.9 r.6 & / G G G . Y =.. N W G G G s r.6 & W G G /.< Z & N.& G G G i r & & W G G C Z = N W G G G f.w Y & W G G G.y Y &.9 B n W D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G.: r.6 & # D D G G.9 Y.4.+ N H D D G.9 r Y & # G G / R Z & n D G G G ^ r.4 q G G G G G G G G G G G G G G G G G G G G G G G G G G G G G /.w Y.4 q } p D G G G.1 ; Y K ] } } }.y Y.4 * D G G G G G G D } } F.. $.6 K n.&.5.5.5 } D D D } }.5 F.. $ Y K N.&.5.5 } } D.9.w.w.w.w.w.w Y.q.w.w.w.w.w M G /.w.w.w.w.w.w Y x.w.w.w.w.w.9 G G G G G G G G G G G G G G G G G G G G /.w Y x.: ] G G G.9 r Y q * # G G G . Y.4 x D G G /.w Y & n } D D.: ; Y V ] G G G W - > t.6 &.& D D.1 r Y & ] } D D G G G G G G G G G G G G G G G G G / r Y.q * W G G G G G G G G G /.w Y & n G G G G G.y Y.4 * G G.1 r Y V.0 G G G G.$.y E Y &.0 G G G a Y.4 x p G G G.$.w Y & n G G G.1 r Y K.0 G G G G W r Y & # G G.$.w Y &.O W G G G G s Y.4 x F G G.9 Y.6 V # G G G G W * ].0 / G M r Y K ] G G G G /.w Y &.0 G G /.w Y q.9 ] G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G s Y.4 x.& D D D G . Y.q.< 4.5 } D G.9 r.6 & W G G.9 Y.4 V W G G G G f r.6 x / G G G G G G G G G G G G G G G G G G G G G G G G G G G G M r Y & n.5 } p D G.$ s ; = V.& }.5.5 s r.4 q D D G G G G D D } F...* Y & N H Q Q Q.&.5 } D } }.5.&.. I _ & N H Q Q.&.5.5 }.9 r Y Y Y Y r.6 Y Y Y Y Y & W G / r Y Y Y Y Y Y r Y Y Y Y & ] G G G G G G G G G G G G G G G G G G G G M r Y.X N G G G G.9 Y Y & ] G G G G.w Y.4 q G G G.1 r Y &.0 } } F . Y & N D G G G G.9 r.w.4 x.5 } p.: r.6 & 4.5 } D G G G G G G G G G G G G G G G G G G - r Y.4.w ^.9 W G G G G G G.1 r Y &.0 G G G G G s Y.4 * G G s Y.4 N D G G G G G s.w Y & # G G G.y Y.4 q G G G G M r Y &.0 G G G s Y.4 x F G G G G /.w Y &.0 G G M r Y.O n G G G G D.y Y.4 q G G.$.y Y = N G G G G G G G G G G G.9 Y.6 x W G G G G D.w Y & ] G G.1 r Y L N D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G D.y Y.4 q } } D D /.w r.4 N.&.5 } p D s Y.4 x F G D.y Y = N G G G G G.1 r.6 & W G G G G G G G G G G G G G G G G G G G G G G G G G G G G f r Y & ].5 } p D G.: ;.6 K.0 }.5.&.& a r.4 x F D G G G G G D p S.* _ & V H Q Q Q.&.5 } } D D } } S.* _ & V H Q Q Q.&.5 } p ].q & & & &.4 r x & & & & & W G /.w & & & & x r & & & & & & ] G G G G G G G G G G G G G G G G G G G G.: r.q ( # G G G G . Y.4 V F G G G W r Y & n G G G.: r.6 & H } p f r Y K.0 G G G G G.1 r r = N.5 } } a Y.4 x.& } p D G G G G G G G G G G G G G G G G G G.1.q.4.6 Y Y r.w ^.1 G G G G.9 Y.6.q.w.w.w.w.w.w.w Y.4 * G G.w Y & n G D D D D D s r.4 x F G G /.w Y & ] G G G G.: r.6 & # G G G.y Y.4 E.w.w.w.w.w.w.w Y &.0 G G f r.6 &.0 D D D D W.w Y & n G G M r Y & ] G D D D D D G G G G G ^ Y.4.q.w.w.w.w.w.w.w Y & ] G G.: r.4 ( # D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G W r Y & n } } } D.1 r Y & ].&.5.5 } p.y Y.4 q G G W r Y.4 t.w.w.w.w.w q.w.6 & W G G G G G G G G G G G G G G G G G G G G G G G G G G G G a Y.6 &.0.5 } p D / s Y = N # # # #.0 a r.6 & W D G G G G G D S.* Z = N H.&.& Q.&.&.5 } p D D D w I Z = N 4.& Q Q Q.&.5 } D W # # # #.9 r.6 x.0 # # # # p G D # # # # #.y Y & ] # # # # W G G G G G G G G G G G G G G G G G G G G a Y _ x F D D D /.w Y = N G G G D.1 r Y &.0 G G G s Y.4 x F } D.9 Y.4 x F D D D D D.1 r Y & ].5.5 p.y Y = N.5 } D D G G G G G G G G G G G G G G G G G G G # * E.q.4.6 Y Y.q f G G G a r.q.w & & & & & & & & & n G /.w Y &.0 D D D D D D.y r.4 q D D D.1 r Y &.0 D D G G a Y.4 x F D G /.w Y.w q & & & & & & & & & # G G.9 Y Y x.& D D D D.1 r Y & ] G G.1 r Y & # D D D D D D D D G G G.y Y.w x & & & & & & & & &.0 G G s r.q N F D D D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G.1 r Y & ].5.5 } } f r.6 & 4.&.5.5 } W r Y & n G G.1 r Y.w & & & & & & & & & x F G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y Y.4 x.&.5 } p D C ;.q.q r r r r r r r r Y & # D G G G G G 1 I.8 = V 4.5.5.&.&.&.&.5 } D G G 1 I.8.4 V.0.5.5.&.& Q.&.5 } D D G G G D.1 r.6 x p D G G G G G G G G G D D.y Y &.0 D G G G G G G G G G G G G G G G G G G G G G G G G.y Y.4 q D D D D # r Y & ] D D D D.9 Y.6 & # D D D.y Y = N D p D s Y.4 q D D D D D D f r Y & 4.5.5 W.w Y & n } p D G G G G G G G G G G G G G G G G G G G G D D W ] q.q.4 Y.6.q W G G s r.4 x.0.0.0.0.0.0.0 # # W G W r Y &.0 D p } } } W.w Y & n D D D.9 Y.6 & W D D D D.y = = N D D D /.w Y & * #.0.0.0.0.0.0 # # p G G . Y = N } } } } }.9 r.6 & # D G f r.6 & # D p p } } p D D D G G.y Y & q #.0.0.0.0.0.0 # # F G D.y Y ; n p p } p p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D.9 Y.6 & 4.5.5.5 } a Y.4 x.&.&.&.5.5 f r Y &.0 D D.1 r Y &.9.0.0.0.0.0.0.0 # # D G G G G G G G G G G G G G G G G G G G / M.1.1 G G G G /.w Y = N.5.5 } D M R Y r.4.4.4.4.4.4.4.4.4 Y & ] D G G G G 1 I.8.4 V ] p }.5.5.5.5.5 } D D G 1 I.8.4 V ] D }.5.5.&.&.5 } D D G G G G D.1 r.6 x F D G G G G G G G G G D }.y Y &.0 D G G G G G G G G G G G G G G G G G G G G G G G /.w Y & n p p p } f r.6 & # D D D p ^ Y.4 x F D D W r Y & ] D D D . Y.4 q D D } } } } s r.4 & H.&.5.1 r Y &.0 } D D G G G G G G G G G G G G G G G G G G G D p p } }.5 # ^ r Y & # D D.9 r.4 x F } } } } } } p D D D W r Y &.0 p } } } }.: r Y &.0 } p D s Y.4 x F p D D M.w Y & ] } p D D.y Y & n } } } } } } } p D D D /.w Y & n } } } } } s Y.4 x.& D D f r.6 & # } } } } f.9 f # F D D ^ Y.4 q } } } } } } } p p D D W r r & ] } } } } p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D s Y.4 x H.5.5.5 }.y Y.4 q.5.&.5.5.5.9 Y.6 & H D D W r Y &.0 } } } } } } p D D D G G G G G G G G G G G G G G G G G G G.y r r s G G G G.1 r Y & ].5.5 } p C ;.4 V x x x x x x x x.q Y.4 * D G G G.$ I $.4 K ] D } }.5.5.5.5 } p D G.$.. $.6 K n p p }.5.5.5.5.5 } D D D G D D } f r.4 x.& } D D G G G G G D D } }.y Y &.0 } D D D G G G G G G G G G G G G G G G G G G G G.1 r Y &.0 } } } } a Y.4 x.& } p } F.w Y = N D D D.1 r Y &.0 D D D ^ Y.4 q p } } } } W R.4.4 q.&.&.5.9 r.6 & # } D D G G G G G G G G G G G G G G G G /.9 ^.w a } }.5.5.5.: r.6 & # D D.1.w.6 & # } } } } '.9 f # D D /.w Y.4 q p } } } / [.q.6 & H } } }.y Y.4 q } } p.$...w Y &.0 } } p D a r.4 q.& } } } p 5.9 f W } D.1 r Y &.0.5.5 } } p.y Y = N } } D.1.w Y &.0 } } } / 5 r r q W D D.9 r.6 q.& } } } p.:.: f W } D.1 r Y &.0.5.5.5 } p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D.w Y.4 q.&.5.5.5 W.w Y & n.5.&.5.5.5 ^ Y.4 x F } p p.y Y.4 * } } } } W 5.9.1 F D D G G G G G G G G G G G G G G G G G G . Y.4 q / G G D [ ;.4 V H.5.5 }.1 R Y & n F.&.&.5.5.5.&.& q Y.4 q D G G.$.. $.6 K n D D } }.5.5.5 } p D D.$.. $.6 K n p D }.5.5.5.5.5 } D D D D D D } } f r & x.& } } D D D G D D D } }.5.y.4 &.0.5 } p D D D G G G G G G G G G G G G G G G G G G.: r.6 & H } } } } . Y.4 q.5 } } } # r Y & ] } p p.9 Y.6 &.& p p p a r.6 & # } } } } S O Y & n.&.&.5 s Y.4 x F } D D G G G G G G G G G G G G G G G G D > r Y.q i.&.5 F f 5 Z = V F D D F - r.4 > # }.&.:.* r.q a } p } ^ r.6.q * W W f 5 u.w.4 x.&.5 } }.y Y.6 x # } W 5 *.y.6 & H.5 } } D #.w Y.q *.& } W 5 I r & # } } f r.6 & H.5.5 } } W r Y & n.5 } D p - r.4 > #.& # C.*.6 K ] } p D W.w r.q > W } W ' I r.q f } }.9 Y.6 & H.5.5.5 } D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G /.w Y.4 q.0 # W }.1 r Y & ].5.5.5.5 F.w Y = N.5 } } } i r.6.q i.& F.1 [ ).4 q W p D G G G G G G G G G G G G G G G G G G.9 r Y.q >.9.9 . ( _ & n.5 } } F s ;.4 V H.5.5.5.5 } }.5.5 a r.4 q p G G [.8 Y q E N s s s s ^ ^ ^ ^ ^ f G [ J ; q E N s s s s ^ ^ ^ ^ ^ f D D D D } }.5 # a n n.&.5 } } D D D D D } }.5.& a n n 4.5.5 } } D D D G G G G G G G G G G G G G G G G G a Y.4 x.&.5 } }.&.w Y & n.5.5 } } f r Y &.0 } } } s Y.4 x F } } } f r Y.4 > #.& W.: ~.w Y & ].&.5.5.y Y = N } } p D G G G G G G G G G G G G G G G G G #.q.4.4 r.w.w.w r ;.4 V.0 D D p }.0.q.4.4.w t.w r ; K N.& } } }.0.w.6 Y r.w.w r & E Y = N.5.5.5.5 a r Y.4.w t.w x.y Y.4 q.5.5.5 } } D a.4.6 r.w t.w ;.4 V ].5.5 } a Y.4 x.&.&.5 } } f r Y & ].5.5 } D f.q.4.4.w.w r Y 3 K n F } } p D i.q.4.4.w t.w r 3 V n.&.5 } s Y.4 q.&.&.5.5 } D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G /.w Y Y r.w.q.1 }.9 r.6 & H.5.5.5.5 # r Y & ].5.5.5 } F >.q.4 r.w.w r ; & N 4.5 } D D G G G G G G G G G G G G G G G G G W.w.4 Y Y r r Y Y & V H.5 } }.: ; Y & n }.5.&.5.5 } } }.5.9 r.6 &.& G D.w r r t Y Y Y Y Y Y Y Y Y Y Y M G.y r &.w Y Y Y Y Y Y Y Y Y Y &.1 D D D p }.5.5.& Q Q Q.&.5.5 } p D D D p }.5.5.& Q Q Q.&.&.5.5 } } D D G G G G G G G G G G G G G G G G G.y Y.4 N.5.5 } } # r Y & ].5.5.5.5.9 Y.6 & H } } F.y Y = N } } } }.& >.4 Y r.w.w r B N r Y & 4.&.5 W.w Y & ] } } } D G G G G G G G G G G G G G G G G G G # >.q &.4.4.4 & K N.0 } D D } }.5.0.q &.4.4.4 & V n.& } } } }.5 i.q &.4.4 & N a.w Y & n.5.5.5.5 #.q.4 = & x N # ^.q & n.5.5.5 } } } d * E &.4.4.4 K V ].5.5.5 } q & & q.5.5.5 } }.9.q & & H.5.5 } D } i.q &.4.4.4 & V ] F } } } } p } i.q &.4.4.4 K V ].5.5.5.5.y & & N.5.&.5 } p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D a.q.4.4.q x F } a.q & x.&.5.5 } }.0.4 & &.0.5.5.5 } }.& >.q &.4.4 & V N H } } } D D G G G G G G G G G G G G G G G G G G f > &.q.4 = & V N H.5.5 }.& R & & N.&.5.5.&.&.5.5 }.5.& ].4 & & # G W.w & & & & & & & & & & & & & & / /.w & & & & & & & & & & & & & x F G G D D } }.5.&.& Q.&.&.5 } } D D D D D } }.5.&.& Q.&.&.5.5 } } D D D G G G G G G G G G G G G G G G G F.w & & n.5.5 } p.0.4 & & 4.5.5 } } q.q & q.5 } }.&.w & & ] } } } }.5 # >.q.4.4 & V n a.q & x.&.5.5.0.4 & &.0 } } p D G G G G G G G G G G G G G G G G G G D p # ] * q n n.0.& } } p D }.5.5.&.& ] n q n ] H.5 } } } } }.5.5.0 n * n ].&.1 r Y &.0.5.5.5.5.5 # * * n.0 F } f ] ] H.5.5.5 } } } }.5 # ] * q n.0.& }.5.5.5.5 i ] ].0.5.5 } } p f ] ] ].&.&.5 } D } }.& ] * q n.0.& D D p } } } } }.5 H ] * q n ].&.5.5.5.5.& i ] ].0.5.5.5 } D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D p.0 n q * ] p }.0 ] ] ].5.5 } } } #.0 ] ].&.5.5.5.5 }.5.5.0 n * q n.0 F } } } } D G G G G G G G G G G G G G G G G G G G G /.0 * * n ].0 F.5.5.5 } #.0.0.0 # }.5.& Q.&.&.5.5.5.& H ] ] ] W G /.:.0.0.0.0 ] ] ] ] ] ].0.0.0 f G /.:.0.0.0.0 ] ] ] ] ] ].0.0.0.0 G G G G D D } }.5.&.&.&.5 } } D D D G D D D } }.5.&.&.&.5.5 } } D D D G G G G G G G G G G G G G G G G G F.0 ] ] 4.5.5 } D # ] ] ].&.5 } } } i ] ].0.5 } }.& ] ] ] H } } } }.5.5 H ] * n ] H p f ] ] ].5.5.5 H ] ] ].& } } p D G G G G G G G G G G G G G G G G G G D D D }.5.5.5.&.&.5.5 } } D }.5.5.&.&.&.5.5 } } }.5 } } } } }.5.5.&.5 } } D D.9 r.6 & H.5.5.5.5.5.5.5 } } } } } } } } }.5.5 } } } }.5.5.5.&.5.5.5 } } } }.5 } } } } }.5.5.5 } } D D }.5.5.&.5.5 } p } } }.5 } } D D D D D D D p } } }.5.5.&.5.5.5 } }.5.5.5.5.5 } } }.5.5.5 } p D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D } } }.5.5.5 } } } } } } }.5.5.5.5.5.5 }.5.5.5.5.5.5 } } } } } } D D G G G G G G G G G G G G G G G G G G G G G G G G G D p }.5.5 } } p p p } }.5.5.& Q.&.&.5.5.&.& Q Q.&.5 p D G G D D p }.5.5.5.5 } D D D G G G G G G D p }.5.5.5.5 } } D D G G G G G G G D D }.5.5.&.5.5 } D D G G G G G D D } }.5.&.5.5 } D D D G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D } }.5.&.5.5 } p } }.5.5.5 } } } }.5.5.5.5 } } p }.5.5.&.5.5 } D D D } } }.5.5.5.5.5.5.5 } } } } D D G G G G G G G G G G G G G G G G G G G D D } }.5.5.&.&.&.5 } } D }.5.& Q.&.&.5.5.5.5.5 } } } p D }.5.&.&.5 } p D D s Y.4 q.&.5.5.5.5.5.5.5.5 } } } } } } } } } } } } } }.5.5.5.&.5.5.5.5 } } } } } } } } } } } } } D D D } }.5.&.5.5 } p } } }.5 } p D G G G D D D D } }.5.5.5.&.5.5.5.5.5 } }.5 } } } } } } } } p D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D p } }.5.5 } } p p D p p } }.5.5.5.5.5 }.5.5.5.5.5.5.5 } } } } p D D G G G G G G G G G G G G G G G G G G G D D D D G G D } }.5.5 } } D p } } }.5.&.& Q.&.&.&.&.& Q Q Q.&.5 } D D D D D }.5.5.&.5.5 } D D G G G G G G D D }.5.&.5.5 } } D D D G G G G G G G G G D }.5.5.5 } D G G G G G G G G G D } }.5 } } D D G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5 } p D D }.5.&.5 } } D p } }.5.5 } } } }.5.5.5.5 } } D }.5.& Q.5.5 } D D D } } }.5.5.5.5.5.5.5.5 } } } D D G G G G G G G G G G G G G G G G G G D D } }.5.5.5.&.&.&.5 } } D } }.5.&.&.&.5.5.5.5.5.5 } } p D }.5.5.&.5.5 } D p.y Y = N.5.5 } }.5.5.5.5.5.5 } }.5.5.5.5.5 } } } } } }.5.5.5.&.&.5.5.5.5 } } } } } }.5 } } } } } D D D } }.5.&.5.5 } D } }.5.5 } } p D D D D D D D } } }.5.5.&.&.5.5.5.5 } } } } }.5.5 } } } } D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D } }.5.5.5 } } D D D p } } }.5.5.5.5 } }.5.5.5.&.5.5.5.5 } } } D D G G G G G G G G G G G G G G G G G G G D D p D D D D } }.5.5.5 } } D p } }.5.5.5.5.5.5.5.5.5.5.&.& Q.5.5 } D D D } }.5.&.& Q.&.5 } p D D D D D D D D }.5.5.&.&.5.5 } } p D D D G G G G G G G D p }.5 } p D G G G G G G G G G D D }.5 } p D G G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5 } D D D }.5.&.5 } p D D }.5.5.5 } } p }.5.5.&.5 } } D }.5.5.&.5.5 } D p } }.5.5.5.5.5.5.5.5.5.5 } } p D D G G G G G G G G G G G G G G G G G D D } }.5.5.5.5.&.&.&.5 } } D } }.5.&.&.5.5.5.5.5.5.5.5 } p D }.5.5.&.&.5 } } W r.6 & ].5 } } }.5.5.5.5.5.5.5.5.5.5.5.5.5 } } } p } } }.5.5.&.&.&.5.5.5 } } } } }.5.5.5 } } } p D D D } }.5.5.5 } } D } }.5.5.5.5 } } p D D D p p } } }.5.5.&.&.&.5.5.5.5 } } }.5.5.5.5 } } p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D } }.5.5.5 } } D D D p } } } }.5 } } } }.5.5.5.&.&.&.5.5 } } } D D G G G G G G G G G G G G G G G G G G G D } } } } } } }.5.5.&.5 } } D p }.5.5.5.5.5 } } } } }.5.5.&.&.5.5 } D D } }.5.&.& Q Q.&.5.5 } } D D D D D p }.5.5.& Q.&.&.5.5 } } } p D D G G G G G G D D } } } D D G G G G G G G G G G D p } p D D G G G G G G G G G G G G G G G G G G G G G G D D }.5.&.5 } D D D }.5.&.5 } p D D }.5.5.5 } } D }.5.5.&.5 } p D } }.5.&.&.5 } } } }.5.5.5.5.5 }.5.5.5.5.5 } } D D G G G G G G G G G G G G G G G G G G D } }.5.5.5.5.5.&.&.&.5 } p D D } }.5.5.5.5.5.5.5.5.5.5 } D D p }.5.&.&.5.5 }.0 E x x.0.5 } } } }.5.5.5.5.5.5.5.5.5.5.5.5 } p D D D p }.5.5.&.&.&.5.5.5 } } } } }.5.5 } } } p D D D D p }.5.5 } } p D p }.5.5.5.5.5 } } } } } p p p p }.5.5.&.&.&.5.5.5 } } } } }.5.5 } } } D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } D } }.5.5.5 } p D D D p } } } } } } } } } }.5.5.&.&.&.5.5 } } p D D G G G G G G G G G G G G G G G G G G D D }.5.5.5.5.5.5.5.5.5.5 } p D p }.5.5.5.5 } p D D D D } }.5.5.5 } } D p }.5.5.&.& Q Q.&.&.5.5 } } } } } } } }.5.&.& Q.&.&.&.5.5.5 } } p D G G G G G G G D D } D D G G G G G G G G G G G D D p D D G G G G G G G G G G G G G G G G G G G G G G G D D }.5.5.5 } D D D }.5.&.5 } D D D }.5.5.5 } p D } }.5.&.5 } D D D }.5.&.5.5.5 } }.5.5.&.5.5.5 } }.5.5.5.5 } p D D G G G G G G G G G G G G G G G G G D D }.5.5.5.5.5.5.5.5.5.5 } D D D D } }.5.5.5.5.5.5.5.5.5 } D D D }.5.&.5.5.5.5.&.&.& H.&.5 } p } } }.5.5.5.5.5.5.5.&.&.5 } } D D D D D } }.5.&.&.&.5.5.5 } } } } }.5.5 } } } D D D D D p } }.5 } p D D D }.5.&.&.5.5.5.5 } } } } p D D } }.5.&.&.&.5.5.5 } } } } } }.5 } } D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D }.5.&.5.5 } p } }.5.5.5 } D D D D D } } } } } } p p p } }.5.&.&.&.5.5 } } D D D G G G G G G G G G G G G G G G G G G D p }.5.5.&.5.5.5.&.5.5.5 } D D D }.5.5.5 } D D G G G G D p }.5 } } } D } }.5.&.& Q Q Q.&.&.&.5.5.5.5 } }.5.5.5.5.&.& Q Q.&.&.&.5.5.5.5 } D D G G G G G G D D D D D G G G G G G G G G G G D D D D D G G G G G G G G G G G G G G G G G G G G G G G D D }.5.5 } } D D D }.5.&.5 } D D D } }.5.5 } D D p }.5.&.5 } D D D }.5.5.5.5.5.5.5.5.&.&.5.5 } } }.5.5.5 } } D D G G G G G G G G G G G G G G G G G G G D p } } } } } }.5.5.5 } D D G D D D } } } } } }.5.5.5 } D D G D D }.5.5.5 } }.5.&.& Q.&.5 } D D D } } } } } }.5.5.5.5 } } D D D D D D D } }.5.5.5.5 } } } p D p } } } } p D D D D D D D p } } p D D D D p }.5.5.5.5 } } } } p D D D D D } }.5.5.5.5 } } } p D p } } } } p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G D p }.5.5 } } D p } }.5 } } D D D D D D D p D D D D D D D } }.5.5.5 } } } D D D G G G G G G G G G G G G G G G G G G G D D }.5.5.5.5.5.5.5.5.5 } D D D D p }.5 } p D G G G G G D D p } } p D D p }.5.5.5.&.&.&.5.5.5.5.5 } } } } } }.5.5.5.5.&.&.5.5.5.5.5.5 } } D D G G G G G G G D D D G G G G G G G G G G G G G D D D G G G G G G G G G G G G G G G G G G G G G G G G D D p } } } D D G D p }.5 } p D G D D }.5 } p D D D } }.5 } p D G D D }.5 } } } } }.5.5.5.5 } } p } } } } } p D G G G G G G G G G G G G G G G G G G G G D D p } } } } } } } } D D D G G G D D D D p } } } } } D D D G D D D } } } } }.5.5.& Q.5.5 } D D D D D p p } } } } } } } D D G G G G G D D p } } } } } p D D D D D D } D D D D D G D D D D D D D D D G D D p } } } } } } p D D D D D G D D p } } } } } p D D D D D D p D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G D p } } p D D D p } } } D D G G D D D D D D D D D D D D D p } } } } } D D D G G G G G G G G G G G G G G G G G G G G G D D } } } } } } } } } D D D G D D p } D D G G G G G G G D D D D D D D D p }.5.5.5.5.5.5.5 } } } } } } } } } } }.5.5.5.5.5.5 } } } } } p D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D D p D D D G D D p } p D D G D D D } p D D G D D } } } D D G G D D } } } } } } } } } } p D D D D p } D D D G G G G G G G G G G G G G G G G G G G G G G D D D D D D D D D D G G G G G G G D D D D D D D D D G G G G G D D D D D p }.5.&.&.5 } D D G G D D D D D D D D D D D D G G G G G G G D D D D D D D D D D G D D D D D D G G G G G G G D D D D G G G G D D D D D D D D D D G G G G G G D D D D D D D D D D G D D D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G D D D D D D D D D D p D D G G G G G D D D D G G G G G G D D D D D D D D D G G G G G G G G G G G G G G G G G G G G G G G D D D D D p D D D D D G G G G D D D D D G G G G G G G G D D D D D G D D D } } } } } } } } } p D D D D D D D p } } } } } } } } } p D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D D D G G G G D D D D D G G G D D D D D G G G D D D D D G G G G D D D D D D D D D D D D D D D D D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G D D D D G G G G G G G G G G G G D D D D G G G G G G G G G G G G D D }.5.5.&.5 } D G G G G G G G G G D D D D G G G G G G G G G G G G D D D D G G G G G G G D G G G G G G G G G G G G G G G G G G G G D D D D G G G G G G G G G G G G D D D D G G G G G G G D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D G G G G G G G D G G G G G G G D G G G G G G G G G G D D D D D D G G G G G G G D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D }.5.5.5 } D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D } }.5 } D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D } } p D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G D D p D D G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G v G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G v G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 7 ! X X X X c g G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 0 ! X X X X c 8 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.% .r G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G z A G G G G G G G G G G G G G G G G G G G G G G G G G G G G G z A G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.o .7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.e X X T.-.- T 9 9 + G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 0 X X.-.-.- T 9 9 + G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G , . G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G U . G G G G G G G G G G G G G G G G G G G G G G G G G G G G G U . G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G , . G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.%.@ z G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ! X T.> h.3.3.# 9 9 T 8 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ! X.> l j 8 ! X X T 7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.2 ` G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.2 ` G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.o . G z G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.r.r G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G g X T.> j G G G G ! X T.t G G G G G G G G 7 v G G G G G G G G 0 7 G G G G G G G G G G G G 7 G G G G G G G G G G G G G G G G X 9.> G G G G.; T.-.3 G G G G G 0 7 0 G G G G G G G G G G G G G G G G G G G G G G G 0 7 G G G G G 7 0 G G G G G G G G v 7 0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.@ .o G G U m .7 z G G .= A .7 G G G.@ .o G. U G G G.7 U G G.2 A .r.@ G G G .= A .7 G G G.@ .o G. U G G G.7 U G G.2 A .r.@ G G G G G G G G.2 A .r.@ G G G G.o m m U G G G. U G G G.7 U G. U ` G G.= A .r ` G G G.2 A .r.2 G G G G.o m m U G G G. U ` G G.@.r.r.= ` .2 G G.2 A .r.2 G G G G G G G. U.= A A U G G G.2 A .r.2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G @ X.>.3 G G G G G G X 9.- G G 7 X X ! ! X X X ! G G G G G ! X X X X.e G G G G c X X 7 c X X X 8 G G G G G G G G G G G G G G X 9.- 7 G G G 7 8 j 7 G G G + @ X X X @ 8 G G G G + X 9 8 G G 8 X X + G G + X X 7 ! X 9 8 G 7 c X X X @ 8 G G G G 8 @ X X X @ 7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G. , G.= A G , .r .@ G G. , G.r G G G G.r .% G.@ ` G , .r .@ G G. , G.r G G G G.r .% G.@ ` G G G G G G.@ ` G G.@ U G G.r G G G G.r .% G m m G.@ ` G.7 .2 G G.@ U G G m m G m .r U G.7 .2 G G G G G G m m .r G G.7 .2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 7 X.- P G G G G G G G c X.- 7 G 8 X 9 X.- X 9 9 9 | G G G @ 9.>.- T 9 9 { G G G X X.- 9.- T 9 9 T v G G G G G G G G G G G G G c 9 T 9 ! 0 G G G G G G G ! X T.>.- T 9 9 + G G G c X.> 0 G G ! X.> 8 G G c X X c 9.- P G 8 X T.>.- 9 9 9 g G G + X T.> T 9 9 9 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.7 .= G z G G G G.= .= G G G.= .=.o , G.2 .r G G G.% A G G G z A G G .% G.o.r.7 G.o , G.2 .r G G G.% A G G G z A G G .% G.o.r.7 G G G G G G .% G.o.r.7 G.= .o G G.@ m G.% A G G G z A G G .r , G.= .r , G , m.= .r , G.2 A G G G G.= .o G G.@ m G G .r , G.= .r , G.7 z.= .r , G.2 A G G G G G G .r.= G.% A .%.= .r , G.2 A G G.7 , G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G + X.> < G G G G G G G c X.> 7 G ! X.> P 7 G g X 9 T G G ! X.>.3 G G @ X T G G 7 X T.> c G G @ X.- g G G G G G G G G G G G G G 7 9 T 9 X X ! 7 G G G G + X.- P 7 G 7 X X T G G G X T.- G G G c 9.> G G G @ X X T.; j 7 7 X T.- j G 8 X.- o G 7 X.- P 0 G + X T.3 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G A G G G.= .= G G G.= .= G ` ` G G G G.% .r G U .@ G G G.o .7 G G A A.o.% G G G ` ` G G G G.% .r G U .@ G G G.o .7 G G A A.o.% G G G G G G G G A A.o.% G G G m .2 G G G G G U .@ G G G.o .7 G z , G G.7 .2 G G G G G m .2 G G G G.% .r G G m .2 G G G G G z , G G. .= G G , G m .2 G G G G G G G G z z G G G m G m .2 G G G G G A G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G c X.> g G G G G G G G @ 9.> v G @ 9.> g G G G c X.- 0 0 X T P G G G + X.- 7 G 8 X.> P G G G c X.> 7 G G G G G G G G G G G G G G 0 | T T 9 X X + G G G X 9.> 7 G G G + X.- 8 G 7 X.- l G G G X T P G G G X T.> j G G G ! X.> j G G G.; ! j G ! X.> g G G G X T l G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G , . G G.@. . . .r .@ G G.= .= G G G.= .= G G. , G G G G , . G.2 .= G G G.@ .o G G , A .= G G. , G G G G , . G.2 .= G G G.@ .o G G , A .= G G G G G G G , A .= G G G G G G G G.2 .= G G G.@ .o G , A G G G .% G G G G G .r G , . G G G G G G G G , A G G G G G G , m G .r G G G G G , m G G G , . G .r G G A G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G @ X.- 0 G G G G G G 7 X T P G G X T P G G G G ! X.- 7 8 X.> @ ! ! ! l X.- g G ! X.> j G G G X 9.- G G G G G G G G G G G G G G G G G 0 | T 9 9 T g G 7 X.- l G G G G 8 X.- j G 8 X.>.3 G G 7 X.-.; G G 8 X.> h G G G G X 9.- G G G G G G G G X 9 T.; ! ! ! X T l G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.o .@ G.@ .2 ,.%.@ .= G.= .= G G G.= .= G G G.r , G G.= . G.2 .@ G. , G G G ` , G G G G.=. .r G G.r , G G.= . G.2 .@ G. , G G G ` , G G G G.=. .r G G G G G G G G G.=. .r G G G G G G.o . G. , G G G ` , G.2 .@ G G G G G G G G G G G G G G G G.2 ` G G G G G G.o . G.2 .@ G G G G G G ` .7 G G G G G G G G G G G G.2 ` G G G.o .@ G G G G G G G G U .@ G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G b X.- 7 G G G G G G ! X.>.; G 7 X.- l G G G G c X.> v.e X X.-.-.-.-.-.-.- 7 G @ 9.> G G G 7 X.- h G G G G G G G G G G G G 0 g 8 v G G G G c X T | G 8 X.> < G G G G ! X.> j G ! X.> g G G + X.>.3 G G + X.> j G G G 0 X.- h G G G G G G G G X T.-.-.-.-.-.-.- l G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ` .2 G z G.= z.= .= G G G.= .= G G G G .@ G ,.r .= G ` .2 G A .o G.%.2 G G.7 .= G.% .r G G .@ G ,.r .= G ` .2 G A .o G.%.2 G G.7 .= G.% .r G G G G G G.7 .= G.% .r G G m .@ G G.=.r U G A .o G.%.2 G G.@ .o G G G A U G.o m G. .@ G G.o . G ` .2 G G m .@ G G.=.r U G.@ .o G G G.r .2 G ,.r .2 G. .@ G G.o . G G G G G.@ .o G G G ` .2 G. .@ G G.o . G.7 .= G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ! X.- | G G G G G 8 X T.> 0 G + X 9 l G G G G X T P G.e X.- j 7 7 7 7 7 7 G G X T P G G G 8 X.>.; G G G G G G G G G G G G c X 9 8 G G G G 8 X.-.; G 8 X.-.3 G G G G @ 9.> 0 G @ 9.> G G G c X.> 7 G G c X.> 0 G G G 0 X.-.; G G G 7 0 G G G X T k 7 7 7 7 7 7 0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G. , G A G , A m G G. , G A .r A. G G.2 ` G , A m G G. , G A .r A. G G.2 ` G G G G.2 ` G G U .@ G G A .r A. G G. , G G G U .7 G , .r z G. , G G U .@ G G. , G G G.@ U G , .r z G G G. , G G G. , G , .r z G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G g X T T 8 G G G + X 9.>.3 G G ! X.> T G G G ! X.> 2 G 8 X.-.3 G G G ! + 7 G 7 X.-.; G G G ! X.> j G G G G G G G G G G G G.e X.- l G G G G c X.>.3 G 7 X T l G G G + X.- l G G X T P G G g 9 9.> G G G X T P G G G G G X T l G G 0 X X X G G @ 9 T G G G 8.e 8 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.r G G z A A.2 .% .o .@.=.r .@ G G G.r .% G z m .r.@ G.r ` G G G.2.r .r ` G G.o .@.=.r .@ G G G.r .% G z m .r.@ G.r ` G G G.2.r .r ` G G G G G G.2.r .r ` G G G G ,. m.= G G G z m .r.@ G.r ` G G.r G G G G G.= A A.@ G G G ,. .7 z G G.r .% G G G ,. m.= G G G.r G G G G G.@ A.o.r G G G ,. .7 z G G G G.r .% G G G.r .% G G ,. .7 z G G.o.r G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G c 9 9 9 @ b X X 9.>.; G G G @ 9.- 9 % + ! X T P G G G.# T T + 8 @ X.> j G + X.> j G G G b 9.> v G G G G G G G G G G G G 0 9 9 9 X @ @ X X.- P G G G @ 9 T o 8 ! X T.> 7 G G X 9.- + + X X.> h G G 0 X.- l G G G G G c 9 T | + @ X.> + G G + 9 T o 8.e X T P G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.2 m G G G G G G G G G G G G G G G G G G G G G G G G ` .2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ` .2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G . , G G.= m G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G o T T 9 9 T.>.>.3 G G G G X T.t.# 9 X 9.- P 7 G G G 7 9 T 9 X T.> 2 G G.; 9.> 7 G G G X T P G G G G G G G G G G G G G G 8 T T T 9 9 T.> P 7 G G G 7.# T 9 X 9.-.- g G G G c 9 9 9 T l X.-.; G G j 9.> 2 G G G G G 0 9 T 9 X T.>.; G G G G o T 9 X 9.- P 0 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G .o G G G G G G G G G G G G G G G G G G G G G G G G. , G G G G G G G G G G G G G G G G G G G G G G G G G G G G G. , G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.7 .= G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 8 | l k l.3 G G G G G 7 X.>.; G { l h.3 G G G G G G 0 | l k.; 7 G G G.3 !.; G G G v |.; j G G G G G G G G G G G G G G G G.3 l k k.; j G G G G G G G.3 l k l.3 G G G G G G | k.; g 7 |.; 7 G G g |.; 7 G G G G G G 0 { l 6.; g G G G G G G 8 l k l.3 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.7 U G G G G G G G G G G G G G G G G G G G G G G G G G.r .% G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.r .% G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.@ A A.2 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G + X.> j G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G.y.y", -".y.y G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ! X.> 7 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G ... [truncated message content] |
From: <pst...@us...> - 2008-04-05 23:49:14
|
Revision: 400 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=400&view=rev Author: pstieber Date: 2008-04-05 16:49:12 -0700 (Sat, 05 Apr 2008) Log Message: ----------- Finished making changes that are similar to the ones made for the Windows version. Modified Paths: -------------- trunk/jazz/src/AlsaDriver.cpp trunk/jazz/src/AudioDriver.cpp Modified: trunk/jazz/src/AlsaDriver.cpp =================================================================== --- trunk/jazz/src/AlsaDriver.cpp 2008-04-05 23:43:43 UTC (rev 399) +++ trunk/jazz/src/AlsaDriver.cpp 2008-04-05 23:49:12 UTC (rev 400) @@ -54,8 +54,8 @@ tAlsaAudioListener(tAlsaAudioPlayer* pPlayer, int key) : wxTimer(), mpPlayer(pPlayer), + mHardExit(true) { - mHardExit = TRUE; mpPlayer->mpListener = this; mpPlayer->rec_info = 0; // not recording! mpPlayer->running_mode = 0; @@ -74,8 +74,8 @@ long to_smpl) : wxTimer(), mpPlayer(pPlayer), + mHardExit(true) { - mHardExit = TRUE; mpPlayer->mpListener = this; mpPlayer->rec_info = 0; // not recording! mpPlayer->running_mode = 0; @@ -103,7 +103,7 @@ mCount += mpPlayer->mSamples.ContinueListen(); if (mCount <= 0) { - mHardExit = FALSE; + mHardExit = false; delete this; } } @@ -119,7 +119,7 @@ int mCount; - int mHardExit; + bool mHardExit; }; Modified: trunk/jazz/src/AudioDriver.cpp =================================================================== --- trunk/jazz/src/AudioDriver.cpp 2008-04-05 23:43:43 UTC (rev 399) +++ trunk/jazz/src/AudioDriver.cpp 2008-04-05 23:49:12 UTC (rev 400) @@ -27,13 +27,16 @@ #include "Configuration.h" #include "Globals.h" +#include <iostream> #include <unistd.h> -#include <stdlib.h> +//#include <stdlib.h> #include <sys/ioctl.h> #include <errno.h> #include <fcntl.h> +using namespace std; + #define AUDIO_DEVICE "/dev/dsp" class tAudioListener : public wxTimer @@ -52,7 +55,7 @@ // SYNC seems not to work?? so add 8 more silent buffers // to hear the end of the sample too. - mCount = 8 + mpPlayer->samples.PrepareListen(key); + mCount = 8 + mpPlayer->mSamples.PrepareListen(key); mpPlayer->OpenDsp(); Start(20); } @@ -65,13 +68,12 @@ : wxTimer(), mpPlayer(pPlayer), mCount(0), - mHardExit(true), + mHardExit(true) { - mpPlayer = p; mpPlayer->mpListener = this; mpPlayer->rec_info = 0; // not recording! - mCount = 8 + mpPlayer->samples.PrepareListen(&spl, fr_smpl, to_smpl); + mCount = 8 + mpPlayer->mSamples.PrepareListen(&spl, fr_smpl, to_smpl); mpPlayer->OpenDsp(); Start(20); } @@ -86,7 +88,7 @@ virtual void Notify() { mCount -= mpPlayer->WriteSamples(); - mCount += mpPlayer->samples.ContinueListen(); + mCount += mpPlayer->mSamples.ContinueListen(); if (mCount <= 0) { mHardExit = false; @@ -176,7 +178,7 @@ int tAudioPlayer::LoadSamples(const char *filename) { - return samples.Load(filename); + return mSamples.Load(filename); } int tAudioPlayer::RecordMode() const @@ -192,10 +194,10 @@ } long ticks_per_minute = Song->TicksPerQuarter * Song->Speed(); - samples.ResetBuffers(AudioBuffer, start_clock, ticks_per_minute); + mSamples.ResetBuffers(AudioBuffer, start_clock, ticks_per_minute); if (PlaybackMode()) { - samples.FillBuffers(OutClock); + mSamples.FillBuffers(OutClock); } audio_bytes = 0; @@ -279,20 +281,20 @@ perror("ioctl DSP_SETFRAGMENT"); } - tmp = samples.BitsPerSample(); + tmp = mSamples.BitsPerSample(); ioctl(dev, SNDCTL_DSP_SAMPLESIZE, &tmp); - if (tmp != samples.BitsPerSample()) + if (tmp != mSamples.BitsPerSample()) { cerr << "Unable to set the sample size" << endl; } - tmp = (samples.GetChannels() == 1) ? 0 : 1; + tmp = (mSamples.GetChannels() == 1) ? 0 : 1; if (ioctl (dev, SNDCTL_DSP_STEREO, &tmp) == -1) { cerr << "Unable to set mono/stereo" << endl; } - tmp = samples.GetSpeed(); + tmp = mSamples.GetSpeed(); if (ioctl (dev, SNDCTL_DSP_SPEED, &tmp) == -1) { perror("ioctl DSP_SPEED"); @@ -348,7 +350,7 @@ WriteSamples(); // here it may hang when swapping in pages - samples.FillBuffers(OutClock); + mSamples.FillBuffers(OutClock); WriteSamples(); } @@ -357,7 +359,7 @@ ReadSamples(); } - if (samples.softsync) + if (mSamples.softsync) { MidiSync(); } @@ -388,7 +390,7 @@ for (int i = 0; i < info.fragments - 1; i++) { - tAudioBuffer *buf = samples.full_buffers.Get(); + tAudioBuffer *buf = mSamples.full_buffers.Get(); if (buf == 0) { break; @@ -398,7 +400,7 @@ perror("write"); } blocks_written ++; - samples.free_buffers.Put(buf); + mSamples.free_buffers.Put(buf); } return blocks_written; @@ -479,7 +481,7 @@ audio_bytes = new_bytes; // OSS bug?: mpu401 does not like speed changes too often - long audio_clock = (long)samples.Samples2Ticks(audio_bytes / 2); + long audio_clock = (long)mSamples.Samples2Ticks(audio_bytes / 2); int delta_clock = audio_clock - midi_clock; int new_speed = midi_speed + delta_clock; @@ -512,13 +514,13 @@ void tAudioPlayer::StartPlay(long Clock, long LoopClock, int Continue) { delete mpListener; - samples.StartPlay(Clock); + mSamples.StartPlay(Clock); tSeq2Player::StartPlay(Clock, LoopClock, Continue); } void tAudioPlayer::StopPlay() { - samples.StopPlay(); + mSamples.StopPlay(); tSeq2Player::StopPlay(); if (!audio_enabled) { @@ -538,7 +540,7 @@ { toc = recd_clock; } - samples.SaveRecordingDlg(frc, toc, recbuffers); + mSamples.SaveRecordingDlg(frc, toc, recbuffers); } recbuffers.Clear(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-05 23:43:44
|
Revision: 399 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=399&view=rev Author: pstieber Date: 2008-04-05 16:43:43 -0700 (Sat, 05 Apr 2008) Log Message: ----------- 1. Changes JZPlayer::samples to mSamples. 2. Made several stylistic changes in the Windows audio interface code. 3. Started making similar changes to the Linux version. 4. Made cosmetic changes. Modified Paths: -------------- trunk/jazz/src/AlsaDriver.cpp trunk/jazz/src/AlsaDriver.h trunk/jazz/src/AudioDriver.cpp trunk/jazz/src/AudioDriver.h trunk/jazz/src/Player.cpp trunk/jazz/src/Player.h trunk/jazz/src/mswin/WindowsAudioInterface.cpp trunk/jazz/src/mswin/WindowsAudioInterface.h Modified: trunk/jazz/src/AlsaDriver.cpp =================================================================== --- trunk/jazz/src/AlsaDriver.cpp 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/AlsaDriver.cpp 2008-04-05 23:43:43 UTC (rev 399) @@ -45,89 +45,100 @@ using namespace std; -#define snd_pcm_write(pcm,data,size) snd_pcm_writei(pcm,data,size) -#define snd_pcm_read(pcm,data,size) snd_pcm_readi(pcm,data,size) - #define MAX_FRAGS 16 // enough large? - - class tAlsaAudioListener : public wxTimer { public: - tAlsaAudioListener(tAlsaAudioPlayer *p, int key) + + tAlsaAudioListener(tAlsaAudioPlayer* pPlayer, int key) + : wxTimer(), + mpPlayer(pPlayer), { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - player->running_mode = 0; - + mHardExit = TRUE; + mpPlayer->mpListener = this; + mpPlayer->rec_info = 0; // not recording! + mpPlayer->running_mode = 0; + // SYNC seems not to work?? so add 8 more silent buffers // to hear the end of the sample too. - player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); - count = 8 + player->samples.PrepareListen(key); + mpPlayer->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); + mCount = 8 + mpPlayer->mSamples.PrepareListen(key); Start(20); } - tAlsaAudioListener(tAlsaAudioPlayer *p, tSample &spl, long fr_smpl, long to_smpl) + tAlsaAudioListener( + tAlsaAudioPlayer* pPlayer, + tSample& spl, + long fr_smpl, + long to_smpl) + : wxTimer(), + mpPlayer(pPlayer), { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - player->running_mode = 0; + mHardExit = TRUE; + mpPlayer->mpListener = this; + mpPlayer->rec_info = 0; // not recording! + mpPlayer->running_mode = 0; - player->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); - player->samples.ResetBufferSize(player->frag_byte_size[tAlsaAudioPlayer::PLAYBACK]); - count = 8 + player->samples.PrepareListen(&spl, fr_smpl, to_smpl); + mpPlayer->OpenDsp(tAlsaAudioPlayer::PLAYBACK, 0); + + mpPlayer->mSamples.ResetBufferSize( + mpPlayer->frag_byte_size[tAlsaAudioPlayer::PLAYBACK]); + + mCount = 8 + mpPlayer->mSamples.PrepareListen(&spl, fr_smpl, to_smpl); + Start(20); } ~tAlsaAudioListener() { Stop(); - player->CloseDsp(hard_exit); - player->listener = 0; + mpPlayer->CloseDsp(mHardExit); + mpPlayer->mpListener = 0; } virtual void Notify() { - count -= player->WriteSamples(); - count += player->samples.ContinueListen(); - if (count <= 0) + mCount -= mpPlayer->WriteSamples(); + mCount += mpPlayer->mSamples.ContinueListen(); + if (mCount <= 0) { - hard_exit = FALSE; + mHardExit = FALSE; delete this; } } long GetPlayPosition() { - return player->GetCurrentPosition(tAlsaAudioPlayer::PLAYBACK); + return mpPlayer->GetCurrentPosition(tAlsaAudioPlayer::PLAYBACK); } private: - tAlsaAudioPlayer *player; - int count; - int hard_exit; + + tAlsaAudioPlayer* mpPlayer; + + int mCount; + + int mHardExit; }; -tAlsaAudioPlayer::tAlsaAudioPlayer(JZSong *song) - : tAlsaPlayer(song) +tAlsaAudioPlayer::tAlsaAudioPlayer(JZSong* pSong) + : tAlsaPlayer(pSong) { AudioBuffer = new tEventArray(); installed = 0; audio_enabled = 0; - listener = 0; - can_duplex = 0; // no duplex yet. + mpListener = 0; + mCanDuplex = 0; // no duplex yet. pcm[PLAYBACK] = NULL; pcm[CAPTURE] = NULL; dev[PLAYBACK] = gpConfig->StrValue(C_AlsaAudioOutputDevice); dev[CAPTURE] = gpConfig->StrValue(C_AlsaAudioInputDevice); - can_duplex = 1; /* FIXME */ + + // FIXME + mCanDuplex = 1; installed = 1; audio_enabled = 1; } @@ -135,7 +146,7 @@ tAlsaAudioPlayer::~tAlsaAudioPlayer() { - delete listener; + delete mpListener; delete AudioBuffer; if (pcm[PLAYBACK]) { @@ -152,7 +163,7 @@ int tAlsaAudioPlayer::LoadSamples(const char *filename) { - return samples.Load(filename); + return mSamples.Load(filename); } int tAlsaAudioPlayer::RecordMode() const @@ -167,8 +178,8 @@ void tAlsaAudioPlayer::StartPlay(long clock, long loopClock, int cont) { - delete listener; - samples.StartPlay(clock); + delete mpListener; + mSamples.StartPlay(clock); tAlsaPlayer::StartPlay(clock, loopClock, cont); if (!audio_enabled) @@ -177,7 +188,7 @@ } long ticks_per_minute = Song->TicksPerQuarter * Song->Speed(); - samples.ResetBuffers(AudioBuffer, clock, ticks_per_minute); + mSamples.ResetBuffers(AudioBuffer, clock, ticks_per_minute); last_scount = 0; cur_pos = 0; audio_clock_offset = clock; @@ -191,11 +202,11 @@ recbuffers.ResetBufferSize(frag_byte_size[CAPTURE]); } - if (dev[CAPTURE] != dev[PLAYBACK] || can_duplex || running_mode == 0) + if (dev[CAPTURE] != dev[PLAYBACK] || mCanDuplex || running_mode == 0) { OpenDsp(PLAYBACK, 1); - samples.ResetBufferSize(frag_byte_size[PLAYBACK]); - samples.FillBuffers(OutClock); + mSamples.ResetBufferSize(frag_byte_size[PLAYBACK]); + mSamples.FillBuffers(OutClock); } if (running_mode == 0) @@ -216,31 +227,42 @@ void tAlsaAudioPlayer::StartAudio() { if (pcm[PLAYBACK]) + { snd_pcm_start(pcm[PLAYBACK]); + } if (pcm[CAPTURE]) + { snd_pcm_start(pcm[CAPTURE]); + } } void tAlsaAudioPlayer::OpenDsp(int mode, int sync_mode) { if (!audio_enabled) + { return; + } unsigned int channels; snd_pcm_format_t format; snd_pcm_uframes_t buffer_size, period_size; frame_shift[mode] = 0; - if (samples.BitsPerSample() == 8) + if (mSamples.BitsPerSample() == 8) + { format = SND_PCM_FORMAT_U8; - else { + } + else + { format = SND_PCM_FORMAT_S16_LE; frame_shift[mode]++; } - channels = samples.GetChannels(); + channels = mSamples.GetChannels(); if (channels > 1) + { frame_shift[mode]++; + } snd_pcm_stream_t stream = (mode == PLAYBACK) ? SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE; @@ -269,20 +291,22 @@ perror("cannot set audio channels"); goto __error; } - if (snd_pcm_hw_params_set_rate(pcm[mode], hw, samples.GetSpeed(), 0) < 0) + if (snd_pcm_hw_params_set_rate(pcm[mode], hw, mSamples.GetSpeed(), 0) < 0) { - cerr << "cannot set audio rate: " << samples.GetSpeed() << endl; + cerr << "cannot set audio rate: " << mSamples.GetSpeed() << endl; goto __error; } period_size = FRAGBYTES >> frame_shift[mode]; - if ((period_size = snd_pcm_hw_params_set_period_size_near(pcm[mode], hw, &period_size, 0)) < 0) + if ( + (period_size = snd_pcm_hw_params_set_period_size_near(pcm[mode], hw, &period_size, 0)) < 0) { perror("cannot set audio period"); goto __error; } buffer_size = period_size * MAX_FRAGS; - if ((buffer_size = snd_pcm_hw_params_set_buffer_size_near(pcm[mode], hw, &buffer_size)) < 0) + if ( + (buffer_size = snd_pcm_hw_params_set_buffer_size_near(pcm[mode], hw, &buffer_size)) < 0) { perror("cannot set audio buffer"); goto __error; @@ -302,9 +326,14 @@ snd_pcm_sw_params_alloca(&sw); snd_pcm_sw_params_current(pcm[mode], sw); if (sync_mode) - snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 0x7fffffff); /* FIXME */ + { + // FIXME + snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 0x7fffffff); + } else + { snd_pcm_sw_params_set_start_threshold(pcm[mode], sw, 1); + } if (snd_pcm_sw_params(pcm[mode], sw) < 0) { perror("snd_pcm_sw_params"); @@ -323,41 +352,47 @@ } -void tAlsaAudioPlayer::CloseDsp(int reset) +void tAlsaAudioPlayer::CloseDsp(bool Reset) { if (pcm) { - if (reset) + if (Reset) { if (pcm[PLAYBACK]) { if (snd_pcm_drop(pcm[PLAYBACK]) < 0) + { perror("playback drop"); + } } } else { if (pcm[PLAYBACK]) { - if (snd_pcm_drain(pcm[PLAYBACK]) < 0 ) + if (snd_pcm_drain(pcm[PLAYBACK]) < 0) + { perror("playback drain"); + } } if (pcm[CAPTURE]) { - if (snd_pcm_drain(pcm[CAPTURE]) < 0 ) + if (snd_pcm_drain(pcm[CAPTURE]) < 0) + { perror("capture drain"); + } } } if (pcm[PLAYBACK]) { snd_pcm_close(pcm[PLAYBACK]); pcm[PLAYBACK] = NULL; - } + } if (pcm[CAPTURE]) { snd_pcm_close(pcm[CAPTURE]); pcm[CAPTURE] = NULL; - } + } } } @@ -368,15 +403,22 @@ if (pcm[PLAYBACK]) { WriteSamples(); - // here it may hang when swapping in pages - samples.FillBuffers(OutClock); + + // The code may hang here when swapping in pages. + mSamples.FillBuffers(OutClock); + WriteSamples(); } + if (pcm[CAPTURE]) + { ReadSamples(); + } - if (pcm[PLAYBACK] && samples.softsync) + if (pcm[PLAYBACK] && mSamples.softsync) + { MidiSync(); + } } tAlsaPlayer::Notify(); } @@ -398,7 +440,9 @@ int tAlsaAudioPlayer::WriteSamples() { if (!audio_enabled || pcm[PLAYBACK] == NULL) + { return 0; + } int blocks_written = 0; int room; @@ -407,11 +451,19 @@ for (; room > frag_size[PLAYBACK]; room -= frag_size[PLAYBACK]) { - tAudioBuffer *buf = samples.full_buffers.Get(); + tAudioBuffer *buf = mSamples.full_buffers.Get(); if (buf == 0) + { break; - ssize_t written = snd_pcm_writei(pcm[PLAYBACK], buf->Data(), frag_size[PLAYBACK]); - if (written < 0) { + } + + ssize_t written = snd_pcm_writei( + pcm[PLAYBACK], + buf->Data(), + frag_size[PLAYBACK]); + + if (written < 0) + { if (written == -EPIPE) { cerr << "xrun!!" << endl; @@ -423,9 +475,11 @@ } } if (written > 0) + { cur_scount += written; + } blocks_written++; - samples.free_buffers.Put(buf); + mSamples.free_buffers.Put(buf); } return blocks_written; @@ -435,14 +489,16 @@ void tAlsaAudioPlayer::ReadSamples() { if (!audio_enabled || pcm[CAPTURE] == NULL) + { return; + } int room = GetFreeSpace(CAPTURE); for (; room > frag_size[CAPTURE]; room -= frag_size[CAPTURE]) { short *b = recbuffers.RequestBuffer()->data; - if (snd_pcm_read(pcm[CAPTURE], b, frag_size[CAPTURE]) != + if (snd_pcm_readi(pcm[CAPTURE], b, frag_size[CAPTURE]) != frag_size[CAPTURE]) { recbuffers.UndoRequest(); @@ -459,7 +515,7 @@ { snd_pcm_drop(pcm[PLAYBACK]); //long ticks_per_minute = Song->TicksPerQuarter * Song->Speed(); - //samples.ResetBuffers(AudioBuffer, clock, ticks_per_minute); + //mSamples.ResetBuffers(AudioBuffer, clock, ticks_per_minute); } audio_clock_offset = clock; cur_pos = 0; @@ -473,15 +529,23 @@ void tAlsaAudioPlayer::MidiSync() { if (!audio_enabled) + { return; + } int mode; if (pcm[PLAYBACK]) + { mode = PLAYBACK; + } else if (pcm[CAPTURE]) + { mode = CAPTURE; + } else + { return; // disabled + } long scount = GetCurrentPosition(mode); @@ -499,12 +563,17 @@ qtick = snd_seq_queue_status_get_tick_time(status); int samplediff; if (scount < last_scount) + { samplediff = frame_boundary[mode] - (last_scount - scount); + } else + { samplediff = scount - last_scount; + } last_scount = scount; cur_pos += samplediff; - long audio_clock = (long)samples.Samples2Ticks(cur_pos) + audio_clock_offset; + long audio_clock = + (long)mSamples.Samples2Ticks(cur_pos) + audio_clock_offset; int delta_clock = audio_clock - qtick; int new_speed = midi_speed + delta_clock; @@ -527,26 +596,24 @@ snd_seq_ev_set_subs(&ev); snd_seq_ev_set_direct(&ev); snd_seq_ev_set_fixed(&ev); - int us = (int)( 60.0E6 / (double)new_speed ); + int us = (int)(60.0E6 / new_speed); snd_seq_ev_set_queue_tempo(&ev, queue, us); write(&ev, 1); curr_speed = new_speed; - // xview has reentrancy problems!! - // gpTrackWindow->DrawSpeed(curr_speed); } } } void tAlsaAudioPlayer::StopPlay() { - samples.StopPlay(); + mSamples.StopPlay(); tAlsaPlayer::StopPlay(); if (!audio_enabled) { return; } - CloseDsp(TRUE); + CloseDsp(true); if (RecordMode()) { long frc = rec_info->mFromClock; @@ -559,53 +626,67 @@ { toc = recd_clock; } - samples.SaveRecordingDlg(frc, toc, recbuffers); + mSamples.SaveRecordingDlg(frc, toc, recbuffers); } recbuffers.Clear(); - // xview has reentrancy problems!! - // gpTrackWindow->DrawSpeed(midi_speed); } void tAlsaAudioPlayer::ListenAudio(int key, int start_stop_mode) { if (!audio_enabled) + { return; + } - // when already listening then stop listening - if (listener) + // If already listening then stop listening. + if (mpListener) { - delete listener; - listener = 0; + delete mpListener; + mpListener = 0; if (start_stop_mode) + { return; + } } if (key < 0) + { return; + } if (pcm[PLAYBACK]) // device busy (playing) + { return; - listener = new tAlsaAudioListener(this, key); + } + + mpListener = new tAlsaAudioListener(this, key); } -void tAlsaAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) +void tAlsaAudioPlayer::ListenAudio(tSample& spl, long fr_smpl, long to_smpl) { if (!audio_enabled) + { return; + } - // when already listening then stop listening - if (listener) + // If already listening then stop listening. + if (mpListener) { - delete listener; - listener = 0; + delete mpListener; + mpListener = 0; } + if (pcm[PLAYBACK]) // device busy (playing) + { return; - listener = new tAlsaAudioListener(this, spl, fr_smpl, to_smpl); + } + mpListener = new tAlsaAudioListener(this, spl, fr_smpl, to_smpl); } long tAlsaAudioPlayer::GetListenerPlayPosition() { - if (!listener) + if (!mpListener) + { return -1L; - return listener->GetPlayPosition(); + } + return mpListener->GetPlayPosition(); } Modified: trunk/jazz/src/AlsaDriver.h =================================================================== --- trunk/jazz/src/AlsaDriver.h 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/AlsaDriver.h 2008-04-05 23:43:43 UTC (rev 399) @@ -48,31 +48,39 @@ virtual void SetAudioEnabled(int x) { audio_enabled = x; } virtual void ListenAudio(int key, int start_stop_mode = 1); virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl); - virtual bool IsListening() const { - return listener != 0; + virtual bool IsListening() const + { + return mpListener != 0; } virtual long GetListenerPlayPosition(); virtual void StartAudio(); virtual void ResetPlay(long clock); - enum { PLAYBACK = 0, CAPTURE }; + enum + { + PLAYBACK = 0, + CAPTURE + }; // for recording int RecordMode() const; int PlayBackMode() const; private: - int can_duplex; // TRUE = can do full duplex record/play int WriteSamples(); void ReadSamples(); void MidiSync(); void OpenDsp(int mode, int sync_mode); - void CloseDsp(int reset); + void CloseDsp(bool Reset); + long GetCurrentPosition(int mode); int GetFreeSpace(int mode); + // If true can do full duplex record/play. + int mCanDuplex; + snd_pcm_t *pcm[2]; int installed; @@ -92,7 +100,7 @@ int frame_shift[2]; long frame_boundary[2]; - tAlsaAudioListener *listener; + tAlsaAudioListener* mpListener; tAudioRecordBuffer recbuffers; }; Modified: trunk/jazz/src/AudioDriver.cpp =================================================================== --- trunk/jazz/src/AudioDriver.cpp 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/AudioDriver.cpp 2008-04-05 23:43:43 UTC (rev 399) @@ -34,63 +34,83 @@ #include <fcntl.h> - #define AUDIO_DEVICE "/dev/dsp" class tAudioListener : public wxTimer { public: - tAudioListener(tAudioPlayer *p, int key) { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! + tAudioListener(tAudioPlayer* pPlayer, int key) + : wxTimer(), + mpPlayer(pPlayer), + mCount(0), + mHardExit(true) + { + mpPlayer->mpListener = this; + + mpPlayer->rec_info = 0; // not recording! + // SYNC seems not to work?? so add 8 more silent buffers // to hear the end of the sample too. - count = 8 + player->samples.PrepareListen(key); - player->OpenDsp(); + mCount = 8 + mpPlayer->samples.PrepareListen(key); + mpPlayer->OpenDsp(); Start(20); } - tAudioListener(tAudioPlayer *p, tSample &spl, long fr_smpl, long to_smpl) { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! + tAudioListener( + tAudioPlayer* pPlayer, + tSample& spl, + long fr_smpl, + long to_smpl) + : wxTimer(), + mpPlayer(pPlayer), + mCount(0), + mHardExit(true), + { + mpPlayer = p; + mpPlayer->mpListener = this; + mpPlayer->rec_info = 0; // not recording! - count = 8 + player->samples.PrepareListen(&spl, fr_smpl, to_smpl); - player->OpenDsp(); + mCount = 8 + mpPlayer->samples.PrepareListen(&spl, fr_smpl, to_smpl); + mpPlayer->OpenDsp(); Start(20); } - ~tAudioListener() { + ~tAudioListener() + { Stop(); - player->CloseDsp(hard_exit); - player->listener = 0; + mpPlayer->CloseDsp(mHardExit); + mpPlayer->mpListener = 0; } - virtual void Notify() { - count -= player->WriteSamples(); - count += player->samples.ContinueListen(); - if (count <= 0) + virtual void Notify() + { + mCount -= mpPlayer->WriteSamples(); + mCount += mpPlayer->samples.ContinueListen(); + if (mCount <= 0) { - hard_exit = FALSE; + mHardExit = false; delete this; } } - long GetPlayPosition() { + long GetPlayPosition() + { count_info cinfo; - if (ioctl(player->dev, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + if (ioctl(mpPlayer->dev, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + { perror("SNDCTL_DSP_GETOPTR"); + } return (cinfo.bytes - cinfo.ptr) / sizeof(short); } private: - tAudioPlayer *player; - int count; - int hard_exit; + + tAudioPlayer* mpPlayer; + + int mCount; + + int mHardExit; }; @@ -99,41 +119,55 @@ : tSeq2Player(song) { long dummy = 0; - AudioBuffer = new tEventArray(); - installed = 0; + AudioBuffer = new tEventArray(); + installed = 0; dummy = gpConfig->GetValue(C_EnableAudio); audio_enabled = dummy; - listener = 0; - can_duplex = 0; // no duplex yet. - dev = -1; + mpListener = 0; + mCanDuplex = 0; // no duplex yet. + dev = -1; // check for device dev = open(AUDIO_DEVICE, O_WRONLY, 0); - if (dev >= 0) { + if (dev >= 0) + { // check device caps int caps; ioctl(dev, SNDCTL_DSP_GETCAPS, &caps); if (caps & DSP_CAP_REALTIME) + { ; // fprintf(stderr, AUDIO " supports REALTIME, good!\n"); + } + if (caps & DSP_CAP_DUPLEX) - can_duplex = 1; // good soundcard! + { + mCanDuplex = 1; // good soundcard! + } + if (!(caps & DSP_CAP_TRIGGER)) - fprintf(stderr, "no CAP_TRIGGER support!\n"); + { + cerr << "no CAP_TRIGGER support!" << endl; + } else + { installed = 1; + } + close(dev); } else + { perror(AUDIO_DEVICE); + } + dev = -1; // closed audio_enabled = audio_enabled && installed; - } tAudioPlayer::~tAudioPlayer() { - delete listener; + delete mpListener; delete AudioBuffer; if (dev >= 0) close(dev); @@ -153,12 +187,16 @@ void tAudioPlayer::StartAudio() { if (!audio_enabled) + { return; + } long ticks_per_minute = Song->TicksPerQuarter * Song->Speed(); samples.ResetBuffers(AudioBuffer, start_clock, ticks_per_minute); if (PlaybackMode()) + { samples.FillBuffers(OutClock); + } audio_bytes = 0; midi_clock = 0; @@ -191,9 +229,11 @@ int tmp; if (!audio_enabled) + { return; + } - can_duplex = gpConfig->GetValue(C_DuplexAudio); + mCanDuplex = gpConfig->GetValue(C_DuplexAudio); // linux driver seems to need some real free memory, which sometimes // is not available when operating with big samples. So allocate @@ -207,61 +247,91 @@ } int mode = 0; - if (can_duplex) + if (mCanDuplex) + { mode = O_RDWR; + } else if (RecordMode()) + { mode = O_RDONLY; + } else + { mode = O_WRONLY; + } dev = open(AUDIO_DEVICE, mode, 0); - if (dev < 0) { + if (dev < 0) + { perror(AUDIO_DEVICE); audio_enabled = 0; return; } - if (can_duplex) + if (mCanDuplex) + { ioctl(dev, SNDCTL_DSP_SETDUPLEX, 0); + } tmp = 0xffff0000 | FRAGBITS; - if (ioctl(dev, SNDCTL_DSP_SETFRAGMENT, &tmp)==-1) + if (ioctl(dev, SNDCTL_DSP_SETFRAGMENT, &tmp) == -1) + { perror("ioctl DSP_SETFRAGMENT"); + } tmp = samples.BitsPerSample(); ioctl(dev, SNDCTL_DSP_SAMPLESIZE, &tmp); if (tmp != samples.BitsPerSample()) - fprintf(stderr, "Unable to set the sample size\n"); + { + cerr << "Unable to set the sample size" << endl; + } tmp = (samples.GetChannels() == 1) ? 0 : 1; - if (ioctl (dev, SNDCTL_DSP_STEREO, &tmp)==-1) - fprintf (stderr, "Unable to set mono/stereo\n"); + if (ioctl (dev, SNDCTL_DSP_STEREO, &tmp) == -1) + { + cerr << "Unable to set mono/stereo" << endl; + } tmp = samples.GetSpeed(); if (ioctl (dev, SNDCTL_DSP_SPEED, &tmp) == -1) + { perror("ioctl DSP_SPEED"); + } - // check if fragsize was ok - ioctl (dev, SNDCTL_DSP_GETBLKSIZE, &tmp); + // Check to see if the fragment size was OK. + ioctl(dev, SNDCTL_DSP_GETBLKSIZE, &tmp); if (tmp < 1) - perror ("GETBLKSIZE"); + { + perror("GETBLKSIZE"); + } else if (tmp != FRAGBYTES) - fprintf(stderr, "Unable to verify FRAGMENT %d, fbytes = %d, fshorts = %d\n", tmp, FRAGBYTES, FRAGSHORTS); + { + cerr + << "Unable to verify FRAGMENT " << tmp + << ", fbytes = " << FRAGBYTES + << ", fshorts = " << FRAGSHORTS + << endl; + } } -void tAudioPlayer::CloseDsp(int reset) +void tAudioPlayer::CloseDsp(bool Reset) { if (dev >= 0) { - if (reset) + if (Reset) { if (ioctl(dev, SNDCTL_DSP_RESET, 0) == -1) + { perror("SNDCTL_DSP_RESET"); + } } - else { + else + { if (ioctl (dev, SNDCTL_DSP_SYNC, NULL) < 0) + { perror("SNDCTL_DSP_SYNC"); + } } close(dev); dev = -1; @@ -271,18 +341,26 @@ void tAudioPlayer::Notify() { - if (audio_enabled) { - if (PlaybackMode()) { + if (audio_enabled) + { + if (PlaybackMode()) + { WriteSamples(); + // here it may hang when swapping in pages samples.FillBuffers(OutClock); + WriteSamples(); } if (RecordMode()) + { ReadSamples(); + } if (samples.softsync) + { MidiSync(); + } } tSeq2Player::Notify(); } @@ -291,25 +369,34 @@ int tAudioPlayer::WriteSamples() { if (!audio_enabled) + { return 0; + } int blocks_written = 0; // number of blocks to be written audio_buf_info info; if (ioctl(dev, SNDCTL_DSP_GETOSPACE, &info) == -1) + { perror("SNDCTL_DSP_GETOSPACE"); + } // todo: this is a bug in the audiodriver in newer kernels (2.1.28) // and the oss/linux for 2.0.29 it should be - // for (int i = 0; i < info.fragments; i++) { + // for (int i = 0; i < info.fragments; i++) - for (int i = 0; i < info.fragments - 1; i++) { + for (int i = 0; i < info.fragments - 1; i++) + { tAudioBuffer *buf = samples.full_buffers.Get(); if (buf == 0) + { break; + } if (write(dev, buf->Data(), BUFBYTES) != BUFBYTES) + { perror("write"); + } blocks_written ++; samples.free_buffers.Put(buf); } @@ -322,21 +409,29 @@ { audio_buf_info info; if (ioctl(dev, SNDCTL_DSP_GETISPACE, &info) == -1) + { perror("SNDCTL_DSP_GETISPACE"); + } // a oss bug: if read is not called, there will be // no recording. probably recording does NOT start // exactly in sync with midi - but who knows. if (force_read && !info.fragments) + { info.fragments = 1; + } force_read = 0; - for (int i = 0; i < info.fragments; i++) { + for (int i = 0; i < info.fragments; i++) + { short *b = recbuffers.RequestBuffer()->data; - if (read(dev, b, BUFBYTES) != BUFBYTES) { + if (read(dev, b, BUFBYTES) != BUFBYTES) + { // oss bug? It send EINTR?? on first read.. if (errno != EINTR && errno != EAGAIN) + { perror("read"); + } recbuffers.UndoRequest(); break; } @@ -347,21 +442,27 @@ void tAudioPlayer::MidiSync() { - // OSS is buggy! In Win32 SDK you read the docs, hack away and - // everything works. In OSS, there are no docs and if it works + // OSS is buggy! In Win32 SDK you read the docs, hack away and + // everything works. In OSS, there are no docs and if it works // with kernel x it wont with kernel y. if (!audio_enabled) + { return; + } int command = SNDCTL_DSP_GETOPTR; if (!PlaybackMode()) + { command = SNDCTL_DSP_GETIPTR; + } // get realtime info for audio/midi sync count_info cinfo; if (ioctl(dev, command, &cinfo) == -1) + { perror("SNDCTL_DSP_GETOPTR"); + } // search for SNDCTL_DSP_GETOPTR in linux/drivers/sound/dmabuf // before trying to understand the next line @@ -370,12 +471,16 @@ { // driver has processed some bytes or whole fragment if (ioctl(seqfd, SNDCTL_SEQ_GETTIME, &midi_clock) < 0) - perror("ioctl SNDCTL_SEQ_GETTIME failed - please get a newer kernel (2.1.28 or up)"); + { + perror( + "ioctl SNDCTL_SEQ_GETTIME failed - " + "please get a newer kernel (2.1.28 or up)"); + } audio_bytes = new_bytes; // OSS bug?: mpu401 does not like speed changes too often - long audio_clock = (long)samples.Samples2Ticks(audio_bytes/2); - int delta_clock = audio_clock - midi_clock; + long audio_clock = (long)samples.Samples2Ticks(audio_bytes / 2); + int delta_clock = audio_clock - midi_clock; int new_speed = midi_speed + delta_clock; // limit speed changes to some reasonable values @@ -392,20 +497,21 @@ if (new_speed != curr_speed) { if (ioctl(seqfd, SNDCTL_TMR_TEMPO, &new_speed) < 0) - // this sometimes happens with mpu-401 timer + { + // Sometimes this happens with mpu-401 timer. ; // perror("SNDCTL_TMR_TEMPO"); + } else + { curr_speed = new_speed; - // xview has reentrancy problems!! - // gpTrackWindow->DrawSpeed(curr_speed); + } } - } } void tAudioPlayer::StartPlay(long Clock, long LoopClock, int Continue) { - delete listener; + delete mpListener; samples.StartPlay(Clock); tSeq2Player::StartPlay(Clock, LoopClock, Continue); } @@ -415,21 +521,26 @@ samples.StopPlay(); tSeq2Player::StopPlay(); if (!audio_enabled) + { return; - CloseDsp(TRUE); + } + + CloseDsp(true); if (RecordMode()) { long frc = rec_info->mFromClock; if (frc < start_clock) + { frc = start_clock; + } long toc = rec_info->mToClock; if (toc > recd_clock) + { toc = recd_clock; + } samples.SaveRecordingDlg(frc, toc, recbuffers); } recbuffers.Clear(); - // xview has reentrancy problems!! - // gpTrackWindow->DrawSpeed(midi_speed); } @@ -437,42 +548,58 @@ void tAudioPlayer::ListenAudio(int key, int start_stop_mode) { if (!audio_enabled) + { return; + } // when already listening then stop listening - if (listener) + if (mpListener) { - delete listener; - listener = 0; + delete mpListener; + mpListener = 0; if (start_stop_mode) + { return; + } } if (key < 0) + { return; + } if (dev >= 0) // device busy (playing) + { return; - listener = new tAudioListener(this, key); + } + + mpListener = new tAudioListener(this, key); } void tAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) { if (!audio_enabled) + { return; + } // when already listening then stop listening - if (listener) - delete listener; + if (mpListener) + { + delete mpListener; + } + if (dev >= 0) // device busy (playing) + { return; - listener = new tAudioListener(this, spl, fr_smpl, to_smpl); + } + mpListener = new tAudioListener(this, spl, fr_smpl, to_smpl); } -long tAudioPlayer::GetListenerPlayPosition() { - if (!listener) +long tAudioPlayer::GetListenerPlayPosition() +{ + if (!mpListener) + { return -1L; - return listener->GetPlayPosition(); + } + return mpListener->GetPlayPosition(); } - - - Modified: trunk/jazz/src/AudioDriver.h =================================================================== --- trunk/jazz/src/AudioDriver.h 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/AudioDriver.h 2008-04-05 23:43:43 UTC (rev 399) @@ -27,7 +27,7 @@ // in oss/free (from kernel 2.0.29) the following is not implemented // but this works for oss/linux for 2.0.29 // #ifndef SNDCTL_SEQ_GETTIME -// #define SNDCTL_SEQ_GETTIME _IOR ('Q',19, int) +// #define SNDCTL_SEQ_GETTIME _IOR ('Q',19, int) // #endif #include <sys/time.h> @@ -43,52 +43,83 @@ class tAudioPlayer : public tSeq2Player { friend class tAudioListener; + public: + tAudioPlayer(JZSong *song); + virtual ~tAudioPlayer(); + int LoadSamples(const char *filename); + virtual void Notify(); + virtual void StartPlay(long Clock, long LoopClock = 0, int Continue = 0); + virtual void StopPlay(); + virtual void StartAudio(); - virtual int Installed() { return installed && tSeq2Player::Installed(); } - virtual int GetAudioEnabled() const { return audio_enabled; } - virtual void SetAudioEnabled(int x) { audio_enabled = x; } + + virtual int Installed() + { + return installed && tSeq2Player::Installed(); + } + + virtual int GetAudioEnabled() const + { + return audio_enabled; + } + + virtual void SetAudioEnabled(int x) + { + audio_enabled = x; + } + virtual void ListenAudio(int key, int start_stop_mode = 1); + virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl); - virtual bool IsListening() const { - return listener != 0; + + virtual bool IsListening() const + { + return mpListener != 0; } + virtual long GetListenerPlayPosition(); // for recording int RecordMode() const; - int PlaybackMode() const { - return !RecordMode() || can_duplex; + + int PlaybackMode() const + { + return !RecordMode() || mCanDuplex; } private: - int can_duplex; // TRUE = can do full duplex record/play + // If true can do full duplex record/play. + int mCanDuplex; + int WriteSamples(); void ReadSamples(); void MidiSync(); void OpenDsp(); - void CloseDsp(int reset); + void CloseDsp(bool Reset); + int dev; int installed; long midi_clock; long audio_bytes; - int midi_speed; // start speed in bpm - int curr_speed; // actual speed in bpm - int audio_enabled; // 0 means midi only + int midi_speed; // start speed in bpm + int curr_speed; // actual speed in bpm + int audio_enabled; // 0 means midi only - tAudioListener *listener; + tAudioListener* mpListener; tAudioRecordBuffer recbuffers; - int force_read; // needed by buggy audio driver ... + // Needed by buggy audio driver ... + int force_read; }; #endif // !define(JZ_AUDIODRIVER_H) Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/Player.cpp 2008-04-05 23:43:43 UTC (rev 399) @@ -191,7 +191,7 @@ JZPlayer::JZPlayer(JZSong *song) - : samples( song->TicksPerQuarter * song->Speed() ) + : mSamples(song->TicksPerQuarter * song->Speed()) { DummyDeviceList.Add("default"); poll_millisec = 200; // default Modified: trunk/jazz/src/Player.h =================================================================== --- trunk/jazz/src/Player.h 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/Player.h 2008-04-05 23:43:43 UTC (rev 399) @@ -36,7 +36,9 @@ #include <sys/types.h> #include <time.h> +class JZRecordingInfo; + // audio-menu #define MEN_AUDIO_LOAD 200 #define MEN_AUDIO_SAVE 201 @@ -65,7 +67,7 @@ long Int2ExtClock(long Clock); void PrepareOutput( - tEventArray *buf, + tEventArray* buf, JZSong* pSong, long ExtFr, long ExtTo, @@ -74,14 +76,18 @@ private: long mStartClock; + long mStopClock; }; -enum tClockSource { CsInt = 0, CsFsk, CsMidi, CsMtc }; +enum tClockSource +{ + CsInt = 0, + CsFsk, + CsMidi, + CsMtc +}; -class JZRecordingInfo; - - class tDeviceList { public: @@ -197,22 +203,29 @@ virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl) {} virtual bool IsListening() const { return 0; } - virtual int OnMenuCommand(int id) { + virtual int OnMenuCommand(int id) + { if (Playing) { return 0; } - return samples.OnMenuCommand(id); + return mSamples.OnMenuCommand(id); } - virtual const char *GetSampleName(int i) { - return samples.GetSampleName(i); + + virtual const char *GetSampleName(int i) + { + return mSamples.GetSampleName(i); } - virtual void AdjustAudioLength(JZTrack *t) { + + virtual void AdjustAudioLength(JZTrack *t) + { long ticks_per_minute = Song->TicksPerQuarter * Song->Speed(); - samples.AdjustAudioLength(t, ticks_per_minute); + mSamples.AdjustAudioLength(t, ticks_per_minute); } - void EditSample(int key) { - samples.Edit(key); + + void EditSample(int key) + { + mSamples.Edit(key); } virtual long GetListenerPlayPosition() @@ -222,14 +235,17 @@ void LoadDefaultSettings() { - samples.LoadDefaultSettings(); + mSamples.LoadDefaultSettings(); } protected: - tSampleSet samples; + tSampleSet mSamples; + public: + JZPlayer(JZSong *song); + virtual ~JZPlayer(); void Notify(); Modified: trunk/jazz/src/mswin/WindowsAudioInterface.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsAudioInterface.cpp 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/mswin/WindowsAudioInterface.cpp 2008-04-05 23:43:43 UTC (rev 399) @@ -42,63 +42,83 @@ #define LeaveCriticalSection(a) #define DeleteCriticalSection(a) - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- class tAudioListener : public wxTimer { // play a sample from piano roll public: - tAudioListener(tWinAudioPlayer *p, int key) + tAudioListener(tWinAudioPlayer* pPlayer, int key) + : wxTimer(), + mpPlayer(pPlayer), + mCount(0), + mHardExit(true), + mChannels(0) { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - channels = player->samples.GetChannels(); + mpPlayer->mpListener = this; - count = player->samples.PrepareListen(key); - player->OpenDsp(); - player->StartAudio(); + // Indicate that we are not recording! + mpPlayer->rec_info = 0; + + mChannels = mpPlayer->mSamples.GetChannels(); + + mCount = mpPlayer->mSamples.PrepareListen(key); + + mpPlayer->OpenDsp(); + + mpPlayer->StartAudio(); + Start(200); } tAudioListener( - tWinAudioPlayer *p, - tSample &spl, + tWinAudioPlayer* pPlayer, + tSample& spl, long fr_smpl, long to_smpl) + : wxTimer(), + mpPlayer(pPlayer), + mCount(0), + mHardExit(true), + mChannels(0) { - hard_exit = TRUE; - player = p; - player->listener = this; - player->rec_info = 0; // not recording! - channels = player->samples.GetChannels(); + mpPlayer->mpListener = this; - count = player->samples.PrepareListen(&spl, fr_smpl, to_smpl); - player->OpenDsp(); - player->StartAudio(); + // Indicate that we are not recording! + mpPlayer->rec_info = 0; + + mChannels = mpPlayer->mSamples.GetChannels(); + + mCount = mpPlayer->mSamples.PrepareListen(&spl, fr_smpl, to_smpl); + + mpPlayer->OpenDsp(); + + mpPlayer->StartAudio(); + Start(200); } ~tAudioListener() { Stop(); - // todo: if !hard_exit flush outstanding buffers to device + + // todo: if !mHardExit flush outstanding buffers to device // before closing - player->CloseDsp(); - player->listener = 0; + mpPlayer->CloseDsp(); + mpPlayer->mpListener = 0; } virtual void Notify() { - EnterCriticalSection(&player->mutex); - count += player->samples.ContinueListen(); - player->WriteBuffers(); - LeaveCriticalSection(&player->mutex); - if (player->blocks_played >= count) + EnterCriticalSection(&mpPlayer->mutex); + mCount += mpPlayer->mSamples.ContinueListen(); + mpPlayer->WriteBuffers(); + LeaveCriticalSection(&mpPlayer->mutex); + if (mpPlayer->blocks_played >= mCount) { - hard_exit = FALSE; + mHardExit = false; delete this; } } @@ -107,21 +127,29 @@ { MMTIME mmtime; mmtime.wType = TIME_SAMPLES; - waveOutGetPosition(player->hout, &mmtime, sizeof(mmtime)); - return mmtime.u.sample * channels; + waveOutGetPosition(mpPlayer->hout, &mmtime, sizeof(mmtime)); + return mmtime.u.sample * mChannels; } private: - tWinAudioPlayer *player; - long count; - int hard_exit; - long channels; -}; + tWinAudioPlayer* mpPlayer; + long mCount; -tWinAudioPlayer::tWinAudioPlayer(JZSong *song) - : tWinIntPlayer(song) + bool mHardExit; + + long mChannels; +}; + +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +tWinAudioPlayer::tWinAudioPlayer(JZSong* pSong) + : tWinIntPlayer(pSong), + mErrorCode(NoError), + mCanDuplex(false), + mCanSynchronize(true), + mpListener(0) { state->audio_player = this; @@ -132,15 +160,12 @@ installed = 0; dummy = gpConfig->GetValue(C_EnableAudio); audio_enabled = dummy; - listener = 0; hout_open = 0; hinp_open = 0; // check for device installed = 0; - can_duplex = (gpConfig->GetValue(C_DuplexAudio) != 0); - error = NoError; - can_sync = 1; + mCanDuplex = (gpConfig->GetValue(C_DuplexAudio) != 0); if (OpenDsp() == 0) { @@ -149,99 +174,109 @@ MMRESULT res = waveOutGetDevCaps((UINT)hout, &ocaps, sizeof(ocaps)); if (res != MMSYSERR_NOERROR) { - error = ErrCapGet; + mErrorCode = ErrCapGet; } else if (!(ocaps.dwSupport & WAVECAPS_SAMPLEACCURATE)) { - // not a real error - wxMessageBox("your soundcard does not support audio/midi sync", "Warning", wxOK); - can_sync = 0; + // This is not an error; just a warning. + wxMessageBox( + "Your soundcard does not support audio/midi sync", + "Warning", + wxOK); + mCanSynchronize = false; } - if (!error && CloseDsp() == 0) + if (!mErrorCode && CloseDsp() == 0) + { installed = 1; + } } recbuffers.Clear(); audio_enabled = (audio_enabled && installed); - } - - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tWinAudioPlayer::~tWinAudioPlayer() { - delete listener; + delete mpListener; delete AudioBuffer; - // close device if open + + // Close the device if it is open. CloseDsp(); - // release semaphor + + // Release the semaphor. DeleteCriticalSection(&mutex); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::ShowError() { - const char *msg = 0; - switch (error) + const char* pMessage = 0; + switch (mErrorCode) { case ErrOutOpen: - msg = "Cannot open audio output device"; + pMessage = "Cannot open audio output device"; break; case ErrOutPrepare: - msg = "Cannot prepare audio output headers"; + pMessage = "Cannot prepare audio output headers"; break; case ErrOutUnprepare: - msg = "Cannot unprepare audio output headers"; + pMessage = "Cannot unprepare audio output headers"; break; case ErrInpOpen: - msg = "Cannot open audio input device"; + pMessage = "Cannot open audio input device"; break; case ErrInpPrepare: - msg = "Cannot prepare audio input headers"; + pMessage = "Cannot prepare audio input headers"; break; case ErrInpUnprepare: - msg = "Cannot unprepare audio input headers"; + pMessage = "Cannot unprepare audio input headers"; break; case ErrCapGet: - msg = "Unable to get audio device capbabilities"; + pMessage = "Unable to get audio device capbabilities"; break; case ErrCapSync: - msg = "Your soundcard does not support audio/midi sync"; + pMessage = "Your soundcard does not support audio/midi sync"; break; } - if (msg) - wxMessageBox((char *)msg, "Error", wxOK); + if (pMessage) + { + wxMessageBox(pMessage, "Error", wxOK); + } } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tWinAudioPlayer::LoadSamples(const char *filename) { - return samples.Load(filename); + return mSamples.Load(filename); } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tWinAudioPlayer::OpenDsp() { int i; MMRESULT res; - error = NoError; // everything ok for now. + mErrorCode = NoError; // everything ok for now. if (!audio_enabled) { return 0; } - can_duplex = (gpConfig->GetValue(C_DuplexAudio) != 0); + mCanDuplex = (gpConfig->GetValue(C_DuplexAudio) != 0); // specify the data format WAVEFORMATEX fmt; memset(&fmt, 0, sizeof(fmt)); fmt.wFormatTag = WAVE_FORMAT_PCM; - fmt.nChannels = samples.GetChannels(); - fmt.nSamplesPerSec = samples.GetSpeed(); - fmt.nBlockAlign = samples.GetChannels() * sizeof(short); + fmt.nChannels = mSamples.GetChannels(); + fmt.nSamplesPerSec = mSamples.GetSpeed(); + fmt.nBlockAlign = mSamples.GetChannels() * sizeof(short); fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec; fmt.wBitsPerSample = 16; fmt.cbSize = 0; @@ -264,14 +299,14 @@ if (res != MMSYSERR_NOERROR) { - error = ErrOutOpen; + mErrorCode = ErrOutOpen; return 1; } // prepare headers for (i = 0; i < BUFCOUNT; i++) { - tAudioBuffer *buf = samples.GetBuffer(i); + tAudioBuffer *buf = mSamples.GetBuffer(i); WAVEHDR *hdr = new WAVEHDR; memset(hdr, 0, sizeof(WAVEHDR)); buf->hdr = hdr; @@ -282,7 +317,7 @@ res = waveOutPrepareHeader(hout, hdr, sizeof(WAVEHDR)); if (res != MMSYSERR_NOERROR) { - error = ErrOutPrepare; + mErrorCode = ErrOutPrepare; return 1; } } @@ -297,7 +332,7 @@ res = waveInOpen(&hinp, WAVE_MAPPER, &fmt, (DWORD)audioInterrupt, (DWORD)this, CALLBACK_FUNCTION); if (res != MMSYSERR_NOERROR) { - error = ErrInpOpen; + mErrorCode = ErrInpOpen; return 1; } @@ -321,7 +356,7 @@ res = waveInAddBuffer(hinp, hdr, sizeof(WAVEHDR)); if (res != MMSYSERR_NOERROR) { - error = ErrInpPrepare; + mErrorCode = ErrInpPrepare; return 1; } } @@ -332,9 +367,8 @@ return 0; } - - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tWinAudioPlayer::CloseDsp() { // todo: close the device immediately if open @@ -342,7 +376,6 @@ int i; MMRESULT res; - if (hout_open) { hout_open = 0; @@ -353,13 +386,13 @@ // unprepare headers for (i = 0; i < BUFCOUNT; i++) { - tAudioBuffer *buf = samples.GetBuffer(i); + tAudioBuffer *buf = mSamples.GetBuffer(i); WAVEHDR *hdr = (WAVEHDR *)buf->hdr; res = waveOutUnprepareHeader(hout, hdr, sizeof(WAVEHDR)); if (res != MMSYSERR_NOERROR) { - error = ErrOutUnprepare; + mErrorCode = ErrOutUnprepare; return 1; } delete hdr; @@ -384,7 +417,7 @@ res = waveInUnprepareHeader(hinp, (WAVEHDR *)buf->hdr, sizeof(WAVEHDR)); if (res != MMSYSERR_NOERROR) { - error = ErrInpUnprepare; + mErrorCode = ErrInpUnprepare; return 1; } delete buf->hdr; @@ -397,16 +430,23 @@ return 0; } - -void FAR PASCAL audioInterrupt(HWAVEOUT hout, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void FAR PASCAL audioInterrupt( + HWAVEOUT hout, + UINT wMsg, + DWORD dwUser, + DWORD dw1, + DWORD dw2) { if (wMsg == MM_WOM_DONE || wMsg == MM_WIM_DATA) + { ((tWinAudioPlayer *)dwUser)->AudioCallback(wMsg); + } } - - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::AudioCallback(UINT wMsg) { // async called by driver when the driver has processed a buffer completely @@ -416,8 +456,8 @@ { blocks_played ++; play_buffers_needed ++; - tAudioBuffer *buf = samples.driv_buffers.Get(); - samples.free_buffers.Put(buf); + tAudioBuffer *buf = mSamples.driv_buffers.Get(); + mSamples.free_buffers.Put(buf); } if (hinp_open && wMsg == MM_WIM_DATA) { @@ -426,10 +466,8 @@ LeaveCriticalSection(&mutex); } - - - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::StartAudio() { // async called by driver to start audio in sync with midi @@ -445,30 +483,37 @@ } } - +//----------------------------------------------------------------------------- +// Description: +// Send the sample set to driver. +//----------------------------------------------------------------------------- void tWinAudioPlayer::WriteBuffers() { if (audio_enabled && hout_open) { - tAudioBuffer *buf; - while ((buf = samples.full_buffers.Get()) != 0) + tAudioBuffer* pAudioBuffer; + while ((pAudioBuffer = mSamples.full_buffers.Get()) != 0) { - if (waveOutWrite(hout, buf->hdr, sizeof(WAVEHDR)) == MMSYSERR_NOERROR) + if ( + waveOutWrite( + hout, + pAudioBuffer->hdr, + sizeof(WAVEHDR)) == MMSYSERR_NOERROR) { - samples.driv_buffers.Put(buf); - -- play_buffers_needed; + mSamples.driv_buffers.Put(pAudioBuffer); + --play_buffers_needed; } else { - samples.full_buffers.UnGet(buf); + mSamples.full_buffers.UnGet(pAudioBuffer); break; } } } } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::Notify() { if (audio_enabled) @@ -477,12 +522,14 @@ if (hout_open) { - samples.FillBuffers(OutClock); + mSamples.FillBuffers(OutClock); if (play_buffers_needed > 0) // dont trigger start play by accident + { WriteBuffers(); + } // midi time correction - if (can_sync && samples.softsync) + if (mCanSynchronize && mSamples.softsync) { MMTIME mmtime; MMRESULT res; @@ -490,11 +537,14 @@ res = waveOutGetPosition(hout, &mmtime, sizeof(mmtime)); if (res == MMSYSERR_NOERROR && mmtime.wType == TIME_SAMPLES) { - long time_now = (long)timeGetTime(); - long audio_now = (long)((double)start_time + (double)mmtime.u.sample * 1000.0 / (double)samples.speed); + long time_now = (long)timeGetTime(); + long audio_now = + (long)((double)start_time + 1000.0 * mmtime.u.sample / mSamples.speed); + // low pass filter for time-correction (not really necessary) const long low = 50; - state->time_correction = (low * state->time_correction + (100 - low) * (audio_now - time_now) ) / 100L; + state->time_correction = + (low * state->time_correction + (100 - low) * (audio_now - time_now) ) / 100L; } } } @@ -512,9 +562,9 @@ tAudioBuffer *buf = recbuffers.RequestBuffer(); buf->hdr = hdr; - hdr->lpData = (LPSTR)buf->data; - hdr->dwBufferLength = BUFBYTES; // length, in bytes, of the buffer - hdr->dwFlags = 0; // see below + hdr->lpData = (LPSTR)buf->data; + hdr->dwBufferLength = BUFBYTES; // length, in bytes, of the buffer + hdr->dwFlags = 0; if (waveInPrepareHeader(hinp, hdr, sizeof(WAVEHDR)) == MMSYSERR_NOERROR) { @@ -522,10 +572,12 @@ record_buffers_needed --; } else + { break; + } } - if (can_sync && samples.softsync && !hout_open) + if (mCanSynchronize && mSamples.softsync && !hout_open) { // midi time correction MMTIME mmtime; @@ -534,8 +586,9 @@ res = waveInGetPosition(hinp, &mmtime, sizeof(mmtime)); if (res == MMSYSERR_NOERROR && mmtime.wType == TIME_SAMPLES) { - long time_now = (long)timeGetTime(); - long audio_now = (long)((double)state->start_time + (double)mmtime.u.sample * 1000.0 / (double)samples.speed); + long time_now = (long)timeGetTime(); + long audio_now = + (long)((double)state->start_time + 1000.0 * mmtime.u.sample / mSamples.speed); // low pass filter for time-correction (not really necessary) const long low = 50; state->time_correction = (low * state->time_correction + (100 - low) * (audio_now - time_now) ) / 100L; @@ -549,34 +602,34 @@ tWinIntPlayer::Notify(); } - - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::StartPlay(long Clock, long LoopClock, int Continue) { - samples.StartPlay(Clock); + mSamples.StartPlay(Clock); tWinIntPlayer::StartPlay(Clock, LoopClock, Continue); if (!audio_enabled) return; - delete listener; + delete mpListener; start_clock = Clock; start_time = state->start_time; - samples.ResetBuffers(AudioBuffer, start_clock, state->ticks_per_minute); - samples.FillBuffers(OutClock); + mSamples.ResetBuffers(AudioBuffer, start_clock, state->ticks_per_minute); + mSamples.FillBuffers(OutClock); OpenDsp(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::StopPlay() { tWinIntPlayer::StopPlay(); CloseDsp(); - samples.StopPlay(); + mSamples.StopPlay(); if (RecordMode()) { long frc = rec_info->mFromClock; @@ -586,33 +639,44 @@ long play_clock = Time2Clock(state->play_time); if (toc > play_clock) toc = play_clock; - samples.SaveRecordingDlg(frc, toc, recbuffers); + mSamples.SaveRecordingDlg(frc, toc, recbuffers); } recbuffers.Clear(); } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::ListenAudio(int key, int start_stop_mode) { if (!audio_enabled) + { return; + } - // play audio file from piano roll + // Play the audio file from the piano roll. if (Playing) + { return; - // when already listening then stop listening - if (listener) + } + + // If already listening then stop listening. + if (mpListener) { - delete listener; + delete mpListener; if (start_stop_mode) + { return; + } } if (key < 0) + { return; - listener = new tAudioListener(this, key); + } + mpListener = new tAudioListener(this, key); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tWinAudioPlayer::ListenAudio(tSample &spl, long fr_smpl, long to_smpl) { if (!audio_enabled) @@ -621,21 +685,27 @@ if (Playing) return; // when already listening then stop listening - if (listener) - delete listener; - listener = new tAudioListener(this, spl, fr_smpl, to_smpl); + if (mpListener) + { + delete mpListener; + } + mpListener = new tAudioListener(this, spl, fr_smpl, to_smpl); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tWinAudioPlayer::GetListenerPlayPosition() { - if (!listener) + if (!mpListener) + { return -1L; - return listener->GetPlayPosition(); + } + return mpListener->GetPlayPosition(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tWinAudioPlayer::RecordMode() const { return rec_info != 0 && rec_info->mpTrack->GetAudioMode(); } - Modified: trunk/jazz/src/mswin/WindowsAudioInterface.h =================================================================== --- trunk/jazz/src/mswin/WindowsAudioInterface.h 2008-04-05 20:12:11 UTC (rev 398) +++ trunk/jazz/src/mswin/WindowsAudioInterface.h 2008-04-05 23:43:43 UTC (rev 399) @@ -35,77 +35,125 @@ class tWinAudioPlayer : public tWinIntPlayer { friend class tAudioListener; + public: - tWinAudioPlayer(JZSong *song); + + enum TEErrorCode + { + NoError, + ErrOutOpen, + ErrOutPrepare, + ErrOutUnprepare, + ErrInpOpen, + ErrInpPrepare, + ErrInpUnprepare, + ErrCapGet, + ErrCapSync + }; + + tWinAudioPlayer(JZSong* pSong); + virtual ~tWinAudioPlayer(); + int LoadSamples(const char *filename); + virtual void Notify(); + virtual void StartPlay(long Clock, long LoopClock = 0, int Continue = 0); + virtual void StopPlay(); + virtual void StartAudio(); // called async by driver - virtual int Installed() { return installed && tWinIntPlayer::Installed(); } - virtual int GetAudioEnabled() const { return audio_enabled; } - virtual void SetAudioEnabled(int x) { audio_enabled = x; } + + virtual int Installed() + { + return installed && tWinIntPlayer::Installed(); + } + + virtual int GetAudioEnabled() const + { + return audio_enabled; + } + + virtual void SetAudioEnabled(int x) + { + audio_enabled = x; + } + virtual void ListenAudio(int key, int start_stop_mode = 1); + virtual void ListenAudio(tSample &spl, long fr_smpl, long to_smpl); + virtual long GetListenerPlayPosition(); - virtual bool IsListening() const { - return listener != 0; + virtual bool IsListening() const + { + return mpListener != 0; } // for recording int RecordMode() const; - int PlaybackMode() const { - return !RecordMode() || can_duplex; + + int PlaybackMode() const + { + return !RecordMode() || mCanDuplex; } - enum ErrorCode { - NoError, - ErrOutOpen, ErrOutPrepare, ErrOutUnprepare, - ErrInpOpen, ErrInpPrepare, ErrInpUnprepare, - ErrCapGet, ErrCapSync - }; - ErrorCode GetError() { - return error; + TEErrorCode GetError() + { + return mErrorCode; } + virtual void ShowError(); private: - ErrorCode error; - int can_duplex; // TRUE = can do full duplex record/play - int can_sync; // TRUE = can determine exact output play position + // ms specific + friend void FAR PASCAL audioInterrupt( + HWAVEOUT, + UINT, + DWORD, + DWORD, + DWORD); - int OpenDsp(); // 0 = ok - int CloseDsp(); // 0 = ok + // Description: + // Send the sample set to driver. + void WriteBuffers(); - int installed; - int audio_enabled; // 0 means midi only + void AudioCallback(UINT msg); + + TEErrorCode mErrorCode; + + // Indicates if full duplex record/play is possible. + bool mCanDuplex; + + // Indicates if the exact output play position can be determined. + bool mCanSynchronize; + + int OpenDsp(); // 0 = ok + int CloseDsp(); // 0 = ok + + int installed; + int audio_enabled; // 0 means midi only long blocks_played; // # of blocks written to device - int play_buffers_needed; // driver requests more output buffers + int play_buffers_needed; // driver requests more output buffers long start_clock; // when did play start long start_time; // play start time (not altered by SetTempo) - tAudioListener *listener; + tAudioListener* mpListener; - // ms specific - friend void FAR PASCAL audioInterrupt(HWAVEOUT, UINT, DWORD, DWORD, DWORD); HWAVEOUT hout; HWAVEIN hinp; - void WriteBuffers(); // send samples.full_buffers to driver - void AudioCallback(UINT msg); - int hout_open; // true = playback device opended successful - int hinp_open; // true = recording device opended successful + int hout_open; // true = playback device opended successful + int hinp_open; // true = recording device opended successful tAudioRecordBuffer recbuffers; - int record_buffers_needed; // driver needs more buffers + int record_buffers_needed; // driver needs more buffers // a semaphor for thread synchronization. Since Notify() and // the audio callback are not time critical, its safe to // let them wait for each other. CRITICAL_SECTION ... [truncated message content] |
From: <pst...@us...> - 2008-04-05 20:12:13
|
Revision: 398 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=398&view=rev Author: pstieber Date: 2008-04-05 13:12:11 -0700 (Sat, 05 Apr 2008) Log Message: ----------- 1. Removed the include of WxWidgets from some header files. 2. Made cosmetic changes in Audio.h and reduced the number of casts by reordering operations. Modified Paths: -------------- trunk/jazz/src/Audio.h trunk/jazz/src/ResourceDialog.cpp trunk/jazz/src/ResourceDialog.h trunk/jazz/src/Sample.cpp Modified: trunk/jazz/src/Audio.h =================================================================== --- trunk/jazz/src/Audio.h 2008-04-05 05:23:55 UTC (rev 397) +++ trunk/jazz/src/Audio.h 2008-04-05 20:12:11 UTC (rev 398) @@ -23,10 +23,6 @@ #ifndef JZ_AUDIO_H #define JZ_AUDIO_H -#include "WxWidgets.h" - -//#include "config.h" - #include "DynamicArray.h" #include "Project.h" @@ -84,75 +80,95 @@ #define WAVEHDR void #endif -struct tAudioBuffer { +struct tAudioBuffer +{ + // This is a Microsoft Windows for mswin wavehdr + WAVEHDR* hdr; + short* data; - WAVEHDR *hdr; // for mswin wavehdr - short *data; - - tAudioBuffer(int dummy) { + tAudioBuffer(int dummy) + { hdr = 0; data = new short [BUFSHORTS]; // in case recording stops inside a buffer memset(data, 0, BUFBYTES); } - ~tAudioBuffer() { + ~tAudioBuffer() + { delete [] data; } - void Clear() { + void Clear() + { memset(data, 0, BUFBYTES); } - short *Data() { + short* Data() + { return data; } - - }; DECLARE_ARRAY(tAudioBufferArray, tAudioBuffer*) -class tAudioBufferQueue { +class tAudioBufferQueue +{ public: - tAudioBufferQueue() { + + tAudioBufferQueue() + { Clear(); } - ~tAudioBufferQueue() { + ~tAudioBufferQueue() + { } - void Clear() { + void Clear() + { written = read = 0; for (int i = 0; i < BUFCOUNT; i++) + { array[i] = 0; + } } - int Count() const { + int Count() const + { return written - read; } - int Empty() const { + int Empty() const + { return written == read; } - void Put(tAudioBuffer *buf) { + void Put(tAudioBuffer *buf) + { array[written++ % BUFCOUNT] = buf; } - tAudioBuffer *Get() { + tAudioBuffer* Get() + { if (written == read) + { return 0; + } return(array[read++ % BUFCOUNT]); } - void UnGet(tAudioBuffer *buf) { + + void UnGet(tAudioBuffer* buf) + { array[ --read % BUFCOUNT ] = buf; } private: - tAudioBuffer *array[BUFCOUNT]; + + tAudioBuffer* array[BUFCOUNT]; + int read, written; }; @@ -162,24 +178,32 @@ { friend class tSampleSet; friend class tWinAudioPlayer; + public: - tAudioRecordBuffer() { + + tAudioRecordBuffer() + { num_buffers = 0; } - ~tAudioRecordBuffer() { + + ~tAudioRecordBuffer() + { Clear(); } void Clear(); tAudioBuffer * RequestBuffer(); - void UndoRequest() { + void UndoRequest() + { num_buffers--; } - void ResetBufferSize(int size) { + void ResetBufferSize(int size) + { bufbytes = size; } private: + tAudioBufferArray buffers; int num_buffers; int bufbytes; @@ -207,7 +231,9 @@ public: tSampleSet(long ticks_per_minute); + virtual ~tSampleSet(); + int Load(const wxString& FileName); // load jazz.spl @@ -272,8 +298,10 @@ long Ticks2Samples(long ticks) const { - long spl = (long)((double)ticks * 60.0 * speed * channels / (double)ticks_per_minute); - // align to first channel + long spl = + (long)(60.0 * ticks * speed * channels / (double)ticks_per_minute); + + // Align to the first channel. return spl & -channels; } @@ -285,7 +313,7 @@ // time in millisec long Ticks2Time(long ticks) const { - return (long)((double)ticks * 60000.0 / ticks_per_minute); + return (long)(60000.0 * ticks / ticks_per_minute); } long Time2Ticks(long time) const @@ -295,7 +323,7 @@ long Samples2Time(long samples) const { - return (long)(1000.0 * (double)samples / speed / channels); + return (long)(1000.0 * samples / speed / channels); } long Time2Samples(long time) const @@ -304,17 +332,28 @@ } virtual const char *GetSampleName(int i); + int OnMenuCommand(int id); + void StartPlay(long clock); + void StopPlay(); // returns number of buffers prepared. Output starts at offs. int PrepareListen(int key, long fr_smpl = -1, long to_smpl = -1); + int PrepareListen(tSample *spl, long fr_smpl = -1, long to_smpl = -1); + int ContinueListen(); // return number of buffers void SaveRecordingDlg(long frc, long toc, tAudioRecordBuffer &buf); - void SaveWave(const char *fname, long frc, long toc, tAudioRecordBuffer &buf); + + void SaveWave( + const char *fname, + long frc, + long toc, + tAudioRecordBuffer &buf); + void AddNote(const char *fname, long frc, long toc); void RefreshDialogs(); @@ -380,7 +419,7 @@ int dirty; // needs reloading // to communicate between PrepareListen and ContinueListen - tSample *listen_sample; + tSample* listen_sample; }; #endif // !defined(JZ_AUDIO_H) Modified: trunk/jazz/src/ResourceDialog.cpp =================================================================== --- trunk/jazz/src/ResourceDialog.cpp 2008-04-05 05:23:55 UTC (rev 397) +++ trunk/jazz/src/ResourceDialog.cpp 2008-04-05 20:12:11 UTC (rev 398) @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "WxWidgets.h" + #include <wx/fs_zip.h> #include <wx/xrc/xmlres.h> Modified: trunk/jazz/src/ResourceDialog.h =================================================================== --- trunk/jazz/src/ResourceDialog.h 2008-04-05 05:23:55 UTC (rev 397) +++ trunk/jazz/src/ResourceDialog.h 2008-04-05 20:12:11 UTC (rev 398) @@ -23,8 +23,6 @@ #ifndef JZ_RESOURCEDIALOG_H #define JZ_RESOURCEDIALOG_H -#include "WxWidgets.h" - #include <list> /// Used by jppResourceDialog to store "Attach" entries. @@ -35,7 +33,8 @@ fields should all be set to zero, except the one that needs to be filled. The constructor will set all the fields to zero. */ -class jppResourceElement { +class jppResourceElement +{ public: /// ID of the widget in the XRC resource. wxString resource; Modified: trunk/jazz/src/Sample.cpp =================================================================== --- trunk/jazz/src/Sample.cpp 2008-04-05 05:23:55 UTC (rev 397) +++ trunk/jazz/src/Sample.cpp 2008-04-05 20:12:11 UTC (rev 398) @@ -20,7 +20,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //***************************************************************************** -//#include "config.h" +#include "WxWidgets.h" + #include "Sample.h" #include "Audio.h" #include "Random.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-04-05 05:23:57
|
Revision: 397 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=397&view=rev Author: pstieber Date: 2008-04-04 22:23:55 -0700 (Fri, 04 Apr 2008) Log Message: ----------- Removed some debug output. Modified Paths: -------------- trunk/jazz/src/Player.cpp Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-04-05 05:19:53 UTC (rev 396) +++ trunk/jazz/src/Player.cpp 2008-04-05 05:23:55 UTC (rev 397) @@ -205,9 +205,7 @@ JZPlayer::~JZPlayer() { - cout << "JZPlayer delete start..." << endl; delete PlayLoop; - cout << "JZPlayer delete end..." << endl; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |