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-05-10 21:35:16
|
Revision: 500
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=500&view=rev
Author: pstieber
Date: 2008-05-10 14:35:14 -0700 (Sat, 10 May 2008)
Log Message:
-----------
Added some PNG files for help file generation. These are in ppm format in the images
directory, but that will change soon. The images are from an ancient Motif version
of the code, but they will act as a good starting point for generating new documentation.
Added Paths:
-----------
trunk/jazz/doc/audioset.png
trunk/jazz/doc/audiotrk.png
trunk/jazz/doc/cleanup.png
trunk/jazz/doc/delete.png
trunk/jazz/doc/eventdlg.png
trunk/jazz/doc/filter.png
trunk/jazz/doc/hb.png
trunk/jazz/doc/hbtoolb.png
trunk/jazz/doc/jzwins.png
trunk/jazz/doc/meter.png
trunk/jazz/doc/metroset.png
trunk/jazz/doc/mixer.png
trunk/jazz/doc/pianowin.png
trunk/jazz/doc/pitched.png
trunk/jazz/doc/pwevents.png
trunk/jazz/doc/pwtoolb.png
trunk/jazz/doc/quantize.png
trunk/jazz/doc/recplay.png
trunk/jazz/doc/replic.png
trunk/jazz/doc/rrg.png
trunk/jazz/doc/rrgtoolb.png
trunk/jazz/doc/sampedit.png
trunk/jazz/doc/sampset.png
trunk/jazz/doc/search.png
trunk/jazz/doc/setchan.png
trunk/jazz/doc/shift.png
trunk/jazz/doc/songset.png
trunk/jazz/doc/speed.png
trunk/jazz/doc/syntype.png
trunk/jazz/doc/trackdef.png
trunk/jazz/doc/tracknam.png
trunk/jazz/doc/trackwin.png
trunk/jazz/doc/transpos.png
trunk/jazz/doc/twselect.png
trunk/jazz/doc/twtoolb.png
trunk/jazz/doc/veloc.png
Added: trunk/jazz/doc/audioset.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/audioset.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/audiotrk.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/audiotrk.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/cleanup.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/cleanup.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/delete.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/eventdlg.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/eventdlg.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/filter.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/filter.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/hb.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/hb.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/hbtoolb.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/hbtoolb.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/jzwins.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/jzwins.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/meter.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/meter.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/metroset.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/metroset.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/mixer.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/mixer.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/pianowin.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/pianowin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/pitched.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/pitched.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/pwevents.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/pwevents.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/pwtoolb.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/pwtoolb.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/quantize.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/quantize.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/recplay.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/recplay.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/replic.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/replic.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/rrg.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/rrg.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/rrgtoolb.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/rrgtoolb.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/sampedit.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/sampedit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/sampset.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/sampset.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/search.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/search.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/setchan.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/setchan.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/shift.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/shift.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/songset.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/songset.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/speed.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/speed.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/syntype.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/syntype.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/trackdef.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/trackdef.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/tracknam.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/tracknam.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/trackwin.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/trackwin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/transpos.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/transpos.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/twselect.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/twselect.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/twtoolb.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/twtoolb.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jazz/doc/veloc.png
===================================================================
(Binary files differ)
Property changes on: trunk/jazz/doc/veloc.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-10 18:13:26
|
Revision: 499
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=499&view=rev
Author: pstieber
Date: 2008-05-10 11:13:22 -0700 (Sat, 10 May 2008)
Log Message:
-----------
Removed the AM_PATH_ALSA macro. This macro comes with the ALSA distribution.
Since the Mac doesn't use ALSA, the macro breaks the Mac build. I believe I
now have the build setup to work with a Mac and a Linux Box with ALSA.
*Please test.*
Modified Paths:
--------------
trunk/jazz/configure.ac
Modified: trunk/jazz/configure.ac
===================================================================
--- trunk/jazz/configure.ac 2008-05-10 16:38:38 UTC (rev 498)
+++ trunk/jazz/configure.ac 2008-05-10 18:13:22 UTC (rev 499)
@@ -101,10 +101,6 @@
if test x$enable_alsa = xyes ; then
AC_MSG_RESULT(alsa is enabled)
AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
-
- dnl This test comes with the alsa distribution!
- AM_PATH_ALSA(0.9.0)
-
fi
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-10 16:38:41
|
Revision: 498
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=498&view=rev
Author: pstieber
Date: 2008-05-10 09:38:38 -0700 (Sat, 10 May 2008)
Log Message:
-----------
1. Started adding some audio menus.
2. Started cleaning up Audio.cpp.
Modified Paths:
--------------
trunk/jazz/src/Audio.cpp
trunk/jazz/src/Player.h
trunk/jazz/src/Resources.h
trunk/jazz/src/TrackFrame.cpp
Modified: trunk/jazz/src/Audio.cpp
===================================================================
--- trunk/jazz/src/Audio.cpp 2008-05-10 16:09:29 UTC (rev 497)
+++ trunk/jazz/src/Audio.cpp 2008-05-10 16:38:38 UTC (rev 498)
@@ -37,6 +37,7 @@
#include "FileSelector.h"
#include "StringReadWrite.h"
#include "Help.h"
+#include "Resources.h"
#include <iostream>
#include <fstream>
@@ -51,21 +52,22 @@
#define db(a) cout << #a << " = " << a << endl
-// -----------------------------------------------------------
+//*****************************************************************************
+//*****************************************************************************
+class tSampleVoice
+{
+ // Activated on note on. Copies data from a tSample object to the output
+ // buffer as needed by the driver.
-
-class tSampleVoice {
- /*
- * activated on note on. Copies data from a tSample Object to the
- * output buffer as needed by the driver.
- */
-
public:
- tSampleVoice(tSampleSet &s) : set(s) {
+ tSampleVoice(tSampleSet &s)
+ : set(s)
+ {
}
- void Start(tSample *s, long c) {
+ void Start(tSample *s, long c)
+ {
spl = s;
clock = c;
first = 1;
@@ -74,7 +76,8 @@
prev = 0;
}
- void AddBuffer(short *b, long buffer_clock, unsigned int bufsize) {
+ void AddBuffer(short *b, long buffer_clock, unsigned int bufsize)
+ {
// everything done?
if (length <= 0)
@@ -113,28 +116,33 @@
length -= count;
b += offset;
while (count--)
+ {
*b++ += *data++;
+ }
}
-
-
- void AddListen(short *b, long fr_smpl, long to_smpl, unsigned int bufsize) {
-
- // everything done?
+ void AddListen(short *b, long fr_smpl, long to_smpl, unsigned int bufsize)
+ {
+ // Is everything done?
if (length <= 0)
+ {
return;
+ }
- if (first) {
+ if (first)
+ {
if (to_smpl > 0 && to_smpl < length)
+ {
length = to_smpl;
+ }
if (fr_smpl > 0 && fr_smpl < length)
{
data += fr_smpl;
length -= fr_smpl;
}
- first = FALSE;
+ first = false;
if (length <= 0)
{
return;
@@ -143,7 +151,9 @@
int count = bufsize;
if (count > length)
+ {
count = length;
+ }
// update length and copy data
length -= count;
@@ -153,23 +163,25 @@
}
}
-
- int Finished() {
+ int Finished()
+ {
return length <= 0;
}
private:
- tSampleSet &set;
- long clock;
- tSample *spl;
- short *data;
- int first;
- long length;
- short prev;
+ tSampleSet& set;
+ long clock;
+ tSample* spl;
+ short* data;
+ int first;
+ long length;
+ short prev;
};
-// ------------------------------------------------------------
-
+//*****************************************************************************
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
tSampleSet::tSampleSet(long tpm)
: mDefaultFileName("noname.spl"),
mRecordFileName("noname.wav")
@@ -179,7 +191,9 @@
ticks_per_minute = tpm;
for (i = 0; i < BUFCOUNT; i++)
+ {
buffers[i] = new tAudioBuffer(0);
+ }
adjust_audio_length = 1;
has_changed = false;
@@ -189,7 +203,8 @@
softsync = 1;
dirty = 0;
- for (i = 0; i < MAXSMPL; i++) {
+ for (i = 0; i < MAXSMPL; i++)
+ {
samples[i] = new tSample(*this);
samplewin[i] = 0;
}
@@ -198,26 +213,34 @@
bits = 16; // dont change!!
for (i = 0; i < MAXPOLY; i++)
+ {
voices[i] = new tSampleVoice(*this);
+ }
num_voices = 0;
-
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
tSampleSet::~tSampleSet()
{
int i;
- for (i = 0; i < MAXSMPL; i++) {
+ for (i = 0; i < MAXSMPL; i++)
+ {
delete samples[i];
delete samplewin[i];
}
for (i = 0; i < MAXPOLY; i++)
+ {
delete voices[i];
+ }
for (i = 0; i < BUFCOUNT; i++)
+ {
delete buffers[i];
+ }
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::Edit(int key)
{
if (samplewin[key] == 0)
@@ -226,11 +249,12 @@
samplewin[key] = new tSampleWin(gpTrackWindow, &samplewin[key], *spl);
}
- samplewin[key]->Show(TRUE);
+ samplewin[key]->Show(true);
samplewin[key]->Redraw();
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::LoadDefaultSettings()
{
wxString FileName = FindFile("jazz.spl");
@@ -240,12 +264,14 @@
}
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::Load(const wxString& FileName)
{
int version;
// enable audio when loading a sample set
- gpMidiPlayer->SetAudioEnabled(TRUE);
+ gpMidiPlayer->SetAudioEnabled(true);
wxBeginBusyCursor();
for (int i = 0; i < MAXSMPL; i++)
@@ -313,6 +339,8 @@
return 0;
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::ReloadSamples()
{
for (int i = 0; i < MAXSMPL; i++)
@@ -320,12 +348,14 @@
dirty = 0;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::Save(const wxString& FileName)
{
ofstream os(FileName.c_str());
os << 1 << " " << speed << " " << channels << " " << softsync << endl;
- for (int i = 0; i < MAXSMPL; i++) {
+ for (int i = 0; i < MAXSMPL; i++)
+ {
tSample *spl = samples[i];
const char *fname = spl->GetFilename();
const char *label = spl->GetLabel();
@@ -344,14 +374,19 @@
return 0;
}
-
-const char *tSampleSet::GetSampleName(int i) {
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+const char* tSampleSet::GetSampleName(int i)
+{
if (0 <= i && i < MAXSMPL)
+ {
return samples[i]->GetLabel();
+ }
return "";
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::ResetBuffers(tEventArray *evnt_arr, long clock, long tpm)
{
int i;
@@ -359,7 +394,9 @@
full_buffers.Clear();
driv_buffers.Clear();
for (i = 0; i < BUFCOUNT; i++)
+ {
free_buffers.Put(buffers[i]);
+ }
buffers_written = 0;
events = evnt_arr;
@@ -372,10 +409,12 @@
return 0;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::ResetBufferSize(unsigned int bufsize)
{
- if (bufsize == 0 || bufsize > BUFBYTES || (bufsize & 1)) {
+ if (bufsize == 0 || bufsize > BUFBYTES || (bufsize & 1))
+ {
cerr << "invalid buffer size " << bufsize << '\n';
return 1;
}
@@ -384,7 +423,8 @@
return 0;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::FillBuffers(long last_clock)
{
// check if last_clock is bigger than free buffer space
@@ -413,7 +453,6 @@
return 0;
}
-
// iterate the events and add sounding voices
while (event_index < events->nEvents)
{
@@ -468,9 +507,10 @@
return nfree;
}
-
+//-----------------------------------------------------------------------------
// returns the number of buffers containing sound. Fills as many
// buffers as possible, the last buffers may contain silence only.
+//-----------------------------------------------------------------------------
int tSampleSet::PrepareListen(tSample *spl, long fr_smpl, long to_smpl)
{
listen_sample = spl;
@@ -481,10 +521,12 @@
int nfree = free_buffers.Count();
int sound_buffers = 0;
- for (int i = 0; i < nfree; i++) {
+ for (int i = 0; i < nfree; i++)
+ {
tAudioBuffer *buf = free_buffers.Get();
buf->Clear();
- if (!voices[0]->Finished()) {
+ if (!voices[0]->Finished())
+ {
voices[0]->AddListen(buf->Data(), fr_smpl, to_smpl, bufshorts);
sound_buffers++;
}
@@ -494,14 +536,16 @@
return sound_buffers;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::PrepareListen(int key, long fr_smpl, long to_smpl)
{
tSample *spl = samples[key];
return PrepareListen(spl, fr_smpl, to_smpl);
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::ContinueListen()
{
int nfree = free_buffers.Count();
@@ -511,7 +555,8 @@
{
tAudioBuffer *buf = free_buffers.Get();
buf->Clear();
- if (!voices[0]->Finished()) {
+ if (!voices[0]->Finished())
+ {
voices[0]->AddListen(buf->Data(), -1, -1, bufshorts);
sound_buffers++;
}
@@ -521,8 +566,8 @@
return sound_buffers;
}
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::AdjustAudioLength(JZTrack *t, long tpm)
{
if (!t->GetAudioMode() || !adjust_audio_length)
@@ -548,14 +593,15 @@
}
}
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::StartPlay(long clock)
{
ReloadSamples();
// touch all playback sample data, so they may get swapped into memory
- for (int i = 0; i < MAXSMPL; i++) {
+ for (int i = 0; i < MAXSMPL; i++)
+ {
tSample *spl = samples[i];
spl->GotoRAM();
}
@@ -563,16 +609,17 @@
is_playing = 1;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::StopPlay()
{
is_playing = 0;
}
-// ******************************************************************
-// GUI
-// ******************************************************************
-
+//*****************************************************************************
+// Description:
+// This is the sample dialog.
+//*****************************************************************************
class tSamplesDlg : public wxDialog
{
friend class tSampleSet;
@@ -635,7 +682,14 @@
ossbug2 = gpConfig->GetValue(C_OssBug2);
duplex_audio = gpConfig->GetValue(C_DuplexAudio);
- static const char *speedtxt[] = { "8000", "11025", "22050", "44100", 0 };
+ static const char *speedtxt[] =
+ {
+ "8000",
+ "11025",
+ "22050",
+ "44100",
+ 0
+ };
speed = set.GetSpeed();
speedstr = 0;
for (int i = 0; speedtxt[i]; i++)
@@ -722,7 +776,8 @@
wxEndBusyCursor();
wxForm::OnOk();
}
- void OnCancel() {
+ void OnCancel()
+ {
set.glb_dialog = 0;
wxForm::OnCancel();
}
@@ -742,25 +797,30 @@
#endif // OBSOLETE
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::GlobalSettingsDlg()
{
- if (spl_dialog) {
- spl_dialog->Show(TRUE);
+ if (spl_dialog)
+ {
+ spl_dialog->Show(true);
return;
}
if (glb_dialog == 0)
{
#ifdef OBSOLETE
- glb_dialog = new wxDialogBox(gpTrackWindow, "Audio Settings", FALSE );
+ glb_dialog = new wxDialogBox(gpTrackWindow, "Audio Settings", false);
tAudioGloblForm *form = new tAudioGloblForm(*this);
form->AssociatePanel(glb_dialog);
glb_dialog->Fit();
#endif // OBSOLETE
}
- glb_dialog->Show(TRUE);
+ glb_dialog->Show(true);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::SaveRecordingDlg(long frc, long toc, tAudioRecordBuffer &buf)
{
if (frc >= toc)
@@ -796,24 +856,27 @@
}
}
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::AddNote(const char *fname, long frc, long toc)
{
int i;
tSample *spl;
// see if fname is already present in sample list
- for (i = 0; i < MAXSMPL; i++) {
+ for (i = 0; i < MAXSMPL; i++)
+ {
spl = samples[i];
if (strcmp(spl->GetFilename(), fname) == 0)
break;
}
// if no entry is there, add an entry
- if (i >= MAXSMPL) {
+ if (i >= MAXSMPL)
+ {
// start somewhere near the top of the list
- for (i = 15; i < MAXSMPL; i++) {
+ for (i = 15; i < MAXSMPL; i++)
+ {
spl = samples[i];
if (spl->GetFilename()[0] == 0)
break;
@@ -840,7 +903,8 @@
#endif
tEventIterator iter(info->mpTrack);
JZEvent *e = iter.Range(frc, toc);
- while (e != 0) {
+ while (e != 0)
+ {
track->Kill(e);
e = iter.Next();
}
@@ -859,9 +923,13 @@
gpTrackWindow->Update();
}
-
-
-void tSampleSet::SaveWave(const char *fname, long frc, long toc, tAudioRecordBuffer &buf)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void tSampleSet::SaveWave(
+ const char *fname,
+ long frc,
+ long toc,
+ tAudioRecordBuffer &buf)
{
WaveHeader wh;
wh.main_chunk = RIFF;
@@ -913,7 +981,8 @@
// very slow, but works!
ofstream slow("t2.wav", ios::out | ios::bin | ios::trunc);
slow.write((char *)&wh, sizeof(wh));
- for (long i = start_index; i < end_index; i++) {
+ for (long i = start_index; i < end_index; i++)
+ {
int bi = i / bufsize;
int di = i % bufsize;
slow.write((char *)&buf.buffers[bi]->data[di], sizeof(short));
@@ -927,20 +996,27 @@
DEFINE_ARRAY(tAudioBufferArray, tAudioBuffer *)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tAudioRecordBuffer::Clear()
{
int n = buffers.GetSize();
- for (int i = 0; i < n; i++) {
+ for (int i = 0; i < n; i++)
+ {
delete buffers[i];
buffers[i] = 0;
}
num_buffers = 0;
}
-tAudioBuffer * tAudioRecordBuffer::RequestBuffer() {
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+tAudioBuffer * tAudioRecordBuffer::RequestBuffer()
+{
if (buffers[num_buffers] == 0)
buffers[num_buffers] = new tAudioBuffer(0);
- if (buffers[num_buffers] == 0) {
+ if (buffers[num_buffers] == 0)
+ {
Clear();
fprintf(stderr, "memory exhausted!\n");
}
@@ -952,9 +1028,13 @@
// -----------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
char * tSamplesDlg::path = 0;
int tSamplesDlg::current = 0;
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
tSamplesDlg::tSamplesDlg(wxWindow* pParent, tSampleSet &s)
: wxDialog(pParent, wxID_ANY, wxString("Sample Settings")),
set(s)
@@ -964,7 +1044,9 @@
names = new char * [tSampleSet::MAXSMPL];
for (int i = 0; i < tSampleSet::MAXSMPL; i++)
+ {
names[i] = ListEntry(i);
+ }
// buttons
#ifdef OBSOLETE
@@ -1003,10 +1085,12 @@
#endif // OBSOLETE
Fit();
Sample2Win(current);
- list->SetSelection(current, TRUE);
- Show(TRUE);
+ list->SetSelection(current, true);
+ Show(true);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
char *tSamplesDlg::ListEntry(int i)
{
char buf[500];
@@ -1016,6 +1100,8 @@
return copystring(buf);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::Sample2Win(int i)
{
tSample *spl = set.samples[i];
@@ -1028,6 +1114,8 @@
#endif
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::Win2Sample(int i)
{
tSample *spl = set.samples[i];
@@ -1040,16 +1128,20 @@
#endif
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::SetCurrentListEntry(int i)
{
if (i >= 0)
{
current = i;
list->SetString(current, ListEntry(current));
- list->SetSelection(current, TRUE);
+ list->SetSelection(current, true);
}
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
tSamplesDlg::~tSamplesDlg()
{
for (int i = 0; i < tSampleSet::MAXSMPL; i++)
@@ -1057,6 +1149,8 @@
delete [] names;
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnCloseButton()
{
if (set.is_playing)
@@ -1070,6 +1164,8 @@
Destroy();
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnAddButton()
{
wxString fname = file_selector(path, "Load Sample", false, false, "*.wav");
@@ -1084,6 +1180,8 @@
}
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnEditButton()
{
wxBeginBusyCursor();
@@ -1096,10 +1194,14 @@
set.Edit(current);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnPlayButton()
{
if (set.is_playing)
+ {
return;
+ }
if (gpMidiPlayer->IsListening())
{
gpMidiPlayer->ListenAudio(-1);
@@ -1114,6 +1216,8 @@
wxEndBusyCursor();
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnClrButton()
{
tSample *spl = set.samples[current];
@@ -1122,16 +1226,21 @@
Sample2Win(current);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnHelpButton()
{
gpHelpInstance->ShowTopic("Sample Settings");
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSamplesDlg::OnListClick()
{
Win2Sample(current);
int i = list->GetSelection();
- if (i >= 0) {
+ if (i >= 0)
+ {
current = i;
SetCurrentListEntry(i);
Sample2Win(current);
@@ -1170,17 +1279,22 @@
}
#endif // OBSOLETE
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::SamplesDlg()
{
- if (glb_dialog) {
- glb_dialog->Show(TRUE);
+ if (glb_dialog)
+ {
+ glb_dialog->Show(true);
return;
}
if (spl_dialog == 0)
spl_dialog = new tSamplesDlg(gpTrackWindow, *this);
- spl_dialog->Show(TRUE);
+ spl_dialog->Show(true);
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tSampleSet::RefreshDialogs()
{
if (spl_dialog)
@@ -1191,12 +1305,13 @@
// -------------------------------- menu ---------------------------
// -----------------------------------------------------------------
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int tSampleSet::OnMenuCommand(int id)
{
switch (id)
{
- case MEN_AUDIO_LOAD:
+ case ID_AUDIO_LOAD:
{
wxString fname = file_selector(
mDefaultFileName,
@@ -1211,7 +1326,7 @@
return 1;
}
- case MEN_AUDIO_SAVE_AS:
+ case ID_AUDIO_SAVE_AS:
{
wxString fname = file_selector(
mDefaultFileName,
@@ -1226,25 +1341,25 @@
return 1;
}
- case MEN_AUDIO_SAVE:
+ case ID_AUDIO_SAVE:
{
if (mDefaultFileName == "noname.spl")
{
- return OnMenuCommand(MEN_AUDIO_SAVE_AS);
+ return OnMenuCommand(ID_AUDIO_SAVE_AS);
}
Save(mDefaultFileName);
return 1;
}
- case MEN_AUDIO_GLOBAL:
+ case ID_AUDIO_GLOBAL:
GlobalSettingsDlg();
break;
- case MEN_AUDIO_SAMPLES:
+ case ID_AUDIO_SAMPLES:
SamplesDlg();
return 1;
- case MEN_AUDIO_NEW:
+ case ID_AUDIO_NEW:
if (spl_dialog == 0 && glb_dialog == 0)
{
if (wxMessageBox("Clear Sample Set?", "Confirm", wxYES_NO) == wxNO)
@@ -1261,6 +1376,3 @@
}
return 0;
}
-
-
-
Modified: trunk/jazz/src/Player.h
===================================================================
--- trunk/jazz/src/Player.h 2008-05-10 16:09:29 UTC (rev 497)
+++ trunk/jazz/src/Player.h 2008-05-10 16:38:38 UTC (rev 498)
@@ -39,15 +39,6 @@
class JZRecordingInfo;
-// audio-menu
-#define MEN_AUDIO_LOAD 200
-#define MEN_AUDIO_SAVE 201
-#define MEN_AUDIO_GLOBAL 202
-#define MEN_AUDIO_SAMPLES 203
-#define MEN_AUDIO_NEW 204
-#define MEN_AUDIO_SAVE_AS 205
-
-
class tPlayLoop
{
public:
Modified: trunk/jazz/src/Resources.h
===================================================================
--- trunk/jazz/src/Resources.h 2008-05-10 16:09:29 UTC (rev 497)
+++ trunk/jazz/src/Resources.h 2008-05-10 16:38:38 UTC (rev 498)
@@ -37,6 +37,13 @@
#define ID_SETTINGS_SYNTHESIZER wxID_HIGHEST + 11
#define ID_SETTINGS_MIDI_DEVICE wxID_HIGHEST + 12
+#define ID_AUDIO_GLOBAL wxID_HIGHEST + 20
+#define ID_AUDIO_SAMPLES wxID_HIGHEST + 21
+#define ID_AUDIO_LOAD wxID_HIGHEST + 22
+#define ID_AUDIO_SAVE wxID_HIGHEST + 23
+#define ID_AUDIO_SAVE_AS wxID_HIGHEST + 24
+#define ID_AUDIO_NEW wxID_HIGHEST + 25
+
#define ID_TRIM wxID_HIGHEST + 30
#define ID_QUANTIZE wxID_HIGHEST + 31
#define ID_SHIFT_LEFT wxID_HIGHEST + 32
Modified: trunk/jazz/src/TrackFrame.cpp
===================================================================
--- trunk/jazz/src/TrackFrame.cpp 2008-05-10 16:09:29 UTC (rev 497)
+++ trunk/jazz/src/TrackFrame.cpp 2008-05-10 16:38:38 UTC (rev 498)
@@ -378,17 +378,16 @@
pMenuBar->Append(pSettingMenu, "&Settings");
-#if 0
- audio_menu = new wxMenu;
- audio_menu->Append(MEN_AUDIO_GLOBAL, "&Global Settings...");
- audio_menu->Append(MEN_AUDIO_SAMPLES, "Sample Se&ttings... ");
- audio_menu->Append(MEN_AUDIO_LOAD, "&Load Set...");
- audio_menu->Append(MEN_AUDIO_SAVE, "&Save Set");
- audio_menu->Append(MEN_AUDIO_SAVE_AS, "Save Set &As");
- audio_menu->Append(MEN_AUDIO_NEW, "&New Set");
- pMenuBar->Append(audio_menu, "&Audio");
-#endif
+ wxMenu* pAudioMenu = new wxMenu;
+ pAudioMenu->Append(ID_AUDIO_GLOBAL, "&Global Settings...");
+ pAudioMenu->Append(ID_AUDIO_SAMPLES, "Sample Se&ttings... ");
+ pAudioMenu->Append(ID_AUDIO_LOAD, "&Load Set...");
+ pAudioMenu->Append(ID_AUDIO_SAVE, "&Save Set");
+ pAudioMenu->Append(ID_AUDIO_SAVE_AS, "Save Set &As");
+ pAudioMenu->Append(ID_AUDIO_NEW, "&New Set");
+ pMenuBar->Append(pAudioMenu, "&Audio");
+
pMenuBar->Append(mpHelpMenu , "&Help");
SetMenuBar(pMenuBar);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-10 16:09:36
|
Revision: 497
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=497&view=rev
Author: pstieber
Date: 2008-05-10 09:09:29 -0700 (Sat, 10 May 2008)
Log Message:
-----------
Added the web site contents.
Added Paths:
-----------
web/
web/cgi-bin/
web/htdocs/
web/htdocs/buildingjazz/
web/htdocs/buildingjazz/index.php
web/htdocs/buildingwx/
web/htdocs/buildingwx/index.php
web/htdocs/credits/
web/htdocs/credits/index.php
web/htdocs/documentation/
web/htdocs/documentation/index.php
web/htdocs/download/
web/htdocs/download/index.php
web/htdocs/graphics/
web/htdocs/graphics/background.png
web/htdocs/graphics/background2.png
web/htdocs/graphics/background3.png
web/htdocs/graphics/jazz.jpg
web/htdocs/include/
web/htdocs/include/footer.php
web/htdocs/include/header.php
web/htdocs/include/jazz.css
web/htdocs/include/leftnav.php
web/htdocs/index.php
web/htdocs/mailinglist/
web/htdocs/mailinglist/index.php
web/htdocs/news/
web/htdocs/news/index.php
web/htdocs/subversion/
web/htdocs/subversion/index.php
Added: web/htdocs/buildingjazz/index.php
===================================================================
--- web/htdocs/buildingjazz/index.php (rev 0)
+++ web/htdocs/buildingjazz/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,254 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<HEAD>
+<LINK rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<TITLE>Building Jazz++</TITLE>
+</HEAD>
+<BODY>
+<H1 class="title">Jazz++ MIDI Sequencer</H1>
+<TABLE class="main">
+<TR>
+<TD class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</TD>
+<TD class="mainCopy">
+<H2>Building Jazz++</H2>
+<P>
+Jazz++ uses a non-stock build of the
+<A NAME="wxWidgetsLink" HREF="http://www.wxwidgets.org">wxWidgets</A> library.
+See
+<A NAME="wxWidgetsLink" HREF="/buildingwx">the wxWidgets build instructions</A>
+to create and install the non-stock wxWidgets build. This non-stock wxWidgets
+build must be available before using the instructions on this page.
+</P>
+
+<H3>Building Jazz++ for Windows</H3>
+<P>
+There are Visual Studio .NET 2005 (VC8) and Visual Studio .NET 2008 (VC9)
+solution and project files available for building on a Windows based PC. These
+solution and project files have been test on Windiws XP and Vista.
+</P>
+<OL>
+<LI>
+Use a subversion client to check out the trunk version of Jazz++.
+<A NAME="TortoiseSVN" HREF="http://tortoisesvn`.tigris.org">TortoiseSVN</A> is
+a good Subversion clint for Windows and is integrated with the Windows
+Explorer.
+</LI>
+
+<LI>
+The Visual Studio .NET 2005 solution file (<TT>JazzPlusPlus-VC8.sln</TT>), can
+be found in the <TT>jazzplusplus/trunk/jazz/vc8</TT> directory.
+</LI>
+
+<LI>
+The Visual Studio .NET 2008 solution file (<TT>JazzPlusPlus-VC9.sln</TT>), can
+be found in the <TT>jazzplusplus/trunk/jazz/vc9</TT> directory.
+</LI>
+
+</OL>
+
+<P>
+Each of these solutions rely on the existence of an environment variable called
+<TT>EXT_PKGS</TT>. This environment variable indicates the location of
+external packages used by Jazz++. wxWidgets is an example of an external
+package used by Jazz++. If you followed
+<A NAME="wxWidgetsLink" HREF="/buildingwx">the wxWidgets build instructions</A>
+found on this web site, you should set this environment variable to
+<TT>C:\ExternalPackages</TT>. The project settings rely on the wxWidgets
+subdirectories following the naming convention suggested in the wxWidgets build
+instructions (wxMSW-2.8.7-VC8 for Visual Studio .NET 2005 and wxMSW-2.8.7-VC9
+for Visual Studio .NET 2008).
+</P>
+
+<H3>Building Jazz++ for Linux</H3>
+<P>
+I'm going to assume you do not have root privileges on your Linux box. Given
+this assumption, we'll create a directory called <TT>Jazz++</TT> under your
+home directory. This directory will hold the source tree that will be obtained
+using Subversion, a build directory call <TT>Build</TT> and a test installation
+directory called <TT>TestInstall</TT> that will be generated by the build
+sequence. The need for the source directory is obvious. Separating the build
+directory from the source tree will allow you to remove the build output
+without damaging the source tree. The installation directory will be created
+during the build process, and its location will prevent the need for root
+privileges on your Linux box.
+</P>
+
+<OL>
+<LI>
+Create a <TT> Jazz++</TT> directory under your home directory and change
+directory to the newly created directory.
+<PRE>
+cd
+mkdir Jazz++
+cd Jazz++
+</Pre>
+</LI>
+
+<LI>
+Checkout the HEAD version of Jazz++ using the following command.
+You must have a Subversion client loaded on your machine.
+
+<PRE>
+svn checkout https://jazzplusplus.svn.sourceforge.net/svnroot/jazzplusplus/trunk/jazz jazz
+</PRE>
+</LI>
+
+<LI>
+Change directory to the created <TT>jazz</TT> directory and run the
+<TT>bootstrap</TT> script.
+
+<PRE>
+cd jazz
+./bootstrap
+</PRE>
+</LI>
+
+<LI>
+Change directory to <TT>Jazz++</TT> under your home directory and create a
+directory called <TT>Build</TT> that is in parallel with the <TT>jazz</TT>
+source tree directory, and change directory to that location.
+
+<PRE>
+cd ..
+mkdir Build
+cd Build
+</PRE>
+</LI>
+
+<LI>
+Run the <TT>configure</TT> command generated by the <TT>./bootstrap</TT>
+script with the following options.
+
+<PRE>
+../jazz/configure \
+ --prefix=$HOME/Jazz++/TestInstall \
+ --enable-debug \
+ --enable-alsa \
+ --enable-sequencer2
+</PRE>
+
+The <TT>prefix</TT> option is used so that the <TT>make install</TT> step
+found later in these instructions, will not require root privileges. It is
+also useful to run <TT>make install</TT> with this prefix option, so that the
+resulting install will create a copy of the <TT>jazz.cfg</TT> file that is
+independent of the one distributed in the source tree. The configuration file
+is modified by the Jazz++ binary. If the version of the <TT>jazz.cfg</TT> file
+in your svn working was altered, this could lead to update conflicts when
+updating the code using Subversion. This may lead to problems using Jazz++ as
+a result.
+<BR>
+<BR>
+</LI>
+
+<LI>
+Run <TT>make</TT> using the following command. This will write a file
+called <TT>BuildLog</TT> that may be useful if you run into trouble.
+
+<PRE>
+make 2>&1 | tee BuildLog
+</PRE>
+</LI>
+
+<LI>
+If all goes well with the build, install Jazz++ using the following command.
+
+<PRE>
+make install
+</PRE>
+</LI>
+</OL>
+
+<P>
+You should now have a <TT>jazz</TT> binary in
+<TT>$HOME/Jazz++/TestInstall/bin</TT>. If the code prompts you for a Jazz++
+configuration file, select the <TT>jazz.cfg</TT> file found in
+<TT>$HOME/Jazz++/TestInstall/share/Jazz++</TT>.
+</P>
+
+<H3>Building Jazz++ for Mac OS X 10.5.2</H3>
+<OL>
+<LI>
+Checkout the HEAD version of Jazz++ using the following command.
+
+<PRE>
+svn checkout https://jazzplusplus.svn.sourceforge.net/svnroot/jazzplusplus/trunk/jazz jazz
+</PRE>
+</LI>
+
+<LI> Change directory to the created <TT>jazz</TT> directory and run the
+<TT>bootstrap</TT> script.
+
+<PRE>
+cd jazz
+./bootstrap
+</PRE>
+</LI>
+
+<LI>Change directory to <TT>Jazz++</TT> and create a directory called
+<TT>Build</TT> in parallel with the <TT>jazz</TT> directory and change
+directory to that location.
+
+<PRE>
+cd ..
+mkdir Build
+cd Build
+</PRE>
+</LI>
+
+<LI>
+Run the <TT>configure</TT> command generated by the <TT>./bootstrap</TT>
+script with the following options.
+
+<PRE>
+../jazz/configure \
+ --prefix=$HOME/Jazz++/TestInstall \
+ --enable-static=yes \
+ --enable-shared=no
+</PRE>
+
+The <TT>prefix</TT> option was used so that the resulting install would not use
+the <TT>jazz.cfg</TT> file from the svn repository. The configuration file is
+modified by the Jazz++ binary. If the version in your svn working was altered,
+this could lead to update conflicts when updating the code. This may lead to
+problems using Jazz++.
+<BR>
+<BR>
+</LI>
+
+<LI>
+Run <TT>make</TT> using the following command. This will write a file
+called <TT>BuildLog</TT> that may be useful if you run into trouble.
+
+<PRE>
+make 2>&1 | tee BuildLog
+</PRE>
+</LI>
+
+<LI>
+If all goes well with the build, install Jazz++ using the following command.
+
+<PRE>
+make install
+</PRE>
+</LI>
+</OL>
+
+<P>
+You should now have a <TT>jazz</TT> binary in
+<TT>$HOME/Jazz++/TestInstall/bin</TT>. If the code prompts you for a Jazz++
+configuration file, select the <TT>jazz.cfg</TT> file found in
+<TT>$HOME/Jazz++/TestInstall/share/Jazz++</TT>.
+</P>
+
+<?php
+require_once('../include/footer.php');
+?>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
Added: web/htdocs/buildingwx/index.php
===================================================================
--- web/htdocs/buildingwx/index.php (rev 0)
+++ web/htdocs/buildingwx/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,372 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<HEAD>
+<LINK rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<TITLE>Building wxWidgets for Jazz++</TITLE>
+</HEAD>
+<BODY>
+<H1 class="title">Jazz++ MIDI Sequencer</H1>
+<TABLE class="main">
+<TR>
+<TD class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</TD>
+<TD class="mainCopy">
+<H2>Building wxWidgets for Jazz++</H2>
+<P>
+Jazz++ uses a non-stock build of the
+<A NAME="wxWidgetsLink" HREF="http://www.wxwidgets.org">wxWidgets</A> library.
+wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11,
+Motif, WinCE, and more using one codebase. This page describes how the Jazz++
+version of wxWidgets was compiled for Windows, Linux, and the Mac. The Windows
+build was generated using Visual Studio. Either Visual Studio .NET 2005 or
+Visual Studio .NET 2008 can be used on Windows. The Linux install was tested
+using Fedora 8 using GCC 4.1.2 and Mandriva 2008.0 using GCC 4.2.2. The Mac
+build was tested using Mac OS X 10.5.2 and GCC 4.0.1.
+</P>
+
+<H3>Building wxWidgets for Windows</H3>
+<P>
+I have used these instructions with Visual Studio .NET 2005 (VC8) and Visual
+Studio .NET 2008 (VC9). I used VC8 in the following text, but simply
+substitute the appropriate VC9 veriage to create a Visual Studio .NET 2008
+build. I have both builds living side-by-side on my hard drive.
+</P>
+<OL>
+<LI>
+Download
+<A NAME="wxMSW-2.8.7.zip-Download"
+HREF="http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.8.7.zip">
+<TT>wxMSW-2.8.7.zip</TT></A> from the wxWidgets web site.
+</LI>
+<LI>
+Extract the zip file to <TT>C:\ExternalPackages</TT>. Extracting creates a
+<TT>wxMSW-2.8.7</TT> directory directly under <TT>C:\ExternalPackages</TT>.
+</LI>
+<LI>
+Change the name of the top-level wxWidgets directory to
+<TT>wxMSW-2.8.7-VC8</TT> so other versions of wxWidgets can be built with
+other compilers in parallel with this directory.
+</LI>
+<LI>
+If you would like wxWidgets help files in compiled HTML format (*.chm),
+download <TT>wxWidgets-2.8.7-CHM.zip</TT> from the wxWidgets web site, and
+extract the zip file to <TT>C:\ExternalPackages\wxMSW-2.8.7-VC8</TT>. This
+installs the compiled HTML help files for wxWidgets and tex2rtf.
+</LI>
+<LI>
+If you would like wxWidgets help files in HTML format, download
+<TT>wxWidgets-2.8.7-HTML.zip</TT> from the wxWidgets web site, and extract the
+zip file to <TT>C:\ExternalPackages\wxMSW-2.8.7-VC8</TT>. This installs the
+HTML help files for wxWidgets and tex2rtf.
+</LI>
+<LI>
+Make the following changes to
+<TT>C:\ExternalPackages\wxMSW-2.8.7-VC8\include\wx\msw\setup.h</TT>:
+
+<P>
+<DIV ALIGN="CENTER">
+<TABLE CELLPADDING=3 BORDER="1">
+<TR><TD ALIGN="CENTER">Macro</TD>
+<TD ALIGN="CENTER">From</TD>
+<TD ALIGN="CENTER">To</TD>
+</TR>
+<TR><TD ALIGN="LEFT"><TT>WXWIN_COMPATIBILITY_2_6</TT></TD>
+<TD ALIGN="CENTER">1</TD>
+<TD ALIGN="CENTER">0</TD>
+</TR>
+
+<TR><TD ALIGN="LEFT"><TT>wxUSE_STD_IOSTREAM</TT></TD>
+<TD ALIGN="CENTER">0</TD>
+<TD ALIGN="CENTER">1</TD>
+</TR>
+<TR><TD ALIGN="LEFT"><TT>wxUSE_IOSTREAMH</TT></TD>
+<TD ALIGN="CENTER">1</TD>
+<TD ALIGN="CENTER">0</TD>
+</TR>
+<TR><TD ALIGN="LEFT"><TT>wxUSE_GLCANVAS</TT></TD>
+<TD ALIGN="CENTER">0</TD>
+
+<TD ALIGN="CENTER">1</TD>
+</TR>
+</TABLE>
+</DIV>
+</P>
+<BR>
+Jazz++ doesn't use OpenGL code at this point, but I use this wxWidgets build
+for other projects. I want to eventually change <TT>wxUSE_STL</TT> from
+<TT>0</TT> to <TT>1</TT>, but there was a bug reported with respect to this
+build on the wxWidgets developers list.
+</LI>
+<LI>
+Edit <TT>C:\ExternalPackages\wxMSW-2.8.7-VC8\include\wx\msw\wx.rc</TT> and
+comment out the following line.
+
+<PRE>
+#include "wx/msw/wince/wince.rc"
+</PRE>
+</LI>
+<LI>
+Use <TT>Start | All Programs | Microsoft Visual Studio .NET 2005 |
+Visual Studio .NET Tools | Visual Studio .NET 2005 Command Prompt</TT> to
+start a console session.
+</LI>
+<LI>
+Ensure that the command-line compiler and tools (including nmake)
+are installed and ready to run.
+</LI>
+<LI>
+Change directory to <TT>C:\ExternalPackages\wxMSW-2.8.7-VC8\build\msw</TT>.
+</LI>
+<LI>
+Build the debug static version of the wxWidgets libraries by typing:
+
+<PRE>
+nmake BUILD=debug SHARED=0 USE_OPENGL=1 -f makefile.vc
+</PRE>
+
+</LI>
+<LI>
+Build the release static version of the wxWidgets libraries by typing:
+
+<PRE>
+nmake BUILD=release SHARED=0 USE_OPENGL=1 -f makefile.vc
+</PRE>
+
+</LI>
+<LI>To conserve disk space, remove the build directories (<TT>vc_msw</TT> and
+<TT>vc_mswd</TT>) under <TT>c:\ExternalPackages\wxMSW-2.8.7-VC8\build\msw</TT>.
+</LI>
+<LI>
+Change directory to
+<TT>C:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src</TT>.
+</LI>
+<LI>
+Build the release static version of tex2rtf by typing:
+
+<PRE>
+nmake BUILD=release SHARED=0 -f makefile.vc
+</PRE>
+</LI>
+<LI>
+Create a directory for the tex2rtf binaries under the wxWidgets
+distribution (<TT>c:\ExternalPackages\wxMSW-2.8.7-VC8\bin</TT>).
+</LI>
+<LI>
+Move the tex2rtf binaries from
+<TT>c:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src\vc_msw</TT> to
+<TT>c:\ExternalPackages\wxMSW-2.8.7-VC8\bin</TT>.
+</LI>
+<LI>
+To conserve disk space, remove the build directory (vc_msw) under
+<TT>c:\ExternalPackages\wxMSW-2.8.7-VC8\utils\tex2rtf\src</TT>.
+</LI>
+</OL>
+
+<h3>Building wxWidgets for Linux</h3>
+<OL>
+<LI>Create a directory under your home directory. I typically use
+<TT>OutsideSource</TT> and change directory to that location.
+
+<PRE>
+cd
+mkdir OutsideSource
+cd OutsideSource
+</PRE>
+</LI>
+
+<LI> Checkout the 2.8 branch of wxWidgets using the following command.
+You must have a Subversion client loaded on your machine.
+
+<PRE>
+svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH wxWidgets-2.8
+</PRE>
+</LI>
+
+<LI> Create a directory called <TT>WxBuild</TT> in parallel with the
+<TT>wxWidgets-2.8</TT> directory and change directory to that location.
+
+<PRE>
+mkdir WxBuild
+cd WxBuild
+</PRE>
+</LI>
+
+<LI> Run the wxWidgets supplied <TT>configure</TT> command with the following
+configure options.
+
+<PRE>
+../wxWidgets-2.8/configure \
+ --prefix=/usr/local/wx287 \
+ --disable-no_exceptions \
+ --disable-no_rtti \
+ --disable-shared \
+ --disable-compat26 \
+ --disable-unicode \
+ --with-regex=builtin \
+ --enable-std_iostreams \
+ --enable-std_string \
+ --enable-stl \
+ --with-gtk
+</PRE>
+
+The <TT>prefix</TT> option was used so that the resulting wxWidgets build
+would be installed in a non-standard location to prevent conflicts with OS
+installed versions.
+</LI>
+
+<LI> Run <TT>make</TT> using the following command. This will write a file
+called <TT>BuildLog</TT> that may be useful if you run into trouble.
+
+<PRE>
+make 2>&1 | tee BuildLog
+</PRE>
+
+</LI>
+<LI>If all goes well with the build, try to install wxWidgets as root.
+
+<PRE>
+su
+make install
+</PRE>
+</LI>
+
+<LI>
+Make sure your <TT>PATH</TT> and <TT>LIBRARY_PATH</TT> environment
+variables are set to find the non-stock wxWidgets binaries and libraries just
+created before building Jazz++. Adding the following lines in <TT>.bashrc</TT>
+or <TT>.bash_profile</TT> will do the trick.
+
+<PRE>
+export PATH=/usr/local/wx287/bin:$PATH
+export LIBRARY_PATH=/usr/local/wx287/lib:$LIBRARY_PATH
+</PRE>
+
+After adding the above lines to your <TT>.bashrc</TT> or <TT>.bash_profile</TT>
+file, it is necessary to reload your bash environment to make these changes
+available. Use one of the following commands to accomplish this;
+<BR>
+<BR>
+(if you added the above lines to <TT>.bashrc</TT>)
+
+<PRE>
+source .bashrc
+</PRE>
+
+(if you added the above lines to <TT>.bash_profile</TT>)
+
+<PRE>
+source .bashrc
+</PRE>
+
+</LI>
+</OL>
+
+<h3>Building wxWidgets for Mac OS X 10.5.2</h3>
+<OL>
+<LI>Create a directory under your home directory. I typically use
+<TT>OutsideSource</TT> and change directory to that location.
+
+<PRE>
+cd
+mkdir OutsideSource
+cd OutsideSource
+</PRE>
+</LI>
+
+<LI>
+Download
+<A NAME="wxMac-2.8.7.tar.gz"
+HREF="http://prdownloads.sourceforge.net/wxwindows/wxMac-2.8.7.tar.gz">
+<TT>wxMac-2.8.7.tar.gz</TT></A> from the wxWidgets web site and extract this
+file under your <TT>OutsideSource</TT> directory.
+</LI>
+
+<LI> Create a directory called <TT>WxBuild</TT> in parallel with the
+<TT>wxMac-2.8.7</TT> directory and change directory to that location.
+
+<PRE>
+mkdir WxBuild
+cd WxBuild
+</PRE>
+</LI>
+
+<LI> Run the wxWidgets supplied <TT>configure</TT> command with the following
+configure options.
+
+<PRE>
+../wxWidgets-2.8/configure \
+ --prefix=$HOME/wx287 \
+ --disable-no_exceptions \
+ --disable-no_rtti \
+ --disable-shared \
+ --disable-compat26 \
+ --disable-unicode \
+ --with-regex=builtin \
+ --enable-std_iostreams \
+ --enable-std_string \
+ --enable-stl \
+ --with-mac
+</PRE>
+
+The <TT>prefix</TT> option was used so that the resulting wxWidgets build
+would be installed in a non-standard under the user's home directory to prevent
+conflicts with OS installed versions.
+</LI>
+
+<LI> Run <TT>make</TT> using the following command. This will write a file
+called <TT>BuildLog</TT> that may be useful if you run into trouble.
+
+<PRE>
+make 2>&1 | tee BuildLog
+</PRE>
+
+</LI>
+<LI>If all goes well with the build, try to install wxWidgets.
+
+<PRE>
+make install
+</PRE>
+</LI>
+
+<LI>
+Make sure your <TT>PATH</TT> and <TT>LIBRARY_PATH</TT> environment
+variables are set to find the non-stock wxWidgets binaries and libraries just
+created before building Jazz++. Adding the following lines in <TT>.bashrc</TT>
+or <TT>.bash_profile</TT> will do the trick.
+
+<PRE>
+export PATH=/usr/local/wx287/bin:$PATH
+export LIBRARY_PATH=/usr/local/wx287/lib:$LIBRARY_PATH
+</PRE>
+
+After adding the above lines to your <TT>.bashrc</TT> or <TT>.bash_profile</TT>
+file, it is necessary to reload your bash environment to make these changes
+available. Use one of the following commands to accomplish this;
+<BR>
+<BR>
+(if you added the above lines to <TT>.bashrc</TT>)
+
+<PRE>
+source .bashrc
+</PRE>
+
+(if you added the above lines to <TT>.bash_profile</TT>)
+
+<PRE>
+source .bashrc
+</PRE>
+
+</LI>
+</OL>
+
+<?php
+require_once('../include/footer.php');
+?>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
Added: web/htdocs/credits/index.php
===================================================================
--- web/htdocs/credits/index.php (rev 0)
+++ web/htdocs/credits/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<title>Jazz++ Credits</title>
+</head>
+<body>
+<h1 class="title">Jazz++ MIDI Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>Jazz++ Credits</h2>
+<p>If we leave anybody out, sorry! Send an email to <a href="mailto:jaz...@li...">jazzplusplus-devel</a>
+and we'll take care of it ASAP.</p>
+<h3>Core Developers</h3>
+<dl>
+ <dt>Pete Stieber</dt>
+ <dd>Lead developer and subversion gatekeeper.</dd>
+ <dt>Patrick Earl</dt>
+ <dd>Developer and subversion gatekeeper. <a href="http://www.patearl.net/">Visit his website!</a>.</dd>
+ <dt>Joakim Verona</dt>
+ <dd>Developer. Wrote most of the original wxWidgets 2.4 port of Jazz++.</dd>
+ <dt>Kevin Cosgrove</dt>
+ <dd>Developer. Also maintains RPM packages.</dd>
+ <dt>Dave Fancella</dt>
+ <dd>Developer. Also wrote the first version of the Jazz++ website hosted on sourceforge.
+ <a href="http://www.davefancella.com/">Visit his website!</a></dd>
+</dl>
+<h3>Contributors</h3>
+<dl>
+ <dt>Mark Constable</dt>
+ <dd>Documentor.</dd>
+ <dt>Matt Kelly</dt>
+ <dd>Developer</dd>
+</dl>
+<hr>
+<p>
+Jazz++ is based on code originally written by Per Sigmund and Andreas Voss
+and produced commercially under the name of Jazz++. Special thanks to these
+guys for writing the application and then opening the source and releasing it
+under the GPL.
+</p>
+<?php
+require_once('../include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
Added: web/htdocs/documentation/index.php
===================================================================
--- web/htdocs/documentation/index.php (rev 0)
+++ web/htdocs/documentation/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="../include/jazz.css" type="text/css" />
+<title>Jazz++ Documentation</title>
+</head>
+<body>
+<h1 class="title">Jazz++ MIDI Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>Jazz++ MIDI Sequencer Documentation</h2>
+<p>
+This portion of the web site is under construction.
+</p>
+<?php
+require_once('../include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
Added: web/htdocs/download/index.php
===================================================================
--- web/htdocs/download/index.php (rev 0)
+++ web/htdocs/download/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<HEAD>
+<LINK rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<TITLE>Jazz++ Downloads</TITLE>
+</HEAD>
+<BODY>
+<H1 class="title">Jazz++ MIDI Sequencer</H1>
+<TABLE class="main">
+<TR>
+<TD class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</TD>
+<TD class="mainCopy">
+<H2>Downloading Jazz++</H2>
+<P>
+Currenly, only a source tarball is available. You would probably have more
+success attempting to build the source in Subversion. We simply aren't ready
+to produce binary distributions. If you still want to give the source tarball
+a try, you need to create a non-stock build of wxWidgets 2.8.7 to build Jazz++.
+View the <a href="/buildingwx/">Building wxWidgets</a> page for details.
+</P>
+<P>
+<A href="http://sourceforge.net/project/showfiles.php?group_id=104252">Download
+the Jazz++ source tarball from sourceforge.</A>
+</P>
+<?php
+require_once('../include/footer.php');
+?>
+</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
Added: web/htdocs/graphics/background.png
===================================================================
(Binary files differ)
Property changes on: web/htdocs/graphics/background.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: web/htdocs/graphics/background2.png
===================================================================
(Binary files differ)
Property changes on: web/htdocs/graphics/background2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: web/htdocs/graphics/background3.png
===================================================================
(Binary files differ)
Property changes on: web/htdocs/graphics/background3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: web/htdocs/graphics/jazz.jpg
===================================================================
(Binary files differ)
Property changes on: web/htdocs/graphics/jazz.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: web/htdocs/include/footer.php
===================================================================
--- web/htdocs/include/footer.php (rev 0)
+++ web/htdocs/include/footer.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,5 @@
+<hr>
+<div class="floatRightImage">
+<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=104252&type=4" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a>
+</div>
+<p>This project is hosted by SourceForge. Special thanks for SourceForge and the OSDN.</p>
Added: web/htdocs/include/header.php
===================================================================
--- web/htdocs/include/header.php (rev 0)
+++ web/htdocs/include/header.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1 @@
+
Added: web/htdocs/include/jazz.css
===================================================================
--- web/htdocs/include/jazz.css (rev 0)
+++ web/htdocs/include/jazz.css 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,147 @@
+body {
+ background: url('/graphics/background3.png');
+ margin-left: 5%;
+ margin-right: 5%;
+ font-size: smaller;
+ font-family: Arial, Helvetica;
+}
+
+a:link {
+ color: blue;
+}
+
+a:visited {
+ color: green;
+}
+
+a:hover {
+ color: red;
+}
+
+a:active {
+ color: green;
+}
+
+table.main {
+ width: 100%;
+}
+
+table.main td {
+ vertical-align: top;
+ border: 1px inset;
+ background: #d0d0da;
+ /*filter: alpha(opacity=10);*/
+ /*-moz-opacity: 0.8;*/
+}
+
+/* table.main td * {filter:alpha(opacity=100); -moz-opacity:1.0; position: relative;} */
+
+td.leftNav {
+ width: 15%;
+ border-right: 1px dotted black;
+}
+
+td.leftNav p {
+ margin-left: 5%;
+ margin-right: 3%;
+ font-variant: small-caps;
+}
+
+.title {
+ color: #dede00;
+}
+
+.mainCopy p {
+ margin-left: 8%;
+ margin-right: 8%;
+}
+
+.mainCopy h1 {
+ margin-left: 2.5%;
+ font-size: 120%;
+/* color: blue; */
+}
+
+.mainCopy h2 {
+ margin-left: 4%;
+ font-size: 110%;
+/* color: blue; */
+}
+
+.mainCopy h3 {
+ margin-left: 6%;
+ font-size: 100%;
+/* color: blue; */
+}
+
+.mainCopy h4 {
+ margin-left: 7.5%;
+ font-size: 90%;
+/* color: blue; */
+}
+
+.mainCopy h5 {
+ margin-left: 9%;
+ font-size: 90%;
+ color: #000066;
+}
+.mainCopy h6 {
+ margin-left: 7.5%;
+ font-size: 90%;
+/* color: blue; */
+}
+
+.mainCopy ul {
+ margin-left: 15%;
+ margin-right: 15%;
+ border: dotted 1px black;
+ background: #eeeeef;
+}
+
+.mainCopy code {
+ margin-left: 15%;
+ color: #000055
+}
+
+.mainCopy dl {
+ border: 1px dotted;
+ background: #eeeeef;
+ margin-left: 15%;
+ margin-right: 15%;
+ padding: 4px;
+}
+
+.mainCopy dt {
+ font-weight: bold;
+}
+
+.news {
+ margin-left: 5%;
+ margin-right: 5%;
+ border-top: 1px solid;
+}
+
+.newsItem {
+ padding: 4px;
+ margin-left: 3%;
+ margin-right: 3%;
+/* border-top: 1px solid; */
+ border-bottom: 1px solid;
+}
+
+table.screenShots {
+ margin-left: 20%;
+ margin-right: 20%;
+ text-align: center;
+ border: inset 1px;
+}
+
+table.screenShots td {
+ border: none;
+}
+
+.floatRightImage {
+ float: right;
+ clear: right;
+}
+
Added: web/htdocs/include/leftnav.php
===================================================================
--- web/htdocs/include/leftnav.php (rev 0)
+++ web/htdocs/include/leftnav.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,12 @@
+<p><a href="/">About</a></p>
+<p><a href="/news/">News</a></p>
+<!-- <p><a href="/screenshots/">Screenshots</a></p> -->
+<p><a href="/download/">Download</a></p>
+<p><a href="/mailinglist/">Mailing Lists</a></p>
+<p><a href="/documentation/">Documentation</a></p>
+<p><a href="http://sourceforge.net/projects/jazzplusplus">Sourceforge Project</a></p>
+<p><a href="/buildingwx/">Building wxWidgets</a></p>
+<p><a href="/subversion/">Subversion</a></p>
+<p><a href="/buildingjazz/">Building Jazz++</a></p>
+<p><a href="/credits/">Credits</a></p>
+<p><img src="/graphics/jazz.jpg" alt="Jazz++ Midi Sequencer" /></p>
Added: web/htdocs/index.php
===================================================================
--- web/htdocs/index.php (rev 0)
+++ web/htdocs/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<title>Jazz++ Midi Sequencer</title>
+</head>
+<body>
+<h1 class="title">Jazz++ Midi Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>About the Jazz++ Midi Sequencer</h2>
+<p>
+A number of years ago, two adventurous souls embarked on a mission to write a
+cross-platform MIDI sequencer with the intent of selling it commercially. For
+one reason or other, they decided to turn it into an open source application
+around the turn of the century, and now we have Jazz++ as an open source
+application licensed under the GNU GPL.
+</p>
+<p>
+The Jazz++ Midi Sequencer is an excellent application for recording and mixing
+MIDI sequences, and for many years was the only stable application like it that
+ran under both Windows and Linux. Unfortunately, it has not been
+well-maintained and is starting to look a little long in the tooth. It was
+also written with the venerable wxWindows version 1.68, which is not only
+obsolete, but isn't even called wxWindows anymore.
+</p>
+<p>
+In order to return Jazz++ to relevance, and in the process turn it into the
+only stable MIDI sequencer that runs under both Windows and Linux, we have gone
+ahead and forked the source code that was available at http://www.jazzware.com/
+(the old Jazzware site) and are in the process of porting it to wxWidgets
+2.8.7. In the process, we'll also be fixing numerous other problems that exist
+in the code and hopefully find a way to get it to run for Mac OS X as well.
+</p>
+<p>
+This is a big job! We need all the help we can get. If you want to test the
+application, check it out from the Subversion repository, build it, and give it
+a run. If you want to develop, check out the mailing lists and get in touch.
+We need <em>you!</em>
+</p>
+<?php
+require_once('include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
Added: web/htdocs/mailinglist/index.php
===================================================================
--- web/htdocs/mailinglist/index.php (rev 0)
+++ web/htdocs/mailinglist/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<title>Jazz++ Mailing Lists</title>
+</head>
+<body>
+<h1 class="title">Jazz++ MIDI Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>Jazz++ Mailing Lists</h2>
+<p>
+All of our mailings lists are hosted by SourceForge. To post an email to a
+particular list, you must subscribe to the list. This requirement reduces the
+amount of spam on the lists.
+</p>
+<h3>Jazz++ Users</h3>
+<p>
+This is where you should direct general usage questions and the like. There
+will be other users who might be able to help you with your problem, and it is
+rumored that several of the developers roam this list from time to time.
+</p>
+<p>
+To subscribe, visit
+<a href="https://lists.sourceforge.net/lists/listinfo/jazzplusplus-user">https://lists.sourceforge.net/lists/listinfo/jazzplusplus-user</a>.
+</p>
+<p>
+You can also <a href="http://sourceforge.net/mailarchive/forum.php?forum_name=jazzplusplus-user">view the mailing list archives</a>.
+</p>
+<h3>Jazz++ Development</h3>
+<p>
+This is where all of the development discussion is going on.
+</p>
+<p>
+To subscribe visit
+<a href="https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel">https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel</a>.
+</p>
+<p>
+You can also <a href="https://sourceforge.net/mailarchive/forum.php?forum_name=jazzplusplus-devel">view the mailing list archives</a>.
+</p>
+<h3>Jazz++ Commit Messages</h3>
+<p>
+You can also follow development by subscribing to the Subversion commit message
+mailing list. Every time a developer commits new or modified code, a message
+describing the change is sent to this list.
+</p>
+<p>
+To subscribe visit
+<a href="https://lists.sourceforge.net/lists/listinfo/jazzplusplus-updates">https://lists.sourceforge.net/lists/listinfo/jazzplusplus-updates</a>.
+</p>
+<p>
+You can also <a href="https://sourceforge.net/mailarchive/forum.php?forum_name=jazzplusplus-updates">view the mailing list archives</a>.
+</p>
+<?php
+require_once('../include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
Added: web/htdocs/news/index.php
===================================================================
--- web/htdocs/news/index.php (rev 0)
+++ web/htdocs/news/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<title>Jazz++ News</title>
+</head>
+<body>
+<h1 class="title">Jazz++ MIDI Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>Jazz++ News</h2>
+<div class="news">
+<?php
+
+// Start output buffering. We want to capture sourceforge's news export and modify it.
+ob_start();
+
+require_once('http://sourceforge.net/export/projnews.php?group_id=104252&limit=20&flat=1&show_summaries=1');
+
+// Grab the news
+$news = ob_get_contents();
+
+// discard the buffer and stop buffering output
+ob_end_clean();
+
+// Now we process the news
+
+// First add the div and class for the individual newsItems
+$newsProc = str_replace('</div>','</div><div class="newsItem">',$news);
+$newsProc = str_replace('<div align="center">','</div><div align="center">',$newsProc);
+
+// Sorry about the long line
+$newsProc = str_replace('[','',$newsProc);
+$newsProc = str_replace(']','',$newsProc);
+$newsProc = str_replace('<div align="center">','<div align="center"><p>',$newsProc);
+$newsProc = str_replace('Comment</a></div>','Comment</a></p></div>',$newsProc);
+$newsProc = str_replace('</div><div align="center"><p>','<p align="center">',$newsProc);
+
+// Now remove the <hr>s
+$newsProc = str_replace('<HR width="100%" size="1" noshade>','',$newsProc);
+
+// Clean up some trash
+$newsProc .= '</div>';
+$newsProc = str_replace('<div class="newsItem"></div>','',$newsProc);
+
+echo '<div class="newsItem">';
+echo $newsProc;
+
+?>
+<?php
+require_once('../include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
Added: web/htdocs/subversion/index.php
===================================================================
--- web/htdocs/subversion/index.php (rev 0)
+++ web/htdocs/subversion/index.php 2008-05-10 16:09:29 UTC (rev 497)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<link rel="stylesheet" href="/include/jazz.css" type="text/css" />
+<title>Jazz++ Subversion Repository</title>
+</head>
+<body>
+<h1 class="title">Jazz++ MIDI Sequencer</h1>
+<table class="main">
+<tr>
+<td class="leftNav">
+<?php
+require_once('../include/leftnav.php');
+?>
+</td>
+<td class="mainCopy">
+<h2>Getting Jazz++ from Subversion</h2>
+<p>
+Our Subversion repository is hosted by SourceForge. Subversion, in case you
+don't already know, is a way to allow multiple developers scattered all over
+the world to collaborate with one another on the same software and store the
+source code in a central location, accessible to all.
+</p>
+<p>
+Linux distributions and Mac OS X supply command-line clients for Subversion.
+<a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> is an easy to use
+Subversion client for windows that is integrated into the windows explorer.
+</p>
+<p>
+The code in the Subversion repository can be unstable at times. Building the
+code will take some effort on your parr, but we have provided instructions for
+building the code, so this should be possible for "non-developers".
+</p>
+<p>
+Since Jazz++ is currently in a development state, code from the Subversion
+repository is the best place to get the latest fixes and features as they are
+added. Until we reach the point when we are creating binaries to download, we
+hope you will give builing Jazz++ form Subversion a try.
+</p>
+<h3>Retrieving the source using Subversion</h3>
+<p>
+To obtain the current development code, type the following in a terminal:
+</p>
+<code>
+svn co https://jazzplusplus.svn.sourceforge.net/svnroot/jazzplusplus/trunk/jazz jazz
+</code>
+<p>
+To obtain the entire Subversion repository, including branches with old builds
+use:
+</p>
+<code>
+svn co https://jazzplusplus.svn.sourceforge.net/svnroot/jazzplusplus jazzplusplus
+</code>
+<?php
+require_once('../include/footer.php');
+?>
+</td>
+</tr>
+</table>
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-09 21:24:37
|
Revision: 496
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=496&view=rev
Author: pstieber
Date: 2008-05-09 14:24:35 -0700 (Fri, 09 May 2008)
Log Message:
-----------
If ALSA is possible, check for it as a configure option. This will fix the Linux build, but might break the Mac build.
Modified Paths:
--------------
trunk/jazz/configure.ac
Modified: trunk/jazz/configure.ac
===================================================================
--- trunk/jazz/configure.ac 2008-05-09 19:03:45 UTC (rev 495)
+++ trunk/jazz/configure.ac 2008-05-09 21:24:35 UTC (rev 496)
@@ -89,22 +89,25 @@
AC_MSG_ERROR(unknown system type ${host}.)
esac
-dnl ---------------------------------------
-dnl check if we are to enable alsa support
-dnl ---------------------------------------
-dnl AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
-dnl
-dnl if test x$enable_alsa = xyes ; then
-dnl AC_MSG_RESULT(alsa is enabled)
-dnl AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
-dnl
-dnl dnl This test comes with the alsa distribution!
-dnl AM_PATH_ALSA(0.9.0)
-dnl
-dnl fi
-
AM_CONDITIONAL(USE_ALSA, test "$have_alsa" = yes)
+if [[ $have_alsa = "yes" ]] ; then
+
+ dnl ---------------------------------------
+ dnl check if we are to enable alsa support
+ dnl ---------------------------------------
+ AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
+
+ if test x$enable_alsa = xyes ; then
+ AC_MSG_RESULT(alsa is enabled)
+ AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
+
+ dnl This test comes with the alsa distribution!
+ AM_PATH_ALSA(0.9.0)
+
+ fi
+fi
+
dnl --------------------------------------------
dnl check if we are to enable sequencer2 support
dnl --------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-09 19:03:47
|
Revision: 495
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=495&view=rev
Author: pstieber
Date: 2008-05-09 12:03:45 -0700 (Fri, 09 May 2008)
Log Message:
-----------
Used a larger font.
Modified Paths:
--------------
trunk/jazz/src/Harmony.cpp
Modified: trunk/jazz/src/Harmony.cpp
===================================================================
--- trunk/jazz/src/Harmony.cpp 2008-05-09 19:03:00 UTC (rev 494)
+++ trunk/jazz/src/Harmony.cpp 2008-05-09 19:03:45 UTC (rev 495)
@@ -841,7 +841,7 @@
wxClientDC Dc(this);
- Dc.SetFont(*wxSMALL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
int TextWidth, TextHeight;
Dc.GetTextExtent("xD#j75+9-x", &TextWidth, &TextHeight);
@@ -1091,7 +1091,7 @@
{
Dc.Clear();
- Dc.SetFont(*wxSMALL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
Dc.DrawText("Seq", 5, 5);
@@ -1286,7 +1286,7 @@
DoPrepareDC(Dc);
- Dc.SetFont(*wxSMALL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
HBContext Context;
int x, y;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-09 19:03:04
|
Revision: 494
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=494&view=rev
Author: pstieber
Date: 2008-05-09 12:03:00 -0700 (Fri, 09 May 2008)
Log Message:
-----------
Fixed a reported bug in the cord naming code. Had to take the reporter's
word for it since I'm weak w.r.t. chord naming.
Modified Paths:
--------------
trunk/jazz/src/HarmonyP.cpp
Modified: trunk/jazz/src/HarmonyP.cpp
===================================================================
--- trunk/jazz/src/HarmonyP.cpp 2008-05-09 01:46:44 UTC (rev 493)
+++ trunk/jazz/src/HarmonyP.cpp 2008-05-09 19:03:00 UTC (rev 494)
@@ -99,7 +99,7 @@
}
else if (c.Contains(10))
{
- ChordName.append("j");
+ ChordName.append("7");
seven = true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-06 14:11:33
|
Revision: 492
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=492&view=rev
Author: pstieber
Date: 2008-05-06 07:11:22 -0700 (Tue, 06 May 2008)
Log Message:
-----------
Changed to attempt to deal with ALSA on all platforms.
Modified Paths:
--------------
trunk/jazz/configure.ac
Modified: trunk/jazz/configure.ac
===================================================================
--- trunk/jazz/configure.ac 2008-05-06 04:31:13 UTC (rev 491)
+++ trunk/jazz/configure.ac 2008-05-06 14:11:22 UTC (rev 492)
@@ -72,52 +72,39 @@
fi
AC_MSG_RESULT($result)
-dnl optional stuff, like alsa oss...
-
dnl To support a new system, you need to add its canonical name (as determined
dnl by config.sub or specified by the configure command line) to this "case"
dnl and also define the shared library flags below - search for
dnl SHARED_LIB_SETUP to find the exact place.
case "${host}" in
*-darwin* )
- mac_build=yes
;;
*-*-linux* )
- mac_build=no
+ AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+ if [[ $have_alsa = "yes" ]] ; then
+ LIBS="$LIBS -lasound"
+ fi
;;
*)
AC_MSG_ERROR(unknown system type ${host}.)
esac
-if test x$mac_build = xno ; then
+dnl ---------------------------------------
+dnl check if we are to enable alsa support
+dnl ---------------------------------------
+dnl AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
+dnl
+dnl if test x$enable_alsa = xyes ; then
+dnl AC_MSG_RESULT(alsa is enabled)
+dnl AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
+dnl
+dnl dnl This test comes with the alsa distribution!
+dnl AM_PATH_ALSA(0.9.0)
+dnl
+dnl fi
- dnl ---------------------------------------
- dnl check if we are to enable alsa support
- dnl ---------------------------------------
- AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
+AM_CONDITIONAL(USE_ALSA, test "$have_alsa" = yes)
- if test x$enable_alsa = xyes ; then
- AC_MSG_RESULT(alsa is enabled)
- AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
-
- dnl for alsa to work it must be installed(logical no?)
- dnl this test is just preliminary
-dnl if test -f /proc/asound/version; then
-dnl AC_MSG_RESULT(alsa seems to be running...very good!)
-dnl LIBS="$LIBS -lasound"
-dnl else
-dnl AC_MSG_ERROR(no alsa i can use! check if its at least 090 and running)
-dnl fi
-
- dnl This test comes with the alsa distribution!
- AM_PATH_ALSA(0.9.0)
-
- LIBS="$LIBS $ALSA_LIBS"
- fi
-fi
-
-AM_CONDITIONAL(USE_ALSA, test "$enable_alsa" = yes)
-
dnl --------------------------------------------
dnl check if we are to enable sequencer2 support
dnl --------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-06 04:31:15
|
Revision: 491
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=491&view=rev
Author: pstieber
Date: 2008-05-05 21:31:13 -0700 (Mon, 05 May 2008)
Log Message:
-----------
Started taking the Mac OS X build into consideration.
Modified Paths:
--------------
trunk/jazz/configure.ac
Modified: trunk/jazz/configure.ac
===================================================================
--- trunk/jazz/configure.ac 2008-05-05 06:20:13 UTC (rev 490)
+++ trunk/jazz/configure.ac 2008-05-06 04:31:13 UTC (rev 491)
@@ -74,17 +74,34 @@
dnl optional stuff, like alsa oss...
-dnl ---------------------------------------
-dnl check if we are to enable alsa support
-dnl ---------------------------------------
-AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
+dnl To support a new system, you need to add its canonical name (as determined
+dnl by config.sub or specified by the configure command line) to this "case"
+dnl and also define the shared library flags below - search for
+dnl SHARED_LIB_SETUP to find the exact place.
+case "${host}" in
+ *-darwin* )
+ mac_build=yes
+ ;;
+ *-*-linux* )
+ mac_build=no
+ ;;
+ *)
+ AC_MSG_ERROR(unknown system type ${host}.)
+esac
-if test x$enable_alsa = xyes ; then
- AC_MSG_RESULT(alsa is enabled)
- AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
+if test x$mac_build = xno ; then
- dnl for alsa to work it must be installed(logical no?)
- dnl this test is just preliminary
+ dnl ---------------------------------------
+ dnl check if we are to enable alsa support
+ dnl ---------------------------------------
+ AC_ARG_ENABLE(alsa, --enable-alsa Support ALSA)
+
+ if test x$enable_alsa = xyes ; then
+ AC_MSG_RESULT(alsa is enabled)
+ AC_DEFINE(DEV_ALSA,1,[use alsa drivers])
+
+ dnl for alsa to work it must be installed(logical no?)
+ dnl this test is just preliminary
dnl if test -f /proc/asound/version; then
dnl AC_MSG_RESULT(alsa seems to be running...very good!)
dnl LIBS="$LIBS -lasound"
@@ -92,10 +109,11 @@
dnl AC_MSG_ERROR(no alsa i can use! check if its at least 090 and running)
dnl fi
- dnl This test comes with the alsa distribution!
-dnl AM_PATH_ALSA(0.9.0)
+ dnl This test comes with the alsa distribution!
+ AM_PATH_ALSA(0.9.0)
- LIBS="$LIBS $ALSA_LIBS"
+ LIBS="$LIBS $ALSA_LIBS"
+ fi
fi
AM_CONDITIONAL(USE_ALSA, test "$enable_alsa" = yes)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-05 05:57:30
|
Revision: 489
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=489&view=rev
Author: pstieber
Date: 2008-05-04 22:57:24 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Created the MIDI Accessible (Midible) branch for Leland.
Added Paths:
-----------
branches/Midible/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-05 03:56:33
|
Revision: 488
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=488&view=rev
Author: pstieber
Date: 2008-05-04 20:56:15 -0700 (Sun, 04 May 2008)
Log Message:
-----------
1. Temporarily commented out the AM_PATH_ALSA line so I can work on the Mac
build. This may break the Linux build.
2. Added an AM_CONDITIONAL statement that may set USE_ALSA.
Modified Paths:
--------------
trunk/jazz/configure.ac
Modified: trunk/jazz/configure.ac
===================================================================
--- trunk/jazz/configure.ac 2008-05-05 03:53:22 UTC (rev 487)
+++ trunk/jazz/configure.ac 2008-05-05 03:56:15 UTC (rev 488)
@@ -93,12 +93,13 @@
dnl fi
dnl This test comes with the alsa distribution!
-
- AM_PATH_ALSA(0.9.0)
+dnl AM_PATH_ALSA(0.9.0)
LIBS="$LIBS $ALSA_LIBS"
fi
+AM_CONDITIONAL(USE_ALSA, test "$enable_alsa" = yes)
+
dnl --------------------------------------------
dnl check if we are to enable sequencer2 support
dnl --------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-05 03:53:24
|
Revision: 487
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=487&view=rev
Author: pstieber
Date: 2008-05-04 20:53:22 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Added a USE_ALSA check to control what modules are compiled. ALSA is not used on the Mac.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2008-05-05 03:52:12 UTC (rev 486)
+++ trunk/jazz/src/Makefile.am 2008-05-05 03:53:22 UTC (rev 487)
@@ -2,6 +2,7 @@
bin_PROGRAMS = jazz
+if USE_ALSA
jazz_SOURCES = \
AboutDialog.cpp \
AlsaDriver.cpp \
@@ -80,6 +81,82 @@
Track.cpp \
TrackFrame.cpp \
TrackWindow.cpp
+else
+jazz_SOURCES = \
+AboutDialog.cpp \
+AsciiMidiFile.cpp \
+Audio.cpp \
+ClockDialog.cpp \
+Command.cpp \
+Configuration.cpp \
+ControlEdit.cpp \
+DeprecatedStringUtils.cpp \
+DeprecatedWx/prop.cpp \
+DeprecatedWx/propform.cpp \
+DeprecatedWx/proplist.cpp \
+Dialogs/KeyOnDialog.cpp \
+Dialogs/MetronomeSettingsDialog.cpp \
+Dialogs/SynthesizerSettingsDialog.cpp \
+Dialogs/TrackDialog.cpp \
+Dialogs.cpp \
+DynamicArray.cpp \
+ErrorMessage.cpp \
+Events.cpp \
+EventWindow.cpp \
+FileSelector.cpp \
+Filter.cpp \
+FindFile.cpp \
+FrequencyTable.cpp \
+GetOptionIndex.cpp \
+Globals.cpp \
+GuitarFrame.cpp \
+GuitarSettings.cpp \
+GuitarSettingsDialog.cpp \
+GuitarWindow.cpp \
+HarmonyBrowserAnalyzer.cpp \
+Harmony.cpp \
+HarmonyP.cpp \
+Help.cpp \
+JazzPlusPlusApplication.cpp \
+KeyDialog.cpp \
+KeyStringConverters.cpp \
+Knob.cpp \
+Mapper.cpp \
+MeasureChoice.cpp \
+MidiDeviceDialog.cpp \
+Metronome.cpp \
+MouseAction.cpp \
+NamedChoice.cpp \
+NamedValue.cpp \
+NamedValueChoice.cpp \
+PianoFrame.cpp \
+PianoWindow.cpp \
+Player.cpp \
+Project.cpp \
+ProjectManager.cpp \
+PropertyListDialog.cpp \
+Random.cpp \
+RecordingInfo.cpp \
+Rectangle.cpp \
+ResourceDialog.cpp \
+Rhythm.cpp \
+SampleCommand.cpp \
+Sample.cpp \
+SampleDialog.cpp \
+SampleWindow.cpp \
+SelectControllerDialog.cpp \
+Signal2.cpp \
+SliderWindow.cpp \
+Song.cpp \
+StandardFile.cpp \
+StringReadWrite.cpp \
+StringUtilities.cpp \
+Synth.cpp \
+ToolBar.cpp \
+Track.cpp \
+TrackFrame.cpp \
+TrackWindow.cpp
+endif
noinst_HEADERS = \
AboutDialog.h \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-05 03:52:14
|
Revision: 486
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=486&view=rev
Author: pstieber
Date: 2008-05-04 20:52:12 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Wrapped the inclusion of the ALSA specific audio driver with a WXGTK check to exclude it from the Mac build.
Modified Paths:
--------------
trunk/jazz/src/Project.cpp
Modified: trunk/jazz/src/Project.cpp
===================================================================
--- trunk/jazz/src/Project.cpp 2008-05-05 03:50:58 UTC (rev 485)
+++ trunk/jazz/src/Project.cpp 2008-05-05 03:52:12 UTC (rev 486)
@@ -38,7 +38,7 @@
#ifdef __WXMSW__
#include "WindowsPlayer.h"
#include "WindowsAudioInterface.h"
-#else
+#elif __WXGTK__
#include "AudioDriver.h"
#endif
#ifdef DEV_ALSA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-05 03:51:01
|
Revision: 485
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=485&view=rev
Author: pstieber
Date: 2008-05-04 20:50:58 -0700 (Sun, 04 May 2008)
Log Message:
-----------
Wrapped literal title argument to wxDialog with wxString() to force construction
of this type. I didn't have to do this in Windows or on Linux because I
compiled wxWidgets with std::string compatability. I thought I did the same on
the Mac, but I may have made a mistake.
Modified Paths:
--------------
trunk/jazz/src/Audio.cpp
trunk/jazz/src/GuitarSettingsDialog.cpp
trunk/jazz/src/Harmony.cpp
Modified: trunk/jazz/src/Audio.cpp
===================================================================
--- trunk/jazz/src/Audio.cpp 2008-05-04 04:57:33 UTC (rev 484)
+++ trunk/jazz/src/Audio.cpp 2008-05-05 03:50:58 UTC (rev 485)
@@ -956,7 +956,7 @@
int tSamplesDlg::current = 0;
tSamplesDlg::tSamplesDlg(wxWindow* pParent, tSampleSet &s)
- : wxDialog(pParent, wxID_ANY, "Sample Settings"),
+ : wxDialog(pParent, wxID_ANY, wxString("Sample Settings")),
set(s)
{
if (path == 0)
Modified: trunk/jazz/src/GuitarSettingsDialog.cpp
===================================================================
--- trunk/jazz/src/GuitarSettingsDialog.cpp 2008-05-04 04:57:33 UTC (rev 484)
+++ trunk/jazz/src/GuitarSettingsDialog.cpp 2008-05-05 03:50:58 UTC (rev 485)
@@ -32,7 +32,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
JZGuitarSettingsDialog::JZGuitarSettingsDialog(wxWindow* pParent)
- : wxDialog(pParent, wxID_ANY, "Guitar Settings"),
+ : wxDialog(pParent, wxID_ANY, wxString("Guitar Settings")),
mpChordModeCheckBox(0),
mpBassGuitarCheckBox(0),
mpShowOctavesCheckBox(0)//,
Modified: trunk/jazz/src/Harmony.cpp
===================================================================
--- trunk/jazz/src/Harmony.cpp 2008-05-04 04:57:33 UTC (rev 484)
+++ trunk/jazz/src/Harmony.cpp 2008-05-05 03:50:58 UTC (rev 485)
@@ -1638,7 +1638,7 @@
HBContextDlg::HBContextDlg(HBCanvas *c, wxFrame *parent, HBContext *pct)
- : wxDialog(parent, wxID_ANY, "Edit chord/scale" )
+ : wxDialog(parent, wxID_ANY, wxString("Edit chord/scale"))
{
int i;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-04 04:57:35
|
Revision: 484
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=484&view=rev
Author: pstieber
Date: 2008-05-03 21:57:33 -0700 (Sat, 03 May 2008)
Log Message:
-----------
Changed direct snap selection member access to IsSelected.
Modified Paths:
--------------
trunk/jazz/src/ControlEdit.cpp
trunk/jazz/src/Harmony.cpp
Modified: trunk/jazz/src/ControlEdit.cpp
===================================================================
--- trunk/jazz/src/ControlEdit.cpp 2008-05-04 04:43:51 UTC (rev 483)
+++ trunk/jazz/src/ControlEdit.cpp 2008-05-04 04:57:33 UTC (rev 484)
@@ -509,7 +509,7 @@
{
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
- if (!mpPianoWindow->mpSnapSel->Selected)
+ if (!mpPianoWindow->mpSnapSel->IsSelected())
{
return (pEvent->IsKeyOn() != 0);
}
@@ -540,7 +540,7 @@
tEventIterator iter(track);
- if (mpPianoWindow->mpSnapSel->Selected)
+ if (mpPianoWindow->mpSnapSel->IsSelected())
{
from_clk = mpPianoWindow->GetFilter()->FromClock;
to_clk = mpPianoWindow->GetFilter()->ToClock;
@@ -558,7 +558,7 @@
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
if (
- !mpPianoWindow->mpSnapSel->Selected ||
+ !mpPianoWindow->mpSnapSel->IsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
@@ -610,7 +610,7 @@
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
- if (!mpPianoWindow->mpSnapSel->Selected)
+ if (!mpPianoWindow->mpSnapSel->IsSelected())
{
return pEvent->IsKeyPressure() != 0;
}
@@ -643,7 +643,7 @@
JZEvent* pEvent;
// SN++ Apply works only if some events are selected !!
- if (!mpPianoWindow->mpSnapSel->Selected)
+ if (!mpPianoWindow->mpSnapSel->IsSelected())
{
OnRevert();
return;
@@ -654,7 +654,7 @@
tEventIterator iter(track);
- if (mpPianoWindow->mpSnapSel->Selected)
+ if (mpPianoWindow->mpSnapSel->IsSelected())
{
from_clk = mpPianoWindow->GetFilter()->FromClock;
to_clk = mpPianoWindow->GetFilter()->ToClock;
@@ -676,7 +676,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->Selected ||
+ !mpPianoWindow->mpSnapSel->IsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
k = pEvent->IsKeyPressure();
@@ -696,7 +696,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->Selected ||
+ !mpPianoWindow->mpSnapSel->IsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
keyon = pEvent->IsKeyOn();
@@ -740,7 +740,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->Selected ||
+ !mpPianoWindow->mpSnapSel->IsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
if (pEvent->IsKeyPressure())
Modified: trunk/jazz/src/Harmony.cpp
===================================================================
--- trunk/jazz/src/Harmony.cpp 2008-05-04 04:43:51 UTC (rev 483)
+++ trunk/jazz/src/Harmony.cpp 2008-05-04 04:57:33 UTC (rev 484)
@@ -1489,7 +1489,7 @@
//-----------------------------------------------------------------------------
HBAnalyzer * HBCanvas::GetAnalyzer()
{
- if (mSequenceCount > 0 && gpTrackWindow->mpSnapSel->Selected)
+ if (mSequenceCount > 0 && gpTrackWindow->mpSnapSel->IsSelected())
{
HBAnalyzer *analyzer = new HBAnalyzer(mSequence, mSequenceCount);
analyzer->Init(gpTrackWindow->mpFilter, transpose_res);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-04 04:43:52
|
Revision: 483
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=483&view=rev
Author: pstieber
Date: 2008-05-03 21:43:51 -0700 (Sat, 03 May 2008)
Log Message:
-----------
Updated to get selection working in the track window in a very basic way.
This is a WIP and hasn't benn fully integrated with the new scrolling code.
Modified Paths:
--------------
trunk/jazz/src/EventWindow.cpp
trunk/jazz/src/EventWindow.h
trunk/jazz/src/MouseAction.cpp
trunk/jazz/src/MouseAction.h
trunk/jazz/src/PianoWindow.cpp
trunk/jazz/src/PianoWindow.h
trunk/jazz/src/SampleWindow.cpp
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/TrackWindow.h
Modified: trunk/jazz/src/EventWindow.cpp
===================================================================
--- trunk/jazz/src/EventWindow.cpp 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/EventWindow.cpp 2008-05-04 04:43:51 UTC (rev 483)
@@ -33,7 +33,6 @@
using namespace std;
-
//*****************************************************************************
// Description:
// This is the event window class definition.
@@ -79,7 +78,7 @@
mScrolledX(0),
mScrolledY(0)
{
- mpSnapSel = new tSnapSelection(this);
+ mpSnapSel = new JZSnapSelection(this);
mpFilter = new JZFilter(mpSong);
@@ -106,7 +105,7 @@
//-----------------------------------------------------------------------------
int JZEventWindow::EventsSelected(const wxString& Message) const
{
- if (!mpSnapSel->Selected)
+ if (!mpSnapSel->IsSelected())
{
wxMessageBox(Message, "Error", wxOK);
return 0;
@@ -401,7 +400,6 @@
mpFilter = new JZFilter(Song);
}
-
JZEventFrame::~JZEventFrame()
{
delete SnapSel;
@@ -421,18 +419,17 @@
}
}
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::CreateMenu()
{
}
-/**
-
-create the canvas component(used for differently dependingon the subclass)
-size it to the client area of the frame(frame size minus toolbar and menus )
-*/
+//-----------------------------------------------------------------------------
+// create the canvas component(used for differently dependingon the subclass)
+// size it to the client area of the frame(frame size minus toolbar and menus )
+//-----------------------------------------------------------------------------
//void JZEventFrame::CreateCanvas()
//{
// cout << "CreateCanvas" << endl;
@@ -451,8 +448,9 @@
Setup();
}
-
+//-----------------------------------------------------------------------------
// Initialize the constants used in drawing.
+//-----------------------------------------------------------------------------
void JZEventFrame::Setup()
{
/*
@@ -478,11 +476,10 @@
*/
}
-
-/**
-this onsize handler is supposed to take care of handling of the resizing the two subwindows sizes to
-they dont overlap
-*/
+//-----------------------------------------------------------------------------
+// this onsize handler is supposed to take care of handling of the resizing
+// the two subwindows sizes to they dont overlap
+//-----------------------------------------------------------------------------
void JZEventFrame::OnSize(wxSizeEvent& Event)
{
// wxFrame::OnSize(Event);
@@ -535,11 +532,8 @@
return OnKeyEvent(e);
}
-// *******************************************************************
-// Coord-Functions
-// *******************************************************************
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int JZEventFrame::y2yLine(int y, int up)
{
if (up)
@@ -552,6 +546,8 @@
return y;
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int JZEventFrame::y2Line(int y, int up)
{
if (up)
@@ -562,13 +558,16 @@
return y / mTrackHeight;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
int JZEventFrame::Line2y(int Line)
{
return Line * mTrackHeight + mTopInfoHeight;
}
/*
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::LineText(wxDC *dc, int x, int y, int w, const char *str, int h, bool down)
{
if (h <= 0)
@@ -618,10 +617,8 @@
}
*/
-// *******************************************************************
-// Painting behavior
-// *******************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::Redraw()
{
// wxDC* dc=new wxClientDC(this);
@@ -631,29 +628,26 @@
// //the problem is that onpaint no longer tkes no argument, and is supposed to be called from the framework only, so it should be split
// delete dc;
-
-
// mpEventWindow->Refresh();
-
}
-// ******************************************************************
-// Mouse
-// ******************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
bool JZEventFrame::OnKeyEvent(wxKeyEvent &e)
{
return false;
}
-/** seems to handle the "selection" rectangle. normally called from the base class onmouseevent handler */
+//-----------------------------------------------------------------------------
+// seems to handle the "selection" rectangle. normally called from the base
+// class onmouseevent handler
+//-----------------------------------------------------------------------------
int JZEventFrame::OnMouseEvent(wxMouseEvent &e)
{
// cout <<"JZEventFrame::OnMouseEvent"<<endl;
if (!MouseAction)
{
// create SnapSel?
-
int x;
int y;
e.GetPosition(&x, &y);
@@ -664,7 +658,8 @@
{
SnapSelStart(e);
- if (SnapSel->Selected){
+ if (SnapSel->IsSelected())
+ {
Refresh(); //redraw the whole window instead(inefficient, we should rather invalidate a rect)
}
SnapSel->Event(e);
@@ -673,7 +668,6 @@
}
}
}
-
else
{
// MouseAction active
@@ -696,38 +690,36 @@
return 0;
}
-// ******************************************************************
-// dummies
-// ******************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
bool JZEventFrame::OnClose()
{
return FALSE;
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::OnMenuCommand(int)
{
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::SnapSelStart(wxMouseEvent& MouseEvent)
{
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::SnapSelStop(wxMouseEvent& MouseEvent)
{
}
//-----------------------------------------------------------------------------
-// PlayPosition
//-----------------------------------------------------------------------------
-
-// **************************************************************************
-// EventsSelected
-// **************************************************************************
-
-int JZEventFrame::EventsSelected(const char *msg)
+int JZEventFrame::EventsSelected(const char* msg)
{
- if (!SnapSel->Selected)
+ if (!SnapSel->IsSelected())
{
if (msg == 0)
{
@@ -739,158 +731,104 @@
return 1;
}
-// **************************************************************************
-// Quantize
-// **************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenQuantize()
{
-
-
if (!EventsSelected())
return;
// wxDialogBox *panel = new wxDialogBox(this, "Quantize", FALSE );
tQuantizeDlg * dlg = new tQuantizeDlg(this, mpFilter);
dlg->Create();
-
-
}
-// **************************************************************************
-// Cleanup
-// **************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenCleanup()
{
-
-
if (!EventsSelected())
return;
tCleanupDlg * dlg = new tCleanupDlg(this, mpFilter);
dlg->Create();
-
}
-
-// **************************************************************************
-// SearchReplace
-// **************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenSearchReplace()
{
-
-
if (!EventsSelected())
return;
tSearchReplaceDlg * dlg = new tSearchReplaceDlg(this, mpFilter);
dlg->Create();
-
-
}
-
-// **************************************************************************
-// SetChannel
-// **************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenSetChannel()
{
-
-
if (!EventsSelected())
return;
tSetChannelDlg * dlg = new tSetChannelDlg(mpFilter);
dlg->Create();
-
}
-
-// **************************************************************************
-// Transpose
-// **************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenTranspose()
{
-
-
if (!EventsSelected())
return;
tTransposeDlg * dlg = new tTransposeDlg(this, mpFilter);
dlg->Create();
-
-
}
-/**show the "shift events" dialog */
-
+//-----------------------------------------------------------------------------
+// show the "shift events" dialog
+//-----------------------------------------------------------------------------
void JZEventFrame::MenShift(int Unit)
{
if (EventsSelected())
{
-
tShiftDlg * dlg = new tShiftDlg(this, mpFilter, Unit);
dlg->Create();
}
-
-
}
-
-// ********************************************************************************
-// Delete
-// ********************************************************************************
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenDelete()
{
-
-
if (!EventsSelected())
return;
tDeleteDlg * dlg = new tDeleteDlg(this, mpFilter);
dlg->Create();
}
-// ********************************************************************************
-// Velocity
-// ********************************************************************************
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenVelocity()
{
-
if (!EventsSelected())
return;
tVelocityDlg * dlg = new tVelocityDlg(mpFilter);
dlg->Create();
}
-// ********************************************************************************
-// Length
-// ********************************************************************************
-
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZEventFrame::MenLength()
{
-
-
if (!EventsSelected())
return;
tLengthDlg * dlg = new tLengthDlg(this, mpFilter);
dlg->Create();
-
}
-
-// ********************************************************************************
+//-----------------------------------------------------------------------------
// convert to modulation
-// ********************************************************************************
-
-
+//-----------------------------------------------------------------------------
void JZEventFrame::MenConvertToModulation()
{
-
-
if (!EventsSelected())
return;
tCmdConvertToModulation cmd(mpFilter);
@@ -898,30 +836,23 @@
Redraw();
}
-
-
-
-
-// ******************************************************************
+//*****************************************************************************
// MeterChange Dialog
-// ******************************************************************
-
-
+//*****************************************************************************
class tMeterChangeDlg : public tPropertyListDlg
{
-public:
- JZEventFrame *EventWin;
- static int Numerator;
- static int Denomiator;
- static int BarNr;
- tMeterChangeDlg(JZEventFrame *w);
- void AddProperties();
- virtual bool OnClose();
- virtual void OnCancel();
- virtual void OnHelp();
+ public:
+ JZEventFrame *EventWin;
+ static int Numerator;
+ static int Denomiator;
+ static int BarNr;
+ tMeterChangeDlg(JZEventFrame *w);
+ void AddProperties();
+ virtual bool OnClose();
+ virtual void OnCancel();
+ virtual void OnHelp();
};
-
int tMeterChangeDlg::Numerator = 4;
int tMeterChangeDlg::Denomiator = 4;
int tMeterChangeDlg::BarNr = 1;
@@ -932,14 +863,12 @@
EventWin = w;
}
-
void tMeterChangeDlg::OnCancel()
{
EventWin->mpSettingsDialog = 0;
//wxForm::OnCancel();
}
-
bool tMeterChangeDlg::OnClose()
{
BarNr += EventWin->Song->GetIntroLength();
@@ -955,7 +884,6 @@
gpHelpInstance->ShowTopic("Meterchange");
}
-
void tMeterChangeDlg::AddProperties()
{
// Add(wxMakeFormShort("BarNr:", &BarNr, wxFORM_DEFAULT, 0,0,0,100));
@@ -980,8 +908,6 @@
"integer"));//JAVE should be a integer list instead FIXME
}
-
-
void JZEventFrame::MenMeterChange()
{
tMeterChangeDlg *dlg;
Modified: trunk/jazz/src/EventWindow.h
===================================================================
--- trunk/jazz/src/EventWindow.h 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/EventWindow.h 2008-05-04 04:43:51 UTC (rev 483)
@@ -40,7 +40,7 @@
{
public:
- tSnapSelection* mpSnapSel;
+ JZSnapSelection* mpSnapSel;
JZFilter* mpFilter;
@@ -182,7 +182,7 @@
int FromLine, ToLine;
// Mousehandling
- tSnapSelection *SnapSel;
+ JZSnapSelection *SnapSel;
tMouseAction *MouseAction;
virtual void SnapSelStart(wxMouseEvent &e);
virtual void SnapSelStop(wxMouseEvent &e);
Modified: trunk/jazz/src/MouseAction.cpp
===================================================================
--- trunk/jazz/src/MouseAction.cpp 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/MouseAction.cpp 2008-05-04 04:43:51 UTC (rev 483)
@@ -67,335 +67,389 @@
actions[i] = code;
}
-int tMouseMapper::Action(wxMouseEvent &e)
+int tMouseMapper::Action(wxMouseEvent& Event)
{
- if (!e.ButtonDown())
+ if (!Event.ButtonDown())
+ {
return 0;
+ }
- if (left_action > 0 && e.LeftDown() &&!e.ShiftDown() && !e.ControlDown())
+ if (
+ left_action > 0 &&
+ Event.LeftDown() &&
+ !Event.ShiftDown() &&
+ !Event.ControlDown())
+ {
return left_action;
+ }
int i = 0; // left down
- if (e.MiddleDown())
+ if (Event.MiddleDown())
+ {
i = 1;
- else
- if (e.RightDown())
+ }
+ else if (Event.RightDown())
+ {
i = 2;
+ }
- if (e.ShiftDown())
+ if (Event.ShiftDown())
+ {
i += 3;
- if (e.ControlDown())
+ }
+ if (Event.ControlDown())
+ {
i += 6;
+ }
return actions[i];
}
-//////////////////////////////////////////////////////////
-//tSelection implementation
-
-tSelection::tSelection(wxWindow* pWindow)
- : win(pWindow),
+//*****************************************************************************
+// Description:
+// This is the selection class definition.
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZSelection::JZSelection(wxWindow* pWindow)
+ : mActive(false),
+ mSelected(false),
+ mRectangle(),
+ mpWindow(pWindow),
mpBackgroundBrush(0)
{
- Active = 0;
- Selected = false;
- mpBackgroundBrush = new wxBrush(wxColor(192, 192, 192), wxSOLID);
+// mpBackgroundBrush = new wxBrush(wxColor(192, 192, 192), wxSOLID);
+ mpBackgroundBrush = new wxBrush(wxColor(100, 100, 100), wxSOLID);
}
-tSelection::~tSelection()
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZSelection::~JZSelection()
{
delete mpBackgroundBrush;
}
-int tSelection::Event(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int JZSelection::Event(wxMouseEvent& Event)
{
- if (e.ButtonDown())
- return ButtonDown(e);
- else if (e.ButtonUp())
- return ButtonUp(e);
- else if (e.Dragging())
- return Dragging(e);
+ if (Event.ButtonDown())
+ {
+ return ButtonDown(Event);
+ }
+ else if (Event.ButtonUp())
+ {
+ return ButtonUp(Event);
+ }
+ else if (Event.Dragging())
+ {
+ return Dragging(Event);
+ }
return 0;
}
-int tSelection::ButtonDown(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int JZSelection::ButtonDown(wxMouseEvent& Event)
{
- if (!Active)
+ if (!mActive)
{
-#ifdef __WXMSW__
-//OBSOLETE Canvas->CaptureMouse();
-#endif
- Active = 1;
-// wxDC *dc = new wxPaintDC(win);//Canvas->GetDC();
-// Dc.SetBrush(*mpBackgroundBrush);
-// Dc.SetLogicalFunction(wxXOR);
- if (Selected && e.ShiftDown())
+ mActive = true;
+ if (mSelected && Event.ShiftDown())
{
// Continue selection
- JZRectangle rr = r;
- rr.SetNormal();
-// if (rr.width && rr.height)
-// Dc.DrawRectangle(rr.x, rr.y, rr.width, rr.height);
- Dragging(e);
+ JZRectangle Rectangle = mRectangle;
+ Rectangle.SetNormal();
+ Dragging(Event);
}
else
{
- Selected = false;
- int x, y;
- //e.Position(&x, &y);
- wxDC *dc = new wxClientDC(win);//Canvas->GetDC();
- wxPoint point=e.GetLogicalPosition(*dc);
- delete dc;
- x=point.x;y=point.y;
+ mSelected = false;
+ int x = Event.GetX();
+ int y = Event.GetY();
Snap(x, y, 0);
- r.x = x;
- r.y = y;
- r.width = 1;
- r.height = 1;
-// Dc.DrawRectangle(r.x, r.y, r.width, r.height);
- //Dragging(e);
+ mRectangle.x = x;
+ mRectangle.y = y;
+ mRectangle.width = 1;
+ mRectangle.height = 1;
}
-// Dc.SetLogicalFunction(wxCOPY);
}
- win->Refresh(); //invalidate
return 0;
}
-
-int tSelection::Dragging(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int JZSelection::Dragging(wxMouseEvent& Event)
{
- if (!Active)
- ButtonDown(e);
+ if (!mActive)
+ {
+ ButtonDown(Event);
+ }
- if (Active)
+ if (mActive)
{
- int x, y;
- JZRectangle r1, r2; //r1=previous rect, r2=new rect
-
- wxDC *dc = new wxClientDC(win);
- wxPoint point=e.GetLogicalPosition(*dc);
- delete dc;
-
- x=point.x;
- y=point.y;
- if ((short)x < 0)
+ int x = Event.GetX();
+ int y = Event.GetY();
+ if (x < 0)
+ {
x = 0;
- if ((short)y < 0)
+ }
+ if (y < 0)
+ {
y = 0;
+ }
Snap(x, y, 1);
- r1 = r;
- r1.SetNormal();
-
- r.width = x - r.x;
- r.height = y - r.y;
-
- r2 = r;
- r2.SetNormal();
-
- win->Refresh(TRUE, &r1);
- win->Refresh(TRUE, &r2);
+ mRectangle.width = x - mRectangle.x;
+ mRectangle.height = y - mRectangle.y;
}
- //invalidate both old and new rect
return 0;
}
-
-int tSelection::ButtonUp(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int JZSelection::ButtonUp(wxMouseEvent& Event)
{
- if (Active)
+ if (mActive)
{
-#ifdef __WXMSW__
-//OBSOLETE Canvas->ReleaseMouse();
-#endif
- Active = 0;
- r.SetNormal();
-// wxDC *dc = new wxPaintDC(win);//Canvas->GetDC();
+ mActive = false;
+ mRectangle.SetNormal();
-// Dc.SetLogicalFunction(wxXOR);
-// if (r.width && r.height)
-// Dc.DrawRectangle(r.x, r.y, r.width, r.height);
-// Dc.SetLogicalFunction(wxCOPY);
- Selected = (r.width > 3 && r.height > 3); //its selected only if larger than 3x3 pixels
+ // Only select if the rectangle is larger than 3x3 pixels.
+ mSelected = (mRectangle.width > 3 && mRectangle.height > 3);
return 1;
}
- win->Refresh();
+
+ mpWindow->Refresh();
return 0;
}
+//-----------------------------------------------------------------------------
// Description:
// Draw the selected rectangle, normally called from OnDraw
// in the parent window.
-void tSelection::Draw(wxDC& Dc)
+//-----------------------------------------------------------------------------
+void JZSelection::Draw(wxDC& Dc, int ScrolledX, int ScrolledY)
{
-// cout
-// << "tSelection::Draw ---------------------------------------------------"
-// << endl;
- // Dc.DrawRectangle(100,100,100,100);
-// if (Selected) //we cant check for "selected" here, because...
-// {
+// if (mSelected)
+ {
+ JZRectangle Rectangle = mRectangle;
- JZRectangle rr = r;
-
- Dc.DestroyClippingRegion();
-
Dc.SetLogicalFunction(wxXOR);
Dc.SetBrush(*mpBackgroundBrush);
- rr.SetNormal();
- if (rr.width && rr.height)
+ Rectangle.SetNormal();
+ if (Rectangle.width && Rectangle.height)
{
- Dc.DrawRectangle(rr.x, rr.y, rr.width, rr.height);
+ Dc.DrawRectangle(
+ Rectangle.x - ScrolledX,
+ Rectangle.y - ScrolledY,
+ Rectangle.width,
+ Rectangle.height);
}
Dc.SetLogicalFunction(wxCOPY);
-// }
+ }
}
-// Draw, but use clipping to redruce drawing
-void tSelection::Draw(wxDC& Dc, int x, int y, int w, int h)
+//-----------------------------------------------------------------------------
+// Description:
+// Draw, but use clipping to redruce drawing.
+//-----------------------------------------------------------------------------
+void JZSelection::Draw(
+ wxDC& Dc,
+ int ScrolledX,
+ int ScrolledY,
+ int ClipX,
+ int ClipY,
+ int ClipWidth,
+ int ClipHeight)
{
-// if (Selected)
-// {
- Dc.SetClippingRegion(x, y, w, h);
- Draw(Dc);
+// if (mSelected)
+ {
+ Dc.SetClippingRegion(ClipX, ClipY, ClipWidth, ClipHeight);
+ Draw(Dc, ScrolledX, ScrolledY);
Dc.DestroyClippingRegion();
- // }
+ }
}
+//-----------------------------------------------------------------------------
// I think this one is meant to select a rectangle and repaint it.
// It did this by drawing directly in the device context. This is bad, so I
// tried changing it to invalidation instead.
-void tSelection::Select(JZRectangle &rr, int x, int y, int w, int h)
+//-----------------------------------------------------------------------------
+void JZSelection::Select(JZRectangle& Rectangle, int x, int y, int w, int h)
{
// clear old rectangle
// Draw(x, y, w, h);
// make new one
- r = rr;
- Selected = true;
+ mRectangle = Rectangle;
+ mSelected = true;
// Draw(x, y, w, h);
- win->Refresh(); //inefficient because should invvalidate only the rectangle
+
+ // Inefficient because should invalidate only the rectangle.
+ mpWindow->Refresh();
}
-void tSelection::Select(JZRectangle &rr)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSelection::Select(JZRectangle& Rectangle)
{
- Select(rr, 0,0,3000,3000);
+ Select(Rectangle, 0, 0, 3000, 3000);
}
-// ***********************************************************************
-// tSnapSelection
-// ***********************************************************************
+//*****************************************************************************
+// Description:
+// This is the snap selection class definition.
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZSnapSelection::JZSnapSelection(wxWindow* pWindow)
+ : JZSelection(pWindow),
+ mXCoordinates(),
+ mYCoordinates(),
+ mXMin(0),
+ mXMax(0),
+ mXStep(0),
+ mYMin(0),
+ mYMax(0),
+ mYStep(0)
+{
+}
-
-
-
-static void SnapVec(int &x, int *Coords, int nCoords, int up)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::Snap(int& x, int& y, bool drag)
{
- int i;
- for (i = 0; i < nCoords; i++)
+ if (!mXCoordinates.empty())
{
- if (Coords[i] > x)
- {
- if (up || i == 0)
- x = Coords[i];
- else
- x = Coords[i-1];
- return;
- }
+ SnapToVector(x, mXCoordinates, drag);
}
- x = Coords[nCoords - 1];
-}
+ else if (mXStep)
+ {
+ SnapMod(x, mXMin, mXMax, mXStep, drag);
+ }
-
-static void SnapMod(int &x, int Min, int Max, int Step, int up)
-{
- if (x <= Min)
+ if (!mYCoordinates.empty())
{
- x = Min;
- return;
+ SnapToVector(y, mYCoordinates, drag);
}
- if (x >= Max)
+ else if (mYStep)
{
- x = Max;
- return;
+ SnapMod(y, mYMin, mYMax, mYStep, drag);
}
- x -= (x - Min) % Step;
- if (up)
- x += Step;
}
-
-
-void tSnapSelection::Snap(float &fx, float &fy, int drag)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SetXSnap(int XCount, int* pXVector)
{
- int x = (int)fx;
- int y = (int)fy;
- if (xCoords)
- SnapVec(x, xCoords, nxCoords, drag);
- else if (xStep)
- SnapMod(x, xMin, xMax, xStep, drag);
-
- if (yCoords)
- SnapVec(y, yCoords, nyCoords, drag);
- else if (yStep)
- SnapMod(y, yMin, yMax, yStep, drag);
- fx = x;
- fy = y;
+ mXCoordinates.clear();
+ for (int i = 0; i < XCount; ++i)
+ {
+ mXCoordinates.push_back(pXVector[i]);
+ }
+ mXStep = 0;
}
-
-tSnapSelection::tSnapSelection(wxWindow *c)
- : tSelection(c)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SetYSnap(int YCount, int* pYVector)
{
- xCoords = 0;
- yCoords = 0;
- xStep = yStep = 0;
+ mYCoordinates.clear();
+ for (int i = 0; i < YCount; ++i)
+ {
+ mXCoordinates.push_back(pYVector[i]);
+ }
+ mYStep = 0;
}
-void tSnapSelection::SetXSnap(int nx, int *cx)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SetXSnap(int XMin, int XMax, int XStep)
{
- xCoords = cx;
- nxCoords = nx;
- xStep = 0;
+ mXMin = XMin;
+ mXMax = XMax;
+ mXStep = XStep;
+ mXCoordinates.clear();
}
-void tSnapSelection::SetYSnap(int ny, int *cy)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SetYSnap(int YMin, int YMax, int YStep)
{
- yCoords = cy;
- nyCoords = ny;
- yStep = 0;
+ mYMin = YMin;
+ mYMax = YMax;
+ mYStep = YStep;
+ mYCoordinates.clear();
}
-void tSnapSelection::SetXSnap(int xmin, int xmax, int xstep)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SnapToVector(
+ int& Coordinate,
+ vector<int> Vector,
+ bool Up)
{
- xMin = xmin;
- xMax = xmax;
- xStep = xstep;
- xCoords = 0;
+ for (unsigned i = 0; i < Vector.size(); ++i)
+ {
+ if (Vector[i] > Coordinate)
+ {
+ if (Up || i == 0)
+ {
+ Coordinate = Vector[i];
+ }
+ else
+ {
+ Coordinate = Vector[i - 1];
+ }
+ return;
+ }
+ }
+ Coordinate = Vector[Vector.size() - 1];
}
-void tSnapSelection::SetYSnap(int ymin, int ymax, int ystep)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSnapSelection::SnapMod(
+ int& Coordinate,
+ int Min,
+ int Max,
+ int Step,
+ bool Up)
{
- yMin = ymin;
- yMax = ymax;
- yStep = ystep;
- yCoords = 0;
+ if (Coordinate <= Min)
+ {
+ Coordinate = Min;
+ return;
+ }
+ if (Coordinate >= Max)
+ {
+ Coordinate = Max;
+ return;
+ }
+ Coordinate -= (Coordinate - Min) % Step;
+ if (Up)
+ {
+ Coordinate += Step;
+ }
}
// *************************************************************************
// tMouseCounter
// *************************************************************************
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
tMouseCounter::tMouseCounter(
tButtonLabelInterface* wwin,
- JZRectangle* rr,
+ JZRectangle* Rectangle,
int val,
int min,
int max,
int wait)
{
win = wwin;
- r = *rr;
+ r = *Rectangle;
Value = val;
Min = min;
Max = max;
@@ -403,45 +457,59 @@
Wait = wait;
}
-
-int tMouseCounter::LeftDown(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int tMouseCounter::LeftDown(wxMouseEvent& Event)
{
- Delta = e.ShiftDown() ? 10 : 1;
+ Delta = Event.ShiftDown() ? 10 : 1;
Start(Timeout);
if (Wait)
+ {
ShowValue(TRUE);
+ }
else
+ {
Notify();
+ }
return 0;
}
-int tMouseCounter::LeftUp(wxMouseEvent &e)
+int tMouseCounter::LeftUp(wxMouseEvent& Event)
{
Stop();
ShowValue(FALSE);
return 1;
}
-int tMouseCounter::RightDown(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int tMouseCounter::RightDown(wxMouseEvent& Event)
{
- Delta = e.ShiftDown() ? -10 : -1;
+ Delta = Event.ShiftDown() ? -10 : -1;
Start(Timeout);
if (Wait)
+ {
ShowValue(TRUE);
+ }
else
+ {
Notify();
+ }
return 0;
+
}
-
-int tMouseCounter::RightUp(wxMouseEvent &e)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+int tMouseCounter::RightUp(wxMouseEvent& Event)
{
Stop();
ShowValue(FALSE);
return 1;
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tMouseCounter::Notify()
{
Value += Delta;
@@ -458,7 +526,8 @@
}
}
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void tMouseCounter::ShowValue(bool down)
{
char buf[20];
@@ -485,7 +554,7 @@
//Frame->SetStatusText("Click Destination point");
}
-int tMarkDestin::ButtonDown(wxMouseEvent &e)
+int tMarkDestin::ButtonDown(wxMouseEvent& Event)
{
wxCursor c = wxCursor(wxCURSOR_ARROW);
Canvas->SetCursor(c);
@@ -493,7 +562,7 @@
//converts physical coords to logical(scrolled) coords
wxClientDC* scrolledDC=new wxClientDC(Canvas);
Canvas->PrepareDC(*scrolledDC);
- wxPoint point=e.GetLogicalPosition(*scrolledDC);
+ wxPoint point = Event.GetLogicalPosition(*scrolledDC);
delete scrolledDC;
x=point.x;
@@ -502,17 +571,17 @@
return 1;
}
-int tMarkDestin::RightDown(wxMouseEvent &e)
+int tMarkDestin::RightDown(wxMouseEvent& Event)
{
- ButtonDown(e);
+ ButtonDown(Event);
Aborted = 1;
//Frame->SetStatusText("Operation aborted");
return 1;
}
-int tMarkDestin::LeftDown(wxMouseEvent &e)
+int tMarkDestin::LeftDown(wxMouseEvent& Event)
{
- ButtonDown(e);
+ ButtonDown(Event);
Aborted = 0;
//Frame->SetStatusText("");
return 1;
Modified: trunk/jazz/src/MouseAction.h
===================================================================
--- trunk/jazz/src/MouseAction.h 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/MouseAction.h 2008-05-04 04:43:51 UTC (rev 483)
@@ -29,6 +29,8 @@
#include "Rectangle.h"
+#include <vector>
+
class JZEventWindow;
enum TEMousePlayMode
@@ -140,56 +142,125 @@
//*****************************************************************************
// Description:
-// Selection - draw a rectangle with the mouse, selecting events
-// This class needs to draw in the window, thus it needs access to the
-// device context of the window. This was by storing a wxCanvas pointer
-// in wxwin168, but wxCanvas is gone in wxwin2.
+// This is the selection class declaration. This class selects events using
+// the mouse and draws indicating the selected events.
//*****************************************************************************
-class tSelection : public tMouseAction
+class JZSelection : public tMouseAction
{
public:
- tSelection(wxWindow* w);//wxCanvas *canvas);
- virtual ~tSelection();
+ JZSelection(wxWindow* pWindow);
- int Active;
- virtual void Snap(int &x, int &y, int drag) {}
- JZRectangle r;
- bool Selected; // r is valid
- virtual int Dragging(wxMouseEvent &);
- virtual int Event(wxMouseEvent &e);
- virtual int ButtonDown(wxMouseEvent &);
- virtual int ButtonUp(wxMouseEvent &);
- virtual void Draw(wxDC& Dc);
- virtual void Draw(wxDC& Dc, int x, int y, int w, int h); // clipping
- // may not be called while dragging
- void Select(JZRectangle &rr, int x, int y, int w, int h);
- void Select(JZRectangle &rr);
+ virtual ~JZSelection();
+ virtual bool IsActive() const
+ {
+ return mActive;
+ }
+
+ virtual bool IsSelected() const
+ {
+ return mSelected;
+ }
+
+ virtual void SetSelected(bool Selected)
+ {
+ mSelected = Selected;
+ }
+
+ virtual const JZRectangle& GetRectangle() const
+ {
+ return mRectangle;
+ }
+
+ virtual void SetRectangle(const JZRectangle& Rectangle)
+ {
+ mRectangle = Rectangle;
+ }
+
+ virtual void Snap(int& x, int& y, bool drag)
+ {
+ }
+
+ virtual int Dragging(wxMouseEvent& Event);
+
+ virtual int Event(wxMouseEvent& Event);
+
+ virtual int ButtonDown(wxMouseEvent& Event);
+
+ virtual int ButtonUp(wxMouseEvent& Event);
+
+ virtual void Draw(wxDC& Dc, int ScrolledX, int ScrolledY);
+
+ // Drawing with clipping.
+ virtual void Draw(
+ wxDC& Dc,
+ int ScrolledX,
+ int ScrolledY,
+ int ClipX,
+ int ClipY,
+ int ClipWidth,
+ int ClipHeight);
+
+ // May not be called while dragging.
+ void Select(JZRectangle& rr, int x, int y, int w, int h);
+
+ void Select(JZRectangle& Rectangle);
+
private:
- wxWindow* win;
+ bool mActive;
- // wxCanvas *Canvas;
+ // The following indicates if the rectangle is valid.
+ bool mSelected;
+ JZRectangle mRectangle;
+
+ wxWindow* mpWindow;
+
wxBrush* mpBackgroundBrush;
};
//*****************************************************************************
+// Description:
+// This is the snap selection class declaration.
//*****************************************************************************
-class tSnapSelection : public tSelection
+class JZSnapSelection : public JZSelection
{
public:
- tSnapSelection(wxWindow *c);
- virtual void Snap(float &x, float &y, int up);
- void SetXSnap(int ny, int *cx);
- void SetYSnap(int ny, int *cy);
- void SetXSnap(int xMin, int xMax, int xStep);
- void SetYSnap(int yMin, int yMax, int yStep);
+ JZSnapSelection(wxWindow* pWindow);
+
+ virtual void Snap(int& x, int& y, bool Up);
+
+ void SetXSnap(int XCount, int* pXVector);
+
+ void SetYSnap(int YCount, int* pYVector);
+
+ void SetXSnap(int XMin, int XMax, int XStep);
+
+ void SetYSnap(int YMin, int YMax, int YStep);
+
+ private:
+
+ static void SnapToVector(
+ int& Coordinate,
+ std::vector<int> Vector,
+ bool Up);
+
+ static void SnapMod(
+ int& Coordinate,
+ int Min,
+ int Max,
+ int Step,
+ bool Up);
+
protected:
- int *xCoords, nxCoords;
- int *yCoords, nyCoords;
- int xMin, xMax, xStep, yMin, yMax, yStep;
+
+ std::vector<int> mXCoordinates;
+
+ std::vector<int> mYCoordinates;
+
+ int mXMin, mXMax, mXStep, mYMin, mYMax, mYStep;
};
Modified: trunk/jazz/src/PianoWindow.cpp
===================================================================
--- trunk/jazz/src/PianoWindow.cpp 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/PianoWindow.cpp 2008-05-04 04:43:51 UTC (rev 483)
@@ -997,7 +997,14 @@
DrawPlayPosition(LocalDc);
// Draw the selection box.
- mpSnapSel->Draw(LocalDc, mEventsX, mEventsY, mEventsWidth, mEventsHeight);
+ mpSnapSel->Draw(
+ LocalDc,
+ mScrolledX,
+ mScrolledY,
+ mEventsX,
+ mEventsY,
+ mEventsWidth,
+ mEventsHeight);
Dc.Blit(
0,
@@ -1022,7 +1029,10 @@
//-----------------------------------------------------------------------------
void JZPianoWindow::DrawPlayPosition(wxDC& Dc)
{
- if (!mpSnapSel->Active && mPlayClock >= mFromClock && mPlayClock < mToClock)
+ if (
+ !mpSnapSel->IsActive() &&
+ mPlayClock >= mFromClock &&
+ mPlayClock < mToClock)
{
Dc.SetBrush(*wxBLACK_BRUSH);
Dc.SetPen(*wxBLACK_PEN);
@@ -1639,7 +1649,7 @@
int Clock, LoopClock;
if (action == MA_CYCLE)
{
- if (mpSnapSel->Selected)
+ if (mpSnapSel->IsSelected())
{
Clock = mpFilter->FromClock;
LoopClock = mpFilter->ToClock;
@@ -1805,10 +1815,11 @@
//-----------------------------------------------------------------------------
void JZPianoWindow::SnapSelStop(wxMouseEvent& Event)
{
- if (mpSnapSel->Selected)
+ if (mpSnapSel->IsSelected())
{
- int fr = y2Pitch((mpSnapSel->r.y + mpSnapSel->r.height - 1));
- int to = y2Pitch(mpSnapSel->r.y + 1);
+ int fr = y2Pitch(
+ mpSnapSel->GetRectangle().y + mpSnapSel->GetRectangle().height - 1);
+ int to = y2Pitch(mpSnapSel->GetRectangle().y + 1);
mpFilter->FltEvents[FltKeyOn].Selected = mVisibleKeyOn;
mpFilter->FltEvents[FltKeyOn].FromValue = fr;
@@ -1847,13 +1858,16 @@
mpFilter->FromTrack = mTrackIndex;
mpFilter->ToTrack = mTrackIndex;
- mpFilter->FromClock = SnapClock(x2Clock(mpSnapSel->r.x + 1));
- mpFilter->ToClock = SnapClock(x2Clock((mpSnapSel->r.x + mpSnapSel->r.width + 1)));
+ mpFilter->FromClock = SnapClock(x2Clock(mpSnapSel->GetRectangle().x + 1));
+ mpFilter->ToClock = SnapClock(x2Clock(
+ mpSnapSel->GetRectangle().x + mpSnapSel->GetRectangle().width + 1));
}
// SN++ Veloc- oder Aftertouch-Editor updaten
if (mpCtrlEdit)
+ {
mpCtrlEdit->UpDate();
+ }
}
//-----------------------------------------------------------------------------
@@ -1905,7 +1919,7 @@
int scroll_clock = (mFromClock + 5 * mToClock) / 6;
if (
- !mpSnapSel->Active &&
+ !mpSnapSel->IsActive() &&
(Clock > scroll_clock || Clock < mFromClock) && Clock >= 0)
{
// Avoid permenent redraws when end of scroll range is reached.
@@ -1920,7 +1934,7 @@
SetXScrollPosition(x);
}
- if (!mpSnapSel->Active) // sets clipping
+ if (!mpSnapSel->IsActive()) // sets clipping
{
if (mPlayClock != Clock)
{
@@ -1947,7 +1961,7 @@
//-----------------------------------------------------------------------------
int JZPianoWindow::EventsSelected(const char *msg)
{
- if (!mpSnapSel->Selected)
+ if (!mpSnapSel->IsSelected())
{
if (msg == 0)
msg = "please select some events first";
@@ -2010,7 +2024,7 @@
{
SnapSelStart(Event);
- if (mpSnapSel->Selected)
+ if (mpSnapSel->IsSelected())
{
// Redraw the whole window instead (inefficient, we should rather
// invalidate a rect).
Modified: trunk/jazz/src/PianoWindow.h
===================================================================
--- trunk/jazz/src/PianoWindow.h 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/PianoWindow.h 2008-05-04 04:43:51 UTC (rev 483)
@@ -34,7 +34,6 @@
class JZEvent;
class JZFilter;
class tCtrlEditBase;
-class tSnapSelection;
//*****************************************************************************
//*****************************************************************************
Modified: trunk/jazz/src/SampleWindow.cpp
===================================================================
--- trunk/jazz/src/SampleWindow.cpp 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/SampleWindow.cpp 2008-05-04 04:43:51 UTC (rev 483)
@@ -153,7 +153,7 @@
int paint_offset;
int paint_length;
- tSnapSelection snapsel;
+ JZSnapSelection snapsel;
// sel_fr == 0: no selection and no insertion point
// sel_fr > 0 && sel_fr == sel_to: insertion point
// sel_fr > 0 && sel_fr < sel_to: selected range
@@ -323,48 +323,59 @@
{
mouse_up_sets_insertion_point = 0;
mouse_down = TRUE;
- if (snapsel.Selected)
+ if (snapsel.IsSelected())
{
- snapsel.Draw(*pDc);
- snapsel.Selected = 0;
+ snapsel.Draw(*pDc, 0, 0);
+ snapsel.SetSelected(false);
}
else if (inspt.IsVisible())
+ {
inspt.Draw();
+ }
else
+ {
mouse_up_sets_insertion_point = 1;
+ }
snapsel.Event(e);
}
else if (e.LeftUp())
{
mouse_down = FALSE;
snapsel.Event(e);
- if (snapsel.Selected)
+ if (snapsel.IsSelected())
{
- snapsel.Draw(*pDc);
- sel_fr = Pixel2Sample(snapsel.r.x);
- sel_to = Pixel2Sample(snapsel.r.x + snapsel.r.width);
+ snapsel.Draw(*pDc, 0, 0);
+ sel_fr = Pixel2Sample(
+ snapsel.GetRectangle().x);
+ sel_to = Pixel2Sample(
+ snapsel.GetRectangle().x + snapsel.GetRectangle().width);
}
- else if (mouse_up_sets_insertion_point) {
+ else if (mouse_up_sets_insertion_point)
+ {
int x, y;
e.GetPosition(&x, &y);
sel_fr = sel_to = Pixel2Sample(x);
inspt.Draw(x);
}
else
+ {
sel_fr = sel_to = -1;
+ }
}
else if (e.Dragging() && mouse_down)
+ {
snapsel.Event(e);
+ }
}
void tSampleCnvs::ClearSelection()
{
- if (snapsel.Selected)
+ if (snapsel.IsSelected())
{
wxDC* pDc = new wxClientDC(this);
- snapsel.Draw(*pDc);
- snapsel.Selected = 0;
+ snapsel.Draw(*pDc, 0, 0);
+ snapsel.SetSelected(false);
}
else if (inspt.IsVisible())
{
@@ -395,10 +406,10 @@
GetClientSize(&cw, &ch);
r.SetY(0);
r.SetHeight(ch);
- snapsel.r = r;
- snapsel.Selected = TRUE;
+ snapsel.SetRectangle(r);
+ snapsel.SetSelected(true);
wxDC* pDc = new wxClientDC(this);
- snapsel.Draw(*pDc);
+ snapsel.Draw(*pDc, 0, 0);
}
@@ -452,16 +463,16 @@
DrawTicks(x, y, w);
}
- if (snapsel.Selected)
+ if (snapsel.IsSelected())
{
JZRectangle r;
r.SetX(Sample2Pixel(sel_fr));
r.SetWidth(Sample2Pixel(sel_to) - r.x);
r.SetY(0);
r.SetHeight(ch);
- snapsel.r = r;
+ snapsel.SetRectangle(r);
wxDC* pDc = new wxClientDC(this);
- snapsel.Draw(*pDc);
+ snapsel.Draw(*pDc, 0, 0);
}
else if (sel_fr > 0)
{
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/TrackWindow.cpp 2008-05-04 04:43:51 UTC (rev 483)
@@ -50,6 +50,8 @@
EVT_LEFT_DOWN(JZTrackWindow::OnLeftButtonDown)
+ EVT_MOTION(JZTrackWindow::OnMouseMove)
+
EVT_LEFT_UP(JZTrackWindow::OnLeftButtonUp)
EVT_RIGHT_UP(JZTrackWindow::OnRightButtonUp)
@@ -166,7 +168,7 @@
int scroll_clock = (mFromClock + 5 * mToClock) / 6;
if (
- !mpSnapSel->Active &&
+ !mpSnapSel->IsActive() &&
(Clock > scroll_clock || Clock < mFromClock) && Clock >= 0)
{
// Avoid permanent redraws when end of scroll range is reached.
@@ -181,7 +183,7 @@
SetXScrollPosition(x);
}
- if (!mpSnapSel->Active) // sets clipping
+ if (!mpSnapSel->IsActive()) // sets clipping
{
if (mPlayClock != Clock)
{
@@ -269,11 +271,24 @@
Point.y >= mEventsY && Point.y < mEventsY + mEventsHeight)
{
SnapSelectionStart(Event);
+ mpSnapSel->ButtonDown(Event);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+void JZTrackWindow::OnMouseMove(wxMouseEvent& Event)
+{
+ if (Event.LeftIsDown())
+ {
+ mpSnapSel->Dragging(Event);
+// SnapSelectionStop(Event);
+ Refresh(false);
+ }
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZTrackWindow::OnLeftButtonUp(wxMouseEvent& Event)
{
wxPoint Point = Event.GetPosition();
@@ -377,6 +392,8 @@
Point.x >= mEventsX && Point.x < mEventsX + mEventsWidth &&
Point.y >= mEventsY && Point.y < mEventsY + mEventsHeight)
{
+ mpSnapSel->ButtonUp(Event);
+
// The point is in event area.
SnapSelectionStop(Event);
}
@@ -633,9 +650,16 @@
LocalDc.SetPen(*wxBLACK_PEN);
ostringstream Oss;
Oss << BarInfo.GetBarIndex() + 1 - Intro;
- LocalDc.DrawText(Oss.str().c_str(), x + mLittleBit, mEventsY - mTrackHeight);
+ LocalDc.DrawText(
+ Oss.str().c_str(),
+ x + mLittleBit,
+ mEventsY - mTrackHeight);
LocalDc.SetPen(*wxGREY_PEN);
- LocalDc.DrawLine(x, mEventsY + 1 - mTrackHeight, x, mEventsY + mEventsHeight);
+ LocalDc.DrawLine(
+ x,
+ mEventsY + 1 - mTrackHeight,
+ x,
+ mEventsY + mEventsHeight);
}
else
{
@@ -741,7 +765,14 @@
DrawPlayPosition(LocalDc);
// Draw the selection box.
- mpSnapSel->Draw(LocalDc, mEventsX, mEventsY, mEventsWidth, mEventsHeight);
+ mpSnapSel->Draw(
+ LocalDc,
+ mScrolledX,
+ mScrolledY,
+ mEventsX,
+ mEventsY,
+ mEventsWidth,
+ mEventsHeight);
Dc.Blit(
0,
@@ -839,7 +870,10 @@
//-----------------------------------------------------------------------------
void JZTrackWindow::DrawPlayPosition(wxDC& Dc)
{
- if (!mpSnapSel->Active && mPlayClock >= mFromClock && mPlayClock < mToClock)
+ if (
+ !mpSnapSel->IsActive() &&
+ mPlayClock >= mFromClock &&
+ mPlayClock < mToClock)
{
Dc.SetBrush(*wxBLACK_BRUSH);
Dc.SetPen(*wxBLACK_PEN);
@@ -1179,7 +1213,7 @@
//-----------------------------------------------------------------------------
int JZTrackWindow::EventsSelected(const wxString& Message)
{
- if (!mpSnapSel->Selected)
+ if (!mpSnapSel->IsSelected())
{
wxMessageBox(Message, "Error", wxOK);
return 0;
@@ -1227,14 +1261,16 @@
Event.GetPosition(&x, &y);
gpProject->SetPlayPosition(x2BarClock(x));
gpProject->Mute((Event.RightDown() != 0));
- if (mpSnapSel->Selected && (Event.ShiftDown() || Event.MiddleDown()))
+ if (
+ mpSnapSel->IsSelected() &&
+ (Event.ShiftDown() || Event.MiddleDown()))
{
gpProject->SetLoop(true);
}
else
{
gpProject->SetLoop(false);
- mPreviouslyRecording = mpSnapSel->Selected;
+ mPreviouslyRecording = mpSnapSel->IsSelected();
}
break;
@@ -1281,7 +1317,7 @@
bool record = gpProject->mRecord;
// Is it possible to record?
- if (record && mpSnapSel->Selected)
+ if (record && mpSnapSel->IsSelected())
{
pRecInfo->mTrackIndex = mpFilter->FromTrack;
@@ -1315,7 +1351,7 @@
// Is it possible to loop?
int loop_clock = 0;
- if (loop && mpSnapSel->Selected)
+ if (loop && mpSnapSel->IsSelected())
{
mPreviousClock = mpFilter->FromClock;
loop_clock = mpFilter->ToClock;
@@ -1390,14 +1426,15 @@
//-----------------------------------------------------------------------------
void JZTrackWindow::SnapSelectionStop(wxMouseEvent& Event)
{
- if (mpSnapSel->Selected)
+ if (mpSnapSel->IsSelected())
{
- mpFilter->FromTrack = y2TrackIndex(mpSnapSel->r.y);
- mpFilter->ToTrack = y2TrackIndex(
- mpSnapSel->r.y + mpSnapSel->r.GetHeight() - 1);
- mpFilter->FromClock = x2BarClock(mpSnapSel->r.x + 1);
+ mpFilter->FromTrack = y2TrackIndex(mpSnapSel->GetRectangle().y);
+ mpFilter->ToTrack = y2TrackIndex(
+ mpSnapSel->GetRectangle().y +
+ mpSnapSel->GetRectangle().GetHeight() - 1);
+ mpFilter->FromClock = x2BarClock(mpSnapSel->GetRectangle().x + 1);
mpFilter->ToClock = x2BarClock(
- mpSnapSel->r.x + mpSnapSel->r.GetWidth() + 1);
+ mpSnapSel->GetRectangle().x + mpSnapSel->GetRectangle().GetWidth() + 1);
// NextWin->NewPosition(mpFilter->FromTrack, mpFilter->FromClock);
}
}
Modified: trunk/jazz/src/TrackWindow.h
===================================================================
--- trunk/jazz/src/TrackWindow.h 2008-05-04 04:35:13 UTC (rev 482)
+++ trunk/jazz/src/TrackWindow.h 2008-05-04 04:43:51 UTC (rev 483)
@@ -30,7 +30,6 @@
class JZSong;
class JZTrack;
class JZFilter;
-class tSnapSelection;
class wxFont;
enum TECounterModes
@@ -94,6 +93,8 @@
void OnLeftButtonDown(wxMouseEvent& Event);
+ void OnMouseMove(wxMouseEvent& Event);
+
void OnLeftButtonUp(wxMouseEvent& Event);
void OnRightButtonUp(wxMouseEvent& Event);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-05-04 04:35:15
|
Revision: 482
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=482&view=rev
Author: pstieber
Date: 2008-05-03 21:35:13 -0700 (Sat, 03 May 2008)
Log Message:
-----------
Updated old wxWidgets location.
Modified Paths:
--------------
branches/jazz-4.1.3/vc6/jazz32/jazz32.dsp
Modified: branches/jazz-4.1.3/vc6/jazz32/jazz32.dsp
===================================================================
--- branches/jazz-4.1.3/vc6/jazz32/jazz32.dsp 2008-05-03 18:44:15 UTC (rev 481)
+++ branches/jazz-4.1.3/vc6/jazz32/jazz32.dsp 2008-05-04 04:35:13 UTC (rev 482)
@@ -26,6 +26,7 @@
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
+F90=df.exe
MTL=midl.exe
RSC=rc.exe
@@ -43,17 +44,17 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O1 /I "\wx\include\base" /I "\wx\include\msw" /I "..\..\src" /I "..\..\mswin" /D "NDEBUG" /D "JAZZ" /D WIN95=1 /D "wx_msw" /D "WIN32" /D "_WINDOWS" /D "MSVC" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O1 /I "\ExternalPackages\wxMSW-1.6e-VC6\include\base" /I "\ExternalPackages\wxMSW-1.6e-VC6\include\msw" /I "..\..\src" /I "..\..\mswin" /D "NDEBUG" /D "JAZZ" /D WIN95=1 /D "wx_msw" /D "WIN32" /D "_WINDOWS" /D "MSVC" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x409 /i "\wx\include\msw" /i "\jazz-src-4.1.3\mswin" /i "\wx\contrib\fafa" /d "NDEBUG"
+# ADD RSC /l 0x409 /i "\ExternalPackages\wxMSW-1.6e-VC6\include\msw" /i "\ExternalPackages\wxMSW-1.6e-VC6\contrib\fafa" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 wx.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ctl3d32.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /libpath:"\wx\lib"
+# ADD LINK32 wx.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ctl3d32.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /libpath:"\ExternalPackages\wxMSW-1.6e-VC6\lib"
!ELSEIF "$(CFG)" == "jazz32 - Win32 Debug"
@@ -69,17 +70,17 @@
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\wx\include\base" /I "\wx\include\msw" /I "..\..\src" /I "..\..\mswin" /D "_DEBUG" /D "JAZZ" /D WIN95=1 /D "wx_msw" /D "WIN32" /D "_WINDOWS" /D "MSVC" /YX /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "\ExternalPackages\wxMSW-1.6e-VC6\include\base" /I "\ExternalPackages\wxMSW-1.6e-VC6\include\msw" /I "..\..\src" /I "..\..\mswin" /D "_DEBUG" /D "JAZZ" /D WIN95=1 /D "wx_msw" /D "WIN32" /D "_WINDOWS" /D "MSVC" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x409 /i "\wx\include\msw" /i "\jazz-src-4.1.3\mswin" /i "\wx\contrib\fafa" /d "_DEBUG"
+# ADD RSC /l 0x409 /i "\ExternalPackages\wxMSW-1.6e-VC6\include\msw" /i "\ExternalPackages\wxMSW-1.6e-VC6\contrib\fafa" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 wx.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ctl3d32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBC.lib" /pdbtype:sept /libpath:"\wx\lib"
+# ADD LINK32 wx.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ctl3d32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"LIBC.lib" /pdbtype:sept /libpath:"\ExternalPackages\wxMSW-1.6e-VC6\lib"
!ENDIF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-28 06:01:02
|
Revision: 479
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=479&view=rev
Author: pstieber
Date: 2008-04-27 23:00:52 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
1. Prefixed some data members with m.
2. Made some of the JZTrack data members private and added IsEditing.
3. Made some cosmetic indentation changes.
Modified Paths:
--------------
trunk/jazz/src/Player.cpp
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/mswin/WindowsPlayer.cpp
Modified: trunk/jazz/src/Player.cpp
===================================================================
--- trunk/jazz/src/Player.cpp 2008-04-28 01:30:56 UTC (rev 478)
+++ trunk/jazz/src/Player.cpp 2008-04-28 06:00:52 UTC (rev 479)
@@ -648,11 +648,11 @@
void JZPlayer::OutNow(JZTrack *t, tParam *r)
{
- OutNow(t, &r->Msb);
- OutNow(t, &r->Lsb);
- OutNow(t, &r->DataMsb);
- OutNow(t, &r->ResetMsb);
- OutNow(t, &r->ResetLsb);
+ OutNow(t, &r->mMsb);
+ OutNow(t, &r->mLsb);
+ OutNow(t, &r->mDataMsb);
+ OutNow(t, &r->mResetMsb);
+ OutNow(t, &r->mResetLsb);
}
// ----------------------------------------------------------------------------------------------
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2008-04-28 01:30:56 UTC (rev 478)
+++ trunk/jazz/src/Track.cpp 2008-04-28 06:00:52 UTC (rev 479)
@@ -37,20 +37,20 @@
int tParam::Write(JZWriteBase& Io)
{
- return Msb.Write(Io) + Lsb.Write(Io) + DataMsb.Write(Io);
+ return mMsb.Write(Io) + mLsb.Write(Io) + mDataMsb.Write(Io);
}
void tParam::SetCha(unsigned char cha)
{
- Msb.Channel = cha;
- Lsb.Channel = cha;
- DataMsb.Channel = cha;
+ mMsb.Channel = cha;
+ mLsb.Channel = cha;
+ mDataMsb.Channel = cha;
#ifdef OBSOLETE
- ResetMb.Channel = cha; //???? JAVE commented out this while porting
+ mResetMb.Channel = cha; //???? JAVE commented out this while porting
#endif // OBSOLETE
- ResetLsb.Channel = cha;
+ mResetLsb.Channel = cha;
}
/*
@@ -246,14 +246,14 @@
}
tDrumInstrumentParameter::tDrumInstrumentParameter(tNrpn *par)
- : pitch(par->Lsb.mValue),
- next(0)
+ : mPitch(par->mLsb.mValue),
+ mpNext(0)
{
for (int i = drumPitchIndex; i < numDrumParameters; i++)
{
param[i] = 0;
}
- param[drumParam2Index(par->Msb.mValue)] = par;
+ param[drumParam2Index(par->mMsb.mValue)] = par;
}
tNrpn *tDrumInstrumentParameter::Get(int index)
@@ -264,17 +264,17 @@
void tDrumInstrumentParameter::Put(tNrpn *par)
{
- param[par->Lsb.mValue] = par;
+ param[par->mLsb.mValue] = par;
}
tDrumInstrumentParameter *tDrumInstrumentParameter::Next()
{
- return next;
+ return mpNext;
}
int tDrumInstrumentParameter::Pitch()
{
- return pitch;
+ return mPitch;
}
tDrumInstrumentParameter
@@ -283,11 +283,11 @@
tDrumInstrumentParameter *ptr = list;
while (ptr)
{
- if (ptr->pitch == pit)
+ if (ptr->mPitch == pit)
{
break;
}
- ptr = ptr->next;
+ ptr = ptr->mpNext;
}
return ptr;
}
@@ -304,16 +304,16 @@
void tDrumInstrumentParameterList::PutParam(tNrpn *par)
{
- tDrumInstrumentParameter* ptr = GetElem(par->Lsb.mValue);
+ tDrumInstrumentParameter* ptr = GetElem(par->mLsb.mValue);
if (!ptr)
{
ptr = new tDrumInstrumentParameter(par);
- ptr ->next = list;
+ ptr->mpNext = list;
list = ptr;
}
else
{
- ptr->param[drumParam2Index(par->Msb.mValue)] = par;
+ ptr->param[drumParam2Index(par->mMsb.mValue)] = par;
}
}
@@ -344,21 +344,21 @@
tDrumInstrumentParameter *prev = 0;
while (ptr)
{
- if (ptr->pitch == pit)
+ if (ptr->mPitch == pit)
{
if (prev)
{
- prev->next = ptr->next;
+ prev->mpNext = ptr->mpNext;
}
else
{
- list = ptr->next;
+ list = ptr->mpNext;
}
delete ptr;
break;
}
prev = ptr;
- ptr = ptr->next;
+ ptr = ptr->mpNext;
}
}
@@ -372,10 +372,10 @@
{
if (cur)
{
- tDrumInstrumentParameter *ptr = GetElem(cur->pitch);
+ tDrumInstrumentParameter *ptr = GetElem(cur->mPitch);
if (ptr)
{
- return ptr->next;
+ return ptr->mpNext;
}
else
{
@@ -393,7 +393,7 @@
tDrumInstrumentParameter *ptr = list;
while (ptr)
{
- list = ptr->next;
+ list = ptr->mpNext;
delete ptr;
ptr = list;
}
@@ -1714,7 +1714,7 @@
void tTrackDlg::OnCancel()
{
- trk->DialogBox = 0;
+ trk->mpDialog = 0;
TrackWin->Redraw();
wxForm::OnCancel();
}
@@ -1726,8 +1726,8 @@
void tTrackDlg::OnOk()
{
- trk->DialogBox->GetPosition(&Config(C_TrackDlgXpos), &Config(C_TrackDlgYpos));
- trk->DialogBox = 0;
+ trk->mpDialog->GetPosition(&Config(C_TrackDlgXpos), &Config(C_TrackDlgYpos));
+ trk->mpDialog = 0;
trk->SetAudioMode(AudioMode);
if (ClearTrack)
@@ -1907,7 +1907,7 @@
JZTrackDialog TrackDialog(*this, pParent);
TrackDialog.ShowModal();
#ifdef OBSOLETE
- DialogBox = new wxDialogBox(
+ mpDialog = new wxDialogBox(
pParent,
"Track Settings",
modal,
@@ -1916,26 +1916,47 @@
#endif // OBSOLETE
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+bool JZTrack::IsEditing() const
+{
+ if (mpDialog)
+ {
+ return (mpDialog->GetHandle() != 0);
+ }
+ return false;
+}
-// ***********************************************************************
-// JZTrack
-// ***********************************************************************
+//*****************************************************************************
+// Description:
+// This is the track class definition.
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+bool JZTrack::mChanged = false;
-
-bool JZTrack::changed = false;
-
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
JZTrack::JZTrack()
- : tEventArray()
+ : tEventArray(),
+ mUndoIndex(0),
+ mRedoCount(0),
+ mUndoCount(0),
+ mpDialog(0)
{
- iUndo = 0;
- nRedo = 0;
- nUndo = 0;
- DialogBox = 0;
ForceChannel = 1;
}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZTrack::~JZTrack()
+{
+ Clear();
+}
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
bool JZTrack::IsDrumTrack()
{
return Channel == gpConfig->GetValue(C_DrumChannel);
@@ -1999,9 +2020,9 @@
void JZTrack::Undo()
{
- if (nUndo > 0)
+ if (mUndoCount > 0)
{
- tUndoBuffer *undo = &UndoBuffers[iUndo];
+ tUndoBuffer *undo = &mUndoBuffers[mUndoIndex];
for (int i = undo->nEvents - 1; i >= 0; i--)
{
JZEvent *e = undo->Events[i];
@@ -2019,19 +2040,19 @@
}
tEventArray::Cleanup(TRUE);
- iUndo = (iUndo - 1 + MaxUndo) % MaxUndo;
- nUndo--;
- nRedo++;
+ mUndoIndex = (mUndoIndex - 1 + MaxUndo) % MaxUndo;
+ --mUndoCount;
+ ++mRedoCount;
}
}
void JZTrack::Redo()
{
- if (nRedo > 0)
+ if (mRedoCount > 0)
{
- iUndo = (iUndo + 1) % MaxUndo;
+ mUndoIndex = (mUndoIndex + 1) % MaxUndo;
- tUndoBuffer *undo = &UndoBuffers[iUndo];
+ tUndoBuffer *undo = &mUndoBuffers[mUndoIndex];
for (int i = 0; i < undo->nEvents; i++)
{
JZEvent *e = undo->Events[i];
@@ -2049,23 +2070,23 @@
}
tEventArray::Cleanup(TRUE);
- nRedo--;
- nUndo++;
+ --mRedoCount;
+ ++mUndoCount;
}
}
void JZTrack::NewUndoBuffer()
{
- nRedo = 0;
- nUndo++;
- if (nUndo > MaxUndo)
+ mRedoCount = 0;
+ ++mUndoCount;
+ if (mUndoCount > MaxUndo)
{
- nUndo = MaxUndo;
+ mUndoCount = MaxUndo;
}
- iUndo = (iUndo + 1) % MaxUndo;
- UndoBuffers[iUndo].Clear();
+ mUndoIndex = (mUndoIndex + 1) % MaxUndo;
+ mUndoBuffers[mUndoIndex].Clear();
};
@@ -2073,7 +2094,7 @@
{
for (int i = 0; i < MaxUndo; i++)
{
- UndoBuffers[i].Clear();
+ mUndoBuffers[i].Clear();
}
State = tsPlay;
tEventArray::Clear();
@@ -2372,7 +2393,7 @@
mpBank2->Control,
mpBank2->Value);
)
- changed = true;
+ mChanged = true;
}
}
@@ -2398,7 +2419,7 @@
{
mPatch = new tProgram(0, Channel - 1, PatchNr - 1);
gpMidiPlayer->OutNow(this, mPatch);
- changed = true;
+ mChanged = true;
}
}
@@ -2425,7 +2446,7 @@
{
VibRate = new tNrpn(0, Channel - 1, 0x01, 0x08, Value - 1);
gpMidiPlayer->OutNow(this, VibRate);
- changed = true;
+ mChanged = true;
}
}
@@ -2451,7 +2472,7 @@
{
VibDepth = new tNrpn(0, Channel - 1, 0x01, 0x09, Value - 1);
gpMidiPlayer->OutNow(this, VibDepth);
- changed = true;
+ mChanged = true;
}
}
@@ -2478,7 +2499,7 @@
{
VibDelay = new tNrpn(0, Channel - 1, 0x01, 0x0a, Value - 1);
gpMidiPlayer->OutNow(this, VibDelay);
- changed = true;
+ mChanged = true;
}
}
@@ -2505,7 +2526,7 @@
{
Cutoff = new tNrpn(0, Channel - 1, 0x01, 0x20, Value - 1);
gpMidiPlayer->OutNow(this, Cutoff);
- changed = true;
+ mChanged = true;
}
}
@@ -2532,7 +2553,7 @@
{
Resonance = new tNrpn(0, Channel - 1, 0x01, 0x21, Value - 1);
gpMidiPlayer->OutNow(this, Resonance);
- changed = true;
+ mChanged = true;
}
}
@@ -2559,7 +2580,7 @@
{
EnvAttack = new tNrpn(0, Channel - 1, 0x01, 0x63, Value - 1);
gpMidiPlayer->OutNow(this, EnvAttack);
- changed = true;
+ mChanged = true;
}
}
@@ -2586,7 +2607,7 @@
{
EnvDecay = new tNrpn(0, Channel - 1, 0x01, 0x64, Value - 1);
gpMidiPlayer->OutNow(this, EnvDecay);
- changed = true;
+ mChanged = true;
}
}
@@ -2613,7 +2634,7 @@
{
EnvRelease = new tNrpn(0, Channel - 1, 0x01, 0x66, Value - 1);
gpMidiPlayer->OutNow(this, EnvRelease);
- changed = true;
+ mChanged = true;
}
}
@@ -2640,7 +2661,7 @@
DrumParams.PutParam(
new tNrpn(0, Channel - 1, drumIndex2Param(index), pitch, Value - 1));
gpMidiPlayer->OutNow(this, DrumParams.GetParam(pitch, index));
- changed = true;
+ mChanged = true;
}
}
@@ -2666,8 +2687,8 @@
if (Value > 0)
{
BendPitchSens = new tRpn(0, Channel - 1, 0x00, 0x00, Value - 1);
- gpMidiPlayer->OutNow(this, BendPitchSens);
- changed = true;
+ gpMidiPlayer->OutNow(this, BendPitchSens);
+ mChanged = true;
}
}
Modified: trunk/jazz/src/Track.h
===================================================================
--- trunk/jazz/src/Track.h 2008-04-28 01:30:56 UTC (rev 478)
+++ trunk/jazz/src/Track.h 2008-04-28 06:00:52 UTC (rev 479)
@@ -36,14 +36,41 @@
#define tsSolo 2
// Mixer-defs
-enum { MxVol = 0, MxPan, MxRev, MxCho, MxParams };
+enum
+{
+ MxVol = 0,
+ MxPan,
+ MxRev,
+ MxCho,
+ MxParams
+};
-
// Param (Nrpn / Rpn) things
-enum { NrpnVibRate = 0, NrpnVibDepth, NrpnVibDelay, NrpnVibParams };
-enum { NrpnCutoff = 0, NrpnResonance, NrpnSoundParams };
-enum { NrpnEnvAttack = 0, NrpnEnvDecay, NrpnEnvRelease, NrpnEnvParams };
+enum
+{
+ NrpnVibRate = 0,
+ NrpnVibDepth,
+ NrpnVibDelay,
+ NrpnVibParams
+};
+enum
+{
+ NrpnCutoff = 0,
+ NrpnResonance,
+ NrpnSoundParams
+};
+
+enum
+{
+ NrpnEnvAttack = 0,
+ NrpnEnvDecay,
+ NrpnEnvRelease,
+ NrpnEnvParams
+};
+
+//*****************************************************************************
+//*****************************************************************************
class tParam
{
public:
@@ -56,11 +83,11 @@
unsigned char id2,
unsigned char lsb,
unsigned char msbval)
- : Msb( clk, cha, id1, msb ),
- Lsb( clk, cha, id2, lsb ),
- DataMsb( clk, cha, 0x06, msbval ),
- ResetMsb( clk, cha, id1, 0x7f ),
- ResetLsb( clk, cha, id2, 0x7f )
+ : mMsb(clk, cha, id1, msb),
+ mLsb(clk, cha, id2, lsb),
+ mDataMsb(clk, cha, 0x06, msbval),
+ mResetMsb(clk, cha, id1, 0x7f),
+ mResetLsb(clk, cha, id2, 0x7f)
{
}
@@ -69,19 +96,23 @@
}
virtual int Write(JZWriteBase& Io);
- virtual void SetCha( unsigned char cha );
+
+ virtual void SetCha(unsigned char cha);
+
virtual int GetVal()
{
- return DataMsb.mValue;
+ return mDataMsb.mValue;
}
- tControl Msb;
- tControl Lsb;
- tControl DataMsb;
- tControl ResetMsb;
- tControl ResetLsb;
+ tControl mMsb;
+ tControl mLsb;
+ tControl mDataMsb;
+ tControl mResetMsb;
+ tControl mResetLsb;
};
+//*****************************************************************************
+//*****************************************************************************
class tNrpn : public tParam
{
public:
@@ -97,6 +128,8 @@
}
};
+//*****************************************************************************
+//*****************************************************************************
class tRpn : public tParam
{
public:
@@ -123,56 +156,133 @@
enum ModulationSysexParameter
{
- mspModPitchControl = 0, mspModTvfCut, mspModAmpl, mspModLfo1Rate,
- mspModLfo1Pitch, mspModLfo1Tvf, mspModLfo1Tva, mspModLfo2Rate,
- mspModLfo2Pitch, mspModLfo2Tvf, mspModLfo2Tva, mspModulationSysexParameters
+ mspModPitchControl = 0,
+ mspModTvfCut,
+ mspModAmpl,
+ mspModLfo1Rate,
+ mspModLfo1Pitch,
+ mspModLfo1Tvf,
+ mspModLfo1Tva,
+ mspModLfo2Rate,
+ mspModLfo2Pitch,
+ mspModLfo2Tvf,
+ mspModLfo2Tva,
+ mspModulationSysexParameters
};
-enum BenderSysexParameter {
- bspBendPitchControl = 0, bspBendTvfCut, bspBendAmpl, bspBendLfo1Rate,
- bspBendLfo1Pitch, bspBendLfo1Tvf, bspBendLfo1Tva, bspBendLfo2Rate,
- bspBendLfo2Pitch, bspBendLfo2Tvf, bspBendLfo2Tva, bspBenderSysexParameters
+enum BenderSysexParameter
+{
+ bspBendPitchControl = 0,
+ bspBendTvfCut,
+ bspBendAmpl,
+ bspBendLfo1Rate,
+ bspBendLfo1Pitch,
+ bspBendLfo1Tvf,
+ bspBendLfo1Tva,
+ bspBendLfo2Rate,
+ bspBendLfo2Pitch,
+ bspBendLfo2Tvf,
+ bspBendLfo2Tva,
+ bspBenderSysexParameters
};
-enum CAfSysexParameter {
- cspCAfPitchControl = 0, cspCAfTvfCut, cspCAfAmpl, cspCAfLfo1Rate,
- cspCAfLfo1Pitch, cspCAfLfo1Tvf, cspCAfLfo1Tva, cspCAfLfo2Rate,
- cspCAfLfo2Pitch, cspCAfLfo2Tvf, cspCAfLfo2Tva, cspCAfSysexParameters
+enum CAfSysexParameter
+{
+ cspCAfPitchControl = 0,
+ cspCAfTvfCut,
+ cspCAfAmpl,
+ cspCAfLfo1Rate,
+ cspCAfLfo1Pitch,
+ cspCAfLfo1Tvf,
+ cspCAfLfo1Tva,
+ cspCAfLfo2Rate,
+ cspCAfLfo2Pitch,
+ cspCAfLfo2Tvf,
+ cspCAfLfo2Tva,
+ cspCAfSysexParameters
};
-enum PAfSysexParameter {
- pspPAfPitchControl = 0, pspPAfTvfCut, pspPAfAmpl, pspPAfLfo1Rate,
- pspPAfLfo1Pitch, pspPAfLfo1Tvf, pspPAfLfo1Tva, pspPAfLfo2Rate,
- pspPAfLfo2Pitch, pspPAfLfo2Tvf, pspPAfLfo2Tva, pspPAfSysexParameters
+enum PAfSysexParameter
+{
+ pspPAfPitchControl = 0,
+ pspPAfTvfCut,
+ pspPAfAmpl,
+ pspPAfLfo1Rate,
+ pspPAfLfo1Pitch,
+ pspPAfLfo1Tvf,
+ pspPAfLfo1Tva,
+ pspPAfLfo2Rate,
+ pspPAfLfo2Pitch,
+ pspPAfLfo2Tvf,
+ pspPAfLfo2Tva,
+ pspPAfSysexParameters
};
-enum CC1SysexParameter {
- cspCC1PitchControl = 0, cspCC1TvfCut, cspCC1Ampl, cspCC1Lfo1Rate,
- cspCC1Lfo1Pitch, cspCC1Lfo1Tvf, cspCC1Lfo1Tva, cspCC1Lfo2Rate,
- cspCC1Lfo2Pitch, cspCC1Lfo2Tvf, cspCC1Lfo2Tva, cspCC1SysexParameters
+enum CC1SysexParameter
+{
+ cspCC1PitchControl = 0,
+ cspCC1TvfCut,
+ cspCC1Ampl,
+ cspCC1Lfo1Rate,
+ cspCC1Lfo1Pitch,
+ cspCC1Lfo1Tvf,
+ cspCC1Lfo1Tva,
+ cspCC1Lfo2Rate,
+ cspCC1Lfo2Pitch,
+ cspCC1Lfo2Tvf,
+ cspCC1Lfo2Tva,
+ cspCC1SysexParameters
};
-enum CC2SysexParameter {
- cspCC2PitchControl = 0, cspCC2TvfCut, cspCC2Ampl, cspCC2Lfo1Rate,
- cspCC2Lfo1Pitch, cspCC2Lfo1Tvf, cspCC2Lfo1Tva, cspCC2Lfo2Rate,
- cspCC2Lfo2Pitch, cspCC2Lfo2Tvf, cspCC2Lfo2Tva, cspCC2SysexParameters
+enum CC2SysexParameter
+{
+ cspCC2PitchControl = 0,
+ cspCC2TvfCut,
+ cspCC2Ampl,
+ cspCC2Lfo1Rate,
+ cspCC2Lfo1Pitch,
+ cspCC2Lfo1Tvf,
+ cspCC2Lfo1Tva,
+ cspCC2Lfo2Rate,
+ cspCC2Lfo2Pitch,
+ cspCC2Lfo2Tvf,
+ cspCC2Lfo2Tva,
+ cspCC2SysexParameters
};
-enum ReverbSysexParameter {
- rspRevCharacter = 0, rspRevPreLpf, rspRevLevel, rspRevTime,
- rspRevDelayFeedback, rspRevSendChorus, rspReverbSysexParameters
+enum ReverbSysexParameter
+{
+ rspRevCharacter = 0,
+ rspRevPreLpf,
+ rspRevLevel,
+ rspRevTime,
+ rspRevDelayFeedback,
+ rspRevSendChorus,
+ rspReverbSysexParameters
};
-enum ChorusSysexParameter {
- cspChoPreLpf = 0, cspChoLevel, cspChoFeedback, cspChoDelay,
- cspChoRate, cspChoDepth, cspChoSendReverb, cspChorusSysexParameters
+enum ChorusSysexParameter
+{
+ cspChoPreLpf = 0,
+ cspChoLevel,
+ cspChoFeedback,
+ cspChoDelay,
+ cspChoRate,
+ cspChoDepth,
+ cspChoSendReverb,
+ cspChorusSysexParameters
};
-enum ModeSysexParameter {
- mspRxChannel = 0x02, mspRxCAf = 0x04, mspRxPAf = 0x07, mspUseForRhythm = 0x15
+enum ModeSysexParameter
+{
+ mspRxChannel = 0x02,
+ mspRxCAf = 0x04,
+ mspRxPAf = 0x07,
+ mspUseForRhythm = 0x15
};
-enum DrumInstrumentParameter {
+enum DrumInstrumentParameter
+{
drumPitch = 0x18,
drumTva = 0x1a,
drumPan = 0x1c,
@@ -180,7 +290,8 @@
drumChorus = 0x1e
};
-enum DrumInstrumentParameterIndex {
+enum DrumInstrumentParameterIndex
+{
drumPitchIndex = 0,
drumTvaIndex,
drumPanIndex,
@@ -189,34 +300,42 @@
numDrumParameters
};
-int drumParam2Index( int par );
-int drumIndex2Param( int index );
+int drumParam2Index(int par);
+int drumIndex2Param(int index);
class tDrumInstrumentParameterList;
+//*****************************************************************************
+//*****************************************************************************
class tDrumInstrumentParameter
{
-
friend class tDrumInstrumentParameterList;
- private:
- int pitch;
- tNrpn *param[numDrumParameters];
- tDrumInstrumentParameter *next;
public:
+
tDrumInstrumentParameter( tNrpn *par );
tNrpn *Get( int index );
void Put( tNrpn *par );
tDrumInstrumentParameter *Next();
int Pitch();
+
+ private:
+
+ int mPitch;
+ tNrpn* param[numDrumParameters];
+ tDrumInstrumentParameter* mpNext;
};
+//*****************************************************************************
+//*****************************************************************************
class tDrumInstrumentParameterList
{
- private:
- tDrumInstrumentParameter *list;
public:
- tDrumInstrumentParameterList() : list(0) {}
+
+ tDrumInstrumentParameterList()
+ : list(0)
+ {
+ }
tDrumInstrumentParameter *GetElem( int pit );
tNrpn *GetParam( int pit, int index );
void PutParam( tNrpn *par );
@@ -225,14 +344,30 @@
tDrumInstrumentParameter *NextElem( tDrumInstrumentParameter *cur );
void DelElem( int pit );
void Clear();
- int IsEmpty() { return( list == 0 ); }
+ int IsEmpty()
+ {
+ return( list == 0 );
+ }
+
+ private:
+
+ tDrumInstrumentParameter* list;
};
-enum tMtcType { Mtc24 = 0, Mtc25, Mtc30Df, Mtc30Ndf };
+enum tMtcType
+{
+ Mtc24 = 0,
+ Mtc25,
+ Mtc30Df,
+ Mtc30Ndf
+};
+//*****************************************************************************
+//*****************************************************************************
class tMtcTime
{
public:
+
tMtcType type;
int hour;
int min;
@@ -249,6 +384,8 @@
};
+//*****************************************************************************
+//*****************************************************************************
class tSimpleEventArray : public wxObject
{
public:
@@ -282,6 +419,8 @@
};
+//*****************************************************************************
+//*****************************************************************************
class tUndoBuffer : public tSimpleEventArray
{
friend class JZTrack;
@@ -289,10 +428,11 @@
public:
virtual void Clear();
- void Put(JZEvent *e, int killed)
+
+ void Put(JZEvent* pEvent, int killed)
{
bits.set(nEvents, killed);
- tSimpleEventArray::Put(e);
+ tSimpleEventArray::Put(pEvent);
}
private:
@@ -301,6 +441,8 @@
};
+//*****************************************************************************
+//*****************************************************************************
class tEventArray : public tSimpleEventArray
{
friend class tEventIterator;
@@ -402,41 +544,42 @@
};
-
#define MaxUndo 20
+//*****************************************************************************
+// Description:
+// This is the track class declaration.
+//*****************************************************************************
class JZTrack : public tEventArray
{
public:
- static bool changed;
+ static bool mChanged;
JZTrack();
- ~JZTrack() { Clear(); }
+ virtual ~JZTrack();
+
bool IsDrumTrack();
- int iUndo; // index to actual undo buffer
- int nRedo; // current number of possible redo's
- int nUndo; // current number of possible undo's
- tUndoBuffer UndoBuffers[MaxUndo];
+ public:
- wxDialog *DialogBox;
+ void Dialog(JZTrackWindow* pParent);
- void Dialog(JZTrackWindow *parent);
+ bool IsEditing() const;
- void Put(JZEvent *e)
+ void Put(JZEvent* pEvent)
{
- changed = true;
- tEventArray::Put(e);
- UndoBuffers[iUndo].Put(e, 0);
+ mChanged = true;
+ tEventArray::Put(pEvent);
+ mUndoBuffers[mUndoIndex].Put(pEvent, 0);
}
- void Kill(JZEvent *e)
+ void Kill(JZEvent* pEvent)
{
- changed = true;
- e->Kill();
- UndoBuffers[iUndo].Put(e, 1);
+ mChanged = true;
+ pEvent->Kill();
+ mUndoBuffers[mUndoIndex].Put(pEvent, 1);
}
void Merge(tEventArray *other);
@@ -508,7 +651,7 @@
int GetEnvRelease();
void SetEnvRelease(int EnvRelease);
- int GetDrumParam( int pitch, int index );
+ int GetDrumParam(int pitch, int index);
void SetDrumParam(int pitch, int index, int Value);
int GetBendPitchSens();
@@ -577,95 +720,111 @@
tMtcTime* GetMtcOffset();
void SetMtcOffset( tMtcTime* mtc );
+
+ private:
+
+ // Index in the actual undo buffer.
+ int mUndoIndex;
+
+ // Current number of possible redo's.
+ int mRedoCount;
+
+ // Current number of possible undo's.
+ int mUndoCount;
+
+ tUndoBuffer mUndoBuffers[MaxUndo];
+
+ wxDialog* mpDialog;
};
-// ***********************************************************************
-// tEventIterator
-// *********************************************************************
-
+//*****************************************************************************
+// Description:
+// This is the event iterator class declaration.
+//*****************************************************************************
class tEventIterator
{
- const tSimpleEventArray* Track;
- int Start, Stop, Actual;
-
public:
- tEventIterator(const tSimpleEventArray* t)
+ tEventIterator(const tSimpleEventArray* pTrack)
{
- Track = t;
- Start = 0;
- Stop = Track->nEvents;
- Actual = Start;
+ mpTrack = pTrack;
+ mStart = 0;
+ mStop = mpTrack->nEvents;
+ mActual = mStart;
}
-
- JZEvent *GreaterEqual(int Clock)
+ JZEvent* GreaterEqual(int Clock)
{
- int lo = Start;
- int hi = Stop;
- int clk = 0;
- while (lo < hi)
+ int Lo = mStart;
+ int Hi = mStop;
+ int TestClock = 0;
+ while (Lo < Hi)
{
- Actual = (hi + lo) / 2;
- clk = Track->Events[Actual]->GetClock();
- if (clk < Clock)
+ mActual = (Hi + Lo) / 2;
+ TestClock = mpTrack->Events[mActual]->GetClock();
+ if (TestClock < Clock)
{
- lo = Actual + 1;
+ Lo = mActual + 1;
}
else
{
- hi = Actual;
+ Hi = mActual;
}
}
- if (Actual < Stop-1 && clk < Clock)
+ if (mActual < mStop - 1 && TestClock < Clock)
{
- clk = Track->Events[++Actual]->GetClock();
+ TestClock = mpTrack->Events[++mActual]->GetClock();
}
- if (Actual < Stop && clk >= Clock)
+ if (mActual < mStop && TestClock >= Clock)
{
- return Track->Events[Actual];
+ return mpTrack->Events[mActual];
}
return 0;
}
-
- JZEvent *First(int Clock = 0)
+ JZEvent* First(int Clock = 0)
{
- Actual = Start;
+ mActual = mStart;
return GreaterEqual(Clock);
}
-
- JZEvent *Range(int frClock, unsigned toClock)
+ JZEvent* Range(int FromClock, unsigned ToClock)
{
- Start = Actual = 0;
- Stop = Track->nEvents;
+ mStart = mActual = 0;
+ mStop = mpTrack->nEvents;
- if (!GreaterEqual(frClock))
+ if (!GreaterEqual(FromClock))
+ {
return 0;
- Start = Actual;
- if (GreaterEqual(toClock))
- Stop = Actual;
- Actual = Start;
- return (Actual < Stop ? Track->Events[Actual] : 0);
+ }
+ mStart = mActual;
+ if (GreaterEqual(ToClock))
+ {
+ mStop = mActual;
+ }
+ mActual = mStart;
+ return (mActual < mStop ? mpTrack->Events[mActual] : 0);
}
-
- JZEvent *Next()
+ JZEvent* Next()
{
- if (Actual < Stop)
+ if (mActual < mStop)
{
- ++Actual;
+ ++mActual;
}
- return (Actual < Stop ? Track->Events[Actual] : 0);
+ return (mActual < mStop ? mpTrack->Events[mActual] : 0);
}
int EventsLeft()
{
- return Stop - Actual;
+ return mStop - mActual;
}
+ private:
+
+ const tSimpleEventArray* mpTrack;
+ int mStart, mStop, mActual;
};
#endif // !defined(JZ_TRACK_H)
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2008-04-28 01:30:56 UTC (rev 478)
+++ trunk/jazz/src/TrackWindow.cpp 2008-04-28 06:00:52 UTC (rev 479)
@@ -685,14 +685,28 @@
mEventsHeight);
// Draw the track name.
- if (pTrack->DialogBox)
+ if (pTrack->IsEditing())
{
// Show the button pressed when the dialog box is open.
- LineText(LocalDc, mTrackNameX, y, mTrackNameWidth, pTrack->GetName(), -1, true);
+ LineText(
+ LocalDc,
+ mTrackNameX,
+ y,
+ mTrackNameWidth,
+ pTrack->GetName(),
+ -1,
+ true);
}
else
{
- LineText(LocalDc, mTrackNameX, y, mTrackNameWidth, pTrack->GetName(), -1, false);
+ LineText(
+ LocalDc,
+ mTrackNameX,
+ y,
+ mTrackNameWidth,
+ pTrack->GetName(),
+ -1,
+ false);
}
// Draw the track status.
Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp
===================================================================
--- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-28 01:30:56 UTC (rev 478)
+++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-28 06:00:52 UTC (rev 479)
@@ -506,11 +506,11 @@
//-----------------------------------------------------------------------------
void JZWindowsPlayer::OutNow(tParam *r)
{
- OutNow(&r->Msb);
- OutNow(&r->Lsb);
- OutNow(&r->DataMsb);
- OutNow(&r->ResetMsb);
- OutNow(&r->ResetLsb);
+ OutNow(&r->mMsb);
+ OutNow(&r->mLsb);
+ OutNow(&r->mDataMsb);
+ OutNow(&r->mResetMsb);
+ OutNow(&r->mResetLsb);
}
//-----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-28 01:31:06
|
Revision: 478
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=478&view=rev
Author: pstieber
Date: 2008-04-27 18:30:56 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
Added a MIDI channel knob control.
Modified Paths:
--------------
trunk/jazz/src/Dialogs/TrackDialog.cpp
trunk/jazz/src/Dialogs/TrackDialog.h
Modified: trunk/jazz/src/Dialogs/TrackDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-04-28 01:27:11 UTC (rev 477)
+++ trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-04-28 01:30:56 UTC (rev 478)
@@ -21,14 +21,30 @@
#include "WxWidgets.h"
#include "TrackDialog.h"
+#include "../Knob.h"
#include "../Track.h"
#include "../Configuration.h"
#include "../Globals.h"
+#include "../Resources.h"
+#include <sstream>
+
using namespace std;
//*****************************************************************************
//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+BEGIN_EVENT_TABLE(JZTrackDialog, wxDialog)
+
+ EVT_KNOB_CHANGED(IDC_KB_CHANNEL, JZTrackDialog::OnChannelChange)
+
+ EVT_BUTTON(wxID_HELP, JZTrackDialog::OnHelp)
+
+END_EVENT_TABLE()
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
JZTrackDialog::JZTrackDialog(JZTrack& Track, wxWindow* pParent)
: wxDialog(pParent, wxID_ANY, wxString("Track Settings")),
mTrack(Track),
@@ -73,6 +89,10 @@
}
}
+ mpChannelValue = new wxStaticText(this, wxID_ANY, "00");
+
+ mpChannelKnob = new JZKnob(this, IDC_KB_CHANNEL, 0, 1, 16);
+
wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK");
wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel");
wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help");
@@ -94,6 +114,21 @@
4);
pTopSizer->Add(mpPatchListBox, 0, wxGROW | wxALL, 4);
+ wxFlexGridSizer* pFlexGridSizer = new wxFlexGridSizer(1, 3, 4, 2);
+
+ pFlexGridSizer->Add(
+ new wxStaticText(this, wxID_ANY, "Channel:"),
+ 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pFlexGridSizer->Add(
+ mpChannelValue,
+ 0,
+ wxALIGN_CENTER_VERTICAL | wxFIXED_MINSIZE);
+ pFlexGridSizer->Add(mpChannelKnob, 0, wxALIGN_CENTER_VERTICAL);
+
+ pTopSizer->Add(pFlexGridSizer, 0, wxCENTER | wxALL, 2);
+
+
wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL);
pButtonSizer->Add(pOkButton, 0, wxALL, 5);
pButtonSizer->Add(pCancelButton, 0, wxALL, 5);
@@ -117,6 +152,13 @@
int PatchIndex = mTrack.GetPatch() + (mTrack.GetBank() << 8);
mpPatchListBox->SetSelection(PatchIndex);
+ ostringstream Oss;
+
+ Oss << (int)mTrack.Channel;
+ mpChannelValue->SetLabel(Oss.str().c_str());
+
+ mpChannelKnob->SetValue(mTrack.Channel);
+
return true;
}
@@ -134,7 +176,25 @@
int Bank = (Selection & 0x0000ff00) >> 8;
mTrack.SetPatch(Patch);
mTrack.SetBank(Bank);
+ mTrack.Channel = mpChannelKnob->GetValue();
}
return true;
}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZTrackDialog::OnChannelChange(JZKnobEvent& Event)
+{
+ int Value = Event.GetValue();
+ ostringstream Oss;
+ Oss << Value;
+ mpChannelValue->SetLabel(Oss.str().c_str());
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZTrackDialog::OnHelp(wxCommandEvent& Event)
+{
+// gpHelpInstance->ShowTopic("Track Dialog");
+}
Modified: trunk/jazz/src/Dialogs/TrackDialog.h
===================================================================
--- trunk/jazz/src/Dialogs/TrackDialog.h 2008-04-28 01:27:11 UTC (rev 477)
+++ trunk/jazz/src/Dialogs/TrackDialog.h 2008-04-28 01:30:56 UTC (rev 478)
@@ -23,6 +23,9 @@
class JZTrack;
class wxTextCtrl;
+class wxStaticText;
+class JZKnobEvent;
+class JZKnob;
//*****************************************************************************
//*****************************************************************************
@@ -38,6 +41,10 @@
virtual bool TransferDataFromWindow();
+ void OnChannelChange(JZKnobEvent& Event);
+
+ void OnHelp(wxCommandEvent& Event);
+
private:
JZTrack& mTrack;
@@ -45,6 +52,12 @@
wxTextCtrl* mpTrackNameEdit;
wxListBox* mpPatchListBox;
+
+ wxStaticText* mpChannelValue;
+
+ JZKnob* mpChannelKnob;
+
+ DECLARE_EVENT_TABLE();
};
#endif // !defined(JZ_TRACKDIALOG_H)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-28 01:27:15
|
Revision: 477
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=477&view=rev
Author: pstieber
Date: 2008-04-27 18:27:11 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
Changed the way the knob control works. The control is no longer angle based, but
captures the mouse. Left-dragging up or down changes the value, left/right double-click
increases/decreases the value, and the mouse wheel also increases/decreases the value.
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-27 22:23:47 UTC (rev 476)
+++ trunk/jazz/src/Knob.cpp 2008-04-28 01:27:11 UTC (rev 477)
@@ -78,16 +78,31 @@
EVT_SIZE(JZKnob::OnSize)
EVT_ERASE_BACKGROUND(JZKnob::OnEraseBackground)
EVT_PAINT(JZKnob::OnPaint)
- EVT_LEFT_DOWN(JZKnob::OnMouse)
- EVT_LEFT_UP(JZKnob::OnMouse)
- EVT_MOTION(JZKnob::OnMouse)
- EVT_MOUSEWHEEL(JZKnob::OnMouse)
+ EVT_LEFT_DOWN(JZKnob::OnLeftButtonDown)
+ EVT_RIGHT_DOWN(JZKnob::OnRightButtonDown)
+ EVT_MOTION(JZKnob::OnMouseMove)
+ EVT_LEFT_UP(JZKnob::OnLeftButtonUp)
+ EVT_LEFT_DCLICK(JZKnob::OnLeftButtonDoubleClick)
+ EVT_RIGHT_DCLICK(JZKnob::OnRightButtonDoubleClick)
+ EVT_MOUSEWHEEL(JZKnob::OnMouseWheel)
END_EVENT_TABLE()
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+int JZKnob::mSensitivity = 4;
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
JZKnob::JZKnob()
- : wxControl()
+ : wxControl(),
+ mMinValue(0),
+ mMaxValue(100),
+ mSetting(50),
+ mRange(300),
+ mMaxAngle(300),
+ mBuffer(),
+ mDragging(false),
+ mLastPoint()
{
}
@@ -106,7 +121,15 @@
long WindowStyle,
const wxValidator& Validator,
const wxString& Name)
- : wxControl()
+ : wxControl(),
+ mMinValue(0),
+ mMaxValue(100),
+ mSetting(50),
+ mRange(300),
+ mMaxAngle(300),
+ mBuffer(),
+ mDragging(false),
+ mLastPoint()
{
Create(
pParent,
@@ -209,6 +232,15 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+void JZKnob::GetCenter(int& x, int& y) const
+{
+ wxSize Size = GetSize();
+ x = Size.x / 2;
+ y = Size.y / 2;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZKnob::OnSize(wxSizeEvent& Event)
{
int Width, Height;
@@ -247,7 +279,8 @@
wxBufferedDC Dc(&PaintDc, mBuffer);
- Dc.SetBackground(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
+ Dc.SetBackground(
+ wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)));
Dc.Clear();
@@ -284,87 +317,96 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZKnob::OnMouse(wxMouseEvent& Event)
+void JZKnob::OnLeftButtonDown(wxMouseEvent& Event)
{
- wxEventType ScrollEvent = wxEVT_NULL;
+ SetFocus();
- if (Event.Moving())
- {
- Event.Skip();
- return;
- }
+ mLastPoint = Event.GetPosition();
- if (Event.GetWheelRotation() < 0)
- {
- SetValueWithEvent(GetValue() - 1);
- Event.Skip();
- return;
- }
+ SetCursor(wxCursor(wxCURSOR_SIZENS));
- if (Event.GetWheelRotation() > 0)
- {
- SetValueWithEvent(GetValue() + 1);
- Event.Skip();
- return;
- }
+ CaptureMouse();
- int XCenter, YCenter;
- GetCenter(XCenter, YCenter);
+ mDragging = true;
+}
- double DeltaX = Event.m_x - XCenter;
- double DeltaY = YCenter - Event.m_y;
- if (DeltaX == 0.0 && DeltaY == 0.0)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZKnob::OnRightButtonDown(wxMouseEvent& Event)
+{
+ SetFocus();
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZKnob::OnMouseMove(wxMouseEvent& Event)
+{
+ if (mDragging)
{
- return;
- }
+ wxPoint Point = Event.GetPosition();
- double Theta = atan2(DeltaY, DeltaX) * gRadiansToDegrees;
- if (Theta < 0.0)
- {
- Theta += 360.0;
+ int Delta = (mLastPoint.y - Point.y) / mSensitivity;
+
+ if (Delta)
+ {
+ int PriorValue = GetValue();
+ SetValueWithEvent(PriorValue + Delta);
+ if (PriorValue != GetValue())
+ {
+ mLastPoint = Point;
+ }
+ }
}
+}
- double DeltaTheta = Theta - mMaxAngle;
- if (DeltaTheta < 0.0)
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZKnob::OnLeftButtonUp(wxMouseEvent& Event)
+{
+ if (HasCapture())
{
- DeltaTheta += 360;
+ ReleaseMouse();
}
- if (DeltaTheta > mRange)
- {
- return;
- }
- int NewValue = int(
- mMaxValue - (DeltaTheta / mRange) * (mMaxValue - mMinValue));
- SetValueWithEvent(NewValue);
- if (Event.Dragging() || Event.ButtonUp())
- {
- if (Event.ButtonUp())
- {
- ScrollEvent = wxEVT_SCROLL_THUMBRELEASE;
- }
- else
- {
- ScrollEvent = wxEVT_SCROLL_THUMBTRACK;
- }
+ SetCursor(wxCursor(wxCURSOR_ARROW));
- wxScrollEvent ScrollEvent(wxEVT_SCROLL_CHANGED, m_windowId);
- ScrollEvent.SetPosition(NewValue);
- ScrollEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(ScrollEvent);
+ mDragging = false;
- wxCommandEvent CommandEvent(wxEVT_COMMAND_SLIDER_UPDATED, m_windowId);
- CommandEvent.SetInt(NewValue);
- CommandEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(CommandEvent);
+ wxPoint Point = Event.GetPosition();
+
+ int Delta = (mLastPoint.y - Point.y) / mSensitivity;
+ if (Delta)
+ {
+ SetValueWithEvent(GetValue() + Delta);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZKnob::GetCenter(int& x, int& y) const
+void JZKnob::OnLeftButtonDoubleClick(wxMouseEvent& Event)
{
- wxSize Size = GetSize();
- x = Size.x / 2;
- y = Size.y / 2;
+ SetValueWithEvent(GetValue() + 1);
}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZKnob::OnRightButtonDoubleClick(wxMouseEvent& Event)
+{
+ SetValueWithEvent(GetValue() - 1);
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZKnob::OnMouseWheel(wxMouseEvent& Event)
+{
+ int WheelRotation = Event.GetWheelRotation();
+
+ if (WheelRotation < 0)
+ {
+ SetValueWithEvent(GetValue() - 1);
+ }
+ else if (WheelRotation > 0)
+ {
+ SetValueWithEvent(GetValue() + 1);
+ }
+}
Modified: trunk/jazz/src/Knob.h
===================================================================
--- trunk/jazz/src/Knob.h 2008-04-27 22:23:47 UTC (rev 476)
+++ trunk/jazz/src/Knob.h 2008-04-28 01:27:11 UTC (rev 477)
@@ -145,22 +145,40 @@
void OnPaint(wxPaintEvent& Event);
- void OnMouse(wxMouseEvent& Event);
+ void OnLeftButtonDown(wxMouseEvent& Event);
+ void OnRightButtonDown(wxMouseEvent& Event);
+
+ void OnMouseMove(wxMouseEvent& Event);
+
+ void OnLeftButtonUp(wxMouseEvent& Event);
+
+ void OnLeftButtonDoubleClick(wxMouseEvent& Event);
+
+ void OnRightButtonDoubleClick(wxMouseEvent& Event);
+
+ void OnMouseWheel(wxMouseEvent& Event);
+
private:
+ static int mSensitivity;
+
int mMinValue;
int mMaxValue;
int mSetting;
+ unsigned int mRange;
+
unsigned int mMaxAngle;
- unsigned int mRange;
-
wxBitmap mBuffer;
+ bool mDragging;
+
+ wxPoint mLastPoint;
+
DECLARE_EVENT_TABLE()
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-27 22:23:49
|
Revision: 476
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=476&view=rev
Author: pstieber
Date: 2008-04-27 15:23:47 -0700 (Sun, 27 Apr 2008)
Log Message:
-----------
1. Renamed the tControl data members Control to mControl and Value to mValue.
2. Changed various local variable names (ctrl, copy, c, and k) to indicate they are control
pointers (pControl and pControlCopy).
3. Added member functions to the track class to increase and decrease the volume
(DecreaseVolume and IncreaseVolume).
4. Renamed a local event pointer e to pEvent.
5. Added code to the track window to increase or decrease the volume by clicking
the left (increase) or right (decrease) mouse button in the patch column.
6. Changed the logic to ToggleTrackState could be removed from the track window.
7. Fixed a typo in a comment in the track window header.
Modified Paths:
--------------
trunk/jazz/src/Command.cpp
trunk/jazz/src/ControlEdit.cpp
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Events.h
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/TrackWindow.h
trunk/jazz/src/mswin/WindowsPlayer.cpp
Modified: trunk/jazz/src/Command.cpp
===================================================================
--- trunk/jazz/src/Command.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/Command.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -750,15 +750,15 @@
void tCmdSearchReplace::ExecuteEvent(JZTrack* pTrack, JZEvent* pEvent)
{
- tControl *ctrl;
- if ((ctrl = pEvent->IsControl()) != 0)
+ tControl* pControl = pEvent->IsControl();
+ if (pControl)
{
- if (ctrl->Control == fr)
+ if (pControl->mControl == fr)
{
- tControl *copy = (tControl *)ctrl->Copy();
- copy->Control = to;
- pTrack->Kill(ctrl);
- pTrack->Put(copy);
+ tControl* pControlCopy = (tControl *)pControl->Copy();
+ pControlCopy->mControl = to;
+ pTrack->Kill(pControl);
+ pTrack->Put(pControlCopy);
}
}
}
Modified: trunk/jazz/src/ControlEdit.cpp
===================================================================
--- trunk/jazz/src/ControlEdit.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/ControlEdit.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -314,10 +314,10 @@
{
if (IsCtrlEdit(pEvent))
{
- if (Clock2Val(pEvent->GetClock()) != pEvent->IsControl()->Value)
+ if (Clock2Val(pEvent->GetClock()) != pEvent->IsControl()->mValue)
{
pControlCopy = pEvent->Copy()->IsControl();
- pControlCopy->Value = Clock2Val(pEvent->GetClock());
+ pControlCopy->mValue = Clock2Val(pEvent->GetClock());
track->Kill(pEvent);
track->Put(pControlCopy);
}
@@ -470,13 +470,13 @@
int tCtrlEdit::IsCtrlEdit(JZEvent* pEvent)
{
- tControl *c = pEvent->IsControl();
- return (c && c->Control == ctrl_num);
+ tControl* pControl = pEvent->IsControl();
+ return (pControl && pControl->mControl == ctrl_num);
}
int tCtrlEdit::GetValue(JZEvent* pEvent)
{
- return pEvent->IsControl()->Value;
+ return pEvent->IsControl()->mValue;
}
JZEvent * tCtrlEdit::NewEvent(long clock, int val)
Modified: trunk/jazz/src/Dialogs.cpp
===================================================================
--- trunk/jazz/src/Dialogs.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/Dialogs.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -853,16 +853,16 @@
// Choice("Controller", &gpConfig->GetCtrlName(0), &Control)
{
Event = e;
- Value = e->Value;
- Control = e->Control + 1;
+ Value = e->mValue;
+ Control = e->mControl + 1;
}
bool tControlDlg::OnClose()
{
- ((tControl *)Copy)->Value = Value;
+ ((tControl *)Copy)->mValue = Value;
// Choice.GetValue();
- ((tControl *)Copy)->Control = Control - 1;
+ ((tControl *)Copy)->mControl = Control - 1;
return tChEventDlg::OnClose();
}
Modified: trunk/jazz/src/Events.h
===================================================================
--- trunk/jazz/src/Events.h 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/Events.h 2008-04-27 22:23:47 UTC (rev 476)
@@ -739,20 +739,20 @@
{
public:
- unsigned char Control;
- unsigned char Value;
+ unsigned char mControl;
+ unsigned char mValue;
tControl(int clk, int cha, unsigned char ctl, unsigned char val)
: tChannelEvent(clk, StatControl, cha)
{
- Control = ctl;
- Value = val;
+ mControl = ctl;
+ mValue = val;
}
virtual int Write(JZWriteBase &io)
{
edb();
- return io.Write(this, Control, Value);
+ return io.Write(this, mControl, mValue);
}
virtual tControl* IsControl()
@@ -770,19 +770,19 @@
virtual int GetValue() const
{
edb();
- return Control;
+ return mControl;
}
virtual int GetPitch() const
{
edb();
- return Control;
+ return mControl;
}
virtual void SetPitch(int p)
{
edb();
- Control = p;
+ mControl = p;
}
virtual const wxPen* GetPen() const
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/Track.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -246,14 +246,14 @@
}
tDrumInstrumentParameter::tDrumInstrumentParameter(tNrpn *par)
- : pitch(par->Lsb.Value),
+ : pitch(par->Lsb.mValue),
next(0)
{
for (int i = drumPitchIndex; i < numDrumParameters; i++)
{
param[i] = 0;
}
- param[drumParam2Index(par->Msb.Value)] = par;
+ param[drumParam2Index(par->Msb.mValue)] = par;
}
tNrpn *tDrumInstrumentParameter::Get(int index)
@@ -264,7 +264,7 @@
void tDrumInstrumentParameter::Put(tNrpn *par)
{
- param[par->Lsb.Value] = par;
+ param[par->Lsb.mValue] = par;
}
tDrumInstrumentParameter *tDrumInstrumentParameter::Next()
@@ -304,7 +304,7 @@
void tDrumInstrumentParameterList::PutParam(tNrpn *par)
{
- tDrumInstrumentParameter *ptr = GetElem(par->Lsb.Value);
+ tDrumInstrumentParameter* ptr = GetElem(par->Lsb.mValue);
if (!ptr)
{
ptr = new tDrumInstrumentParameter(par);
@@ -313,7 +313,7 @@
}
else
{
- ptr->param[drumParam2Index(par->Msb.Value)] = par;
+ ptr->param[drumParam2Index(par->Msb.mValue)] = par;
}
}
@@ -731,7 +731,7 @@
void tEventArray::Cleanup(bool dont_delete_killed_events)
{
JZEvent *e;
- tControl *c;
+ tControl* pControl;
tSysEx *s;
int i;
@@ -845,32 +845,32 @@
{
MtcOffset = e->IsMtcOffset();
}
- if ((c = e->IsControl()) != 0)
+ if ((pControl = e->IsControl()) != 0)
{
- switch (c->Control)
+ switch (pControl->mControl)
{
case 0x07:
if (!Volume)
{
- Volume = c;
+ Volume = pControl;
}
break;
case 0x0a:
if (!Pan)
{
- Pan = c;
+ Pan = pControl;
}
break;
case 0x5b:
if (!Reverb)
{
- Reverb = c;
+ Reverb = pControl;
}
break;
case 0x5d:
if (!Chorus)
{
- Chorus = c;
+ Chorus = pControl;
}
break;
}
@@ -1380,7 +1380,7 @@
WrittenBefore = 0;
if (e->IsControl())
{
- switch (e->IsControl()->Control)
+ switch (e->IsControl()->mControl)
{
// Don't write these again if present as events
// and clock == 0 (should not happen)
@@ -1451,22 +1451,22 @@
}
if (e->IsControl())
{
- switch (e->IsControl()->Control)
+ switch (e->IsControl()->mControl)
{
// Grab Rpn/Nrpn/Bank from file and save them, don't put
// them into event-array
case 0x63:
case 0x65:
- Msb = e->IsControl()->Value; // Rpn/Nrpn Msb
+ Msb = e->IsControl()->mValue; // Rpn/Nrpn Msb
SpecialEvent = 1;
break;
case 0x62:
case 0x64:
- Lsb = e->IsControl()->Value; // Rpn/Nrpn Lsb
+ Lsb = e->IsControl()->mValue; // Rpn/Nrpn Lsb
SpecialEvent = 1;
break;
case 0x06:
- Data = e->IsControl()->Value; // Rpn/Nrpn Data
+ Data = e->IsControl()->mValue; // Rpn/Nrpn Data
SpecialEvent = 1;
cha = e->IsControl()->Channel;
switch (Msb)
@@ -2142,7 +2142,7 @@
{
if (Volume)
{
- return Volume->Value + 1;
+ return Volume->mValue + 1;
}
return 0;
}
@@ -2155,20 +2155,58 @@
}
if (Value > 0)
{
- JZEvent *e = new tControl(0, Channel - 1, 0x07, Value - 1);
- Put(e);
- gpMidiPlayer->OutNow(this, e);
+ JZEvent* pEvent = new tControl(0, Channel - 1, 0x07, Value - 1);
+ Put(pEvent);
+ gpMidiPlayer->OutNow(this, pEvent);
}
Cleanup();
}
+bool JZTrack::DecreaseVolume()
+{
+ if (Volume && Volume->mValue > 0)
+ {
+ Kill(Volume);
+
+ --Volume->mValue;
+
+ JZEvent* pEvent = new tControl(0, Channel - 1, 0x07, Volume->mValue);
+ Put(pEvent);
+ gpMidiPlayer->OutNow(this, pEvent);
+
+ Cleanup();
+
+ return true;
+ }
+ return false;
+}
+
+bool JZTrack::IncreaseVolume()
+{
+ if (Volume && Volume->mValue < 127)
+ {
+ Kill(Volume);
+
+ ++Volume->mValue;
+
+ JZEvent* pEvent = new tControl(0, Channel - 1, 0x07, Volume->mValue);
+ Put(pEvent);
+ gpMidiPlayer->OutNow(this, pEvent);
+
+ Cleanup();
+
+ return true;
+ }
+ return false;
+}
+
// ------------------------ Pan ------------------------------
int JZTrack::GetPan()
{
if (Pan)
{
- return Pan->Value + 1;
+ return Pan->mValue + 1;
}
return 0;
}
@@ -2194,7 +2232,7 @@
{
if (Reverb)
{
- return Reverb->Value + 1;
+ return Reverb->mValue + 1;
}
return 0;
}
@@ -2220,7 +2258,7 @@
{
if (Chorus)
{
- return Chorus->Value + 1;
+ return Chorus->mValue + 1;
}
return 0;
}
@@ -2250,7 +2288,7 @@
if (mpBank)
{
DEBUG(fprintf(stderr,"Bank %d selected.\n\n",mpBank->Value);)
- return mpBank->Value;
+ return mpBank->mValue;
}
else
{
@@ -2263,8 +2301,8 @@
for (int i=0; gpConfig->BankEntry(i).Command[0]>=0; i++)
{
if (
- gpConfig->BankEntry(i).Command[0] == mpBank->Value &&
- gpConfig->BankEntry(i).Command[1] == mpBank2->Value)
+ gpConfig->BankEntry(i).Command[0] == mpBank->mValue &&
+ gpConfig->BankEntry(i).Command[1] == mpBank2->mValue)
{
DEBUG(fprintf(stderr,"Bank %d selected.\n\n",i);)
return i;
Modified: trunk/jazz/src/Track.h
===================================================================
--- trunk/jazz/src/Track.h 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/Track.h 2008-04-27 22:23:47 UTC (rev 476)
@@ -72,7 +72,7 @@
virtual void SetCha( unsigned char cha );
virtual int GetVal()
{
- return( DataMsb.Value );
+ return DataMsb.mValue;
}
tControl Msb;
@@ -472,6 +472,8 @@
int GetVolume();
void SetVolume(int Volume);
+ bool DecreaseVolume();
+ bool IncreaseVolume();
int GetPan();
void SetPan(int Pan);
@@ -575,8 +577,6 @@
tMtcTime* GetMtcOffset();
void SetMtcOffset( tMtcTime* mtc );
-
-
};
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/TrackWindow.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -142,7 +142,8 @@
Dc.GetTextExtent("999", &Width, &Height);
mPatchWidth = Width + 2 * mLittleBit;
- mLeftInfoWidth = mNumberWidth + mTrackNameWidth + mStateWidth + mPatchWidth + 1;
+ mLeftInfoWidth =
+ mNumberWidth + mTrackNameWidth + mStateWidth + mPatchWidth + 1;
//DEBUG cout
//DEBUG << ' ' << mNumberWidth
@@ -280,10 +281,10 @@
// Check to see if the mouse was clicked in the top header.
if (Point.y < mTopInfoHeight)
{
- // Check to see if the mouse was clicked inside of the number mode
- // indicator.
- if (Point.x < mNumberWidth && Point.y < mTopInfoHeight)
+ if (Point.x < mNumberWidth)
{
+ // The point is inside of the number mode indicator, so toggle the first
+ // column between track index and MIDI channel.
if (mNumberMode == eNmTrackNr)
{
mNumberMode = eNmMidiChannel;
@@ -295,11 +296,13 @@
Refresh(false);
}
}
- // Check to see if the mouse was clicked inside of the track name header.
else if (
Point.x >= mTrackNameX &&
Point.x < mTrackNameX + mTrackNameWidth)
{
+ // The point is inside of the track name header. This cell indicates
+ // the song tempo.
+
// Bump up the speed value one tick.
int SpeedBpm = gpProject->GetTrack(0)->GetDefaultSpeed();
++SpeedBpm;
@@ -309,9 +312,10 @@
}
Refresh(false);
}
- // Check to see if the mouse was clicked inside of the patch header.
else if (Point.x >= mPatchX && Point.x < mPatchX + mPatchWidth)
{
+ // The point is inside the patch header.
+
// Toggle the patch type.
switch (mCounterMode)
{
@@ -338,29 +342,46 @@
Refresh(false);
}
}
- else if (Point.x >= mStateX && Point.x < mStateX + mStateWidth)
+ else
{
- ToggleTrackState(Point);
- }
- // Check to see if the mouse was clicked inside of a track name.
- else if (
- Point.x >= mTrackNameX &&
- Point.x < mTrackNameX + mTrackNameWidth)
- {
- // Edit the track settings.
+ // The point is not in the top header row.
+
+ // Get the track associated with the y position.
JZTrack* pTrack = y2Track(Point.y);
if (pTrack)
{
- pTrack->Dialog(this);
- Refresh(false);
+ if (Point.x < mNumberWidth)
+ {
+ // The point is inside the number field.
+ }
+ else if (
+ Point.x >= mTrackNameX &&
+ Point.x < mTrackNameX + mTrackNameWidth)
+ {
+ // The point is inside of a track name column. Edit the track
+ // settings.
+ pTrack->Dialog(this);
+ Refresh(false);
+ }
+ else if (Point.x >= mStateX && Point.x < mStateX + mStateWidth)
+ {
+ // The point is inside the track name field. Toggle the track state.
+ pTrack->ToggleState(1);
+ Refresh(false);
+ }
+ else if (Point.x >= mPatchX && Point.x < mPatchX + mPatchWidth)
+ {
+ IncreaseTrackNumberField(pTrack);
+ }
+ else if (
+ Point.x >= mEventsX && Point.x < mEventsX + mEventsWidth &&
+ Point.y >= mEventsY && Point.y < mEventsY + mEventsHeight)
+ {
+ // The point is in event area.
+ SnapSelectionStop(Event);
+ }
}
}
- else if (
- Point.x >= mEventsX && Point.x < mEventsX + mEventsWidth &&
- Point.y >= mEventsY && Point.y < mEventsY + mEventsHeight)
- {
- SnapSelectionStop(Event);
- }
}
//-----------------------------------------------------------------------------
@@ -369,29 +390,103 @@
{
wxPoint Point = Event.GetPosition();
- if (
- Point.x >= mTrackNameX && Point.x < mTrackNameX + mTrackNameWidth &&
- Point.y < mTopInfoHeight)
+ if (Point.y < mTopInfoHeight)
{
- // Knock down the speed value one tick.
- int SpeedBpm = gpProject->GetTrack(0)->GetDefaultSpeed();
- --SpeedBpm;
- if (SpeedBpm > 0 && SpeedBpm < 300)
+ // The point is inside the top header line.
+
+ if (Point.x >= mTrackNameX && Point.x < mTrackNameX + mTrackNameWidth)
{
- gpProject->GetTrack(0)->SetDefaultSpeed(SpeedBpm);
+ // The point is inside the track name field.
+ int SpeedBpm = gpProject->GetTrack(0)->GetDefaultSpeed();
+
+ // Knock down the speed value one tick.
+ --SpeedBpm;
+
+ if (SpeedBpm > 0 && SpeedBpm < 300)
+ {
+ gpProject->GetTrack(0)->SetDefaultSpeed(SpeedBpm);
+ }
+ Refresh(false);
}
+ }
+ else
+ {
+ // The point is below the top header line.
+
+ // Get the track associated with the y position.
+ JZTrack* pTrack = y2Track(Point.y);
+ if (pTrack)
+ {
+ if (Point.x < mNumberWidth)
+ {
+ // The point is inside the number field.
+ }
+ else if (Point.x >= mStateX && Point.x < mStateX + mStateWidth)
+ {
+ // The point is inside the track name field.
+ }
+ else if (Point.x >= mPatchX && Point.x < mPatchX + mPatchWidth)
+ {
+ DecreaseTrackNumberField(pTrack);
+ }
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZTrackWindow::IncreaseTrackNumberField(JZTrack* pTrack)
+{
+ bool UpdateFlag = false;
+
+ switch (mCounterMode)
+ {
+ case eCmProgram:
+ break;
+ case eCmBank:
+ break;
+ case eCmVolume:
+ UpdateFlag = pTrack->IncreaseVolume();
+ break;
+ case eCmPan:
+ break;
+ case eCmReverb:
+ break;
+ case eCmChorus:
+ default:
+ break;
+ }
+ if (UpdateFlag)
+ {
Refresh(false);
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZTrackWindow::ToggleTrackState(const wxPoint& Point)
+void JZTrackWindow::DecreaseTrackNumberField(JZTrack* pTrack)
{
- JZTrack* pTrack = y2Track(Point.y);
- if (pTrack)
+ bool UpdateFlag = false;
+
+ switch (mCounterMode)
{
- pTrack->ToggleState(1);
+ case eCmProgram:
+ break;
+ case eCmBank:
+ break;
+ case eCmVolume:
+ UpdateFlag = pTrack->DecreaseVolume();
+ break;
+ case eCmPan:
+ break;
+ case eCmReverb:
+ break;
+ case eCmChorus:
+ default:
+ break;
+ }
+ if (UpdateFlag)
+ {
Refresh(false);
}
}
Modified: trunk/jazz/src/TrackWindow.h
===================================================================
--- trunk/jazz/src/TrackWindow.h 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/TrackWindow.h 2008-04-27 22:23:47 UTC (rev 476)
@@ -104,8 +104,10 @@
void VerticalScroll(wxScrollWinEvent& Event);
- void ToggleTrackState(const wxPoint& Point);
+ void IncreaseTrackNumberField(JZTrack* pTrack);
+ void DecreaseTrackNumberField(JZTrack* pTrack);
+
virtual void OnDraw(wxDC& Dc);
void Draw(wxDC& Dc);
@@ -157,7 +159,7 @@
int mPlayClock;
bool mUseColors;
- // The values indicate the staring postions and widths of the track fields
+ // The values indicate the starting postions and widths of the track fields
// on the left hand side of the screen. Note that the position of the
// first field displayed is always 0, so it doesn't need to be recorded.
int mNumberWidth;
Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp
===================================================================
--- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-22 21:35:23 UTC (rev 475)
+++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-27 22:23:47 UTC (rev 476)
@@ -299,10 +299,10 @@
case StatControl:
{
- tControl *k = e->IsControl();
- u.c[0] = 0xB0 | k->Channel;
- u.c[1] = k->Control;
- u.c[2] = k->Value;
+ tControl* pControl = e->IsControl();
+ u.c[0] = 0xB0 | pControl->Channel;
+ u.c[1] = pControl->mControl;
+ u.c[2] = pControl->mValue;
}
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-22 21:35:25
|
Revision: 475
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=475&view=rev
Author: pstieber
Date: 2008-04-22 14:35:23 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Updated Linux specific code for the recent event code change.
Modified Paths:
--------------
trunk/jazz/src/AlsaPlayer.cpp
trunk/jazz/src/Player.cpp
Modified: trunk/jazz/src/AlsaPlayer.cpp
===================================================================
--- trunk/jazz/src/AlsaPlayer.cpp 2008-04-22 04:38:39 UTC (rev 474)
+++ trunk/jazz/src/AlsaPlayer.cpp 2008-04-22 21:35:23 UTC (rev 475)
@@ -407,7 +407,7 @@
// prepend 0xf0
char *buf = new char[s->Length + 1];
buf[0] = 0xF0;
- memcpy(buf + 1, s->Data, s->Length);
+ memcpy(buf + 1, s->mpData, s->Length);
set_event_header(&ev, e->GetClock(), s->Length + 1, buf);
rc = write(&ev, now);
delete [] buf;
Modified: trunk/jazz/src/Player.cpp
===================================================================
--- trunk/jazz/src/Player.cpp 2008-04-22 04:38:39 UTC (rev 474)
+++ trunk/jazz/src/Player.cpp 2008-04-22 21:35:23 UTC (rev 475)
@@ -1660,7 +1660,7 @@
sysex->device_no = mididev;
sysex->len = s->Length + 1;
sysex->data[0] = 0xf0;
- memcpy(sysex->data + 1, s->Data, s->Length);
+ memcpy(sysex->data + 1, s->mpData, s->Length);
SEQ_WRPATCH(sysex, sizeof(*sysex) + sysex->len - 1);
delete [] (char *)sysex;
@@ -1678,7 +1678,7 @@
SEQ_SYSEX(mididev, (unsigned char *)buf, N);
i = 0;
}
- buf[i++] = sx->Data[j];
+ buf[i++] = sx->mpData[j];
}
if (i > 0) {
SEQ_SYSEX(mididev, (unsigned char *)buf, i);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-22 04:38:41
|
Revision: 474
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=474&view=rev
Author: pstieber
Date: 2008-04-21 21:38:39 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
1. Added a drum set container accessor to the configuration class.
2. Added more code to the track dialog.
3. Changed tMetaEvent::Data to mpData.
4. Made cosmetic changes to the synthesizer class.
Modified Paths:
--------------
trunk/jazz/src/Configuration.h
trunk/jazz/src/Dialogs/TrackDialog.cpp
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Events.h
trunk/jazz/src/Synth.cpp
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/mswin/WindowsPlayer.cpp
Modified: trunk/jazz/src/Configuration.h
===================================================================
--- trunk/jazz/src/Configuration.h 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Configuration.h 2008-04-22 04:38:39 UTC (rev 474)
@@ -244,6 +244,8 @@
bool Put(int entry);
bool Put(int entry, int value);
+ const std::vector<std::pair<std::string, int> >& GetDrumSets() const;
+
const std::vector<std::pair<std::string, int> >& GetDrumNames() const;
const std::vector<std::pair<std::string, int> >& GetControlNames() const;
@@ -301,6 +303,15 @@
//-----------------------------------------------------------------------------
inline
const std::vector<std::pair<std::string, int> >&
+JZConfiguration::GetDrumSets() const
+{
+ return mDrumSets;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+inline
+const std::vector<std::pair<std::string, int> >&
JZConfiguration::GetDrumNames() const
{
return mDrumNames;
Modified: trunk/jazz/src/Dialogs/TrackDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Dialogs/TrackDialog.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -38,20 +38,20 @@
mpTrackNameEdit = new wxTextCtrl(this, wxID_ANY);
mpPatchListBox = new wxListBox(this, wxID_ANY);
- if (Track.IsDrumTrack())
+ if (mTrack.IsDrumTrack())
{
- const vector<pair<string, int> >& DrumNames = gpConfig->GetDrumNames();
+ const vector<pair<string, int> >& DrumSets = gpConfig->GetDrumSets();
for (
- vector<pair<string, int> >::const_iterator iDrumName =
- DrumNames.begin();
- iDrumName != DrumNames.end();
- ++iDrumName)
+ vector<pair<string, int> >::const_iterator iDrumSet =
+ DrumSets.begin();
+ iDrumSet != DrumSets.end();
+ ++iDrumSet)
{
- const string& DrumName = iDrumName->first;
+ const string& DrumSet = iDrumSet->first;
- if (!DrumName.empty())
+ if (!DrumSet.empty())
{
- mpPatchListBox->Append(DrumName.c_str());
+ mpPatchListBox->Append(DrumSet.c_str());
}
}
}
@@ -84,15 +84,15 @@
new wxStaticText(this, wxID_ANY, "Track Name:"),
0,
wxALL,
- 2);
- pTopSizer->Add(mpTrackNameEdit, 0, wxGROW | wxALL, 2);
+ 4);
+ pTopSizer->Add(mpTrackNameEdit, 0, wxGROW | wxALL, 4);
pTopSizer->Add(
new wxStaticText(this, wxID_ANY, "Patch:"),
0,
wxALL,
- 2);
- pTopSizer->Add(mpPatchListBox, 0, wxGROW | wxALL, 2);
+ 4);
+ pTopSizer->Add(mpPatchListBox, 0, wxGROW | wxALL, 4);
wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL);
pButtonSizer->Add(pOkButton, 0, wxALL, 5);
@@ -114,6 +114,9 @@
{
mpTrackNameEdit->ChangeValue(mTrack.GetName());
+ int PatchIndex = mTrack.GetPatch() + (mTrack.GetBank() << 8);
+ mpPatchListBox->SetSelection(PatchIndex);
+
return true;
}
@@ -121,5 +124,17 @@
//-----------------------------------------------------------------------------
bool JZTrackDialog::TransferDataFromWindow()
{
+ wxString Trackname = mpTrackNameEdit->GetValue();
+ mTrack.SetName(Trackname.c_str());
+
+ int Selection = mpPatchListBox->GetSelection();
+ if (Selection != wxNOT_FOUND)
+ {
+ int Patch = Selection & 0x000000ff;;
+ int Bank = (Selection & 0x0000ff00) >> 8;
+ mTrack.SetPatch(Patch);
+ mTrack.SetBank(Bank);
+ }
+
return true;
}
Modified: trunk/jazz/src/Dialogs.cpp
===================================================================
--- trunk/jazz/src/Dialogs.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Dialogs.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -1152,8 +1152,8 @@
for (int i = 0; i < s->Length; i++)
{
- sprintf( hexbyte, "%02x ", s->Data[i] );
- strcat( str, hexbyte );
+ sprintf(hexbyte, "%02x ", s->mpData[i]);
+ strcat(str, hexbyte);
}
}
@@ -1245,7 +1245,7 @@
ostringstream Oss;
Oss
<< "First data byte is at offset "
- << uptr - Event->IsSysEx()->Data + 1 << ", value "
+ << uptr - Event->IsSysEx()->mpData + 1 << ", value "
<< setw(2) << hex << static_cast<int>(*uptr)
<< dec << " (" << static_cast<int>(*uptr) << " decimal)";
sheet->AddProperty(new wxProperty(
Modified: trunk/jazz/src/Events.h
===================================================================
--- trunk/jazz/src/Events.h 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Events.h 2008-04-22 04:38:39 UTC (rev 474)
@@ -861,27 +861,32 @@
{
public:
- unsigned char* Data;
+ unsigned char* mpData;
unsigned short Length;
- tMetaEvent(int clk, unsigned char sta, unsigned char *dat, unsigned short len)
+ tMetaEvent(
+ int clk,
+ unsigned char sta,
+ unsigned char* dat,
+ unsigned short len)
: JZEvent(clk, sta)
{
Length = len;
- Data = new unsigned char [len + 1];
+ mpData = new unsigned char [len + 1];
if (dat)
- memcpy(Data, dat, len);
- Data[len] = 0;
+ memcpy(mpData, dat, len);
+ mpData[len] = 0;
}
virtual ~tMetaEvent()
{
- delete [] Data;
+ delete [] mpData;
}
virtual int Write(JZWriteBase &io)
{
- edb(); return io.Write(this, Data, Length);
+ edb();
+ return io.Write(this, mpData, Length);
}
virtual tMetaEvent* IsMetaEvent()
@@ -893,7 +898,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tMetaEvent(mClock, Stat, Data, Length);
+ return new tMetaEvent(mClock, Stat, mpData, Length);
}
};
@@ -910,44 +915,50 @@
: tMetaEvent(clk, StatJazzMeta, dat, len)
{
}
- tJazzMeta() : tMetaEvent(0, StatJazzMeta, 0, DATALEN) {
- memset(Data, 0, DATALEN);
- memcpy(Data, "JAZ2", 4);
- Data[4] = 1; // version or so
+ tJazzMeta()
+ : tMetaEvent(0, StatJazzMeta, 0, DATALEN)
+ {
+ memset(mpData, 0, DATALEN);
+ memcpy(mpData, "JAZ2", 4);
+ mpData[4] = 1; // version or so
}
- char GetAudioMode() const {
- return Data[5];
+ char GetAudioMode() const
+ {
+ return mpData[5];
}
- void SetAudioMode(char c) {
- Data[5] = c;
+ void SetAudioMode(char c)
+ {
+ mpData[5] = c;
}
- char GetTrackState() const {
- return Data[6];
+ char GetTrackState() const
+ {
+ return mpData[6];
}
- void SetTrackState(char c) {
- Data[6] = c;
+ void SetTrackState(char c)
+ {
+ mpData[6] = c;
}
- // Data[7] is unused
+ // mpData[7] is unused
unsigned char GetTrackDevice() const
{
- return Data[8];
+ return mpData[8];
}
void SetTrackDevice(unsigned char x)
{
- Data[8] = x;
+ mpData[8] = x;
}
unsigned char GetIntroLength() const
{
- return Data[9];
+ return mpData[9];
}
void SetIntroLength(unsigned char x)
{
- Data[9] = x;
+ mpData[9] = x;
}
virtual tJazzMeta* IsJazzMeta()
@@ -959,7 +970,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tJazzMeta(mClock, Data, Length);
+ return new tJazzMeta(mClock, mpData, Length);
}
};
@@ -982,7 +993,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tSysEx(mClock, Data, Length);
+ return new tSysEx(mClock, mpData, Length);
}
// todo
@@ -1007,7 +1018,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tSongPtr(mClock, Data, Length);
+ return new tSongPtr(mClock, mpData, Length);
}
};
@@ -1033,7 +1044,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tMidiClock(mClock, Data, Length);
+ return new tMidiClock(mClock, mpData, Length);
}
};
@@ -1057,7 +1068,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tStartPlay(mClock, Data, Length);
+ return new tStartPlay(mClock, mpData, Length);
}
};
@@ -1083,7 +1094,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tContPlay(mClock, Data, Length);
+ return new tContPlay(mClock, mpData, Length);
}
};
@@ -1110,7 +1121,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tStopPlay(mClock, Data, Length);
+ return new tStopPlay(mClock, mpData, Length);
}
};
@@ -1134,12 +1145,12 @@
virtual JZEvent* Copy() const
{
edb();
- return new tText(mClock, Data, Length);
+ return new tText(mClock, mpData, Length);
}
virtual unsigned char* GetText()
{
- return Data;
+ return mpData;
}
};
@@ -1163,7 +1174,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tCopyright(mClock, Data, Length);
+ return new tCopyright(mClock, mpData, Length);
}
};
@@ -1181,7 +1192,7 @@
// clip to 16 chars
if (len > 16)
{
- Data[16] = 0;
+ mpData[16] = 0;
Length = 16;
}
#endif
@@ -1197,7 +1208,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tTrackName(mClock, Data, Length);
+ return new tTrackName(mClock, mpData, Length);
}
};
@@ -1221,7 +1232,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tMarker(mClock, Data, Length);
+ return new tMarker(mClock, mpData, Length);
}
};
@@ -1278,16 +1289,16 @@
virtual int Write(JZWriteBase &io)
{
- Data = new unsigned char [Length + 1];
- int* dat = (int *)Data;
+ mpData = new unsigned char [Length + 1];
+ int* dat = (int *)mpData;
dat[0] = track;
dat[1] = transpose;
dat[2] = eventlength;
Length = sizeof(int) * 3;
edb();
- Data[Length] = 0;
- return io.Write(this, Data, Length);
+ mpData[Length] = 0;
+ return io.Write(this, mpData, Length);
}
virtual tPlayTrack* IsPlayTrack()
@@ -1388,7 +1399,7 @@
virtual JZEvent* Copy() const
{
edb();
- return new tMtcOffset(mClock, Data, Length);
+ return new tMtcOffset(mClock, mpData, Length);
}
};
Modified: trunk/jazz/src/Synth.cpp
===================================================================
--- trunk/jazz/src/Synth.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Synth.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -25,7 +25,6 @@
#include "Synth.h"
#include "Track.h"
-//#include "util.h"
#include "Player.h"
#include "JazzPlusPlusApplication.h"
//#include "eventwin.h"
@@ -340,37 +339,37 @@
gs_dt1[4] = 0x40;
gs_dt1[5] = 0x20;
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x00 + i;
SXDECL(SX_GS_ModPitch + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x10 + i;
SXDECL(SX_GS_BendPitch + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x20 + i;
SXDECL(SX_GS_CafPitch + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x30 + i;
SXDECL(SX_GS_PafPitch + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x40 + i;
SXDECL(SX_GS_CC1Pitch + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 11; i++ )
+ for (i = 0; i < 11; i++)
{
gs_dt1[6] = 0x50 + i;
SXDECL(SX_GS_CC2Pitch + i, GS_DT1_LEN, gs_dt1);
@@ -378,19 +377,44 @@
gs_dt1[4] = 0x40;
gs_dt1[5] = 0x01;
- for ( i = 0; i < 7; i++ )
+ for (i = 0; i < 7; i++)
{
gs_dt1[6] = 0x30 + i;
SXDECL(SX_GS_ReverbMacro + i, GS_DT1_LEN, gs_dt1);
}
- for ( i = 0; i < 8; i++ )
+ for (i = 0; i < 8; i++)
{
gs_dt1[6] = 0x38 + i;
SXDECL(SX_GS_ChorusMacro + i, GS_DT1_LEN, gs_dt1);
}
- const unsigned char gs_partial_reserve[] = {GS_DT1,0x40,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf7};
+ const unsigned char gs_partial_reserve[] =
+ {
+ GS_DT1,
+ 0x40,
+ 0x01,
+ 0x10,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0x00,
+ 0xf7
+ };
+
SXDECL(SX_GS_PartialReserve, GS_DT1_LEN, gs_partial_reserve);
gs_dt1[4] = 0x40;
@@ -413,8 +437,6 @@
gs_dt1[6] = 0x20;
SXDECL(SX_GS_CC2CtrlNo, GS_DT1_LEN, gs_dt1);
-
-
// XG native
const unsigned char xg_on[] = {XG_NAT,0x00,0x00,0x7e,0x00,0xf7};
SXDECL(SX_XG_ON, XG_NAT_LEN, xg_on);
@@ -422,13 +444,13 @@
// XG native multipart
unsigned char xg_multi[] = {XG_NAT,0x08,0x00,0x00,0x00,0x7f};
- for ( i = 0; i < 12; i++ )
+ for (i = 0; i < 12; i++)
{
xg_multi[5] = 0x1d + i;
SXDECL(SX_XG_ModPitch + i, XG_NAT_LEN, xg_multi);
}
- for ( i = 0; i < 26; i++ )
+ for (i = 0; i < 26; i++)
{
xg_multi[5] = 0x4d + i;
SXDECL(SX_XG_CafPitch + i, XG_NAT_LEN, xg_multi);
@@ -470,11 +492,11 @@
if (!s)
return SX_NONE;
- switch (s->Data[0])
+ switch (s->mpData[0])
{
case 0x7e:
// GM ON ?
- if (!memcmp(sxdata[SX_GM_ON], s->Data, s->Length))
+ if (!memcmp(sxdata[SX_GM_ON], s->mpData, s->Length))
{
return SX_GM_ON;
}
@@ -486,7 +508,7 @@
case 0x7f:
// GM MasterVol ?
- if (!memcmp(sxdata[SX_GM_MasterVol],s->Data,4))
+ if (!memcmp(sxdata[SX_GM_MasterVol], s->mpData, 4))
{
return SX_GM_MasterVol;
}
@@ -500,11 +522,11 @@
// Roland!
// GS DT1?
- if ((s->Data[2] == 0x42) && (s->Data[3] == 0x12))
+ if ((s->mpData[2] == 0x42) && (s->mpData[3] == 0x12))
{
- register unsigned char a1 = s->Data[4];
- register unsigned char a2 = s->Data[5];
- register unsigned char a3 = s->Data[6];
+ register unsigned char a1 = s->mpData[4];
+ register unsigned char a2 = s->mpData[5];
+ register unsigned char a3 = s->mpData[6];
if (a1 == 0x40)
{
@@ -536,7 +558,7 @@
else if (a3 == 0x10)
return SX_GS_PartialReserve;
}
- else if ( (a2 & 0xf0) == 0x10 )
+ else if ((a2 & 0xf0) == 0x10)
{
// 0x40 0x1n 0x??
switch (a3)
@@ -556,7 +578,7 @@
break;
}
}
- else if ( (a2 & 0xf0) == 0x20 )
+ else if ((a2 & 0xf0) == 0x20)
{
// 0x40 0x2n 0x??
if (a3 <= 0x0a)
@@ -575,11 +597,11 @@
} // end a1 == 0x40
} // end GS DT1
- if ((s->Data[3] == 0x12) && (s->Length >= 10))
+ if ((s->mpData[3] == 0x12) && (s->Length >= 10))
{
return SX_ROLAND_DT1;
}
- else if ((s->Data[3] == 0x11) && (s->Length >= 12))
+ else if ((s->mpData[3] == 0x11) && (s->Length >= 12))
{
return SX_ROLAND_RQ1;
}
@@ -593,11 +615,11 @@
case 0x43:
// Yamaha!
// XG Native?
- if (((s->Data[1] & 0xf0) == 0x10) && (s->Data[2] == 0x4c))
+ if (((s->mpData[1] & 0xf0) == 0x10) && (s->mpData[2] == 0x4c))
{
- register unsigned char a1 = s->Data[3];
- register unsigned char a2 = s->Data[4];
- register unsigned char a3 = s->Data[5];
+ register unsigned char a1 = s->mpData[3];
+ register unsigned char a2 = s->mpData[4];
+ register unsigned char a3 = s->mpData[5];
// Multipart?
if (a1 == 0x08)
@@ -648,11 +670,11 @@
}
}
- if (s->Data[2] == 0x4c)
+ if (s->mpData[2] == 0x4c)
{
return SX_XG_NATIVE;
}
- else if (s->Data[2] == 0x49)
+ else if (s->mpData[2] == 0x49)
{
return SX_MU80_NATIVE;
}
@@ -679,38 +701,38 @@
return 0;
}
- switch (s->Data[0])
+ switch (s->mpData[0])
{
case 0x7f:
// GM MasterVol?
- if (!memcmp(sxdata[SX_GM_MasterVol],s->Data,4))
+ if (!memcmp(sxdata[SX_GM_MasterVol], s->mpData,4))
{
- return &s->Data[4];
+ return &s->mpData[4];
}
break;
case 0x41:
// Roland!
// GS DT1?
- if ((s->Data[2] == 0x42) && (s->Data[3] == 0x12) && (s->Length >= 10))
+ if ((s->mpData[2] == 0x42) && (s->mpData[3] == 0x12) && (s->Length >= 10))
{
- return &s->Data[7];
+ return &s->mpData[7];
}
// other DT1 or RQ1 ?
else if (
- ((s->Data[3] == 0x12) && (s->Length >= 10)) ||
- ((s->Data[3] == 0x11) && (s->Length >= 12)))
+ ((s->mpData[3] == 0x12) && (s->Length >= 10)) ||
+ ((s->mpData[3] == 0x11) && (s->Length >= 12)))
{
- return &s->Data[7];
+ return &s->mpData[7];
}
break;
case 0x43:
// Yamaha!
// XG Native?
- if (((s->Data[1] & 0xf0) == 0x10) && (s->Data[2] == 0x4c))
+ if (((s->mpData[1] & 0xf0) == 0x10) && (s->mpData[2] == 0x4c))
{
- return &s->Data[6];
+ return &s->mpData[6];
}
break;
default:
@@ -730,17 +752,21 @@
return 0;
}
- switch (s->Data[0])
+ switch (s->mpData[0])
{
case 0x41:
// Roland!
// GS DT1 + address 0x40?
- if ((s->Data[2] == 0x42) && (s->Data[3] == 0x12) &&
- (s->Data[4] == 0x40))
+ if (
+ (s->mpData[2] == 0x42) &&
+ (s->mpData[3] == 0x12) &&
+ (s->mpData[4] == 0x40))
{
- if ( ((s->Data[5] & 0xf0) == 0x10 ) || ((s->Data[5] & 0xf0) == 0x20 ) )
+ if (
+ ((s->mpData[5] & 0xf0) == 0x10) ||
+ ((s->mpData[5] & 0xf0) == 0x20))
{
- return &s->Data[5];
+ return &s->mpData[5];
}
}
break;
@@ -748,9 +774,12 @@
case 0x43:
// Yamaha!
// XG Native multipart?
- if (((s->Data[1] & 0xf0) == 0x10) && (s->Data[2] == 0x4c) && (s->Data[3] == 0x08))
+ if (
+ ((s->mpData[1] & 0xf0) == 0x10) &&
+ (s->mpData[2] == 0x4c) &&
+ (s->mpData[3] == 0x08))
{
- return &s->Data[4];
+ return &s->mpData[4];
}
break;
default:
@@ -763,16 +792,16 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void tSynthSysex::FixCheckSum( tSysEx *s )
+void tSynthSysex::FixCheckSum(tSysEx* s)
{
if (
- (s->Data[0] == 0x41) &&
- (((s->Data[3] == 0x12) && (s->Length >= 10)) ||
- ((s->Data[3] == 0x11) && (s->Length >= 12))))
+ (s->mpData[0] == 0x41) &&
+ (((s->mpData[3] == 0x12) && (s->Length >= 10)) ||
+ ((s->mpData[3] == 0x11) && (s->Length >= 12))))
{
// Roland RQ1 or DT1
int len = s->Length;
- unsigned char *sx = s->Data;
+ unsigned char *sx = s->mpData;
unsigned char sum = 0x00;
for (int i = 4; i < (len-2); i++)
@@ -793,7 +822,11 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-tSysEx* tSynthSysex::operator()(long clk, int id, int datalen, unsigned char val[])
+tSysEx* tSynthSysex::operator()(
+ long clk,
+ int id,
+ int datalen,
+ unsigned char val[])
{
return (*this)(clk, id, -1, datalen, val);
}
@@ -807,18 +840,18 @@
int datalen,
unsigned char val[])
{
- assert( (id > SX_NONE) && (id < NumSysexIds) );
- assert( datalen > 0 );
+ assert((id > SX_NONE) && (id < NumSysexIds));
+ assert(datalen > 0);
int i;
for (i = 0; i < datalen; i++)
{
- assert( val[i] < 128 );
+ assert(val[i] < 128);
}
int len = sxlen[id] + datalen - 1;
unsigned char* sx = new unsigned char[len];
- memcpy( sx, sxdata[id], sxlen[id] );
+ memcpy(sx, sxdata[id], sxlen[id]);
tSysEx* s = 0;
if (id == SX_GM_MasterVol)
@@ -829,7 +862,7 @@
else
sx[4] = 0;
sx[5] = val[0]; // MSB
- s = new tSysEx( clk, sx, len );
+ s = new tSysEx(clk, sx, len);
}
else if ((id > SX_GS_ON) && (id < SX_XG_ON))
{
@@ -839,7 +872,7 @@
if (channel >= 0)
{
- sx[5] = sx[5] | sysex_channel( channel );
+ sx[5] = sx[5] | sysex_channel(channel);
}
unsigned char sum = 0x00;
@@ -847,20 +880,22 @@
sum += sx[i];
sx[len - 2] = (0x80 - (sum & 0x7f)) & 0x7f;
sx[len-1] = 0xf7;
- s = new tSysEx( clk, sx, len );
+ s = new tSysEx(clk, sx, len);
}
else if (id > SX_XG_ON)
{
// XG Native
for (i = 0; i < datalen; i++)
+ {
sx[i+6] = val[i];
+ }
if (channel >= 0)
{
sx[4] = channel - 1;
}
sx[len-1] = 0xf7;
- s = new tSysEx( clk, sx, len );
+ s = new tSysEx(clk, sx, len);
}
delete sx;
@@ -868,194 +903,194 @@
}
-JZEvent* tGS::MasterVolSX( long clk, unsigned char vol )
+JZEvent* tGS::MasterVolSX(long clk, unsigned char vol)
{
- return Sysex( clk, SX_GS_MasterVol, vol );
+ return Sysex(clk, SX_GS_MasterVol, vol);
}
-JZEvent* tGS::MasterPanSX( long clk, unsigned char pan )
+JZEvent* tGS::MasterPanSX(long clk, unsigned char pan)
{
- return Sysex( clk, SX_GS_MasterPan, pan );
+ return Sysex(clk, SX_GS_MasterPan, pan);
}
-JZEvent* tGS::ModSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::ModSX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_ModPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_ModPitch + index, cha, 1, &val);
}
-JZEvent* tGS::BendSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::BendSX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_BendPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_BendPitch + index, cha, 1, &val);
}
-JZEvent* tGS::CafSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::CafSX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_CafPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_CafPitch + index, cha, 1, &val);
}
-JZEvent* tGS::PafSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::PafSX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_PafPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_PafPitch + index, cha, 1, &val);
}
-JZEvent* tGS::CC1SX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::CC1SX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_CC1Pitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_CC1Pitch + index, cha, 1, &val);
}
-JZEvent* tGS::CC2SX( int index, long clk, int cha, unsigned char val )
+JZEvent* tGS::CC2SX(int index, long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_CC2Pitch + index, cha, 1, &val );
+ return Sysex(clk, SX_GS_CC2Pitch + index, cha, 1, &val);
}
-JZEvent* tGS::PartialReserveSX( long clk, int cha, unsigned char *valptr )
+JZEvent* tGS::PartialReserveSX(long clk, int cha, unsigned char *valptr)
{
- return Sysex( clk, SX_GS_PartialReserve, 16, valptr );
+ return Sysex(clk, SX_GS_PartialReserve, 16, valptr);
}
-JZEvent* tGS::RxChannelSX( long clk, int cha, unsigned char val )
+JZEvent* tGS::RxChannelSX(long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_RxChannel, cha, 1, &val );
+ return Sysex(clk, SX_GS_RxChannel, cha, 1, &val);
}
-JZEvent* tGS::UseForRhythmSX( long clk, int cha, unsigned char val )
+JZEvent* tGS::UseForRhythmSX(long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_GS_UseForRhythm, cha, 1, &val );
+ return Sysex(clk, SX_GS_UseForRhythm, cha, 1, &val);
}
-JZEvent* tGS::ControllerNumberSX( int ctrlno, long clk, int cha, unsigned char val )
+JZEvent* tGS::ControllerNumberSX(int ctrlno, long clk, int cha, unsigned char val)
{
- if (ctrlno == 1)
- return Sysex( clk, SX_GS_CC1CtrlNo, cha, 1, &val );
- else if (ctrlno == 2)
- return Sysex( clk, SX_GS_CC2CtrlNo, cha, 1, &val );
- else
- return 0;
+ if (ctrlno == 1)
+ return Sysex(clk, SX_GS_CC1CtrlNo, cha, 1, &val);
+ else if (ctrlno == 2)
+ return Sysex(clk, SX_GS_CC2CtrlNo, cha, 1, &val);
+ else
+ return 0;
}
-JZEvent* tGS::ReverbMacroSX( long clk, unsigned char val, unsigned char lsb )
+JZEvent* tGS::ReverbMacroSX(long clk, unsigned char val, unsigned char lsb)
{
- return Sysex( clk, SX_GS_ReverbMacro, val );
+ return Sysex(clk, SX_GS_ReverbMacro, val);
}
-JZEvent* tGS::ReverbParamSX( int index, long clk, unsigned char val )
+JZEvent* tGS::ReverbParamSX(int index, long clk, unsigned char val)
{
- return Sysex( clk, SX_GS_RevCharacter + index, val );
+ return Sysex(clk, SX_GS_RevCharacter + index, val);
}
-JZEvent* tGS::ChorusMacroSX( long clk, unsigned char val, unsigned char lsb )
+JZEvent* tGS::ChorusMacroSX(long clk, unsigned char val, unsigned char lsb)
{
- return Sysex( clk, SX_GS_ChorusMacro, val );
+ return Sysex(clk, SX_GS_ChorusMacro, val);
}
-JZEvent* tGS::ChorusParamSX( int index, long clk, unsigned char val )
+JZEvent* tGS::ChorusParamSX(int index, long clk, unsigned char val)
{
- return Sysex( clk, SX_GS_ChoPreLpf + index, val );
+ return Sysex(clk, SX_GS_ChoPreLpf + index, val);
}
// XG:
-JZEvent* tXG::ModSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::ModSX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_ModPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_ModPitch + index, cha, 1, &val);
else if ((index >= 4) && (index <=6))
- return Sysex( clk, SX_XG_ModPitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_ModPitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::BendSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::BendSX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_BendPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_BendPitch + index, cha, 1, &val);
else if ((index >= 4) && (index <=6))
- return Sysex( clk, SX_XG_BendPitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_BendPitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::CafSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::CafSX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_CafPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_CafPitch + index, cha, 1, &val);
else if ((index >= 4) && (index <= 6))
- return Sysex( clk, SX_XG_CafPitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_CafPitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::PafSX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::PafSX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_PafPitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_PafPitch + index, cha, 1, &val);
else if ((index >= 4) && (index <= 6))
- return Sysex( clk, SX_XG_PafPitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_PafPitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::CC1SX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::CC1SX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_CC1Pitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC1Pitch + index, cha, 1, &val);
else if ((index >= 4) && (index <= 6))
- return Sysex( clk, SX_XG_CC1Pitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC1Pitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::CC2SX( int index, long clk, int cha, unsigned char val )
+JZEvent* tXG::CC2SX(int index, long clk, int cha, unsigned char val)
{
if ((index >= 0) && (index <= 2))
- return Sysex( clk, SX_XG_CC2Pitch + index, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC2Pitch + index, cha, 1, &val);
else if ((index >= 4) && (index <= 6))
- return Sysex( clk, SX_XG_CC2Pitch + index - 1, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC2Pitch + index - 1, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::RxChannelSX( long clk, int cha, unsigned char val )
+JZEvent* tXG::RxChannelSX(long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_XG_RxChannel, cha, 1, &val );
+ return Sysex(clk, SX_XG_RxChannel, cha, 1, &val);
}
-JZEvent* tXG::UseForRhythmSX( long clk, int cha, unsigned char val )
+JZEvent* tXG::UseForRhythmSX(long clk, int cha, unsigned char val)
{
- return Sysex( clk, SX_XG_UseForRhythm, cha, 1, &val );
+ return Sysex(clk, SX_XG_UseForRhythm, cha, 1, &val);
}
-JZEvent* tXG::ControllerNumberSX( int ctrlno, long clk, int cha, unsigned char val )
+JZEvent* tXG::ControllerNumberSX(int ctrlno, long clk, int cha, unsigned char val)
{
if (ctrlno == 1)
- return Sysex( clk, SX_XG_CC1CtrlNo, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC1CtrlNo, cha, 1, &val);
else if (ctrlno == 2)
- return Sysex( clk, SX_XG_CC2CtrlNo, cha, 1, &val );
+ return Sysex(clk, SX_XG_CC2CtrlNo, cha, 1, &val);
else
return 0;
}
-JZEvent* tXG::ReverbMacroSX( long clk, unsigned char val, unsigned char lsb )
+JZEvent* tXG::ReverbMacroSX(long clk, unsigned char val, unsigned char lsb)
{
unsigned char valp[2];
valp[0] = val;
valp[1] = lsb;
- return Sysex( clk, SX_XG_ReverbMacro, 2, valp );
+ return Sysex(clk, SX_XG_ReverbMacro, 2, valp);
}
-JZEvent* tXG::ChorusMacroSX( long clk, unsigned char val, unsigned char lsb )
+JZEvent* tXG::ChorusMacroSX(long clk, unsigned char val, unsigned char lsb)
{
- unsigned char valp[2];
- valp[0] = val;
- valp[1] = lsb;
+ unsigned char valp[2];
+ valp[0] = val;
+ valp[1] = lsb;
- return Sysex( clk, SX_XG_ChorusMacro, 2, valp );
+ return Sysex(clk, SX_XG_ChorusMacro, 2, valp);
}
-JZEvent* tXG::EqualizerMacroSX( long clk, unsigned char val )
+JZEvent* tXG::EqualizerMacroSX(long clk, unsigned char val)
{
- return Sysex( clk, SX_XG_EqualizerMacro, val );
+ return Sysex(clk, SX_XG_EqualizerMacro, val);
}
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Track.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -92,7 +92,7 @@
tMtcTime::tMtcTime(tMtcOffset *s)
{
- type = (tMtcType) ((s->Data[0] & 0x60) >> 5);
+ type = (tMtcType) ((s->mpData[0] & 0x60) >> 5);
if (type < Mtc24)
{
type = Mtc24;
@@ -101,10 +101,10 @@
{
type = Mtc30Ndf;
}
- hour = s->Data[0] & 0x1f;
- min = s->Data[1];
- sec = s->Data[2];
- fm = s->Data[3];
+ hour = s->mpData[0] & 0x1f;
+ min = s->mpData[1];
+ sec = s->mpData[2];
+ fm = s->mpData[3];
}
tMtcTime::tMtcTime(int millisec, tMtcType t)
@@ -2085,7 +2085,7 @@
{
if (Copyright)
{
- return (const char *)Copyright->Data;
+ return (const char *)Copyright->mpData;
}
return "";
}
@@ -2116,22 +2116,22 @@
{
if (mName)
{
- return (const char*)mName->Data;
+ return (const char*)mName->mpData;
}
return "";
}
-void JZTrack::SetName(char *str)
+void JZTrack::SetName(const char* pTrackName)
{
if (mName)
{
Kill(mName);
}
- if (strlen(str))
+ if (strlen(pTrackName))
{
- Put(new tTrackName(0, (unsigned char *)str, strlen(str)));
+ Put(new tTrackName(0, (unsigned char *)pTrackName, strlen(pTrackName)));
}
Cleanup();
}
Modified: trunk/jazz/src/Track.h
===================================================================
--- trunk/jazz/src/Track.h 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/Track.h 2008-04-22 04:38:39 UTC (rev 474)
@@ -452,7 +452,7 @@
void Cleanup();
const char* GetName();
- void SetName(char *Name);
+ void SetName(const char *Name);
const char* GetCopyright();
void SetCopyright(char *Copyright);
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/TrackWindow.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -352,6 +352,7 @@
if (pTrack)
{
pTrack->Dialog(this);
+ Refresh(false);
}
}
else if (
Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp
===================================================================
--- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-21 13:49:25 UTC (rev 473)
+++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-04-22 04:38:39 UTC (rev 474)
@@ -426,7 +426,7 @@
state->sysex_found = TRUE;
tWinSysexBuffer *buf = state->osx_buffers->AllocBuffer();
- buf->PrepareOut(state->hout, sx->Data, sx->Length - 1);
+ buf->PrepareOut(state->hout, sx->mpData, sx->Length - 1);
state->play_buffer.put(SYSEX_EVENT, time);
state->play_buffer.put((DWORD)buf, time);
return 0;
@@ -487,7 +487,7 @@
if (s->Length + 1 < maxSysLen)
{
pSysBuf[0] = 0xf0;
- memcpy(pSysBuf + 1, s->Data, s->Length);
+ memcpy(pSysBuf + 1, s->mpData, s->Length);
pSysHdr->lpData = (LPSTR)pSysBuf;
pSysHdr->dwBufferLength = s->Length + 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-21 13:49:28
|
Revision: 473
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=473&view=rev
Author: pstieber
Date: 2008-04-21 06:49:25 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
Added the track dialog to the build. This is a WIP.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
trunk/jazz/src/Track.cpp
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2008-04-21 05:29:47 UTC (rev 472)
+++ trunk/jazz/src/Makefile.am 2008-04-21 13:49:25 UTC (rev 473)
@@ -21,6 +21,7 @@
Dialogs/KeyOnDialog.cpp \
Dialogs/MetronomeSettingsDialog.cpp \
Dialogs/SynthesizerSettingsDialog.cpp \
+Dialogs/TrackDialog.cpp \
Dialogs.cpp \
DynamicArray.cpp \
ErrorMessage.cpp \
@@ -99,6 +100,7 @@
Dialogs/KeyOnDialog.h \
Dialogs/MetronomeSettingsDialog.h \
Dialogs/SynthesizerSettingsDialog.h \
+Dialogs/TrackDialog.h \
Dialogs.h \
DynamicArray.h \
ErrorMessage.h \
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2008-04-21 05:29:47 UTC (rev 472)
+++ trunk/jazz/src/Track.cpp 2008-04-21 13:49:25 UTC (rev 473)
@@ -27,10 +27,10 @@
#include "Configuration.h"
#include "Player.h"
#include "JazzPlusPlusApplication.h"
-//#include "eventwin.h"
#include "TrackWindow.h"
#include "Globals.h"
#include "Song.h"
+#include "Dialogs/TrackDialog.h"
#include <cstdlib>
#include <assert.h>
@@ -1902,26 +1902,17 @@
#endif // OBSOLETE
-void JZTrack::Dialog(JZTrackWindow *parent)
+void JZTrack::Dialog(JZTrackWindow* pParent)
{
+ JZTrackDialog TrackDialog(*this, pParent);
+ TrackDialog.ShowModal();
#ifdef OBSOLETE
-
- tTrackDlg *dlg;
- if (DialogBox)
- {
- DialogBox->Show(true);
- return;
- }
-#ifdef __WXMSW__
- bool modal = true; // keep button down
-#else
- bool modal = false;
-#endif
- DialogBox = new wxDialogBox(parent, "Track Settings", modal, Config(C_TrackDlgXpos), Config(C_TrackDlgYpos));
- dlg = new tTrackDlg((JZTrackWindow*) parent, this);
- dlg->EditForm(DialogBox);
- DialogBox->Fit();
- DialogBox->Show(TRUE);
+ DialogBox = new wxDialogBox(
+ pParent,
+ "Track Settings",
+ modal,
+ Config(C_TrackDlgXpos),
+ Config(C_TrackDlgYpos));
#endif // OBSOLETE
}
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2008-04-21 05:29:47 UTC (rev 472)
+++ trunk/jazz/src/TrackWindow.cpp 2008-04-21 13:49:25 UTC (rev 473)
@@ -342,7 +342,19 @@
{
ToggleTrackState(Point);
}
+ // Check to see if the mouse was clicked inside of a track name.
else if (
+ Point.x >= mTrackNameX &&
+ Point.x < mTrackNameX + mTrackNameWidth)
+ {
+ // Edit the track settings.
+ JZTrack* pTrack = y2Track(Point.y);
+ if (pTrack)
+ {
+ pTrack->Dialog(this);
+ }
+ }
+ else if (
Point.x >= mEventsX && Point.x < mEventsX + mEventsWidth &&
Point.y >= mEventsY && Point.y < mEventsY + mEventsHeight)
{
Modified: trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj
===================================================================
--- trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-21 05:29:47 UTC (rev 472)
+++ trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-21 13:49:25 UTC (rev 473)
@@ -853,6 +853,14 @@
RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.h"
>
</File>
+ <File
+ RelativePath="..\src\Dialogs\TrackDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\Dialogs\TrackDialog.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-21 05:29:47 UTC (rev 472)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-21 13:49:25 UTC (rev 473)
@@ -852,6 +852,14 @@
RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.h"
>
</File>
+ <File
+ RelativePath="..\src\Dialogs\TrackDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\Dialogs\TrackDialog.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2008-04-21 05:29:49
|
Revision: 472
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=472&view=rev
Author: pstieber
Date: 2008-04-20 22:29:47 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
Made a cosmetic change.
Modified Paths:
--------------
trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp
Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-21 05:29:17 UTC (rev 471)
+++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2008-04-21 05:29:47 UTC (rev 472)
@@ -84,7 +84,6 @@
mKeyNormalName =
mIndexToName[mPitchToIndex[mMetronomeInfo.GetKeyNormal()]];
-
mKeyAccentedName =
mIndexToName[mPitchToIndex[mMetronomeInfo.GetKeyAccented()]];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|