|
From: <pst...@us...> - 2009-01-01 03:32:12
|
Revision: 675
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=675&view=rev
Author: pstieber
Date: 2009-01-01 03:32:09 +0000 (Thu, 01 Jan 2009)
Log Message:
-----------
1. Changed to use the new versions of ReadString and WriteString.
2. Replaced some char buffers with STL strings.
3. Updated to use the new filter accessor and mutator function.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2009-01-01 03:30:55 UTC (rev 674)
+++ trunk/jazz/src/Rhythm.cpp 2009-01-01 03:32:09 UTC (rev 675)
@@ -188,7 +188,6 @@
void tRhythm::read(istream& Is, int version)
{
- char buf[200];
Is >> rhythm;
Is >> length;
Is >> veloc;
@@ -213,8 +212,9 @@
}
Is >> parm;
- ReadString(Is, buf, sizeof(buf));
- SetLabel(buf);
+ string Label;
+ ReadString(Is, Label);
+ SetLabel(Label.c_str());
if (version > 1)
{
@@ -1077,15 +1077,15 @@
JZFilter* pFilter = mpEventWindow->mpFilter;
- if (pFilter->FromTrack != pFilter->ToTrack)
+ if (pFilter->GetFromTrack() != pFilter->GetToTrack())
{
wxMessageBox("you must select exacty 1 track", "Error", wxOK);
return;
}
- long fr_clock = pFilter->FromClock;
- long to_clock = pFilter->ToClock;
- JZTrack *track = mpSong->GetTrack(pFilter->FromTrack);
+ long fr_clock = pFilter->GetFromClock();
+ long to_clock = pFilter->GetToClock();
+ JZTrack *track = mpSong->GetTrack(pFilter->GetFromTrack());
mpSong->NewUndoBuffer();
// remove selection
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2011-08-05 19:48:29
|
Revision: 881
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=881&view=rev
Author: pstieber
Date: 2011-08-05 19:48:23 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
1. Changed fname to FileName.
2. Updated string processing.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2011-08-05 02:16:13 UTC (rev 880)
+++ trunk/jazz/src/Rhythm.cpp 2011-08-05 19:48:23 UTC (rev 881)
@@ -761,15 +761,15 @@
case wxID_OPEN:
{
- wxString fname = file_selector(
+ wxString FileName = file_selector(
mDefaultFileName,
"Load Rhythm",
false,
has_changed,
"*.rhy");
- if (fname)
+ if (!FileName.empty())
{
- ifstream Is(fname);
+ ifstream Is(FileName.wx_str());
Is >> *this;
OnPaint();
}
@@ -779,15 +779,15 @@
case wxID_SAVE:
{
Win2Instrument();
- wxString fname = file_selector(
+ wxString FileName = file_selector(
mDefaultFileName,
"Save Rhythm",
true,
has_changed,
"*.rhy");
- if (fname)
+ if (!FileName.empty())
{
- ofstream Os(fname);
+ ofstream Os(FileName.wx_str());
Os << *this;
}
}
@@ -907,7 +907,7 @@
pRhythm->n_keys = 1;
pRhythm->keys[0] = keys[i];
pRhythm->mode = MODE_ALL_OF;
- pRhythm->SetLabel(names[i].c_str());
+ pRhythm->SetLabel(names[i]);
}
// choose controller?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-04-09 02:43:38
|
Revision: 1026
http://sourceforge.net/p/jazzplusplus/code/1026
Author: pstieber
Date: 2013-04-09 02:43:35 +0000 (Tue, 09 Apr 2013)
Log Message:
-----------
Updated control layout.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2013-04-09 02:42:30 UTC (rev 1025)
+++ trunk/jazz/src/Rhythm.cpp 2013-04-09 02:43:35 UTC (rev 1026)
@@ -1554,13 +1554,11 @@
mpVelocityEdit(0),
mpRhythmEdit(0)
{
- int x = 0;
- int y = 0;
int Width, Height;
GetClientSize(&Width, &Height);
wxPanel* pInstrumentPanel =
- new wxPanel(this, wxID_ANY, wxPoint(x, y), wxSize(Width, Height / 2));
+ new wxPanel(this, wxID_ANY, wxPoint(0, 0), wxSize(Width, Height / 2));
mpStepsPerCountSlider = new wxSlider(
pInstrumentPanel,
@@ -1632,32 +1630,36 @@
"Randomize",
wxPoint(Width / 2, 4 * Height / 12));
- wxPanel* pPanel = new wxPanel(this);
+ wxPanel* pArrayControlPanel = new wxPanel(
+ this,
+ wxID_ANY,
+ wxPoint(0, Height / 2),
+ wxSize(Width, Height / 2));
mpLengthEdit = new JZArrayControl(
- pPanel,
+ pArrayControlPanel,
wxID_ANY,
mRhythm.mLengthArray,
- wxPoint(x, y),
- wxSize(Width / 2, Height / 2 - 4));
+ wxPoint(0, 0),
+ wxSize(Width / 2, Height / 4 - 4));
mpLengthEdit->SetXMinMax(1, 8);
mpLengthEdit->SetLabel("length/interval");
mpVelocityEdit = new JZArrayControl(
- pPanel,
+ pArrayControlPanel,
wxID_ANY,
mRhythm.mVelocityArray,
- wxPoint(x + Width / 2, y),
- wxSize(Width / 2, Height / 2 - 4));
+ wxPoint(Width / 2, 0),
+ wxSize(Width / 2, Height / 4 - 4));
mpVelocityEdit->SetXMinMax(1, 127);
mpVelocityEdit->SetLabel("velocity");
mpRhythmEdit = new JZRhythmArrayControl(
- pPanel,
+ pArrayControlPanel,
wxID_ANY,
mRhythm.mRhythmArray,
- wxPoint(x, y + Height / 2),
- wxSize(Width, Height / 2 - 4));
+ wxPoint(0, Height / 4),
+ wxSize(Width, Height / 4 - 4));
mpRhythmEdit->SetMeter(
mRhythm.mStepsPerCount,
mRhythm.mCountPerBar,
@@ -1667,7 +1669,7 @@
wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL);
pSizer->Add(pInstrumentPanel, wxSizerFlags().Border().Expand());
- pSizer->Add(pPanel, wxSizerFlags(1).Border().Expand());
+ pSizer->Add(pArrayControlPanel, wxSizerFlags(1).Border().Expand());
SetSizer(pSizer);
}
@@ -2035,15 +2037,15 @@
JZTrack* pTrack = mpSong->GetTrack(pFilter->GetFromTrack());
mpSong->NewUndoBuffer();
- // remove selection
+ // Remove selection.
// if (
// wxMessageBox(
// "Erase destination before generating?",
// "Replace",
// wxYES_NO) == wxYES)
{
- JZCommandErase erase(pFilter, 1);
- erase.Execute(0);
+ JZCommandErase Erase(pFilter, 1);
+ Erase.Execute(0);
}
for (
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-04-02 20:21:37
|
Revision: 1000
http://sourceforge.net/p/jazzplusplus/code/1000
Author: pstieber
Date: 2013-04-02 20:21:34 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
Fixed a menu name and updated local variable names.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2013-03-29 19:48:24 UTC (rev 999)
+++ trunk/jazz/src/Rhythm.cpp 2013-04-02 20:21:34 UTC (rev 1000)
@@ -551,26 +551,26 @@
n_bars = 0;
instrument_list = 0;
- wxMenuBar *menu_bar = new wxMenuBar;
- wxMenu *menu = new wxMenu;
- menu->Append(wxID_OPEN, "&Load");
- menu->Append(wxID_SAVE, "&Save");
- menu->Append(wxID_CLOSE, "&Close");
- menu_bar->Append(menu, "&File");
+ wxMenuBar* pMenuBar = new wxMenuBar;
+ wxMenu* pMenu = new wxMenu;
+ pMenu->Append(wxID_OPEN, "&Load");
+ pMenu->Append(wxID_SAVE, "&Save");
+ pMenu->Append(wxID_CLOSE, "&Close");
+ pMenuBar->Append(pMenu, "&File");
- menu = new wxMenu;
- menu->Append(ID_INSTRUMENT_ADD, "&Add");
- menu->Append(ID_INSTRUMENT_DELETE, "&Delete");
- menu->Append(ID_INSTRUMENT_UP, "&Up");
- menu->Append(ID_INSTRUMENT_DOWN, "&Down");
- menu->Append(ID_INSTRUMENT_GENERATE, "&Generate");
- menu_bar->Append(menu, &Instrument");
+ pMenu = new wxMenu;
+ pMenu->Append(ID_INSTRUMENT_ADD, "&Add");
+ pMenu->Append(ID_INSTRUMENT_DELETE, "&Delete");
+ pMenu->Append(ID_INSTRUMENT_UP, "&Up");
+ pMenu->Append(ID_INSTRUMENT_DOWN, "&Down");
+ pMenu->Append(ID_INSTRUMENT_GENERATE, "&Generate");
+ pMenuBar->Append(pMenu, "&Instrument");
- menu = new wxMenu;
- menu->Append(wxID_HELP, "&Help");
- menu_bar->Append(menu, "Help");
+ pMenu = new wxMenu;
+ pMenu->Append(wxID_HELP, "&Help");
+ pMenuBar->Append(pMenu, "Help");
- SetMenuBar(menu_bar);
+ SetMenuBar(pMenuBar);
int x = 0;
int y = (int)tb_height;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-04-07 06:02:18
|
Revision: 1006
http://sourceforge.net/p/jazzplusplus/code/1006
Author: pstieber
Date: 2013-04-07 06:02:14 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
Fixed panel width.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2013-04-07 05:59:57 UTC (rev 1005)
+++ trunk/jazz/src/Rhythm.cpp 2013-04-07 06:02:14 UTC (rev 1006)
@@ -1411,7 +1411,7 @@
GetClientSize(&Width, &Height);
mpInstrumentPanel =
- new wxPanel(this, wxID_ANY, wxPoint(x, y), wxSize(Width / 2, Height / 2));
+ new wxPanel(this, wxID_ANY, wxPoint(x, y), wxSize(Width, Height / 2));
mpStepsPerCountSlider = new wxSlider(
mpInstrumentPanel,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-04-07 16:14:31
|
Revision: 1009
http://sourceforge.net/p/jazzplusplus/code/1009
Author: pstieber
Date: 2013-04-07 16:14:28 +0000 (Sun, 07 Apr 2013)
Log Message:
-----------
Recorded the position of the rhythm generator frame in the configuration file.
Modified Paths:
--------------
trunk/jazz/src/Rhythm.cpp
Modified: trunk/jazz/src/Rhythm.cpp
===================================================================
--- trunk/jazz/src/Rhythm.cpp 2013-04-07 16:08:51 UTC (rev 1008)
+++ trunk/jazz/src/Rhythm.cpp 2013-04-07 16:14:28 UTC (rev 1009)
@@ -1894,6 +1894,11 @@
//-----------------------------------------------------------------------------
JZRhythmGeneratorFrame::~JZRhythmGeneratorFrame()
{
+ int XPixel, YPixel;
+ GetPosition(&XPixel, &YPixel);
+ gpConfig->Put(C_RhythmXpos, XPixel);
+ gpConfig->Put(C_RhythmYpos, YPixel);
+
delete mpRhythmGeneratorWindow;
gpRhythmGeneratorFrame = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|