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-22 05:42:28
|
Revision: 554 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=554&view=rev Author: pstieber Date: 2008-05-21 22:42:06 -0700 (Wed, 21 May 2008) Log Message: ----------- Updated to the new key off interface. Modified Paths: -------------- trunk/jazz/src/Player.cpp Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-22 05:38:45 UTC (rev 553) +++ trunk/jazz/src/Player.cpp 2008-05-22 05:42:06 UTC (rev 554) @@ -1643,8 +1643,8 @@ SEQ_STOP_NOTE( mididev, pKeyOff->GetChannel(), - pKeyOff->Key, - pKeyOff->OffVeloc); + pKeyOff->GetKey(), + pKeyOff->GetOffVelocity()); if (now) seqbuf_flush_last_event(); } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-22 05:38:57
|
Revision: 553 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=553&view=rev Author: pstieber Date: 2008-05-21 22:38:45 -0700 (Wed, 21 May 2008) Log Message: ----------- Started using accessors in the tKeyOff event class. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp trunk/jazz/src/Events.h trunk/jazz/src/Player.cpp trunk/jazz/src/StandardFile.cpp trunk/jazz/src/Track.cpp trunk/jazz/src/mswin/WindowsPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-22 05:38:45 UTC (rev 553) @@ -425,8 +425,8 @@ tKeyOff* pKeyOff = pEvent->IsKeyOff(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEOFF); ev.data.note.channel = pKeyOff->GetChannel(); - ev.data.note.note = pKeyOff->Key; - ev.data.note.velocity = pKeyOff->OffVeloc; + ev.data.note.note = pKeyOff->GetKey(); + ev.data.note.velocity = pKeyOff->GetOffVelocity(); rc = write(&ev, now); } break; Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/Events.h 2008-05-22 05:38:45 UTC (rev 553) @@ -525,8 +525,8 @@ { public: - tChannelEvent(int clk, unsigned char sta, int Channel) - : JZEvent(clk, sta) + tChannelEvent(int Clock, unsigned char sta, int Channel) + : JZEvent(Clock, sta) { mChannel = Channel; } @@ -567,12 +567,12 @@ public: tKeyOn( - int clk, - int cha, + int Clock, + int Channel, unsigned char Key, unsigned char Velocity, unsigned short Length = 0) - : tChannelEvent(clk, StatKeyOn, cha), + : tChannelEvent(Clock, StatKeyOn, Channel), mKey(Key), mVelocity(Velocity), mLength(Length), @@ -689,20 +689,21 @@ class tKeyOff : public tChannelEvent { public: - unsigned char Key; - // SN++ - unsigned char OffVeloc; - - tKeyOff(int clk, int cha, unsigned char key, unsigned char veloc = 0) - : tChannelEvent(clk, StatKeyOff, cha) + tKeyOff( + int Clock, + int Channel, + unsigned char Key, + unsigned char OffVelocity = 0) + : tChannelEvent(Clock, StatKeyOff, Channel), + mKey(Key), + mOffVelocity(OffVelocity) { - Key = key; - OffVeloc = veloc; } virtual int Write(JZWriteBase &io) { - edb(); return io.Write(this, Key, OffVeloc); + edb(); + return io.Write(this, mKey, mOffVelocity); } virtual tKeyOff* IsKeyOff() @@ -716,6 +717,27 @@ edb(); return new tKeyOff(*this); } + + unsigned char GetKey() const + { + return mKey; + } + + void SetKey(unsigned char Key) + { + mKey = Key; + } + + unsigned char GetOffVelocity() const + { + return mOffVelocity; + } + + private: + + unsigned char mKey; + + unsigned char mOffVelocity; }; @@ -724,14 +746,18 @@ public: short Value; - tPitch(int clk, unsigned short cha, unsigned char lo, unsigned char hi) - : tChannelEvent(clk, StatPitch, cha) + tPitch( + int Clock, + unsigned short Channel, + unsigned char lo, + unsigned char hi) + : tChannelEvent(Clock, StatPitch, Channel) { Value = ((hi << 7) | lo) - 8192; } - tPitch(int clk, unsigned short cha, short val) - : tChannelEvent(clk, StatPitch, cha) + tPitch(int Clock, unsigned short Channel, short val) + : tChannelEvent(Clock, StatPitch, Channel) { Value = val; } @@ -792,8 +818,12 @@ unsigned char mControl; unsigned char mValue; - tControl(int clk, int cha, unsigned char ctl, unsigned char val) - : tChannelEvent(clk, StatControl, cha) + tControl( + int Clock, + int Channel, + unsigned char ctl, + unsigned char val) + : tChannelEvent(Clock, StatControl, Channel) { mControl = ctl; mValue = val; @@ -851,8 +881,8 @@ { public: - tProgram(int clk, int Channel, unsigned char Program) - : tChannelEvent(clk, StatProgram, Channel) + tProgram(int Clock, int Channel, unsigned char Program) + : tChannelEvent(Clock, StatProgram, Channel) { mProgram = Program; } @@ -927,11 +957,11 @@ unsigned short Length; tMetaEvent( - int clk, + int Clock, unsigned char sta, unsigned char* dat, unsigned short len) - : JZEvent(clk, sta) + : JZEvent(Clock, sta) { Length = len; mpData = new unsigned char [len + 1]; @@ -973,8 +1003,8 @@ // the file. public: enum { DATALEN = 20 }; - tJazzMeta(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatJazzMeta, dat, len) + tJazzMeta(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatJazzMeta, dat, len) { } tJazzMeta() @@ -1041,8 +1071,8 @@ { public: - tSysEx(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatSysEx, dat, len) + tSysEx(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatSysEx, dat, len) { } @@ -1066,8 +1096,8 @@ { public: - tSongPtr(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatSongPtr, dat, len) + tSongPtr(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatSongPtr, dat, len) { } @@ -1087,13 +1117,13 @@ class tMidiClock : public tMetaEvent { public: - tMidiClock(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatMidiClock, dat, len) + tMidiClock(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatMidiClock, dat, len) { } - tMidiClock(int clk) - : tMetaEvent(clk, StatMidiClock, 0, 0) + tMidiClock(int Clock) + : tMetaEvent(Clock, StatMidiClock, 0, 0) { } @@ -1113,14 +1143,17 @@ class tStartPlay : public tMetaEvent { public: - tStartPlay(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatStartPlay, dat, len) + + tStartPlay(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatStartPlay, dat, len) { } - tStartPlay(int clk) - : tMetaEvent(clk, StatStartPlay, 0, 0) + + tStartPlay(int Clock) + : tMetaEvent(Clock, StatStartPlay, 0, 0) { } + virtual tStartPlay* IsStartPlay() { edb(); @@ -1137,13 +1170,14 @@ class tContPlay : public tMetaEvent { public: - tContPlay(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatContPlay, dat, len) + + tContPlay(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatContPlay, dat, len) { } - tContPlay(int clk) - : tMetaEvent(clk, StatContPlay, 0, 0) + tContPlay(int Clock) + : tMetaEvent(Clock, StatContPlay, 0, 0) { } @@ -1164,13 +1198,13 @@ { public: - tStopPlay(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatStopPlay, dat, len) + tStopPlay(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatStopPlay, dat, len) { } - tStopPlay(int clk) - : tMetaEvent(clk, StatStopPlay, 0, 0) + tStopPlay(int Clock) + : tMetaEvent(Clock, StatStopPlay, 0, 0) { } @@ -1190,14 +1224,17 @@ class tText : public tMetaEvent { public: - tText(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatText, dat, len) + + tText(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatText, dat, len) { } - tText(int clk, unsigned char *dat) - : tMetaEvent(clk, StatText, dat, strlen((const char*)dat)) + + tText(int Clock, unsigned char *dat) + : tMetaEvent(Clock, StatText, dat, strlen((const char*)dat)) { } + virtual tText* IsText() { edb(); @@ -1222,8 +1259,8 @@ { public: - tCopyright(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatCopyright, dat, len) + tCopyright(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatCopyright, dat, len) { } @@ -1244,8 +1281,8 @@ { public: - tTrackName(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatTrackName, dat, len) + tTrackName(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatTrackName, dat, len) { // SN++ Diese Restriktion ist viel zu hart. Es genuegt, den Namen im Mixerdialog // zu begrenzen!!! @@ -1280,8 +1317,8 @@ { public: - tMarker(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatMarker, dat, len) + tMarker(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatMarker, dat, len) { } @@ -1318,8 +1355,8 @@ // that seems to be for serialization. int eventlength; - tPlayTrack(int clk, unsigned char *chardat, unsigned short len) - : tMetaEvent(clk, StatPlayTrack, chardat, len) + tPlayTrack(int Clock, unsigned char *chardat, unsigned short len) + : tMetaEvent(Clock, StatPlayTrack, chardat, len) { int *dat = (int *)chardat; @@ -1335,8 +1372,8 @@ } } - tPlayTrack(int clk, int track, int transpose, int eventlength) - : tMetaEvent(clk, StatPlayTrack, 0, 0) + tPlayTrack(int Clock, int track, int transpose, int eventlength) + : tMetaEvent(Clock, StatPlayTrack, 0, 0) { this->track=track; this->transpose=transpose; @@ -1391,11 +1428,11 @@ int uSec; tSetTempo( - int clk, + int Clock, unsigned char Character1, unsigned char Character2, unsigned char Character3) - : JZEvent(clk, StatSetTempo) + : JZEvent(Clock, StatSetTempo) { uSec = ((unsigned)Character1 << 16L) + @@ -1403,8 +1440,8 @@ Character3; } - tSetTempo(int clk, int bpm) - : JZEvent(clk, StatSetTempo) + tSetTempo(int Clock, int bpm) + : JZEvent(Clock, StatSetTempo) { SetBPM(bpm); } @@ -1448,8 +1485,8 @@ class tMtcOffset : public tMetaEvent { public: - tMtcOffset(int clk, unsigned char *dat, unsigned short len) - : tMetaEvent(clk, StatMtcOffset, dat, len) + tMtcOffset(int Clock, unsigned char *dat, unsigned short len) + : tMetaEvent(Clock, StatMtcOffset, dat, len) { } virtual tMtcOffset* IsMtcOffset() @@ -1473,12 +1510,12 @@ unsigned char Numerator, Denomiator, Clocks, Quarter; tTimeSignat( - int clk, + int Clock, unsigned char Character1, unsigned char Character2, unsigned char Character3 = 24, unsigned char Character4 = 8) - : JZEvent(clk, StatTimeSignat) + : JZEvent(Clock, StatTimeSignat) { Numerator = Character1; Denomiator = Character2; @@ -1518,8 +1555,8 @@ { public: - tEndOfTrack(int clk) - : JZEvent(clk, StatEndOfTrack) + tEndOfTrack(int Clock) + : JZEvent(Clock, StatEndOfTrack) { } @@ -1549,8 +1586,8 @@ int Sharps; int Minor; - tKeySignat(int clk, int Character1, int Character2) - : JZEvent(clk, StatKeySignat) + tKeySignat(int Clock, int Character1, int Character2) + : JZEvent(Clock, StatKeySignat) { Sharps = Character1; Minor = Character2; @@ -1581,8 +1618,12 @@ short Value; short Key; - tKeyPressure(int clk, unsigned short cha, unsigned char key, unsigned char val) - : tChannelEvent(clk, StatKeyPressure, cha) + tKeyPressure( + int Clock, + unsigned short Channel, + unsigned char key, + unsigned char val) + : tChannelEvent(Clock, StatKeyPressure, Channel) { Value = val; Key = key; @@ -1630,8 +1671,8 @@ public: unsigned char Value; - tChnPressure(int clk, int cha, unsigned char val) - : tChannelEvent(clk, StatChnPressure, cha) + tChnPressure(int Clock, int Channel, unsigned char val) + : tChannelEvent(Clock, StatChnPressure, Channel) { Value = val; } Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/Player.cpp 2008-05-22 05:38:45 UTC (rev 553) @@ -506,7 +506,7 @@ // SN++ Patch: Notes off for not GM/GS devices int ii; - tKeyOff off(0, 0, 0); + tKeyOff pKeyOff(0, 0, 0); for (ii = 0; ii < Song->GetTrackCount(); ii++) { @@ -522,9 +522,9 @@ { if (pKeyOn->GetClock() + pKeyOn->GetEventLength() >= Clock - 100) { - off.SetChannel(pKeyOn->GetChannel()); - off.Key = pKeyOn->GetKey(); - OutNow(&off); + pKeyOff.SetChannel(pKeyOn->GetChannel()); + pKeyOff.SetKey(pKeyOn->GetKey()); + OutNow(&pKeyOff); } } pEvent = Iterator.Next(); Modified: trunk/jazz/src/StandardFile.cpp =================================================================== --- trunk/jazz/src/StandardFile.cpp 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/StandardFile.cpp 2008-05-22 05:38:45 UTC (rev 553) @@ -247,7 +247,7 @@ // KeyOff -> KeyOn mit Vel=0. Gives better Runningstatus! case StatKeyOff: // SN-- only if KeyOff veloc is zero - if (!pEvent->IsKeyOff()->OffVeloc) + if (!pEvent->IsKeyOff()->GetOffVelocity()) { Stat = StatKeyOn | pEvent->IsChannelEvent()->GetChannel(); if (Stat != RunningStatus) Modified: trunk/jazz/src/Track.cpp =================================================================== --- trunk/jazz/src/Track.cpp 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/Track.cpp 2008-05-22 05:38:45 UTC (rev 553) @@ -1243,7 +1243,7 @@ if ( pKeyOff && !pKeyOff->IsKilled() && - pKeyOn->GetKey() == pKeyOff->Key && + pKeyOn->GetKey() == pKeyOff->GetKey() && pKeyOn->GetChannel() == pKeyOff->GetChannel()) { pKeyOn->SetLength(pKeyOff->GetClock() - pKeyOn->GetClock()); Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-22 05:26:26 UTC (rev 552) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-22 05:38:45 UTC (rev 553) @@ -278,7 +278,7 @@ { tKeyOff* pKeyOff = pEvent->IsKeyOff(); u.c[0] = 0x80 | pKeyOff->GetChannel(); - u.c[1] = pKeyOff->Key; + u.c[1] = pKeyOff->GetKey(); u.c[2] = 0; } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-22 05:26:27
|
Revision: 552 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=552&view=rev Author: pstieber Date: 2008-05-21 22:26:26 -0700 (Wed, 21 May 2008) Log Message: ----------- Started using accessors in the tProgram event class. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Events.h trunk/jazz/src/Player.cpp trunk/jazz/src/Track.cpp trunk/jazz/src/mswin/WindowsPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-22 05:26:26 UTC (rev 552) @@ -433,10 +433,10 @@ case StatProgram: { - tProgram *k = pEvent->IsProgram(); + tProgram* pProgram = pEvent->IsProgram(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_PGMCHANGE); - ev.data.control.channel = k->GetChannel(); - ev.data.control.value = k->Program; + ev.data.control.channel = pProgram->GetChannel(); + ev.data.control.value = pProgram->GetProgram(); rc = write(&ev, now); } break; Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/Dialogs.cpp 2008-05-22 05:26:26 UTC (rev 552) @@ -1053,21 +1053,23 @@ }; -tProgramDlg::tProgramDlg(tProgram *e, JZPianoWindow* w, JZTrack *t) - : tEventDlg(e, w, t), - Program(e->Program + 1)//, +tProgramDlg::tProgramDlg(tProgram* pProgram, JZPianoWindow* w, JZTrack *t) + : tEventDlg(pProgram, w, t), + Program(pProgram->GetProgram() + 1)//, // Choice("Program", &gpConfig->GetVoiceName(0), &Program) { - Event = e; + Event = pProgram; } bool tProgramDlg::OnClose() { - //Choice.GetValue(); +// Choice.GetValue(); if (Program <= 0) + { Program = 1; - ((tProgram *)Copy)->Program = Program - 1; + } + ((tProgram *)Copy)->SetProgram(Program - 1); return tEventDlg::OnClose(); } Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/Events.h 2008-05-22 05:26:26 UTC (rev 552) @@ -851,17 +851,15 @@ { public: - unsigned char Program; - - tProgram(int clk, int cha, unsigned char prg) - : tChannelEvent(clk, StatProgram, cha) + tProgram(int clk, int Channel, unsigned char Program) + : tChannelEvent(clk, StatProgram, Channel) { - Program = prg; + mProgram = Program; } virtual int Write(JZWriteBase &io) { - edb(); return io.Write(this, Program); + edb(); return io.Write(this, mProgram); } virtual tProgram* IsProgram() @@ -879,19 +877,19 @@ virtual int GetValue() const { edb(); - return Program; + return mProgram; } virtual int GetPitch() const { edb(); - return Program; + return mProgram; } - virtual void SetPitch(int p) + virtual void SetPitch(int Pitch) { edb(); - Program = p; + mProgram = Pitch; } virtual const wxPen* GetPen() const @@ -903,6 +901,20 @@ { return wxGREEN_BRUSH; } + + unsigned char GetProgram() const + { + return mProgram; + } + + void SetProgram(unsigned char Program) + { + mProgram = Program; + } + + private: + + unsigned char mProgram; }; Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/Player.cpp 2008-05-22 05:26:26 UTC (rev 552) @@ -1650,8 +1650,8 @@ break; case StatProgram: { - tProgram *k = pEvent->IsProgram(); - SEQ_SET_PATCH(mididev, k->GetChannel(), k->Program); + tProgram* pProgram = pEvent->IsProgram(); + SEQ_SET_PATCH(mididev, pProgram->GetChannel(), pProgram->GetProgram()); if (now) seqbuf_flush_last_event(); } break; Modified: trunk/jazz/src/Track.cpp =================================================================== --- trunk/jazz/src/Track.cpp 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/Track.cpp 2008-05-22 05:26:26 UTC (rev 552) @@ -2411,7 +2411,7 @@ { if (mPatch) { - return mPatch->Program + 1; + return mPatch->GetProgram() + 1; } return 0; } Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-21 15:51:25 UTC (rev 551) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-22 05:26:26 UTC (rev 552) @@ -285,15 +285,15 @@ case StatProgram: { - tProgram *k = pEvent->IsProgram(); - u.c[0] = 0xC0 | k->GetChannel(); - u.c[1] = k->Program; + tProgram* pProgram = pEvent->IsProgram(); + u.c[0] = 0xC0 | pProgram->GetChannel(); + u.c[1] = pProgram->GetProgram(); } break; case StatChnPressure: { - tChnPressure *k = pEvent->IsChnPressure(); + tChnPressure* k = pEvent->IsChnPressure(); u.c[0] = 0xC0 | k->GetChannel(); u.c[1] = k->Value; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-21 15:51:31
|
Revision: 551 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=551&view=rev Author: pstieber Date: 2008-05-21 08:51:25 -0700 (Wed, 21 May 2008) Log Message: ----------- Updated the ALSA specific portion of the player code for the latest event encapsulation changes. Modified Paths: -------------- trunk/jazz/src/Player.cpp Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-21 15:47:39 UTC (rev 550) +++ trunk/jazz/src/Player.cpp 2008-05-21 15:51:25 UTC (rev 551) @@ -1630,7 +1630,7 @@ tKeyOn* pKeyOn = pEvent->IsKeyOn(); SEQ_START_NOTE( mididev, - pKeyOn->Channel, + pKeyOn->GetChannel(), pKeyOn->GetKey(), pKeyOn->GetVelocity()); if (now) seqbuf_flush_last_event(); @@ -1642,7 +1642,7 @@ tKeyOff* pKeyOff = pEvent->IsKeyOff(); SEQ_STOP_NOTE( mididev, - pKeyOff->Channel, + pKeyOff->GetChannel(), pKeyOff->Key, pKeyOff->OffVeloc); if (now) seqbuf_flush_last_event(); @@ -1651,7 +1651,7 @@ case StatProgram: { tProgram *k = pEvent->IsProgram(); - SEQ_SET_PATCH(mididev, k->Channel, k->Program); + SEQ_SET_PATCH(mididev, k->GetChannel(), k->Program); if (now) seqbuf_flush_last_event(); } break; @@ -1660,7 +1660,7 @@ case StatKeyPressure: { tKeyPressure *k = pEvent->IsKeyPressure(); - SEQ_KEY_PRESSURE(mididev, k->Channel, k->Key, k->Value); + SEQ_KEY_PRESSURE(mididev, k->GetChannel(), k->Key, k->Value); if (now) seqbuf_flush_last_event(); } break; @@ -1669,7 +1669,7 @@ case StatChnPressure: { tChnPressure *k = pEvent->IsChnPressure(); - SEQ_CHN_PRESSURE(mididev, k->Channel, k->Value); + SEQ_CHN_PRESSURE(mididev, k->GetChannel(), k->Value); if (now) seqbuf_flush_last_event(); } break; @@ -1677,7 +1677,7 @@ case StatControl: { tControl *k = pEvent->IsControl(); - SEQ_CONTROL(mididev, k->Channel, k->mControl, k->mValue); + SEQ_CONTROL(mididev, k->GetChannel(), k->mControl, k->mValue); if (now) seqbuf_flush_last_event(); } break; @@ -1685,7 +1685,7 @@ case StatPitch: { tPitch *k = pEvent->IsPitch(); - SEQ_BENDER(mididev, k->Channel, k->Value + 8192); + SEQ_BENDER(mididev, k->GetChannel(), k->Value + 8192); if (now) seqbuf_flush_last_event(); } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-21 15:47:42
|
Revision: 550 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=550&view=rev Author: pstieber Date: 2008-05-21 08:47:39 -0700 (Wed, 21 May 2008) Log Message: ----------- Updated the ALSA driver for the latest event encapsulation changes. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-21 01:47:00 UTC (rev 549) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-21 15:47:39 UTC (rev 550) @@ -413,7 +413,7 @@ { tKeyOn* pKeyOn = pEvent->IsKeyOn(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEON); - ev.data.note.channel = pKeyOn->Channel; + ev.data.note.channel = pKeyOn->GetChannel(); ev.data.note.note = pKeyOn->GetKey(); ev.data.note.velocity = pKeyOn->GetVelocity(); rc = write(&ev, now); @@ -424,7 +424,7 @@ { tKeyOff* pKeyOff = pEvent->IsKeyOff(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEOFF); - ev.data.note.channel = pKeyOff->Channel; + ev.data.note.channel = pKeyOff->GetChannel(); ev.data.note.note = pKeyOff->Key; ev.data.note.velocity = pKeyOff->OffVeloc; rc = write(&ev, now); @@ -435,7 +435,7 @@ { tProgram *k = pEvent->IsProgram(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_PGMCHANGE); - ev.data.control.channel = k->Channel; + ev.data.control.channel = k->GetChannel(); ev.data.control.value = k->Program; rc = write(&ev, now); } @@ -445,7 +445,7 @@ { tKeyPressure *k = pEvent->IsKeyPressure(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_KEYPRESS); - ev.data.note.channel = k->Channel; + ev.data.note.channel = k->GetChannel(); ev.data.note.note = k->Key; ev.data.note.velocity = k->Value; rc = write(&ev, now); @@ -456,7 +456,7 @@ { tChnPressure *k = pEvent->IsChnPressure(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_CHANPRESS); - ev.data.control.channel = k->Channel; + ev.data.control.channel = k->GetChannel(); ev.data.control.value = k->Value; rc = write(&ev, now); } @@ -466,7 +466,7 @@ { tControl *k = pEvent->IsControl(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_CONTROLLER); - ev.data.control.channel = k->Channel; + ev.data.control.channel = k->GetChannel(); ev.data.control.param = k->mControl; ev.data.control.value = k->mValue; rc = write(&ev, now); @@ -477,7 +477,7 @@ { tPitch *k = pEvent->IsPitch(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_PITCHBEND); - ev.data.control.channel = k->Channel; + ev.data.control.channel = k->GetChannel(); ev.data.control.value = k->Value; rc = write(&ev, now); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-21 01:47:08
|
Revision: 549 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=549&view=rev Author: pstieber Date: 2008-05-20 18:47:00 -0700 (Tue, 20 May 2008) Log Message: ----------- Encapsulated the channel member. Modified Paths: -------------- trunk/jazz/src/AsciiMidiFile.cpp trunk/jazz/src/Command.cpp trunk/jazz/src/ControlEdit.cpp trunk/jazz/src/Dialogs/KeyOnDialog.cpp trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Events.cpp trunk/jazz/src/Events.h trunk/jazz/src/PianoWindow.cpp trunk/jazz/src/Player.cpp trunk/jazz/src/StandardFile.cpp trunk/jazz/src/Track.cpp trunk/jazz/src/mswin/WindowsPlayer.cpp Modified: trunk/jazz/src/AsciiMidiFile.cpp =================================================================== --- trunk/jazz/src/AsciiMidiFile.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/AsciiMidiFile.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -162,12 +162,12 @@ //----------------------------------------------------------------------------- int JZAsciiWrite::Write(JZEvent* pEvent, unsigned char* pData, int Length) { - tChannelEvent *ce; + tChannelEvent* pChannelEvent; fprintf(mpFd, "%6d %02x ", pEvent->GetClock(), pEvent->GetStat()); - if ((ce = pEvent->IsChannelEvent()) != 0) + if ((pChannelEvent = pEvent->IsChannelEvent()) != 0) { - fprintf(mpFd, "%2d ", ce->Channel); + fprintf(mpFd, "%2d ", pChannelEvent->GetChannel()); } else { Modified: trunk/jazz/src/Command.cpp =================================================================== --- trunk/jazz/src/Command.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Command.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -443,7 +443,7 @@ if ((c = pEvent->IsChannelEvent()) != 0) { c = (tChannelEvent *)pEvent->Copy(); - c->Channel = NewChannel; + c->SetChannel(NewChannel); pTrack->Kill(pEvent); pTrack->Put(c); } @@ -620,7 +620,7 @@ { startclock = pEvent->IsKeyOn()->GetClock(); startvelocity = pEvent->IsKeyOn()->GetVelocity(); - channel = pEvent->IsKeyOn()->Channel; + channel = pEvent->IsKeyOn()->GetChannel(); startkey = pEvent->IsKeyOn()->GetKey(); previouspitch = pEvent->GetPitch(); } @@ -732,7 +732,7 @@ else if (shortenOverlaps) { // Shorten length of overlapping notes. - tKeyOn* pPreviousKeyOn = prev_note[pKeyOn->Channel][pKeyOn->GetKey()]; + tKeyOn* pPreviousKeyOn = prev_note[pKeyOn->GetChannel()][pKeyOn->GetKey()]; if ( pPreviousKeyOn && pPreviousKeyOn->GetClock() + pPreviousKeyOn->GetEventLength() >= @@ -745,7 +745,7 @@ pTrack->Kill(pPreviousKeyOn); } } - prev_note[pKeyOn->Channel][pKeyOn->GetKey()] = pKeyOn; + prev_note[pKeyOn->GetChannel()][pKeyOn->GetKey()] = pKeyOn; } } } Modified: trunk/jazz/src/ControlEdit.cpp =================================================================== --- trunk/jazz/src/ControlEdit.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/ControlEdit.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -705,7 +705,7 @@ key_clk = pKeyOn->GetClock() + 1; key_end = pKeyOn->GetClock() + pKeyOn->GetEventLength(); key_val = pKeyOn->GetKey(); - key_cha = pKeyOn->Channel; + key_cha = pKeyOn->GetChannel(); } if (key_val>0) { Modified: trunk/jazz/src/Dialogs/KeyOnDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -199,10 +199,10 @@ mpLengthEdit->ChangeValue(LengthString); Oss.str(""); - Oss << (int)mpEvent->Channel + 1; + Oss << (int)mpEvent->GetChannel() + 1; mpChannelValue->SetLabel(Oss.str().c_str()); - mpChannelKnob->SetValue(mpEvent->Channel + 1); + mpChannelKnob->SetValue(mpEvent->GetChannel() + 1); string ClockString; gpProject->ClockToString(mpEvent->GetClock(), ClockString); @@ -228,7 +228,7 @@ Iss >> Length; mpEvent->SetLength(Length); - mpEvent->Channel = mpChannelKnob->GetValue() - 1; + mpEvent->SetChannel(mpChannelKnob->GetValue() - 1); wxString ClockString = mpClockEdit->GetValue(); int Clock = gpProject->StringToClock(ClockString.c_str()); Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Dialogs.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -763,10 +763,10 @@ int Channel; - tChEventDlg(tChannelEvent *e, JZPianoWindow* w, JZTrack *t) - : tEventDlg(e, w, t) + tChEventDlg(tChannelEvent* pChannelEvent, JZPianoWindow* w, JZTrack *t) + : tEventDlg(pChannelEvent, w, t) { - Channel = e->Channel + 1; // 1..16 + Channel = pChannelEvent->GetChannel() + 1; // 1..16 } void AddProperties(); bool OnClose(); @@ -785,7 +785,7 @@ bool tChEventDlg::OnClose() { - ((tChannelEvent *)Copy)->Channel = Channel - 1; + ((tChannelEvent *)Copy)->SetChannel(Channel - 1); tEventDlg::OnClose(); return false; } Modified: trunk/jazz/src/Events.cpp =================================================================== --- trunk/jazz/src/Events.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Events.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -172,7 +172,7 @@ case StatPitch: nBytes = 0; - Buffer[nBytes++] = Stat | ((tChannelEvent *)pEvent)->Channel; + Buffer[nBytes++] = Stat | ((tChannelEvent *)pEvent)->GetChannel(); while(Length--) { Buffer[nBytes++] = *pData++; Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Events.h 2008-05-21 01:47:00 UTC (rev 549) @@ -313,6 +313,10 @@ class tPlayTrack; class tEndOfTrack; +//***************************************************************************** +// Description: +// This is the MIDI event base class declaration. +//***************************************************************************** class JZEvent { public: @@ -521,12 +525,10 @@ { public: - unsigned char Channel; - - tChannelEvent(int clk, unsigned char sta, int cha) + tChannelEvent(int clk, unsigned char sta, int Channel) : JZEvent(clk, sta) { - Channel = cha; + mChannel = Channel; } virtual tChannelEvent* IsChannelEvent() @@ -540,6 +542,20 @@ edb(); return new tChannelEvent(*this); } + + unsigned char GetChannel() const + { + return mChannel; + } + + void SetChannel(unsigned char Channel) + { + mChannel = Channel; + } + + private: + + unsigned char mChannel; }; Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/PianoWindow.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -283,7 +283,7 @@ tEventIterator iter(Win->GetTrack()); tKeyPressure *a; key = Copy->GetKey(); - channel = Copy->Channel; + channel = Copy->GetChannel(); JZEvent* pEvent = iter.Range( Copy->GetClock() + Copy->GetEventLength(), Copy->GetClock() + mpKeyOn->GetEventLength()); @@ -292,7 +292,7 @@ a = pEvent->IsKeyPressure(); if (a) { - if (a->Key == key && a->Channel == channel) + if (a->Key == key && a->GetChannel() == channel) { Win->KillTrackEvent(pEvent); } @@ -2415,7 +2415,7 @@ return; } key = pKeyOn->GetKey(); - channel = pKeyOn->Channel; + channel = pKeyOn->GetChannel(); pEvent = iter.Range( pKeyOn->GetClock() + 1, pKeyOn->GetClock() + pKeyOn->GetEventLength()); @@ -2424,7 +2424,7 @@ a = pEvent->IsKeyPressure(); if (a) { - if (a->Key == key && a->Channel == channel) + if (a->Key == key && a->GetChannel() == channel) { pTrack->Kill(pEvent); } @@ -2445,7 +2445,7 @@ { return; } - channel = pKeyOn->Channel; + channel = pKeyOn->GetChannel(); if (pKeyOn->GetEventLength() < 2) { return; @@ -2461,7 +2461,7 @@ a = pEvent->IsKeyPressure(); if (a) { - if (a->Key == key && a->Channel == channel) + if (a->Key == key && a->GetChannel() == channel) { mPasteBuffer.Put(pEvent->Copy()); } @@ -2960,7 +2960,7 @@ mListen.KeyOn( pTrack, pKeyOn->GetKey(), - pKeyOn->Channel, + pKeyOn->GetChannel(), pKeyOn->GetVelocity(), pKeyOn->GetEventLength()); } @@ -3041,7 +3041,9 @@ c->SetPitch(c->GetPitch() + DeltaPitch); c->SetClock(c->GetClock() + DeltaClock); if (pTrack->ForceChannel && c->IsChannelEvent()) - c->IsChannelEvent()->Channel = pTrack->Channel - 1; + { + c->IsChannelEvent()->SetChannel(pTrack->Channel - 1); + } tKeyOn* pKeyOn = c->IsKeyOn(); if (pKeyOn) { @@ -3054,7 +3056,7 @@ mListen.KeyOn( pTrack, pKeyOn->GetKey(), - pKeyOn->Channel, + pKeyOn->GetChannel(), pKeyOn->GetVelocity(), pKeyOn->GetEventLength()); } Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Player.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -522,7 +522,7 @@ { if (pKeyOn->GetClock() + pKeyOn->GetEventLength() >= Clock - 100) { - off.Channel = pKeyOn->Channel; + off.SetChannel(pKeyOn->GetChannel()); off.Key = pKeyOn->GetKey(); OutNow(&off); } @@ -622,15 +622,15 @@ { for (int c = 0; c < 16; c++) { - NoteOff.Channel = c; + NoteOff.SetChannel(c); NoteOff.SetDevice(dev); OutNow(&NoteOff); - Pitch.Channel = c; + Pitch.SetChannel(c); Pitch.SetDevice(dev); OutNow(&Pitch); - CtrlRes.Channel = c; + CtrlRes.SetChannel(c); CtrlRes.SetDevice(dev); OutNow(&CtrlRes); } Modified: trunk/jazz/src/StandardFile.cpp =================================================================== --- trunk/jazz/src/StandardFile.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/StandardFile.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -249,7 +249,7 @@ // SN-- only if KeyOff veloc is zero if (!pEvent->IsKeyOff()->OffVeloc) { - Stat = StatKeyOn | pEvent->IsChannelEvent()->Channel; + Stat = StatKeyOn | pEvent->IsChannelEvent()->GetChannel(); if (Stat != RunningStatus) { RunningStatus = Stat; @@ -260,7 +260,7 @@ } else { - Stat = StatKeyOff | pEvent->IsChannelEvent()->Channel; + Stat = StatKeyOff | pEvent->IsChannelEvent()->GetChannel(); if (Stat != RunningStatus) { RunningStatus = Stat; @@ -281,7 +281,7 @@ // SN++ case StatChnPressure: - Stat = pEvent->GetStat() | pEvent->IsChannelEvent()->Channel; + Stat = pEvent->GetStat() | pEvent->IsChannelEvent()->GetChannel(); if (Stat != RunningStatus) { RunningStatus = Stat; Modified: trunk/jazz/src/Track.cpp =================================================================== --- trunk/jazz/src/Track.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/Track.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -40,17 +40,17 @@ return mMsb.Write(Io) + mLsb.Write(Io) + mDataMsb.Write(Io); } -void tParam::SetCha(unsigned char cha) +void tParam::SetCha(unsigned char Channel) { - mMsb.Channel = cha; - mLsb.Channel = cha; - mDataMsb.Channel = cha; + mMsb.SetChannel(Channel); + mLsb.SetChannel(Channel); + mDataMsb.SetChannel(Channel); #ifdef OBSOLETE - mResetMb.Channel = cha; //???? JAVE commented out this while porting + mResetMb.SetChannel(Channel); //???? JAVE commented out this while porting #endif // OBSOLETE - mResetLsb.Channel = cha; + mResetLsb.SetChannel(Channel); } /* @@ -1166,7 +1166,7 @@ // SN++ added off veloc JZEvent* pKeyOff = new tKeyOff( pKeyOn->GetClock() + pKeyOn->GetEventLength(), - pKeyOn->Channel, + pKeyOn->GetChannel(), pKeyOn->GetKey(), pKeyOn->GetOffVelocity()); @@ -1244,7 +1244,7 @@ pKeyOff && !pKeyOff->IsKilled() && pKeyOn->GetKey() == pKeyOff->Key && - pKeyOn->Channel == pKeyOff->Channel) + pKeyOn->GetChannel() == pKeyOff->GetChannel()) { pKeyOn->SetLength(pKeyOff->GetClock() - pKeyOn->GetClock()); if (pKeyOn->GetEventLength() <= 0) @@ -1476,7 +1476,7 @@ case 0x06: Data = e->IsControl()->mValue; // Rpn/Nrpn Data SpecialEvent = 1; - cha = e->IsControl()->Channel; + cha = e->IsControl()->GetChannel(); switch (Msb) { case 0x01: // Nrpn @@ -1630,7 +1630,7 @@ NeedToDelete = false; if (!Channel && e->IsChannelEvent()) { - Channel = e->IsChannelEvent()->Channel + 1; + Channel = e->IsChannelEvent()->GetChannel() + 1; } } if (e->IsEndOfTrack()) @@ -1767,7 +1767,7 @@ if ((c = e->IsChannelEvent()) != 0) { c = (tChannelEvent *)e->Copy(); - c->Channel = trk->Channel - 1; + c->SetChannel(trk->Channel - 1); trk->Kill(e); trk->Put(c); } @@ -2002,10 +2002,10 @@ JZEvent *c = e->Copy(); if (ForceChannel) { - tChannelEvent *k = c->IsChannelEvent(); - if (k) + tChannelEvent* pChannelEvent = c->IsChannelEvent(); + if (pChannelEvent) { - k->Channel = Channel - 1; + pChannelEvent->SetChannel(Channel - 1); } } Put(c); Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-20 04:43:07 UTC (rev 548) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-21 01:47:00 UTC (rev 549) @@ -268,7 +268,7 @@ case StatKeyOn: { tKeyOn* pKeyOn = pEvent->IsKeyOn(); - u.c[0] = 0x90 | pKeyOn->Channel; + u.c[0] = 0x90 | pKeyOn->GetChannel(); u.c[1] = pKeyOn->GetKey(); u.c[2] = pKeyOn->GetVelocity(); } @@ -277,7 +277,7 @@ case StatKeyOff: { tKeyOff* pKeyOff = pEvent->IsKeyOff(); - u.c[0] = 0x80 | pKeyOff->Channel; + u.c[0] = 0x80 | pKeyOff->GetChannel(); u.c[1] = pKeyOff->Key; u.c[2] = 0; } @@ -286,7 +286,7 @@ case StatProgram: { tProgram *k = pEvent->IsProgram(); - u.c[0] = 0xC0 | k->Channel; + u.c[0] = 0xC0 | k->GetChannel(); u.c[1] = k->Program; } break; @@ -294,7 +294,7 @@ case StatChnPressure: { tChnPressure *k = pEvent->IsChnPressure(); - u.c[0] = 0xC0 | k->Channel; + u.c[0] = 0xC0 | k->GetChannel(); u.c[1] = k->Value; } break; @@ -302,7 +302,7 @@ case StatControl: { tControl* pControl = pEvent->IsControl(); - u.c[0] = 0xB0 | pControl->Channel; + u.c[0] = 0xB0 | pControl->GetChannel(); u.c[1] = pControl->mControl; u.c[2] = pControl->mValue; } @@ -311,7 +311,7 @@ case StatKeyPressure: { tKeyPressure *k = pEvent->IsKeyPressure(); - u.c[0] = 0xA0 | k->Channel; + u.c[0] = 0xA0 | k->GetChannel(); u.c[1] = k->Key; u.c[2] = k->Value; } @@ -321,7 +321,7 @@ { tPitch *k = pEvent->IsPitch(); int v = k->Value + 8192; - u.c[0] = 0xE0 | k->Channel; + u.c[0] = 0xE0 | k->GetChannel(); u.c[1] = (unsigned char)(v & 0x7F); u.c[2] = (unsigned char)(v >> 7); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-20 04:43:17
|
Revision: 548 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=548&view=rev Author: pstieber Date: 2008-05-19 21:43:07 -0700 (Mon, 19 May 2008) Log Message: ----------- Applied a slightly modified patch provided by Donald B. Moore. Moved the Linux/MIDI treatise out of this document and into the jazz.tex file as an abstract. Pete's changes. Made cosmetic indentation changes. Modified Paths: -------------- web/htdocs/documentation/index.php Modified: web/htdocs/documentation/index.php =================================================================== --- web/htdocs/documentation/index.php 2008-05-20 04:39:55 UTC (rev 547) +++ web/htdocs/documentation/index.php 2008-05-20 04:43:07 UTC (rev 548) @@ -46,198 +46,14 @@ </p> <h3>Using Jazz++ with Linux on the x86/x86_64 PC</h3> - -<h4>Introduction</h4> <p> -Years ago when the Jazz++ project first came to my attention, -using it with Linux on the PC was a much different proposition to -what is possible today on this platform/OS. Although it would be -entirely possible to create a MIDI score with jazz, (in the same way -this text is being produced with a text-editor), the whole point of -the exercise would be to compose a MIDI score you could actually hear. +Sections of this documentation are being added to right now. +The lastest versions of this and other Jazz++ documentation +is always included in the current svn source code. As time +permits, links to that documentation will appear here. </p> <p> -Back then with Linux, making sound via MIDI applications meant having -MIDI *hardware*. This may have taken the form of a MIDI adapter plugged -in the PC's serial port or soundcard gameport (in MPU-401 mode), with a real -world MIDI instrument(s) attached to that, or else a MIDI capable soundcard -with a hardware based MIDI sound synthesis chip to make the actual sound. -(so called 'MIDI/synth' capable soundcards) -In that latter case, the soundcard necessarily had to be supported -by Linux drivers, and in that respect these drivers were more than -likely using the now deprecated 'OSS' sound system modules. -</p> - -<p> -Things have changed. The x86 based hardwares have become faster and -cheaper, Linux has grown and matured as an operating system, and -likewise Free software has multiplied and proliferated around the world -giving rise to the creation of a great many new software applications. -Along the way, the venerable 'OSS' sound system drivers were replaced -with the 'Advanced Linux Sound Architecture' (ALSA) drivers and API. -</p> - -<p> -The result of these many advances and changes over time, means Linux -users are no longer constrained by the need of having actual MIDI -capable hardware or a MIDI/synth capable soundcard, to obtain good sound -production with MIDI applications like Jazz++. Instead of having one -or more hardware sound synthesis chips (be they on a soundcard or -in a MIDI musical instrument) to produce the sound(s), we can now -use a software application to achieve the same ends, and many folks -loosely refer to these software applications as being 'softsynths'. -</p> - -<p> -For many years now, users with Windows on their PC have had a distinct -advantage over Linux users on the PC, because virtually every sound -card (and/or onboard sound chip) typically ships with proprietary -Windows drivers that enable the use of that hardware as a 'softsynth' in -conjunction with the underlying Windows sound API supports. In -effect, Windows users could come to the website, download Jazz++ and -install it, and be making noise in under 2 minutes with very little -or no effort. If only users of other platforms/OS' could have it this -easy - hopefully this documentation will help bridge the (Linux) gap. -</p> - -<h4>Hardware based sound synthesis and Linux on the x86 PC</h4> -<p> -Thanks to all the great work done by the ALSA team over the years, Linux -now has much better driver supports for the various soundcards on the market -today that have hardware based MIDI/synth chips as part of their design. -</p> - -<p> -However, at this point documentation detailing the configuration and -use of such soundcard hardware with Linux and Jazz++ will be the -focus of future efforts here. Why? Simply because the majority of -people out there on the x86 PC don't have a hardware MIDI/synth soundcard -as part of their computer's hardware. They need to know how to setup a -'softsynth' in Linux if they don't have this sort of soundcard or -any 'real' MIDI hardware to hear Jazz++ with...and believe me, this -will be 80% or more of people out there using Linux and the PC. -</p> - -<p> -I will however include a section here soon listing all the sound -cards of this type that are currently supported under Linux, and -later document configuration details here for use with Jazz++. -</p> - -<h4>Software based sound synthesis and Linux on the x86 PC</h4> -<p> -This area of the documentation will grow over time. There is a lot -that can be documented here now with Linux, however at this early -stage of Jazz++'s development, it's more important for potential -users and testers of the Jazz++ code to have some form of consistant -MIDI 'test-bed' to prove and test Jazz++ itself on linux. -</p> - -<p> -Although this isn't 'set in stone', the Jazz++ developers have -been using a softsynth setup in Linux as I describe below, which -uses JACK, FLUIDSYNTH and QSYNTH. A similar setup should also -work on the Mac running Mac OSX. -</p> - -<p> -Essentially, -any- ALSA based, MIDI capable softsynth setup -should work with Jazz++, and I've already tested a few that seem -to work fine. However, more consistant and comparable results of -testing, will be observed using the same softsynth 'kit' as the -Jazz++ developers do, and this is why documentation of this -softsynth setup comes first. -</p> - -<h4>Overview of a typical Linux softsynth setup</h4> -<p> -Softsynth setups in Linux are comprised of a number of -software applications which work together to form a virtual -machine that emulates hardware based MIDI/synth devices. The -so formed virtual machine can be easily broken down into it's -individual parts, to better understand how the components -'expose' themselves to the user ; -</p> - -<p> -The ALSA part -- forms virtual MIDI and real audio paths for the -other parts of the virtual machine to communicate across. Allows -PCM data rendered by the virtual machine to be realized as an -analogue audio signal at the line outputs of the soundcard hardware. -</p> - -<p> -The JACK part -- a low-latency sound server. Forms both a virtual -MIDI patch-bay and a virtual audio patch-bay to control and -define how the virtual machine parts interconnect with and across -the virtual and real machine paths formed by the ALSA part. -</p> - -<p> -The FLUIDSYNTH part -- the virtual MIDI synthesizer itself. It -accepts valid MIDI data as input, and renders that data into -PCM data output, as determined by sound/instrument data contained -in a 'SoundFont' file. -</p> - -<p> -The QSYNTH part -- this forms the virtual control panel of the -virtual synthesizer part. Essentially, this comprises a GUI to -easily allow the user to change/control the virtual synthesizer -itself, add/remove SoundFont files, define bank settings, and -adjust other working parameters of the virtual synthesizer itself. -</p> - -<p> -Additionally, the QJACKCTL software provides a GUI visualization -of the virtual MIDI/audio patch-bays formed by the JACK part, -allowing the user a quick and easy way to 'hook it all up' as it -were, in any particular configuration they desire. -</p> - -<p> -For the sake of accuracy with this overview, it is worth noting -that Jazz++ itself is a virtual machine - it is a software emulation -of -hardware- based MIDI sequencers that were in common use years -ago. Jazz++ is of course much more capable than these old hardware -sequencers I speak of, which in their day were little more than -'drum machines' triggering sound events on a MIDI or otherwise -connected 'tip-and-ring patch cord configured' analogue synthesizer. -</p> - -<p> -Also note here, the virtual machine softsynth described in the -overview above, lacks one obvious component - the INPUT part. -It is basically a virtual MIDI synthesizer with all the bells, -knobs and whistles, but without a keyboard or anything else -'driving' it. Jazz++ is that part. The MIDI data produced by Jazz++ -is that MIDI input data the FLUIDSYNTH part accepts. -</p> - -<p> -Jazz++ can itself accept valid MIDI data from either the virtual -and/or 'real world' MIDI domains. This means, you can connect -a real MIDI synthesizer keyboard to Jazz++ as a MIDI data INPUT -part, and record notes played on that with Jazz++. Equally, you -could connect the same external MIDI keyboard as an INPUT part -to FLUIDSYNTH and use the virtual MIDI softsynth to replay the -notes you are playing, instead of the synthesizer's own hardware -kit. -</p> - -<p> -Finally, there are other virtual machines in software that -can be used as valid MIDI data INPUT parts here, such as the -program VKEYBD, which is a virtual onscreen MIDI keyboard GUI -with keys you click on with your mouse -- all these MIDI devices -be they virtual machines or not, can interact and interconnect -with each other, and thus possibly form very complex MIDI -sound production environments that traverse and inter-operate -across the software virtual and real hardware MIDI domains. -</p> - -<p> Check out an ancient version of the Jazz++ online docs by visiting <a name="Old Manual" href="/manual/jazz_contents.html">the manual page</a>. </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-20 04:40:07
|
Revision: 547 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=547&view=rev Author: pstieber Date: 2008-05-19 21:39:55 -0700 (Mon, 19 May 2008) Log Message: ----------- Applied a patch provided by Donald B. Moore. 1. Replaced reference to old user-list email address with current source forge user-list address. 2. Changed some words in the opening paragraph. 3. Moved Linux/MIDI treatise out of htdocs and into the jazz.tex file as an abstract. Modified Paths: -------------- trunk/jazz/src/HelpFiles/jazz.tex Modified: trunk/jazz/src/HelpFiles/jazz.tex =================================================================== --- trunk/jazz/src/HelpFiles/jazz.tex 2008-05-19 05:56:49 UTC (rev 546) +++ trunk/jazz/src/HelpFiles/jazz.tex 2008-05-20 04:39:55 UTC (rev 547) @@ -16,9 +16,9 @@ \chapter{Introduction}\label{introduction} -JAZZ++ is a full size MIDI sequencer with audio support. In addition to basic -sequencer functions like record and play, JAZZ++ provides many edit features -like quantize, copy, transpose, graphical pitch editing, multiple +JAZZ++ is a fully featured MIDI sequencer with audio support. In addition to +basic sequencer functions like record and play, JAZZ++ provides many edit +features like quantize, copy, transpose, graphical pitch editing, multiple undo/redo etc. JAZZ++ has two main windows; one @@ -75,6 +75,172 @@ application allowing the sequencer/editor and the midi-driver to run on separate computers. The native driver has better support for the MPU-401 than the JAZZ++/OSS solution (e.g. support for external timing source). +\item *New* + Introduction + +Years ago when the Jazz++ project first came to my attention, +using it with Linux on the PC was a much different proposition to +what is possible today on this platform/OS. Although it would be +entirely possible to create a MIDI score with jazz, (in the same way +this text is being produced with a text-editor), the whole point of +the exercise would be to compose a MIDI score you could actually hear. + + +Back then with Linux, making sound via MIDI applications meant having +MIDI *hardware*. This may have taken the form of a MIDI adapter plugged +in the PC's serial port or soundcard gameport (in MPU-401 mode), with a real +world MIDI instrument(s) attached to that, or else a MIDI capable soundcard +with a hardware based MIDI sound synthesis chip to make the actual sound. +(so called 'MIDI/synth' capable soundcards) +In that latter case, the soundcard necessarily had to be supported +by Linux drivers, and in that respect these drivers were more than +likely using the now deprecated 'OSS' sound system modules. + +Things have changed. The x86 based hardwares have become faster and +cheaper, Linux has grown and matured as an operating system, and +likewise Free software has multiplied and proliferated around the world +giving rise to the creation of a great many new software applications. +Along the way, the venerable 'OSS' sound system drivers were replaced +with the 'Advanced Linux Sound Architecture' (ALSA) drivers and API. + +The result of these many advances and changes over time, means Linux +users are no longer constrained by the need of having actual MIDI +capable hardware or a MIDI/synth capable soundcard, to obtain good sound +production with MIDI applications like Jazz++. Instead of having one +or more hardware sound synthesis chips (be they on a soundcard or +in a MIDI musical instrument) to produce the sound(s), we can now +use a software application to achieve the same ends, and many folks +loosely refer to these software applications as being 'softsynths'. + + +For many years now, users with Windows on their PC have had a distinct +advantage over Linux users on the PC, because virtually every sound +card (and/or onboard sound chip) typically ships with proprietary +Windows drivers that enable the use of that hardware as a 'softsynth' in +conjunction with the underlying Windows sound API supports. In +effect, Windows users could come to the website, download Jazz++ and +install it, and be making noise in under 2 minutes with very little +or no effort. If only users of other platforms/OS' could have it this +easy - hopefully this documentation will help bridge the (Linux) gap. + + + + Hardware based sound synthesis and Linux on the x86 PC + +Thanks to all the great work done by the ALSA team over the years, Linux +now has much better driver supports for the various soundcards on the market +today that have hardware based MIDI/synth chips as part of their design. + +However, at this point documentation detailing the configuration and +use of such soundcard hardware with Linux and Jazz++ will be the +focus of future efforts here. Why? Simply because the majority of +people out there on the x86 PC don't have a hardware MIDI/synth soundcard +as part of their computer's hardware. They need to know how to setup a +'softsynth' in Linux if they don't have this sort of soundcard or +any 'real' MIDI hardware to hear Jazz++ with...and believe me, this +will be 80% or more of people out there using Linux and the PC. + + +I will however include a section here soon listing all the sound +cards of this type that are currently supported under Linux, and +later document configuration details here for use with Jazz++. + + + + Software based sound synthesis and Linux on the x86 PC + +This area of the documentation will grow over time. There is a lot +that can be documented here now with Linux, however at this early +stage of Jazz++'s development, it's more important for potential +users and testers of the Jazz++ code to have some form of consistant +MIDI 'test-bed' to prove and test Jazz++ itself on linux. + +Although this isn't 'set in stone', the Jazz++ developers have +been using a softsynth setup in Linux as I describe below, which +uses JACK, FLUIDSYNTH and QSYNTH. A similar setup should also +work on the Mac running Mac OSX. + +Essentially, -any- ALSA based, MIDI capable softsynth setup +should work with Jazz++, and I've already tested a few that seem +to work fine. However, more consistant and comparable results of +testing, will be observed using the same softsynth 'kit' as the +Jazz++ developers do, and this is why documentation of this +softsynth setup comes first. + + + + Overview of a typical Linux softsynth setup + +\item Abstract: + +Softsynth setups in Linux are comprised of a number of +software applications which work together to form a virtual +machine that emulates hardware based MIDI/synth devices. The +so formed virtual machine can be easily broken down into it's +individual parts, to better understand how the components +'expose' themselves to the user ; + +\item The ALSA part -- forms virtual MIDI and real audio paths for the +other parts of the virtual machine to communicate across. Allows +PCM data rendered by the virtual machine to be realized as an +analogue audio signal at the line outputs of the soundcard hardware. + +\item The JACK part -- a low-latency sound server. Forms both a virtual +MIDI patch-bay and a virtual audio patch-bay to control and +define how the virtual machine parts interconnect with and across +the virtual and real machine paths formed by the ALSA part. + +\item The FLUIDSYNTH part -- the virtual MIDI synthesizer itself. It +accepts valid MIDI data as input, and renders that data into +PCM data output, as determined by sound/instrument data contained +in a 'SoundFont' file. + +\item The QSYNTH part -- this forms the virtual control panel of the +virtual synthesizer part. Essentially, this comprises a GUI to +easily allow the user to change/control the virtual synthesizer +itself, add/remove SoundFont files, define bank settings, and +adjust other working parameters of the virtual synthesizer itself. + +Additionally, the QJACKCTL software provides a GUI visualization +of the virtual MIDI/audio patch-bays formed by the JACK part, +allowing the user a quick and easy way to 'hook it all up' as it +were, in any particular configuration they desire. + +For the sake of accuracy with this overview, it is worth noting +that Jazz++ itself is a virtual machine - it is a software emulation +of -hardware- based MIDI sequencers that were in common use years +ago. Jazz++ is of course much more capable than these old hardware +sequencers I speak of, which in their day were little more than +'drum machines' triggering sound events on a MIDI or otherwise +connected 'tip-and-ring patch cord configured' analogue synthesizer. + +Also note here, the virtual machine softsynth described in the +overview above, lacks one obvious component - the INPUT part. +It is basically a virtual MIDI synthesizer with all the bells, +knobs and whistles, but without a keyboard or anything else +'driving' it. Jazz++ is that part. The MIDI data produced by Jazz++ +is that MIDI input data the FLUIDSYNTH part accepts. + +Jazz++ can itself accept valid MIDI data from either the virtual +and/or 'real world' MIDI domains. This means, you can connect +a real MIDI synthesizer keyboard to Jazz++ as a MIDI data INPUT +part, and record notes played on that with Jazz++. Equally, you +could connect the same external MIDI keyboard as an INPUT part +to FLUIDSYNTH and use the virtual MIDI softsynth to replay the +notes you are playing instead of the synthesizer's own hardware kit. + +Finally, there are other virtual machines in software that +can be used as valid MIDI data INPUT parts here, such as the +program VKEYBD, which is a virtual onscreen MIDI keyboard GUI +with keys you click on with your mouse -- all these MIDI devices +be they virtual machines or not, can interact and interconnect +with each other, and thus possibly form very complex MIDI +sound production environments that traverse and inter-operate +across the software virtual and real hardware MIDI domains. + +\item Practical: + +Still work in progress, come back soon!! \end{itemize} \subsection{Windows operating systems} @@ -104,7 +270,7 @@ You are welcome to join the JAZZ++ mailing list by sending mail to \begin{indented}{2cm} -{\tt jaz...@hi...} +{\tt jaz...@li...} \end{indented} with subject-field containing {\tt subscribe}. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-19 05:56:51
|
Revision: 546 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=546&view=rev Author: pstieber Date: 2008-05-18 22:56:49 -0700 (Sun, 18 May 2008) Log Message: ----------- Made all members of the key on event private and added the appropriate accessors. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp trunk/jazz/src/Audio.cpp trunk/jazz/src/Command.cpp trunk/jazz/src/ControlEdit.cpp trunk/jazz/src/Dialogs/KeyOnDialog.cpp trunk/jazz/src/Dialogs/KeyOnDialog.h trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Events.h trunk/jazz/src/Harmony.cpp trunk/jazz/src/HarmonyBrowserAnalyzer.cpp trunk/jazz/src/PianoWindow.cpp trunk/jazz/src/Player.cpp trunk/jazz/src/Rhythm.cpp trunk/jazz/src/Song.cpp trunk/jazz/src/Track.cpp trunk/jazz/src/mswin/WindowsPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -411,22 +411,22 @@ { case StatKeyOn: { - tKeyOn *k = pEvent->IsKeyOn(); + tKeyOn* pKeyOn = pEvent->IsKeyOn(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEON); - ev.data.note.channel = k->Channel; - ev.data.note.note = k->mKey; - ev.data.note.velocity = k->mVelocity; + ev.data.note.channel = pKeyOn->Channel; + ev.data.note.note = pKeyOn->GetKey(); + ev.data.note.velocity = pKeyOn->GetVelocity(); rc = write(&ev, now); } break; case StatKeyOff: { - tKeyOff *k = pEvent->IsKeyOff(); + tKeyOff* pKeyOff = pEvent->IsKeyOff(); set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEOFF); - ev.data.note.channel = k->Channel; - ev.data.note.note = k->Key; - ev.data.note.velocity = k->OffVeloc; + ev.data.note.channel = pKeyOff->Channel; + ev.data.note.note = pKeyOff->Key; + ev.data.note.velocity = pKeyOff->OffVeloc; rc = write(&ev, now); } break; Modified: trunk/jazz/src/Audio.cpp =================================================================== --- trunk/jazz/src/Audio.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Audio.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -466,7 +466,7 @@ tKeyOn* pKeyOn = e->IsKeyOn(); if (pKeyOn && num_voices < MAXPOLY) { - voices[num_voices++]->Start(samples[pKeyOn->mKey], pKeyOn->GetClock()); + voices[num_voices++]->Start(samples[pKeyOn->GetKey()], pKeyOn->GetClock()); } } @@ -582,11 +582,13 @@ tKeyOn* pKeyOn = e->IsKeyOn(); if (pKeyOn) { - pKeyOn->mLength = - (int)Samples2Ticks(samples[pKeyOn->mKey]->GetLength()); - if (pKeyOn->mLength < 15) // invisble? + pKeyOn->SetLength( + (int)Samples2Ticks(samples[pKeyOn->GetKey()]->GetLength())); + + // Is the event visble? + if (pKeyOn->GetEventLength() < 15) { - pKeyOn->mLength = 15; + pKeyOn->SetLength(15); } } e = it.Next(); Modified: trunk/jazz/src/Command.cpp =================================================================== --- trunk/jazz/src/Command.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Command.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -140,7 +140,7 @@ tKeyOn* pKeyOn = pEvent->IsKeyOn(); if (pKeyOn) { - Keys[pKeyOn->mKey] += pKeyOn->mLength; + Keys[pKeyOn->GetKey()] += pKeyOn->GetEventLength(); } } @@ -371,7 +371,7 @@ } if (NoteLength) { - pKeyOn->mLength = Quantize(pKeyOn->mLength, 2); + pKeyOn->SetLength(Quantize(pKeyOn->GetEventLength(), 2)); } pTrack->Kill(pEvent); pTrack->Put(pKeyOn); @@ -398,12 +398,12 @@ pKeyOn = (tKeyOn *)pEvent->Copy(); if (FitIntoScale) { - pKeyOn->mKey += Notes; - pKeyOn->mKey = Scale.FitInto(pKeyOn->mKey); + pKeyOn->SetKey(pKeyOn->GetKey() + Notes); + pKeyOn->SetKey(Scale.FitInto(pKeyOn->GetKey())); } else if (Notes) { - pKeyOn->mKey = Scale.Transpose(pKeyOn->mKey, Notes); + pKeyOn->SetKey(Scale.Transpose(pKeyOn->GetKey(), Notes)); } pTrack->Kill(pEvent); pTrack->Put(pKeyOn); @@ -478,13 +478,13 @@ case 0: break; case 1: - val = pKeyOn->mVelocity + val; + val = pKeyOn->GetVelocity() + val; break; case 2: - val = pKeyOn->mVelocity - val; + val = pKeyOn->GetVelocity() - val; break; } - pKeyOn->mVelocity = val < 1 ? 1 : (val > 127 ? 127 : val); + pKeyOn->SetVelocity(val < 1 ? 1 : (val > 127 ? 127 : val)); pTrack->Kill(pEvent); pTrack->Put(pKeyOn); } @@ -519,14 +519,14 @@ case 0: break; case 1: - val = pKeyOn->mLength + val; + val = pKeyOn->GetEventLength() + val; break; case 2: - val = pKeyOn->mLength - val; + val = pKeyOn->GetEventLength() - val; break; } - pKeyOn->mLength = val < 1 ? 1 : val; + pKeyOn->SetLength(val < 1 ? 1 : val); pTrack->Kill(pEvent); pTrack->Put(pKeyOn); } @@ -619,9 +619,9 @@ if (startclock == -1) { startclock = pEvent->IsKeyOn()->GetClock(); - startvelocity = pEvent->IsKeyOn()->mVelocity; + startvelocity = pEvent->IsKeyOn()->GetVelocity(); channel = pEvent->IsKeyOn()->Channel; - startkey = pEvent->IsKeyOn()->mKey; + startkey = pEvent->IsKeyOn()->GetKey(); previouspitch = pEvent->GetPitch(); } pitchdiff = pEvent->GetPitch()-previouspitch; @@ -636,10 +636,18 @@ pTrack->Kill(pEvent); //remove the old event - pTrack->Put(new tControl(pEvent->GetClock(), channel, 0x07, pEvent->IsKeyOn()->mVelocity)); - pTrack->Put(new tControl(pEvent->GetClock() + pEvent->IsKeyOn()->mLength, channel, 0x07, 0)); + pTrack->Put(new tControl( + pEvent->GetClock(), + channel, + 0x07, + pEvent->IsKeyOn()->GetVelocity())); + pTrack->Put(new tControl( + pEvent->GetClock() + pEvent->IsKeyOn()->GetEventLength(), + channel, + 0x07, + 0)); - lastlength = pEvent->IsKeyOn()->mLength; + lastlength = pEvent->IsKeyOn()->GetEventLength(); endclock = pEvent->GetClock(); previouspitch = pEvent->GetPitch(); } @@ -685,7 +693,8 @@ // only echo note events pKeyOn = (tKeyOn *)pEvent->Copy(); pKeyOn->SetClock(pKeyOn->GetClock()+ clockDelay * i); - pKeyOn->mVelocity = (unsigned char)(pow(scale, i) * pKeyOn->mVelocity); + pKeyOn->SetVelocity( + (unsigned char)(pow(scale, i) * pKeyOn->GetVelocity())); pTrack->Put(pKeyOn); } } @@ -715,24 +724,28 @@ tKeyOn* pKeyOn; if ((pKeyOn = pEvent->IsKeyOn()) != 0) { - if (pKeyOn->mLength < lengthLimit) + if (pKeyOn->GetEventLength() < lengthLimit) { - // remove short notes + // Remove short notes. pTrack->Kill(pEvent); } else if (shortenOverlaps) { - // shorten length of overlapping notes - tKeyOn *p = prev_note[pKeyOn->Channel][pKeyOn->mKey]; - if (p && p->GetClock() + p->mLength >= pKeyOn->GetClock()) + // Shorten length of overlapping notes. + tKeyOn* pPreviousKeyOn = prev_note[pKeyOn->Channel][pKeyOn->GetKey()]; + if ( + pPreviousKeyOn && + pPreviousKeyOn->GetClock() + pPreviousKeyOn->GetEventLength() >= + pKeyOn->GetClock()) { - p->mLength = pKeyOn->GetClock() - p->GetClock() - 1; - if (p->mLength < lengthLimit) + pPreviousKeyOn->SetLength( + pKeyOn->GetClock() - pPreviousKeyOn->GetClock() - 1); + if (pPreviousKeyOn->GetEventLength() < lengthLimit) { - pTrack->Kill(p); + pTrack->Kill(pPreviousKeyOn); } } - prev_note[pKeyOn->Channel][pKeyOn->mKey] = pKeyOn; + prev_note[pKeyOn->Channel][pKeyOn->GetKey()] = pKeyOn; } } } @@ -976,7 +989,7 @@ if (mpFilter->IsSelected(pEvent) && pEvent->IsKeyOn()) { tKeyOn* pKeyOn = (tKeyOn *)pEvent; - Keys[pKeyOn->mKey] = 1; + Keys[pKeyOn->GetKey()] = 1; } pEvent = Iterator.Next(); } @@ -992,7 +1005,7 @@ int n_th = 0; // the n'th key from bottom .. - for (i = 0; i <= pKeyOn->mKey; i++) + for (i = 0; i <= pKeyOn->GetKey(); i++) { n_th += Keys[i]; } @@ -1003,7 +1016,7 @@ n_th -= Keys[i]; } - pKeyOn->mKey = i + 1; + pKeyOn->SetKey(i + 1); pTrack->Kill(pEvent); pTrack->Put(pKeyOn); @@ -1056,15 +1069,15 @@ switch (mSource) { case veloc: - sval = mRandomArray[(int)pKeyOn->mVelocity]; + sval = mRandomArray[(int)pKeyOn->GetVelocity()]; break; case length: - sval = mRandomArray[(int)pKeyOn->mLength]; + sval = mRandomArray[(int)pKeyOn->GetEventLength()]; break; case key: - sval = mRandomArray[(int)pKeyOn->mKey]; + sval = mRandomArray[(int)pKeyOn->GetKey()]; break; case rhythm: @@ -1106,7 +1119,7 @@ { if (mAdd) { - sval = pKeyOn->mVelocity + sval; + sval = pKeyOn->GetVelocity() + sval; } if (sval > 127) { @@ -1118,7 +1131,7 @@ } tKeyOn* pKeyOnCopy = (tKeyOn *)pKeyOn->Copy(); pTrack->Kill(pKeyOn); - pKeyOnCopy->mVelocity = sval; + pKeyOnCopy->SetVelocity(sval); pTrack->Put(pKeyOnCopy); } break; @@ -1127,7 +1140,7 @@ { if (mAdd) { - sval = pKeyOn->mKey + sval; + sval = pKeyOn->GetKey() + sval; } if (sval > 127) { @@ -1139,7 +1152,7 @@ } tKeyOn* pKeyOnCopy = (tKeyOn *)pKeyOn->Copy(); pTrack->Kill(pKeyOn); - pKeyOnCopy->mKey = sval; + pKeyOnCopy->SetKey(sval); pTrack->Put(pKeyOnCopy); } break; @@ -1148,7 +1161,7 @@ { if (mAdd) { - sval = pKeyOn->mLength + sval; + sval = pKeyOn->GetEventLength() + sval; } if (sval < 1) { @@ -1156,7 +1169,7 @@ } tKeyOn* pKeyOnCopy = (tKeyOn *)pKeyOn->Copy(); pTrack->Kill(pKeyOn); - pKeyOnCopy->mLength = sval; + pKeyOnCopy->SetLength(sval); pTrack->Put(pKeyOnCopy); } break; Modified: trunk/jazz/src/ControlEdit.cpp =================================================================== --- trunk/jazz/src/ControlEdit.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/ControlEdit.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -528,7 +528,7 @@ int tVelocEdit::GetValue(JZEvent* pEvent) { - return pEvent->IsKeyOn()->mVelocity; + return pEvent->IsKeyOn()->GetVelocity(); } void tVelocEdit::OnApply() @@ -568,7 +568,7 @@ tKeyOn* pKeyOnCopy = pKeyOn->Copy()->IsKeyOn(); int i = Clock2i(pKeyOnCopy->GetClock()); - pKeyOnCopy->mVelocity = array[i]; + pKeyOnCopy->SetVelocity(array[i]); track->Kill(pKeyOn); track->Put(pKeyOnCopy); } @@ -665,7 +665,7 @@ to_clk = to_clock; } tKeyPressure *k; - tKeyOn *keyon; + tKeyOn* pKeyOn; if (!ctrlmode) { @@ -699,13 +699,13 @@ !mpPianoWindow->mpSnapSel->IsSelected() || mpPianoWindow->GetFilter()->IsSelected(pEvent)) { - keyon = pEvent->IsKeyOn(); - if (keyon) + pKeyOn = pEvent->IsKeyOn(); + if (pKeyOn) { - key_clk = keyon->GetClock() + 1; - key_end = keyon->GetClock() + keyon->mLength; - key_val = keyon->mKey; - key_cha = keyon->Channel; + key_clk = pKeyOn->GetClock() + 1; + key_end = pKeyOn->GetClock() + pKeyOn->GetEventLength(); + key_val = pKeyOn->GetKey(); + key_cha = pKeyOn->Channel; } if (key_val>0) { Modified: trunk/jazz/src/Dialogs/KeyOnDialog.cpp =================================================================== --- trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -178,15 +178,15 @@ bool JZKeyOnDialog::TransferDataToWindow() { string KeyString; - KeyToString(mpEvent->mKey, KeyString); + KeyToString(mpEvent->GetKey(), KeyString); mpPitchEdit->ChangeValue(KeyString.c_str()); ostringstream Oss; - Oss << (int)mpEvent->mVelocity; + Oss << (int)mpEvent->GetVelocity(); mpVelocityValue->SetLabel(Oss.str().c_str()); - mpVelocityKnob->SetValue(mpEvent->mVelocity); + mpVelocityKnob->SetValue(mpEvent->GetVelocity()); Oss.str(""); Oss << (int)mpEvent->GetOffVelocity(); @@ -195,7 +195,7 @@ mpOffVelocityKnob->SetValue(mpEvent->GetOffVelocity()); wxString LengthString; - LengthString << mpEvent->mLength; + LengthString << mpEvent->GetEventLength(); mpLengthEdit->ChangeValue(LengthString); Oss.str(""); @@ -216,15 +216,17 @@ bool JZKeyOnDialog::TransferDataFromWindow() { wxString KeyString = mpPitchEdit->GetValue(); - mpEvent->mKey = StringToKey(KeyString.c_str()); + mpEvent->SetKey(StringToKey(KeyString.c_str())); - mpEvent->mVelocity = mpVelocityKnob->GetValue(); + mpEvent->SetVelocity(mpVelocityKnob->GetValue()); mpEvent->SetOffVelocity(mpOffVelocityKnob->GetValue()); wxString LengthString = mpLengthEdit->GetValue(); istringstream Iss(LengthString.c_str()); - Iss >> mpEvent->mLength; + unsigned short Length; + Iss >> Length; + mpEvent->SetLength(Length); mpEvent->Channel = mpChannelKnob->GetValue() - 1; Modified: trunk/jazz/src/Dialogs/KeyOnDialog.h =================================================================== --- trunk/jazz/src/Dialogs/KeyOnDialog.h 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Dialogs/KeyOnDialog.h 2008-05-19 05:56:49 UTC (rev 546) @@ -50,10 +50,6 @@ private: tKeyOn* mpEvent; -// int mPitch; -// int mVelocity; -// int mLength; -// int mOffVelocity; wxTextCtrl* mpPitchEdit; wxStaticText* mpVelocityValue; Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Dialogs.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -1367,7 +1367,9 @@ if (t->GetAudioMode()) { if (!gpMidiPlayer->IsPlaying()) - gpMidiPlayer->EditSample(e->IsKeyOn()->mKey); + { + gpMidiPlayer->EditSample(e->IsKeyOn()->GetKey()); + } break; } str = "Key On"; Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Events.h 2008-05-19 05:56:49 UTC (rev 546) @@ -550,28 +550,16 @@ { public: - unsigned char mKey; - unsigned char mVelocity; - - // Length is 0 if a corresponding tKeyOff exists. - unsigned short mLength; - - private: - - unsigned short mOffVelocity; - - public: - tKeyOn( int clk, int cha, unsigned char Key, unsigned char Velocity, - unsigned short len = 0) + unsigned short Length = 0) : tChannelEvent(clk, StatKeyOn, cha), mKey(Key), mVelocity(Velocity), - mLength(len), + mLength(Length), mOffVelocity(0) { } @@ -594,36 +582,61 @@ return new tKeyOn(*this); } - virtual unsigned short GetEventLength() const + virtual int GetValue() const { edb(); - return mLength; + return mKey; } - virtual int GetLength() const + virtual int GetPitch() const { edb(); - return mLength; + return mKey; } - virtual int GetValue() const + virtual void SetPitch(int p) { edb(); + mKey = p; + } + + unsigned char GetKey() const + { return mKey; } - virtual int GetPitch() const + void SetKey(unsigned char Key) { + mKey = Key; + } + + unsigned char GetVelocity() const + { + return mVelocity; + } + + void SetVelocity(unsigned char Velocity) + { + mVelocity = Velocity; + } + + virtual unsigned short GetEventLength() const + { edb(); - return mKey; + return mLength; } - virtual void SetPitch(int p) + virtual int GetLength() const { edb(); - mKey = p; + return mLength; } + void SetLength(unsigned short Length) + { + mLength = Length; + } + unsigned short GetOffVelocity() const { return mOffVelocity; @@ -643,6 +656,17 @@ { return wxBLACK_BRUSH; } + + private: + + unsigned char mKey; + + unsigned char mVelocity; + + // Length is 0 if a corresponding tKeyOff exists. + unsigned short mLength; + + unsigned short mOffVelocity; }; Modified: trunk/jazz/src/Harmony.cpp =================================================================== --- trunk/jazz/src/Harmony.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Harmony.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -711,7 +711,7 @@ tKeyOn* pKeyOn = buf.Events[i]->IsKeyOn(); if (pKeyOn) { - piano += pKeyOn->mKey; + piano += pKeyOn->GetKey(); } } } Modified: trunk/jazz/src/HarmonyBrowserAnalyzer.cpp =================================================================== --- trunk/jazz/src/HarmonyBrowserAnalyzer.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/HarmonyBrowserAnalyzer.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -167,18 +167,18 @@ int start = Step2Clock(i); int stop = Step2Clock(i+1); if ( - pKeyOn->GetClock() + pKeyOn->mLength >= start && + pKeyOn->GetClock() + pKeyOn->GetEventLength() >= start && pKeyOn->GetClock() < stop) { if (pKeyOn->GetClock() > start) { start = pKeyOn->GetClock(); } - if (pKeyOn->GetClock() + pKeyOn->mLength < stop) + if (pKeyOn->GetClock() + pKeyOn->GetEventLength() < stop) { - stop = pKeyOn->GetClock() + pKeyOn->mLength; + stop = pKeyOn->GetClock() + pKeyOn->GetEventLength(); } - count[i][pKeyOn->mKey % 12] += stop - start; + count[i][pKeyOn->GetKey() % 12] += stop - start; } } } @@ -191,7 +191,7 @@ int start = Step2Clock(i); int stop = Step2Clock(i+1); if ( - pKeyOn->GetClock() + pKeyOn->mLength >= start && + pKeyOn->GetClock() + pKeyOn->GetEventLength() >= start && pKeyOn->GetClock() < stop) { // key matches this step @@ -201,17 +201,17 @@ { fr = pKeyOn->GetClock(); } - if (pKeyOn->GetClock() + pKeyOn->mLength < to) + if (pKeyOn->GetClock() + pKeyOn->GetEventLength() < to) { - to = pKeyOn->GetClock() + pKeyOn->mLength; + to = pKeyOn->GetClock() + pKeyOn->GetEventLength(); } // transpose if most of key length belongs to this step // OR: it covers the whole step - if (to - fr >= pKeyOn->mLength / 2 || (fr == start && to == stop)) + if (to - fr >= pKeyOn->GetEventLength() / 2 || (fr == start && to == stop)) { tKeyOn* pKeyOnCopy = (tKeyOn *)pKeyOn->Copy(); - pKeyOnCopy->mKey += delta[i][pKeyOn->mKey % 12]; + pKeyOnCopy->SetKey(pKeyOnCopy->GetKey() + delta[i][pKeyOn->GetKey() % 12]); pTrack->Kill(pKeyOn); pTrack->Put(pKeyOnCopy); Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/PianoWindow.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -266,7 +266,7 @@ { Length = 1; } - Copy->mLength = Length; + Copy->SetLength(Length); Win->DrawEvent(Dc, Copy, Copy->GetBrush(), 1, 1); return 0; @@ -277,16 +277,16 @@ int tKeyLengthDragger::ButtonUp(wxMouseEvent& Event) { // SN++ Key_Aftertouch - if (Copy->mLength < mpKeyOn->mLength) + if (Copy->GetEventLength() < mpKeyOn->GetEventLength()) { int key, channel; tEventIterator iter(Win->GetTrack()); tKeyPressure *a; - key = Copy->mKey; + key = Copy->GetKey(); channel = Copy->Channel; JZEvent* pEvent = iter.Range( - Copy->GetClock() + Copy->mLength, - Copy->GetClock() + mpKeyOn->mLength); + Copy->GetClock() + Copy->GetEventLength(), + Copy->GetClock() + mpKeyOn->GetEventLength()); while (pEvent) { a = pEvent->IsKeyPressure(); @@ -421,7 +421,7 @@ JZPianoWindow* pPianoWindow, JZRectangle* pRectangle, tKeyOn* pKeyOn) - : tMouseCounter(pPianoWindow, pRectangle, pKeyOn->mVelocity, 1, 127) + : tMouseCounter(pPianoWindow, pRectangle, pKeyOn->GetVelocity(), 1, 127) { Win = pPianoWindow; mpKeyOn = pKeyOn; @@ -447,7 +447,7 @@ if (tMouseCounter::Event(Event)) { tKeyOn* pKeyOnCopy = (tKeyOn *)mpKeyOn->Copy(); - pKeyOnCopy->mVelocity = Value; + pKeyOnCopy->SetVelocity(Value); Win->ApplyToTrack(mpKeyOn, pKeyOnCopy); @@ -1376,7 +1376,7 @@ // show velocity as colors if (force_color != 0 && mUseColors && pEvent->IsKeyOn()) { - int vel = pEvent->IsKeyOn()->mVelocity; + int vel = pEvent->IsKeyOn()->GetVelocity(); // Next line is "Patrick Approved." Dc.SetBrush(mpColorBrush[ vel * NUM_COLORS / 128 ]); @@ -1458,7 +1458,7 @@ // show velocity as colors if (!force_color && mUseColors && pEvent->IsKeyOn()) { - int vel = pEvent->IsKeyOn()->mVelocity; + int vel = pEvent->IsKeyOn()->GetVelocity(); Dc.SetBrush(mpColorBrush[ vel * NUM_COLORS / 128 ]); } else @@ -2410,13 +2410,15 @@ { return; } - if (pKeyOn->mLength < 2) + if (pKeyOn->GetEventLength() < 2) { return; } - key = pKeyOn->mKey; + key = pKeyOn->GetKey(); channel = pKeyOn->Channel; - pEvent = iter.Range(pKeyOn->GetClock() + 1, pKeyOn->GetClock() + pKeyOn->mLength); + pEvent = iter.Range( + pKeyOn->GetClock() + 1, + pKeyOn->GetClock() + pKeyOn->GetEventLength()); while (pEvent) { a = pEvent->IsKeyPressure(); @@ -2444,15 +2446,15 @@ return; } channel = pKeyOn->Channel; - if (pKeyOn->mLength < 2) + if (pKeyOn->GetEventLength() < 2) { return; } - key = pKeyOn->mKey; + key = pKeyOn->GetKey(); pEvent = iter.Range( pKeyOn->GetClock() + 1, - pKeyOn->GetClock() + pKeyOn->mLength); + pKeyOn->GetClock() + pKeyOn->GetEventLength()); while (pEvent) { @@ -2951,16 +2953,16 @@ kill_keys_aftertouch(pTrack, pEvent); if (pTrack->GetAudioMode()) { - gpMidiPlayer->ListenAudio(pKeyOn->mKey, 0); + gpMidiPlayer->ListenAudio(pKeyOn->GetKey(), 0); } else { mListen.KeyOn( pTrack, - pKeyOn->mKey, + pKeyOn->GetKey(), pKeyOn->Channel, - pKeyOn->mVelocity, - pKeyOn->mLength); + pKeyOn->GetVelocity(), + pKeyOn->GetEventLength()); } } @@ -3045,16 +3047,16 @@ { if (pTrack->GetAudioMode()) { - gpMidiPlayer->ListenAudio(pKeyOn->mKey, 0); + gpMidiPlayer->ListenAudio(pKeyOn->GetKey(), 0); } else { mListen.KeyOn( pTrack, - pKeyOn->mKey, + pKeyOn->GetKey(), pKeyOn->Channel, - pKeyOn->mVelocity, - pKeyOn->mLength); + pKeyOn->GetVelocity(), + pKeyOn->GetEventLength()); } } wxClientDC Dc(this); Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Player.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -520,10 +520,10 @@ tKeyOn* pKeyOn = pEvent->IsKeyOn(); if (pKeyOn) { - if (pKeyOn->GetClock() + pKeyOn->mLength >= Clock - 100) + if (pKeyOn->GetClock() + pKeyOn->GetEventLength() >= Clock - 100) { off.Channel = pKeyOn->Channel; - off.Key = pKeyOn->mKey; + off.Key = pKeyOn->GetKey(); OutNow(&off); } } @@ -1631,8 +1631,8 @@ SEQ_START_NOTE( mididev, pKeyOn->Channel, - pKeyOn->mKey, - pKeyOn->mVelocity); + pKeyOn->GetKey(), + pKeyOn->GetVelocity()); if (now) seqbuf_flush_last_event(); } break; Modified: trunk/jazz/src/Rhythm.cpp =================================================================== --- trunk/jazz/src/Rhythm.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Rhythm.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -352,10 +352,10 @@ tEventArray &src = gpTrackWindow->GetPianoWindow()->PasteBuffer; for (int ii = 0; ii < src.nEvents; ii++) { - tKeyOn *on = src.Events[ii]->IsKeyOn(); - if (on) + tKeyOn* pKeyOn = src.Events[ii]->IsKeyOn(); + if (pKeyOn) { - tKeyOn *k = new tKeyOn(clock, chan, on->Key, vel, len - clocks_per_step/2); + tKeyOn *k = new tKeyOn(clock, chan, pKeyOn->Key, vel, len - clocks_per_step / 2); track->Put(k); } } @@ -938,16 +938,16 @@ for (int ii = 0; ii < events.nEvents; ii++) { - tKeyOn *on = events.Events[ii]->IsKeyOn(); - if (on) + tKeyOn* pKeyOn = events.Events[ii]->IsKeyOn(); + if (pKeyOn) { - pRhythm->keys[pRhythm->n_keys++] = on->mKey; + pRhythm->keys[pRhythm->n_keys++] = pKeyOn->GetKey(); if (pRhythm->n_keys > 1) { Oss << ", "; } string KeyString; - KeyToString(on->mKey, KeyString); + KeyToString(pKeyOn->GetKey(), KeyString); Oss << KeyString; if (pRhythm->n_keys >= MAX_KEYS) { Modified: trunk/jazz/src/Song.cpp =================================================================== --- trunk/jazz/src/Song.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Song.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -464,7 +464,7 @@ d->SetClock(d->GetClock() + c->GetClock() + loopOffset); if (d->IsKeyOn()) { - d->IsKeyOn()->mKey += c->transpose; + d->IsKeyOn()->SetKey(d->IsKeyOn()->GetKey() + c->transpose); } if (d->IsPlayTrack()) { @@ -571,7 +571,7 @@ tKeyOn* pKeyOn = pEvent->IsKeyOn(); if (pKeyOn) { - pKeyOn->mLength = (int)(f * pKeyOn->mLength + 0.5); + pKeyOn->SetLength((int)(f * pKeyOn->GetEventLength() + 0.5)); } } } Modified: trunk/jazz/src/Track.cpp =================================================================== --- trunk/jazz/src/Track.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/Track.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -1155,20 +1155,24 @@ int n = nEvents; for (int i = 0; i < n; i++) { - tKeyOn *on; - if ((on = Events[i]->IsKeyOn()) != 0 && on->mLength != 0) + tKeyOn* pKeyOn; + if ((pKeyOn = Events[i]->IsKeyOn()) != 0 && pKeyOn->GetEventLength() != 0) { -// JZEvent *of = new tKeyOff(on->GetClock() + on->mLength, on->Channel, on->Key); +// JZEvent* pKeyOff = new tKeyOff( +// pKeyOn->GetClock() + pKeyOn->GetEventLength(), +// pKeyOn->Channel, +// pKeyOn->Key); + // SN++ added off veloc - JZEvent *of = new tKeyOff( - on->GetClock() + on->mLength, - on->Channel, - on->mKey, - on->GetOffVelocity()); + JZEvent* pKeyOff = new tKeyOff( + pKeyOn->GetClock() + pKeyOn->GetEventLength(), + pKeyOn->Channel, + pKeyOn->GetKey(), + pKeyOn->GetOffVelocity()); - on->mLength = 0; - of->SetDevice(on->GetDevice()); - Put(of); + pKeyOn->SetLength(0); + pKeyOff->SetDevice(pKeyOn->GetDevice()); + Put(pKeyOff); } } Sort(); @@ -1182,21 +1186,25 @@ int i; for (i = 1; i < nEvents; i++) { - tKeyOff *of; - if ((of = Events[i]->IsKeyOff()) != 0) + tKeyOff* pKeyOff; + if ((pKeyOff = Events[i]->IsKeyOff()) != 0) { JZEvent **e = &Events[i - 1]; while (e >= Events) { - tKeyOn *on = (*e)->IsKeyOn(); - if (on && on->Key == of->Key && on->Channel == of->Channel && on->Length == 0) + tKeyOn* pKeyOn = (*e)->IsKeyOn(); + if ( + pKeyOn && + pKeyOn->Key == pKeyOff->Key && + pKeyOn->Channel == pKeyOff->Channel && + pKeyOn->Length == 0) { - on->Length = of->GetClock() - on->GetClock(); - if (on->Length <= 0L) + pKeyOn->Length = pKeyOff->GetClock() - pKeyOn->GetClock(); + if (pKeyOn->Length <= 0L) { - on->Length = 1; + pKeyOn->Length = 1; } - of->Kill(); + pKeyOff->Kill(); break; } --e; @@ -1225,25 +1233,25 @@ int i; for (i = 0; i < nEvents; i++) { - tKeyOn* on; - if ((on = Events[i]->IsKeyOn()) != 0 && on->mLength == 0) + tKeyOn* pKeyOn; + if ((pKeyOn = Events[i]->IsKeyOn()) != 0 && pKeyOn->GetEventLength() == 0) { int j; for (j = i + 1; j < nEvents; j++) { - tKeyOff *of = Events[j]->IsKeyOff(); + tKeyOff* pKeyOff = Events[j]->IsKeyOff(); if ( - of && - !of->IsKilled() && - on->mKey == of->Key && - on->Channel == of->Channel) + pKeyOff && + !pKeyOff->IsKilled() && + pKeyOn->GetKey() == pKeyOff->Key && + pKeyOn->Channel == pKeyOff->Channel) { - on->mLength = of->GetClock() - on->GetClock(); - if (on->mLength <= 0L) + pKeyOn->SetLength(pKeyOff->GetClock() - pKeyOn->GetClock()); + if (pKeyOn->GetEventLength() <= 0) { - on->mLength = 1; + pKeyOn->SetLength(1); } - of->Kill(); + pKeyOff->Kill(); break; } } @@ -1254,15 +1262,15 @@ // and kill all remaining KeyOff's for (i = 0; i < nEvents; i++) { - tKeyOn* on = Events[i]->IsKeyOn(); - if (on && on->mLength <= 0) + tKeyOn* pKeyOn = Events[i]->IsKeyOn(); + if (pKeyOn && pKeyOn->GetEventLength() <= 0) { - on->Kill(); + pKeyOn->Kill(); } - tKeyOff *of = Events[i]->IsKeyOff(); - if (of) + tKeyOff* pKeyOff = Events[i]->IsKeyOff(); + if (pKeyOff) { - of->Kill(); + pKeyOff->Kill(); } } Cleanup(0); Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-19 03:57:57 UTC (rev 545) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-19 05:56:49 UTC (rev 546) @@ -267,18 +267,18 @@ { case StatKeyOn: { - tKeyOn *k = pEvent->IsKeyOn(); - u.c[0] = 0x90 | k->Channel; - u.c[1] = k->mKey; - u.c[2] = k->mVelocity; + tKeyOn* pKeyOn = pEvent->IsKeyOn(); + u.c[0] = 0x90 | pKeyOn->Channel; + u.c[1] = pKeyOn->GetKey(); + u.c[2] = pKeyOn->GetVelocity(); } break; case StatKeyOff: { - tKeyOff *k = pEvent->IsKeyOff(); - u.c[0] = 0x80 | k->Channel; - u.c[1] = k->Key; + tKeyOff* pKeyOff = pEvent->IsKeyOff(); + u.c[0] = 0x80 | pKeyOff->Channel; + u.c[1] = pKeyOff->Key; u.c[2] = 0; } break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-19 03:57:58
|
Revision: 545 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=545&view=rev Author: pstieber Date: 2008-05-18 20:57:57 -0700 (Sun, 18 May 2008) Log Message: ----------- 1. Renamed JZEvent::Stat to JZEvent::mStat, made it protected, and added an accessor. 2. Made JZEvent::mClock protected. 3. Renamed JZEvent::Device to JZEvent::mDevice. Renamed e to pEvent in a few places. 4. Updated class and comment headers in Player.cpp. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp trunk/jazz/src/AsciiMidiFile.cpp trunk/jazz/src/Dialogs.cpp trunk/jazz/src/Events.cpp trunk/jazz/src/Events.h trunk/jazz/src/Filter.h trunk/jazz/src/PianoWindow.cpp trunk/jazz/src/Player.cpp trunk/jazz/src/StandardFile.cpp trunk/jazz/src/mswin/WindowsPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -402,17 +402,17 @@ // 0 = event successfully sent to driver // 1 = try again later //----------------------------------------------------------------------------- -int tAlsaPlayer::OutEvent(JZEvent *e, int now) +int tAlsaPlayer::OutEvent(JZEvent* pEvent, int now) { int rc = 0; snd_seq_event_t ev; memset(&ev, 0, sizeof(ev)); - switch (e->Stat) + switch (pEvent->GetStat()) { case StatKeyOn: { - tKeyOn *k = e->IsKeyOn(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_NOTEON); + tKeyOn *k = pEvent->IsKeyOn(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEON); ev.data.note.channel = k->Channel; ev.data.note.note = k->mKey; ev.data.note.velocity = k->mVelocity; @@ -422,8 +422,8 @@ case StatKeyOff: { - tKeyOff *k = e->IsKeyOff(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_NOTEOFF); + tKeyOff *k = pEvent->IsKeyOff(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_NOTEOFF); ev.data.note.channel = k->Channel; ev.data.note.note = k->Key; ev.data.note.velocity = k->OffVeloc; @@ -433,8 +433,8 @@ case StatProgram: { - tProgram *k = e->IsProgram(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_PGMCHANGE); + tProgram *k = pEvent->IsProgram(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_PGMCHANGE); ev.data.control.channel = k->Channel; ev.data.control.value = k->Program; rc = write(&ev, now); @@ -443,8 +443,8 @@ case StatKeyPressure: { - tKeyPressure *k = e->IsKeyPressure(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_KEYPRESS); + tKeyPressure *k = pEvent->IsKeyPressure(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_KEYPRESS); ev.data.note.channel = k->Channel; ev.data.note.note = k->Key; ev.data.note.velocity = k->Value; @@ -454,8 +454,8 @@ case StatChnPressure: { - tChnPressure *k = e->IsChnPressure(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_CHANPRESS); + tChnPressure *k = pEvent->IsChnPressure(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_CHANPRESS); ev.data.control.channel = k->Channel; ev.data.control.value = k->Value; rc = write(&ev, now); @@ -464,8 +464,8 @@ case StatControl: { - tControl *k = e->IsControl(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_CONTROLLER); + tControl *k = pEvent->IsControl(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_CONTROLLER); ev.data.control.channel = k->Channel; ev.data.control.param = k->mControl; ev.data.control.value = k->mValue; @@ -475,8 +475,8 @@ case StatPitch: { - tPitch *k = e->IsPitch(); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_PITCHBEND); + tPitch *k = pEvent->IsPitch(); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_PITCHBEND); ev.data.control.channel = k->Channel; ev.data.control.value = k->Value; rc = write(&ev, now); @@ -485,9 +485,9 @@ case StatSetTempo: { - int bpm = e->IsSetTempo()->GetBPM(); + int bpm = pEvent->IsSetTempo()->GetBPM(); int us = (int)( 60.0E6 / (double)bpm ); - set_event_header(&ev, e->GetClock(), SND_SEQ_EVENT_TEMPO); + set_event_header(&ev, pEvent->GetClock(), SND_SEQ_EVENT_TEMPO); snd_seq_ev_set_queue_tempo(&ev, queue, us); rc = write(&ev, now); } @@ -495,12 +495,12 @@ case StatSysEx: { - tSysEx *s = e->IsSysEx(); + tSysEx *s = pEvent->IsSysEx(); // prepend 0xf0 char *buf = new char[s->Length + 1]; buf[0] = 0xF0; memcpy(buf + 1, s->mpData, s->Length); - set_event_header(&ev, e->GetClock(), s->Length + 1, buf); + set_event_header(&ev, pEvent->GetClock(), s->Length + 1, buf); rc = write(&ev, now); delete [] buf; } Modified: trunk/jazz/src/AsciiMidiFile.cpp =================================================================== --- trunk/jazz/src/AsciiMidiFile.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/AsciiMidiFile.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -164,7 +164,7 @@ { tChannelEvent *ce; - fprintf(mpFd, "%6d %02x ", pEvent->GetClock(), pEvent->Stat); + fprintf(mpFd, "%6d %02x ", pEvent->GetClock(), pEvent->GetStat()); if ((ce = pEvent->IsChannelEvent()) != 0) { fprintf(mpFd, "%2d ", ce->Channel); Modified: trunk/jazz/src/Dialogs.cpp =================================================================== --- trunk/jazz/src/Dialogs.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/Dialogs.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -1361,7 +1361,7 @@ tEventDlg *dlg = 0; const char* str = 0; - switch (e->Stat) + switch (e->GetStat()) { case StatKeyOn: if (t->GetAudioMode()) Modified: trunk/jazz/src/Events.cpp =================================================================== --- trunk/jazz/src/Events.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/Events.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -158,7 +158,7 @@ //----------------------------------------------------------------------------- int tGetMidiBytes::Write(JZEvent* pEvent, unsigned char* pData, int Length) { - int Stat = pEvent->Stat; + int Stat = pEvent->GetStat(); switch (Stat) { Modified: trunk/jazz/src/Events.h =================================================================== --- trunk/jazz/src/Events.h 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/Events.h 2008-05-19 03:57:57 UTC (rev 545) @@ -334,9 +334,13 @@ } #endif - unsigned char Stat; - int mClock; // should be protected ... + public: + unsigned char GetStat() const + { + return mStat; + } + int GetClock() const { return mClock & ~KILLED_CLOCK; @@ -353,11 +357,11 @@ BROADCAST_DEVICE = 0 }; - JZEvent(int clk, unsigned char sta) + JZEvent(int Clock, unsigned char Stat) { - mClock = clk; - Stat = sta; - Device = BROADCAST_DEVICE; + mClock = Clock; + mStat = Stat; + mDevice = BROADCAST_DEVICE; #ifdef E_DBUG Magic = MAGIC; #endif @@ -493,17 +497,23 @@ int GetDevice() const { - return Device; + return mDevice; } - void SetDevice(int d) + void SetDevice(int Device) { - Device = d; + mDevice = Device; } + protected: + + unsigned char mStat; + + int mClock; + private: - int Device; + int mDevice; }; @@ -898,7 +908,7 @@ virtual JZEvent* Copy() const { edb(); - return new tMetaEvent(mClock, Stat, mpData, Length); + return new tMetaEvent(mClock, mStat, mpData, Length); } }; Modified: trunk/jazz/src/Filter.h =================================================================== --- trunk/jazz/src/Filter.h 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/Filter.h 2008-05-19 03:57:57 UTC (rev 545) @@ -84,10 +84,10 @@ int Value = pEvent->GetValue(); for (int i = 0; i < nFltEvents; ++i) { - if (pEvent->Stat == FltEvents[i].Stat) + if (pEvent->GetStat() == FltEvents[i].Stat) { // SN++ Aftertouch gehoert eigendlich zu KeyOn Events. - if (pEvent->Stat == StatKeyPressure) + if (pEvent->GetStat() == StatKeyPressure) { int aval = pEvent->IsKeyPressure()->Key; return @@ -95,17 +95,17 @@ FltEvents[i].FromValue <= aval && aval <= FltEvents[i].ToValue; } - if (pEvent->Stat == StatTimeSignat) + if (pEvent->GetStat() == StatTimeSignat) { return FltEvents[i].Selected; } // SN++ - if (pEvent->Stat == StatChnPressure) + if (pEvent->GetStat() == StatChnPressure) { return FltEvents[i].Selected; } - if (pEvent->Stat == StatSysEx) + if (pEvent->GetStat() == StatSysEx) { return FltEvents[i].Selected; } Modified: trunk/jazz/src/PianoWindow.cpp =================================================================== --- trunk/jazz/src/PianoWindow.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/PianoWindow.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -1420,7 +1420,7 @@ while (pEvent) { - if (pEvent->Stat == Stat) + if (pEvent->GetStat() == Stat) { int Pitch = pEvent->GetPitch(); int Length = pEvent->GetLength(); @@ -2258,7 +2258,7 @@ //----------------------------------------------------------------------------- int JZPianoWindow::IsVisible(JZEvent* pEvent) { - switch (pEvent->Stat) + switch (pEvent->GetStat()) { case StatKeyOn: return mVisibleKeyOn; Modified: trunk/jazz/src/Player.cpp =================================================================== --- trunk/jazz/src/Player.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/Player.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -71,38 +71,48 @@ using namespace std; -// ------------------------- tDeviceList -------------------------- - - +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tDeviceList::tDeviceList() : mDeviceNames() { } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tDeviceList::~tDeviceList() { } -// ------------------------- tPlayLoop -------------------------- - +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tPlayLoop::tPlayLoop() : mStartClock(0), mStopClock(0) { } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tPlayLoop::Reset() { mStartClock = mStopClock = 0; } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tPlayLoop::Set(long Start, long Stop) { mStartClock = Start; mStopClock = Stop; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tPlayLoop::Ext2IntClock(long Clock) { if (mStopClock) @@ -112,12 +122,17 @@ return Clock; } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tPlayLoop::Int2ExtClock(long Clock) { return Clock; } -// Copy events from song to output buffer. +//----------------------------------------------------------------------------- +// Description: +// Copy events from the passed song to output buffer. +//----------------------------------------------------------------------------- void tPlayLoop::PrepareOutput( tEventArray* buf, JZSong* pSong, @@ -160,9 +175,10 @@ } } -// ------------------------- JZPlayer --------------------- - - +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- JZPlayer::JZPlayer(JZSong* pSong) : mSamples(pSong->GetTicksPerQuarter() * pSong->Speed()) { @@ -176,17 +192,22 @@ rec_info = 0; } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- JZPlayer::~JZPlayer() { delete PlayLoop; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::ShowError() { wxMessageBox("could not install driver", "Error", wxOK); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::StartPlay(long Clock, long LoopClock, int Continue) { #ifdef DEBUG_PLAYER_STARTPLAY @@ -433,10 +454,10 @@ } // if !Continue t = Song->GetTrack(0); - JZEvent *e = t->GetCurrentTempo(Clock); - if (e) + JZEvent* pEvent = t->GetCurrentTempo(Clock); + if (pEvent) { - OutNow(e); + OutNow(pEvent); } // Send songpointer? @@ -473,7 +494,8 @@ Playing = true; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::StopPlay() { // Stop the wxTimer. @@ -492,10 +514,10 @@ if (Track) { tEventIterator Iterator(Track); - JZEvent *e = Iterator.First(); - while (e && e->GetClock() < Clock + 100) + JZEvent* pEvent = Iterator.First(); + while (pEvent && pEvent->GetClock() < Clock + 100) { - tKeyOn* pKeyOn = e->IsKeyOn(); + tKeyOn* pKeyOn = pEvent->IsKeyOn(); if (pKeyOn) { if (pKeyOn->GetClock() + pKeyOn->mLength >= Clock - 100) @@ -505,7 +527,7 @@ OutNow(&off); } } - e = Iterator.Next(); + pEvent = Iterator.Next(); } } } @@ -513,7 +535,8 @@ JZProjectManager::Instance()->NewPlayPosition(-1); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::Notify() { // called by timer @@ -560,22 +583,24 @@ } } - +//----------------------------------------------------------------------------- +// Description: +// Try to send all events up to OutClock to device. +//----------------------------------------------------------------------------- void JZPlayer::FlushToDevice() -// try to send all events up to OutClock to device { int BufferFull = 0; tEventIterator Iterator(&mPlayBuffer); - JZEvent *e = Iterator.Range(0, OutClock); - while (!BufferFull && e) + JZEvent* pEvent = Iterator.Range(0, OutClock); + while (!BufferFull && pEvent) { - if (OutEvent(e) != 0) + if (OutEvent(pEvent) != 0) BufferFull = 1; else { - e->Kill(); - e = Iterator.Next(); + pEvent->Kill(); + pEvent = Iterator.Next(); } } @@ -584,7 +609,8 @@ mPlayBuffer.Cleanup(0); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::AllNotesOff(int Reset) { tControl NoteOff(0, 0, 0x78, 0); @@ -616,8 +642,8 @@ } } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void JZPlayer::OutNow(JZTrack *t, tParam *r) { OutNow(t, &r->mMsb); @@ -627,42 +653,47 @@ OutNow(t, &r->mResetLsb); } -// ---------------------------------------------------------------------------------------------- -// MPU-Player -// ---------------------------------------------------------------------------------------------- - #ifdef DEV_MPU401 +//***************************************************************************** +// MPU-Player +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tMpuPlayer::tMpuPlayer(JZSong* pSong) : JZPlayer(pSong) { - poll_millisec = 25; - midinethost = getenv("MIDINETHOST"); - if (!midinethost || !strlen(midinethost)) { - midinethost = "localhost"; - } - midinetservice = getenv("MIDINETSERVICE"); - if (!midinetservice || !strlen(midinetservice)) { - midinetservice = MIDINETSERVICE; - } - dev = midinetconnect( midinethost, midinetservice ); + poll_millisec = 25; + midinethost = getenv("MIDINETHOST"); + if (!midinethost || !strlen(midinethost)) + { + midinethost = "localhost"; + } + midinetservice = getenv("MIDINETSERVICE"); + if (!midinetservice || !strlen(midinetservice)) + { + midinetservice = MIDINETSERVICE; + } + dev = midinetconnect( midinethost, midinetservice ); } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tMpuPlayer::~tMpuPlayer() { close(dev); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tMpuPlayer::Installed() { return dev >= 0; } - #if DB_WRITE +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int dwrite(int dev, const char *buf, int size) { int i, written; @@ -675,13 +706,17 @@ } printf("W: "); for (i = 0; i < written; i++) + { printf("%02x ", (unsigned char)buf[i]); + } putchar('\n'); if (written != size) { printf("L: "); for (i = written; i < size; i++) + { printf("%02x ", (unsigned char)buf[i]); + } putchar('\n'); } fflush(stdout); @@ -689,6 +724,8 @@ } #endif +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tMpuPlayer::StartPlay(long IntClock, long LoopClock, int Continue) { long ExtClock = PlayLoop->Int2ExtClock(IntClock); @@ -740,9 +777,10 @@ clock_to_host_counter = 0; ActiveTrack = 0; - for (int i = 0; i < ACTIVE_TRACKS; i++) { - TrackClock[i] = ExtClock; - TrackRunningStatus[i] = 0; + for (int i = 0; i < ACTIVE_TRACKS; i++) + { + TrackClock[i] = ExtClock; + TrackRunningStatus[i] = 0; } // Setup Timebase @@ -765,49 +803,50 @@ JZPlayer::StartPlay(IntClock, LoopClock, Continue); // Supress realtime messages to MIDI Out port? - if (!Config(C_RealTimeOut)) { - char realtime[2]; - realtime[0] = CMD+1; - realtime[1] = 0x32; - write_ack_mpu( realtime, 2 ); + if (!Config(C_RealTimeOut)) + { + char realtime[2]; + realtime[0] = CMD + 1; + realtime[1] = 0x32; + write_ack_mpu(realtime, 2); } // What is the clock source ? char clocksource[2]; clocksource[0] = CMD+1; - switch (Config(C_ClockSource)) { - case CsInt: - clocksource[1] = 0x80; - play = play1; - playsize = sizeof( play1 ); - break; - case CsFsk: - clocksource[1] = 0x81; - play = play1; - playsize = sizeof( play1 ); - break; - case CsMidi: - clocksource[1] = 0x82; - play = play2; - playsize = sizeof( play2 ); - break; - default: - clocksource[1] = 0x80; - play = play1; - playsize = sizeof( play1 ); - break; + switch (Config(C_ClockSource)) + { + case CsInt: + clocksource[1] = 0x80; + play = play1; + playsize = sizeof( play1 ); + break; + case CsFsk: + clocksource[1] = 0x81; + play = play1; + playsize = sizeof( play1 ); + break; + case CsMidi: + clocksource[1] = 0x82; + play = play2; + playsize = sizeof( play2 ); + break; + default: + clocksource[1] = 0x80; + play = play1; + playsize = sizeof( play1 ); + break; } write_ack_mpu(clocksource, 2); JZPlayer::Notify(); // Start play - write_ack_mpu( play, playsize ); - + write_ack_mpu(play, playsize); } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tMpuPlayer::StopPlay() { static const char stop = RES; @@ -822,25 +861,33 @@ RecdBuffer.Keyoff2Length(); } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tMpuPlayer::SetHardThru(int on, int idummy, int odummy) { - char midithru[2]; midithru[0] = CMD+1; if (on) + { midithru[1] = 0x89; + } else + { midithru[1] = 0x88; + } write_ack_mpu( midithru, 2 ); - } -int tMpuPlayer::OutEvent(JZEvent *e) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +int tMpuPlayer::OutEvent(JZEvent* pEvent) { if (!PlyBytes.WriteFile(dev)) + { return 1; // buffer full + } - int Stat = e->Stat; + int Stat = pEvent->GetStat(); switch (Stat) { @@ -851,156 +898,167 @@ case StatProgram: case StatChnPressure: case StatPitch: - { - tGetMidiBytes midi; - int i; - tChannelEvent *c; + { + tGetMidiBytes midi; + int i; + tChannelEvent *c; - e->Write(midi); - Stat = midi.Buffer[0]; // Status + Channel + pEvent->Write(midi); + Stat = midi.Buffer[0]; // Status + Channel - OutBreak(e->GetClock()); + OutBreak(pEvent->GetClock()); - if ( (c = e->IsChannelEvent()) != 0 ) { - switch (c->Channel) { - case 0: - case 3: - ActiveTrack = 5; - break; - case 1: - case 4: - ActiveTrack = 4; - break; - case 2: - case 5: - ActiveTrack = 3; - break; - case 6: - case 10: - case 13: - ActiveTrack = 2; - break; - case 9: - ActiveTrack = 6; - break; - case 7: - case 11: - case 14: - ActiveTrack = 1; - break; - case 8: - case 12: - case 15: - ActiveTrack = 0; - break; - default: - ActiveTrack = 6; - break; - } + if ((c = pEvent->IsChannelEvent()) != 0) + { + switch (c->Channel) + { + case 0: + case 3: + ActiveTrack = 5; + break; + case 1: + case 4: + ActiveTrack = 4; + break; + case 2: + case 5: + ActiveTrack = 3; + break; + case 6: + case 10: + case 13: + ActiveTrack = 2; + break; + case 9: + ActiveTrack = 6; + break; + case 7: + case 11: + case 14: + ActiveTrack = 1; + break; + case 8: + case 12: + case 15: + ActiveTrack = 0; + break; + default: + ActiveTrack = 6; + break; } - else { - // Not channel event => play on track #6 - ActiveTrack = 6; - } + } + else + { + // Not channel event => play on track #6 + ActiveTrack = 6; + } - long Time = e->GetClock() - TrackClock[ActiveTrack]; - assert(Time < 240); + long Time = pEvent->GetClock() - TrackClock[ActiveTrack]; + assert(Time < 240); - if (Stat != TrackRunningStatus[ActiveTrack]) - { - PlyBytes.Put(TRK + midi.nBytes + 1 + 1); - PlyBytes.Put(ActiveTrack); - PlyBytes.Put(Time); - PlyBytes.Put(Stat); - TrackRunningStatus[ActiveTrack] = Stat; - } - else - { - PlyBytes.Put(TRK + midi.nBytes + 1); - PlyBytes.Put(ActiveTrack); - PlyBytes.Put(Time); - } - for (i = 1; i < midi.nBytes; i++) - PlyBytes.Put(midi.Buffer[i]); - - TrackClock[ActiveTrack] = e->GetClock(); - return 0; + if (Stat != TrackRunningStatus[ActiveTrack]) + { + PlyBytes.Put(TRK + midi.nBytes + 1 + 1); + PlyBytes.Put(ActiveTrack); + PlyBytes.Put(Time); + PlyBytes.Put(Stat); + TrackRunningStatus[ActiveTrack] = Stat; } + else + { + PlyBytes.Put(TRK + midi.nBytes + 1); + PlyBytes.Put(ActiveTrack); + PlyBytes.Put(Time); + } + for (i = 1; i < midi.nBytes; i++) + PlyBytes.Put(midi.Buffer[i]); + TrackClock[ActiveTrack] = pEvent->GetClock(); + return 0; + } + case StatSetTempo: case StatSysEx: + { + if (pEvent->GetClock() > 0) { - if (e->GetClock() > 0) - { - OutOfBandEvents.Put(e->Copy()); - } - return 0; + OutOfBandEvents.Put(pEvent->Copy()); } + return 0; + } default: // Meterchange etc - return 0; - break; + return 0; + break; } } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tMpuPlayer::OutBreak() { // send a break to the driver starting at PlyBytes.GetClock() and ending at OutClock if (!PlyBytes.WriteFile(dev)) + { return; + } (void)OutBreak(OutClock); PlyBytes.WriteFile(dev); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tMpuPlayer::OutBreak(long BreakOver) { -int OverFlow = 1; + int OverFlow = 1; - while (OverFlow) { - OverFlow = 0; - for (int i = 0; i < ACTIVE_TRACKS; i++) { - if ( (BreakOver - TrackClock[i]) >= 240 ) { - PlyBytes.Put(TRK+1+1); - PlyBytes.Put( i ); - PlyBytes.Put(0xf8); - TrackClock[i] += 240; - OverFlow = 1; - } - } + while (OverFlow) + { + OverFlow = 0; + for (int i = 0; i < ACTIVE_TRACKS; i++) + { + if ((BreakOver - TrackClock[i]) >= 240) + { + PlyBytes.Put(TRK + 1 + 1); + PlyBytes.Put(i); + PlyBytes.Put(0xf8); + TrackClock[i] += 240; + OverFlow = 1; + } } + } } - - -void tMpuPlayer::OutNow(JZEvent *e) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +void tMpuPlayer::OutNow(JZEvent* pEvent) { // send event to driver immediately regardless of events remaining // in the play-queue. int i, n = 0; tGetMidiBytes midi; - if (e->Write(midi) == 0) + if (pEvent->Write(midi) == 0) { char *buf = new char[midi.nBytes + 3]; buf[n++] = CMD+1; buf[n++] = 0xd7; buf[n++] = DAT+midi.nBytes; for (i = 0; i < midi.nBytes; i++) + { buf[n++] = midi.Buffer[i]; + } write_noack_mpu(buf, n); delete[] buf; } - else // special event { - switch (e->Stat) + switch (pEvent->GetStat()) { case StatSetTempo: { char cmd[4]; - tSetTempo *s = (tSetTempo *)e; + tSetTempo *s = (tSetTempo *)pEvent; int bpm = s->GetBPM(); cmd[0] = CMD+1; cmd[1] = 0xE0; @@ -1011,31 +1069,35 @@ break; case StatSysEx: { - n = 0; - tSysEx *s = (tSysEx *) e; - char *sysex = new char[s->Length+4]; - sysex[n++] = CMD+1; - sysex[n++] = 0xdf; - sysex[n++] = DAT + s->Length + 1; - sysex[n++] = StatSysEx; - for (i = 0; i < s->Length; i++) - sysex[n++] = s->Data[i]; - write_noack_mpu(sysex, n); - delete[] sysex; + n = 0; + tSysEx *s = (tSysEx *) pEvent; + char *sysex = new char[s->Length+4]; + sysex[n++] = CMD+1; + sysex[n++] = 0xdf; + sysex[n++] = DAT + s->Length + 1; + sysex[n++] = StatSysEx; + for (i = 0; i < s->Length; i++) + { + sysex[n++] = s->Data[i]; + } + write_noack_mpu(sysex, n); + delete[] sysex; } case StatSongPtr: { - n = 0; - tSongPtr *s = (tSongPtr *) e; - char *common = new char[s->Length+4]; - common[n++] = CMD+1; - common[n++] = 0xdf; - common[n++] = DAT + s->Length + 1; - common[n++] = StatSongPtr; - for (i = 0; i < s->Length; i++) - common[n++] = s->Data[i]; - write_noack_mpu(common, n); - delete[] common; + n = 0; + tSongPtr *s = (tSongPtr *) pEvent; + char *common = new char[s->Length+4]; + common[n++] = CMD+1; + common[n++] = 0xdf; + common[n++] = DAT + s->Length + 1; + common[n++] = StatSongPtr; + for (i = 0; i < s->Length; i++) + { + common[n++] = s->Data[i]; + } + write_noack_mpu(common, n); + delete[] common; } break; @@ -1045,20 +1107,21 @@ } } - +//----------------------------------------------------------------------------- +// try to send all out of band events up to Clock to device +//----------------------------------------------------------------------------- void tMpuPlayer::FlushOutOfBand(long Clock) -// try to send all out of band events up to Clock to device { tEventIterator Iterator(&OutOfBandEvents); - JZEvent *e = Iterator.Range(0, Clock); - while (e) + JZEvent* pEvent = Iterator.Range(0, Clock); + while (pEvent) { - switch (e->Stat) + switch (pEvent->GetStat()) { case StatSetTempo: { char cmd[4]; - tSetTempo *s = (tSetTempo *)e; + tSetTempo *s = (tSetTempo *)pEvent; int bpm = s->GetBPM(); cmd[0] = CMD+1; cmd[1] = 0xE0; @@ -1070,7 +1133,7 @@ case StatSysEx: { int n = 0; - tSysEx *s = (tSysEx *) e; + tSysEx *s = (tSysEx *) pEvent; char *sysex = new char[s->Length+4]; sysex[n++] = CMD+1; sysex[n++] = 0xdf; @@ -1084,14 +1147,15 @@ default: break; } - e->Kill(); - e = Iterator.Next(); + pEvent->Kill(); + pEvent = Iterator.Next(); } OutOfBandEvents.Cleanup(0); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tMpuPlayer::GetRealTimeClock() { static int receiving_song_ptr = 0; @@ -1167,7 +1231,8 @@ return playclock; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tMpuPlayer::GetRecordedData() { int c, i; @@ -1196,7 +1261,7 @@ { unsigned char c1, c2; int Channel; - JZEvent *e = 0; + JZEvent* pEvent = 0; if (c & 0x80) { @@ -1211,39 +1276,43 @@ { case StatKeyOff: c2 = recbuf[i++]; // SN++ added veloc - e = new tKeyOff(RecBytes.Clock, Channel, c1, c2); - e = new tKeyOff(RecBytes.Clock, Channel, c1); + pEvent = new tKeyOff(RecBytes.Clock, Channel, c1, c2); + pEvent = new tKeyOff(RecBytes.Clock, Channel, c1); break; case StatKeyOn: c2 = recbuf[i++]; if (!c2) - e = new tKeyOff(RecBytes.Clock, Channel, c1); + { + pEvent = new tKeyOff(RecBytes.Clock, Channel, c1); + } else - e = new tKeyOn(RecBytes.Clock, Channel, c1, c2); + { + pEvent = new tKeyOn(RecBytes.Clock, Channel, c1, c2); + } break; // #if 0 case StatKeyPressure: c2 = recbuf[i++]; - e = new tKeyPressure(RecBytes.Clock, Channel, c1, c2); + pEvent = new tKeyPressure(RecBytes.Clock, Channel, c1, c2); break; case StatChnPressure: - e = new tChnPressure(RecBytes.Clock, Channel, c1); + pEvent = new tChnPressure(RecBytes.Clock, Channel, c1); break; case StatControl: c2 = recbuf[i++]; - e = new tControl(RecBytes.Clock, Channel, c1, c2); + pEvent = new tControl(RecBytes.Clock, Channel, c1, c2); break; case StatProgram: - e = new tProgram(RecBytes.Clock, Channel, c1); + pEvent = new tProgram(RecBytes.Clock, Channel, c1); break; case StatPitch: c2 = recbuf[i++]; - e = new tPitch(RecBytes.Clock, Channel, c1, c2); + pEvent = new tPitch(RecBytes.Clock, Channel, c1, c2); break; default: @@ -1251,13 +1320,14 @@ break; } - if (e) + if (pEvent) { - e->Clock = PlayLoop->Ext2IntClock(e->Clock); - RecdBuffer.Put(e); + pEvent->Clock = PlayLoop->Ext2IntClock(pEvent->Clock); + RecdBuffer.Put(pEvent); } } - else if (c == 0xfc) { + else if (c == 0xfc) + { // Data end mark } else @@ -1273,12 +1343,12 @@ #endif // DEV_MPU401 -// **************************************************************** -// /dev/sequencer2 -// **************************************************************** - #ifdef DEV_SEQUENCER2 +//***************************************************************************** +// /dev/sequencer2 +//***************************************************************************** + // SN-- SEQ_DEFINEBUF (32768); #define sequencer_buffer 65536 SEQ_DEFINEBUF (sequencer_buffer); // 64K @@ -1286,6 +1356,8 @@ int seqfd = -1; int mididev = -1; +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void seqbuf_dump(void) { if (_seqbufptr) @@ -1309,10 +1381,12 @@ memmove(_seqbuf, _seqbuf + size, _seqbufptr); } } -#define seqbuf_empty() (_seqbufptr == 0) + +#define seqbuf_empty() (_seqbufptr == 0) #define seqbuf_clear() (_seqbufptr = 0) - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void seqbuf_flush_last_event() { _seqbufptr -= 8; @@ -1320,8 +1394,11 @@ perror("ioctl flush_last"); } -// --------------------- voxware midi through ------------------------ - +//***************************************************************************** +// voxware midi through +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tOSSThru::tOSSThru() { int time_base = 120; @@ -1335,7 +1412,8 @@ Start(5); // poll every 5 ms } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tOSSThru::~tOSSThru() { Stop(); @@ -1343,7 +1421,8 @@ seqbuf_dump(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tOSSThru::Notify() { unsigned char buf[128]; @@ -1365,13 +1444,15 @@ } if (_seqbufptr) + { seqbuf_dump(); + } } - -// ------------------------- tSeq2Player --------------------- - - +//***************************************************************************** +//***************************************************************************** +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tSeq2Player::tSeq2Player(JZSong* pSong) : JZPlayer(pSong) { @@ -1426,22 +1507,25 @@ } } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tSeq2Player::Installed() { return seqfd >= 0 && mididev >= 0; } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- tSeq2Player::~tSeq2Player() { delete through; if (seqfd > 0) close(seqfd); seqfd = -1; - } +} - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- int tSeq2Player::FindMidiDevice() { struct synth_info si; @@ -1507,6 +1591,8 @@ } } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tSeq2Player::SetSoftThru(int on, int idummy, int odummy) { gpConfig->Put(C_SoftThru, on); @@ -1527,20 +1613,21 @@ } } - -int tSeq2Player::OutEvent(JZEvent *e, int now) +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +int tSeq2Player::OutEvent(JZEvent* pEvent, int now) { if (!now) { - OutBreak(e->GetClock()); + OutBreak(pEvent->GetClock()); } - int Stat = e->Stat; + int Stat = pEvent->GetStat(); switch (Stat) { case StatKeyOn: { - tKeyOn* pKeyOn = e->IsKeyOn(); + tKeyOn* pKeyOn = pEvent->IsKeyOn(); SEQ_START_NOTE( mididev, pKeyOn->Channel, @@ -1552,7 +1639,7 @@ case StatKeyOff: { - tKeyOff* pKeyOff = e->IsKeyOff(); + tKeyOff* pKeyOff = pEvent->IsKeyOff(); SEQ_STOP_NOTE( mididev, pKeyOff->Channel, @@ -1563,7 +1650,7 @@ break; case StatProgram: { - tProgram *k = e->IsProgram(); + tProgram *k = pEvent->IsProgram(); SEQ_SET_PATCH(mididev, k->Channel, k->Program); if (now) seqbuf_flush_last_event(); } @@ -1572,7 +1659,7 @@ // SN++ Aftertouch case StatKeyPressure: { - tKeyPressure *k = e->IsKeyPressure(); + tKeyPressure *k = pEvent->IsKeyPressure(); SEQ_KEY_PRESSURE(mididev, k->Channel, k->Key, k->Value); if (now) seqbuf_flush_last_event(); } @@ -1581,7 +1668,7 @@ case StatChnPressure: { - tChnPressure *k = e->IsChnPressure(); + tChnPressure *k = pEvent->IsChnPressure(); SEQ_CHN_PRESSURE(mididev, k->Channel, k->Value); if (now) seqbuf_flush_last_event(); } @@ -1589,7 +1676,7 @@ case StatControl: { - tControl *k = e->IsControl(); + tControl *k = pEvent->IsControl(); SEQ_CONTROL(mididev, k->Channel, k->mControl, k->mValue); if (now) seqbuf_flush_last_event(); } @@ -1597,7 +1684,7 @@ case StatPitch: { - tPitch *k = e->IsPitch(); + tPitch *k = pEvent->IsPitch(); SEQ_BENDER(mididev, k->Channel, k->Value + 8192); if (now) seqbuf_flush_last_event(); } @@ -1605,7 +1692,7 @@ case StatSetTempo: { - int bpm = e->IsSetTempo()->GetBPM(); + int bpm = pEvent->IsSetTempo()->GetBPM(); if (now) { if (ioctl(seqfd, SNDCTL_TMR_TEMPO, &bpm) < 0) @@ -1614,7 +1701,7 @@ else { if (!GetAudioEnabled()) - if (e->GetClock() > 0) + if (pEvent->GetClock() > 0) SEQ_SET_TEMPO(bpm); } } @@ -1625,7 +1712,7 @@ if (now) { // todo - tSysEx *s = e->IsSysEx(); + tSysEx *s = pEvent->IsSysEx(); struct sysex_info *sysex = (struct sysex_info *)new char [sizeof(struct sysex_info) + s->Length + 1]; sysex->key = SYSEX_PATCH; @@ -1637,9 +1724,10 @@ delete [] (char *)sysex; } - else if (e->GetClock() > 0) { + else if (pEvent->GetClock() > 0) + { // OSS wants small packets with max 6 bytes - tSysEx *sx = e->IsSysEx(); + tSysEx *sx = pEvent->IsSysEx(); const int N = 6; int i, j; char buf[N]; @@ -1666,8 +1754,8 @@ return 0; } - - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tSeq2Player::OutBreak(long clock) { if (play_clock < clock) @@ -1688,13 +1776,16 @@ play_clock = clock; } +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tSeq2Player::OutBreak() { OutBreak(OutClock); seqbuf_dump(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tSeq2Player::StartPlay(long Clock, long LoopClock, int Continue) { char buf[512]; @@ -1772,7 +1863,8 @@ seqbuf_dump(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- void tSeq2Player::StopPlay() { seqbuf_clear(); @@ -1796,20 +1888,21 @@ RecdBuffer.Keyoff2Length(); } - +//----------------------------------------------------------------------------- +// try to send all events up to OutClock to device +//----------------------------------------------------------------------------- void tSeq2Player::FlushToDevice() -// try to send all events up to OutClock to device { tEventIterator Iterator(&mPlayBuffer); - JZEvent *e = Iterator.Range(0, OutClock); - if (e) + JZEvent* pEvent = Iterator.Range(0, OutClock); + if (pEvent) { do { - OutEvent(e); - e->Kill(); - e = Iterator.Next(); - } while (e); + OutEvent(pEvent); + pEvent->Kill(); + pEvent = Iterator.Next(); + } while (pEvent); mPlayBuffer.Cleanup(0); } @@ -1817,7 +1910,8 @@ seqbuf_dump(); } - +//----------------------------------------------------------------------------- +//----------------------------------------------------------------------------- long tSeq2Player::GetRealTimeClock() { unsigned char buf[256]; @@ -1827,7 +1921,7 @@ int i = 0; while (i < size) { - JZEvent *e = 0; + JZEvent* pEvent = 0; switch(buf[i]) { @@ -1854,16 +1948,16 @@ //printf("got: chn %d, ctl %d, val %d\n", chn, ctl, val); switch(buf[i+2]) { case MIDI_CTL_CHANGE: - e = new tControl(0, chn, ctl, val); + pEvent = new tControl(0, chn, ctl, val); break; case MIDI_PGM_CHANGE: - e = new tProgram(0, chn, ctl); + pEvent = new tProgram(0, chn, ctl); break; case MIDI_CHN_PRESSURE: - e = new tChnPressure(0, chn, ctl); + pEvent = new tChnPressure(0, chn, ctl); break; case MIDI_PITCH_BEND: - e = new tPitch(0, chn, val - 8192); + pEvent = new tPitch(0, chn, val - 8192); break; } @@ -1882,18 +1976,23 @@ unsigned char chn = buf[i+3]; unsigned char key = buf[i+4]; unsigned char vel = buf[i+5]; - switch(buf[i+2]) { + switch(buf[i+2]) + { case MIDI_NOTEOFF: // SN++ added veloc - e = new tKeyOff(0, chn, key, vel); + pEvent = new tKeyOff(0, chn, key, vel); break; case MIDI_NOTEON: if (vel == 0) - e = new tKeyOff(0, chn, key); + { + pEvent = new tKeyOff(0, chn, key); + } else - e = new tKeyOn(0, chn, key, vel); + { + pEvent = new tKeyOn(0, chn, key, vel); + } break; case MIDI_KEY_PRESSURE: - e = new tKeyPressure(0, chn, key, vel); + pEvent = new tKeyPressure(0, chn, key, vel); break; } @@ -1913,11 +2012,11 @@ break; } - if (e) + if (pEvent) { - e->SetClock(PlayLoop->Ext2IntClock(recd_clock)); - RecdBuffer.Put(e); - e = 0; + pEvent->SetClock(PlayLoop->Ext2IntClock(recd_clock)); + RecdBuffer.Put(pEvent); + pEvent = 0; } } Modified: trunk/jazz/src/StandardFile.cpp =================================================================== --- trunk/jazz/src/StandardFile.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/StandardFile.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -230,10 +230,10 @@ #if 0 printfxxo("%02X %02X ", pEvent->Clock, dif); - if (pEvent->Stat != 0x90) + if (pEvent->GetStat() != 0x90) { int i; - printf("%02X ", pEvent->Stat); + printf("%02X ", pEvent->GetStat()); for (i = 0; i < Length; i++) { printf("%02X ", Data[i]); @@ -242,7 +242,7 @@ } #endif - switch (pEvent->Stat) + switch (pEvent->GetStat()) { // KeyOff -> KeyOn mit Vel=0. Gives better Runningstatus! case StatKeyOff: @@ -281,7 +281,7 @@ // SN++ case StatChnPressure: - Stat = pEvent->Stat | pEvent->IsChannelEvent()->Channel; + Stat = pEvent->GetStat() | pEvent->IsChannelEvent()->Channel; if (Stat != RunningStatus) { RunningStatus = Stat; @@ -323,14 +323,14 @@ if (1) { int i; - printf("%02X ", pEvent->Stat); + printf("%02X ", pEvent->GetStat()); for (i = 0; i < Length; i++) printf("%02X ", Data[i]); putchar('\n'); } #endif - Stat = pEvent->Stat; + Stat = pEvent->GetStat(); RunningStatus = 0; *cp++ = 0xff; *cp++ = Stat; Modified: trunk/jazz/src/mswin/WindowsPlayer.cpp =================================================================== --- trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-19 00:59:59 UTC (rev 544) +++ trunk/jazz/src/mswin/WindowsPlayer.cpp 2008-05-19 03:57:57 UTC (rev 545) @@ -210,48 +210,50 @@ } u; u.w = dw; - JZEvent *e = 0; + JZEvent* pEvent = 0; switch(u.c[0] & 0xf0) { case 0x80: - e = new tKeyOff(0, u.c[0] & 0x0f, u.c[1]); + pEvent = new tKeyOff(0, u.c[0] & 0x0f, u.c[1]); break; case 0x90: if (u.c[2]) - e = new tKeyOn(0, u.c[0] & 0x0f, u.c[1], u.c[2], 0); + pEvent = new tKeyOn(0, u.c[0] & 0x0f, u.c[1], u.c[2], 0); else - e = new tKeyOff(0, u.c[0] & 0x0f, u.c[1]); + pEvent = new tKeyOff(0, u.c[0] & 0x0f, u.c[1]); break; case 0xA0: - e = new tKeyPressure(0, u.c[0] & 0x0f, u.c[1], u.c[2]); + pEvent = new tKeyPressure(0, u.c[0] & 0x0f, u.c[1], u.c[2]); break; case 0xB0: if (u.c[1] != 0x7b) - e = new tControl(0, u.c[0] & 0x0f, u.c[1], u.c[2]); + { + pEvent = new tControl(0, u.c[0] & 0x0f, u.c[1], u.c[2]); + } break; case 0xC0: - e = new tProgram(0, u.c[0] & 0x0f, u.c[1]); + pEvent = new tProgram(0, u.c[0] & 0x0f, u.c[1]); break; case 0xD0: - e = new tChnPressure(0, u.c[0] & 0x0f, u.c[1]); + pEvent = new tChnPressure(0, u.c[0] & 0x0f, u.c[1]); break; case 0xE0: - e = new tPitch(0, u.c[0] & 0x0f, u.c[1], u.c[2]); + pEvent = new tPitch(0, u.c[0] & 0x0f, u.c[1], u.c[2]); break; } - return e; + return pEvent; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -DWORD JZWindowsPlayer::Event2Dword(JZEvent *e) +DWORD JZWindowsPlayer::Event2Dword(JZEvent* pEvent) { union { @@ -260,12 +262,12 @@ } u; u.w = 0; - int Stat = e->Stat; + int Stat = pEvent->GetStat(); switch (Stat) { case StatKeyOn: { - tKeyOn *k = e->IsKeyOn(); + tKeyOn *k = pEvent->IsKeyOn(); u.c[0] = 0x90 | k->Channel; u.c[1] = k->mKey; u.c[2] = k->mVelocity; @@ -274,7 +276,7 @@ case StatKeyOff: { - tKeyOff *k = e->IsKeyOff(); + tKeyOff *k = pEvent->IsKeyOff(); u.c[0] = 0x80 | k->Channel; u.c[1] = k->Key; u.c[2] = 0; @@ -283,7 +285,7 @@ case StatProgram: { - tProgram *k = e->IsProgram(); + tProgram *k = pEvent->IsProgram(); u.c[0] = 0xC0 | k->Channel; u.c[1] = k->Program; } @@ -291,7 +293,7 @@ case StatChnPressure: { - tChnPressure *k = e->IsChnPressure(); + tChnPressure *k = pEvent->IsChnPressure(); u.c[0] = 0xC0 | k->Channel; u.c[1] = k->Value; } @@ -299,7 +301,7 @@ case StatControl: { - tControl* pControl = e->IsControl(); + tControl* pControl = pEvent->IsControl(); u.c[0] = 0xB0 | pControl->Channel; u.c[1] = pControl->mControl; u.c[2] = pControl->mValue; @@ -308,7 +310,7 @@ case StatKeyPressure: { - tKeyPressure *k = e->IsKeyPressure(); + tKeyPressure *k = pEvent->IsKeyPressure(); u.c[0] = 0xA0 | k->Channel; u.c[1] = k->Key; u.c[2] = k->Value; @@ -317,7 +319,7 @@ case StatPitch: { - tPitch *k = e->IsPitch(); + tPitch *k = pEvent->IsPitch(); int v = k->Value + 8192; u.c[0] = 0xE0 | k->Channel; u.c[1] = (unsigned char)(v & 0x7F); @@ -339,11 +341,11 @@ case StatSetTempo: { - tSetTempo *t = e->IsSetTempo(); + tSetTempo *t = pEvent->IsSetTempo(); if (t && t->GetClock() > 0) { SetTempo( t->GetBPM(), t->GetClock() ); - OutOfBandEvents.Put( e->Copy() ); + OutOfBandEvents.Put(pEvent->Copy()); } } break; @@ -415,9 +417,9 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int JZWindowsPlayer::OutSysex(JZEvent *e, DWORD time) +int JZWindowsPlayer::OutSysex(JZEvent* pEvent, DWORD time) { - tSysEx *sx = e->IsSysEx(); + tSysEx *sx = pEvent->IsSysEx(); if (sx == 0) return 1; @@ -434,32 +436,32 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int JZWindowsPlayer::OutEvent(JZEvent *e) +int JZWindowsPlayer::OutEvent(JZEvent* pEvent) { - DWORD d = Event2Dword(e); + DWORD d = Event2Dword(pEvent); if (d) { - state->play_buffer.put(d, Clock2Time(e->GetClock())); + state->play_buffer.put(d, Clock2Time(pEvent->GetClock())); } - else if (e->IsSysEx() && (e->GetClock() > 0)) + else if (pEvent->IsSysEx() && (pEvent->GetClock() > 0)) { - OutSysex(e, Clock2Time(e->GetClock())); + OutSysex(pEvent, Clock2Time(pEvent->GetClock())); } return 0; } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -int JZWindowsMidiPlayer::OutEvent(JZEvent *e) +int JZWindowsMidiPlayer::OutEvent(JZEvent* pEvent) { - DWORD d = Event2Dword(e); + DWORD d = Event2Dword(pEvent); if (d) { - state->play_buffer.put(d, e->GetClock()); + state->play_buffer.put(d, pEvent->GetClock()); } - else if (e->IsSysEx() && (e->GetClock() > 0)) + else if (pEvent->IsSysEx() && (pEvent->GetClock() > 0)) { - OutSysex(e, e->GetClock()); + OutSysex(pEvent, pEvent->GetClock()); } return 0; } @@ -474,14 +476,14 @@ { midiOutShortMsg(state->hout, d); } - else if (pEvent->Stat == StatSetTempo) + else if (pEvent->GetStat() == StatSetTempo) { if (state->playing) { SetTempo(pEvent->IsSetTempo()->GetBPM(), OutClock); } } - else if (pEvent->Stat == StatSysEx) + else if (pEvent->GetStat() == StatSysEx) { tSysEx *s = pEvent->IsSysEx(); if (s->Length + 1 < maxSysLen) @@ -641,12 +643,16 @@ if (gpConfig->GetValue(C_RealTimeOut)) { - tMetaEvent *e; + tMetaEvent* pEvent; if (!Continue) - e = new tStartPlay( 0 ); + { + pEvent = new tStartPlay(0); + } else - e = new tContPlay( 0 ); - OutNow( e ); + { + pEvent = new tContPlay(0); + } + OutNow(pEvent); FillMidiClocks(mPlayBuffer.GetLastClock()); // also does a sort } @@ -709,9 +715,9 @@ JZPlayer::StopPlay(); if (gpConfig->GetValue(C_RealTimeOut)) { - tStopPlay *e = new tStopPlay(0); - OutNow( e ); - delete e; + tStopPlay* pEvent = new tStopPlay(0); + OutNow(pEvent); + delete pEvent; } AllNotesOff(); RecdBuffer.Keyoff2Length(); @@ -795,11 +801,11 @@ midi_event *m = state->recd_buffer.get(); // Event? - JZEvent *e = Dword2Event(m->data); - if (e) + JZEvent* pEvent = Dword2Event(m->data); + if (pEvent) { - e->SetClock(PlayLoop->Ext2IntClock(Time2RealTimeClock(m->ref))); - RecdBuffer.Put(e); + pEvent->SetClock(PlayLoop->Ext2IntClock(Time2RealTimeClock(m->ref))); + RecdBuffer.Put(pEvent); } } @@ -811,19 +817,19 @@ if ( !OutOfBandEvents.IsEmpty() ) { tEventIterator Iterator(&OutOfBandEvents); - JZEvent *e = Iterator.Range(0, clock); - while (e) + JZEvent* pEvent = Iterator.Range(0, clock); + while (pEvent) { - switch (e->Stat) + switch (pEvent->GetStat()) { case StatSetTempo: - SetRealTimeTempo( ((tSetTempo *)e)->GetBPM(), clock ); + SetRealTimeTempo( ((tSetTempo *)pEvent)->GetBPM(), clock ); break; default: break; } - e->Kill(); - e = Iterator.Next(); + pEvent->Kill(); + pEvent = Iterator.Next(); } OutOfBandEvents.Cleanup(0); } @@ -863,11 +869,11 @@ } // Event? - JZEvent *e = Dword2Event(m->data); - if (e) + JZEvent* pEvent = Dword2Event(m->data); + if (pEvent) { - e->SetClock(PlayLoop->Ext2IntClock(m->ref)); - RecdBuffer.Put(e); + pEvent->SetClock(PlayLoop->Ext2IntClock(m->ref)); + RecdBuffer.Put(pEvent); } } @@ -908,11 +914,11 @@ } // Event? - JZEvent *e = Dword2Event(m->data); - if (e) + JZEvent* pEvent = Dword2Event(m->data); + if (pEvent) { - e->SetClock(PlayLoop->Ext2IntClock(Time2Clock(m->ref))); - RecdBuffer.Put(e); + pEvent->SetClock(PlayLoop->Ext2IntClock(Time2Clock(m->ref))); + RecdBuffer.Put(pEvent); } } @@ -949,19 +955,19 @@ if ( !OutOfBandEvents.IsEmpty() ) { tEventIterator Iterator(&OutOfBandEvents); - JZEvent *e = Iterator.Range(0, clock); - while (e) + JZEvent* pEvent = Iterator.Range(0, clock); + while (pEvent) { - switch (e->Stat) + switch (pEvent->GetStat()) { case StatSetTempo: - SetRealTimeTempo( ((tSetTempo *)e)->GetBPM(), clock ); + SetRealTimeTempo( ((tSetTempo *)pEvent)->GetBPM(), clock ); break; default: break; } - e->Kill(); - e = Iterator.Next(); + pEvent->Kill(); + pEvent = Iterator.Next(); } OutOfBandEvents.Cleanup(0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-19 01:00:01
|
Revision: 544 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=544&view=rev Author: pstieber Date: 2008-05-18 17:59:59 -0700 (Sun, 18 May 2008) Log Message: ----------- Added some literals to conditional tests to prevent complaints on the Mac. Modified Paths: -------------- trunk/jazz/configure.ac Modified: trunk/jazz/configure.ac =================================================================== --- trunk/jazz/configure.ac 2008-05-18 23:32:38 UTC (rev 543) +++ trunk/jazz/configure.ac 2008-05-19 00:59:59 UTC (rev 544) @@ -81,7 +81,7 @@ ;; *-*-linux* ) AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) - if [[ $have_alsa = "yes" ]] ; then + if [[ x$have_alsa = x"yes" ]] ; then LIBS="$LIBS -lasound" fi ;; @@ -91,7 +91,7 @@ AM_CONDITIONAL(USE_ALSA, test "$have_alsa" = yes) -if [[ $have_alsa = "yes" ]] ; then +if [[ x$have_alsa = x"yes" ]] ; then dnl --------------------------------------- dnl check if we are to enable alsa support This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-18 23:32:43
|
Revision: 543 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=543&view=rev Author: pstieber Date: 2008-05-18 16:32:38 -0700 (Sun, 18 May 2008) Log Message: ----------- Added more device validity checking to the ALSA player. Modified Paths: -------------- trunk/jazz/src/AlsaPlayer.cpp Modified: trunk/jazz/src/AlsaPlayer.cpp =================================================================== --- trunk/jazz/src/AlsaPlayer.cpp 2008-05-18 04:56:05 UTC (rev 542) +++ trunk/jazz/src/AlsaPlayer.cpp 2008-05-18 23:32:38 UTC (rev 543) @@ -86,7 +86,7 @@ self.port = create_port(handle, "Input/Output"); cout - << "created client:port = " << static_cast<int>(self.client) + << "INFO: Created client:port = " << static_cast<int>(self.client) << ':' << static_cast<int>(self.port) << endl; @@ -99,7 +99,7 @@ // scan input addressess scan_clients(iaddr, SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ); - cout << "Input device count: " << iaddr.GetCount() << endl; + cout << "INFO: Input device count: " << iaddr.GetCount() << endl; if (iaddr.GetCount()) { iaddr.AsciiWrite("Input Devices"); @@ -108,6 +108,12 @@ // scan output addresses scan_clients(oaddr, SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE); + cout << "INFO: Output device count: " << oaddr.GetCount() << endl; + if (oaddr.GetCount()) + { + oaddr.AsciiWrite("Output Devices"); + } + mInputDeviceIndex = gpConfig->GetValue(C_AlsaInputDevice); if (mInputDeviceIndex < 0) { @@ -116,12 +122,12 @@ iaddr, "Input Device", mInputDeviceIndex); - cout << "Input device is: " << mInputDeviceIndex << endl; + cout << "INFO: Input device is: " << mInputDeviceIndex << endl; gpConfig->Put(C_AlsaInputDevice, mInputDeviceIndex); } else if (static_cast<unsigned>(mInputDeviceIndex) > iaddr.GetCount()) { - cout << "INFO: output device is out of range, so selecting one." << endl; + cout << "INFO: Input device is out of range, so selecting one." << endl; mInputDeviceIndex = select_list( iaddr, "Output Device", @@ -131,7 +137,7 @@ mOutputDeviceIndex = gpConfig->GetValue(C_AlsaOutputDevice); if (mOutputDeviceIndex < 0) { - cout << "INFO: output device is -1, so selecting one." << endl; + cout << "INFO: Output device is -1, so selecting one." << endl; mOutputDeviceIndex = select_list( oaddr, "Output Device", @@ -139,7 +145,7 @@ } else if (static_cast<unsigned>(mOutputDeviceIndex) > oaddr.GetCount()) { - cout << "INFO: output device is out of range, so selecting one." << endl; + cout << "INFO: Output device is out of range, so selecting one." << endl; mOutputDeviceIndex = select_list( oaddr, "Output Device", @@ -154,18 +160,29 @@ } else { - cout << "WARNING: The input device index is out of range!" << endl; + cout + << "WARNING: The input device index (" << mInputDeviceIndex + << ") is out of range!" << '\n' + << "Setting the value to -1" + << endl; + mInputDeviceIndex = -1; } } if (mOutputDeviceIndex >= 0) { - if (static_cast<unsigned>(mOutputDeviceIndex) < iaddr.GetCount()) + if (static_cast<unsigned>(mOutputDeviceIndex) < oaddr.GetCount()) { subscribe_out(mOutputDeviceIndex); } else { cout << "WARNING: The output device index is out of range!" << endl; + cout + << "WARNING: The output device index (" << mOutputDeviceIndex + << ") is out of range!" << '\n' + << "Setting the value to -1" + << endl; + mOutputDeviceIndex = -1; } } @@ -219,12 +236,44 @@ thru->Stop(); } + if (on && !thru->IsRunning()) { - thru->SetSource(iaddr[ithru].client, iaddr[ithru].port); - thru->SetDestin(oaddr[othru].client, oaddr[othru].port); + bool StartThru = false; + if (static_cast<unsigned>(ithru) < iaddr.GetCount()) + { + thru->SetSource(iaddr[ithru].client, iaddr[ithru].port); + StartThru = true; + } + else + { + cout + << "WARNING: The input MIDI thru device index (" << ithru + << ") is out of range!" << '\n' + << "Setting the value to -1" + << endl; + ithru = -1; + } - thru->Start(); + if (static_cast<unsigned>(othru) < oaddr.GetCount()) + { + thru->SetDestin(oaddr[othru].client, oaddr[othru].port); + StartThru = true; + } + else + { + cout + << "WARNING: The output MIDI thru device index (" << othru + << ") is out of range!" << '\n' + << "Setting the value to -1" + << endl; + othru = -1; + } + + if (StartThru) + { + thru->Start(); + } } else if (!on && thru->IsRunning()) { @@ -1012,7 +1061,7 @@ } else { - cerr << "no device found!" << endl; + cerr << "INFO: No device found!" << endl; return -1; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-18 04:56:13
|
Revision: 542 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=542&view=rev Author: pstieber Date: 2008-05-17 21:56:05 -0700 (Sat, 17 May 2008) Log Message: ----------- Added a link to the online help, an ancient version of which, is now in the web content. Modified Paths: -------------- web/htdocs/documentation/index.php Modified: web/htdocs/documentation/index.php =================================================================== --- web/htdocs/documentation/index.php 2008-05-17 21:44:16 UTC (rev 541) +++ web/htdocs/documentation/index.php 2008-05-18 04:56:05 UTC (rev 542) @@ -237,6 +237,11 @@ across the software virtual and real hardware MIDI domains. </p> +<p> +Check out an ancient version of the Jazz++ online docs by visiting +<a name="Old Manual" href="/manual/jazz_contents.html">the manual page</a>. +</p> + <?php require_once('../include/footer.php'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-17 21:44:18
|
Revision: 541 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=541&view=rev Author: pstieber Date: 2008-05-17 14:44:16 -0700 (Sat, 17 May 2008) Log Message: ----------- Applied a slightly modified version of a patch provided by Donald B. Moore. Donald's changes. Added content to the documentation page of the website. Pete's changes. 1. Changed some break tags to paragraph tags. 2. Wrapped lines at 80 columns. Modified Paths: -------------- web/htdocs/documentation/index.php Modified: web/htdocs/documentation/index.php =================================================================== --- web/htdocs/documentation/index.php 2008-05-17 21:36:05 UTC (rev 540) +++ web/htdocs/documentation/index.php 2008-05-17 21:44:16 UTC (rev 541) @@ -47,8 +47,9 @@ <h3>Using Jazz++ with Linux on the x86/x86_64 PC</h3> +<h4>Introduction</h4> <p> -Introduction: Years ago when the Jazz++ project first came to my attention, +Years ago when the Jazz++ project first came to my attention, using it with Linux on the PC was a much different proposition to what is possible today on this platform/OS. Although it would be entirely possible to create a MIDI score with jazz, (in the same way @@ -81,7 +82,7 @@ The result of these many advances and changes over time, means Linux users are no longer constrained by the need of having actual MIDI capable hardware or a MIDI/synth capable soundcard, to obtain good sound -production with MIDI applications like jazz. Instead of having one +production with MIDI applications like Jazz++. Instead of having one or more hardware sound synthesis chips (be they on a soundcard or in a MIDI musical instrument) to produce the sound(s), we can now use a software application to achieve the same ends, and many folks @@ -94,17 +95,17 @@ card (and/or onboard sound chip) typically ships with proprietary Windows drivers that enable the use of that hardware as a 'softsynth' in conjunction with the underlying Windows sound API supports. In -effect, Windows users could come to the website, download jazz and +effect, Windows users could come to the website, download Jazz++ and install it, and be making noise in under 2 minutes with very little or no effort. If only users of other platforms/OS' could have it this easy - hopefully this documentation will help bridge the (Linux) gap. </p> +<h4>Hardware based sound synthesis and Linux on the x86 PC</h4> <p> -Hardware based sound synthesis and Linux on the PC: Thanks to all the -great work done by the ALSA team over the years, Linux now has much -better driver supports for the various soundcards on the market today -that have hardware based MIDI/synths chips as part of their design. +Thanks to all the great work done by the ALSA team over the years, Linux +now has much better driver supports for the various soundcards on the market +today that have hardware based MIDI/synth chips as part of their design. </p> <p> @@ -123,6 +124,118 @@ cards of this type that are currently supported under Linux, and later document configuration details here for use with Jazz++. </p> + +<h4>Software based sound synthesis and Linux on the x86 PC</h4> +<p> +This area of the documentation will grow over time. There is a lot +that can be documented here now with Linux, however at this early +stage of Jazz++'s development, it's more important for potential +users and testers of the Jazz++ code to have some form of consistant +MIDI 'test-bed' to prove and test Jazz++ itself on linux. +</p> + +<p> +Although this isn't 'set in stone', the Jazz++ developers have +been using a softsynth setup in Linux as I describe below, which +uses JACK, FLUIDSYNTH and QSYNTH. A similar setup should also +work on the Mac running Mac OSX. +</p> + +<p> +Essentially, -any- ALSA based, MIDI capable softsynth setup +should work with Jazz++, and I've already tested a few that seem +to work fine. However, more consistant and comparable results of +testing, will be observed using the same softsynth 'kit' as the +Jazz++ developers do, and this is why documentation of this +softsynth setup comes first. +</p> + +<h4>Overview of a typical Linux softsynth setup</h4> +<p> +Softsynth setups in Linux are comprised of a number of +software applications which work together to form a virtual +machine that emulates hardware based MIDI/synth devices. The +so formed virtual machine can be easily broken down into it's +individual parts, to better understand how the components +'expose' themselves to the user ; +</p> + +<p> +The ALSA part -- forms virtual MIDI and real audio paths for the +other parts of the virtual machine to communicate across. Allows +PCM data rendered by the virtual machine to be realized as an +analogue audio signal at the line outputs of the soundcard hardware. +</p> + +<p> +The JACK part -- a low-latency sound server. Forms both a virtual +MIDI patch-bay and a virtual audio patch-bay to control and +define how the virtual machine parts interconnect with and across +the virtual and real machine paths formed by the ALSA part. +</p> + +<p> +The FLUIDSYNTH part -- the virtual MIDI synthesizer itself. It +accepts valid MIDI data as input, and renders that data into +PCM data output, as determined by sound/instrument data contained +in a 'SoundFont' file. +</p> + +<p> +The QSYNTH part -- this forms the virtual control panel of the +virtual synthesizer part. Essentially, this comprises a GUI to +easily allow the user to change/control the virtual synthesizer +itself, add/remove SoundFont files, define bank settings, and +adjust other working parameters of the virtual synthesizer itself. +</p> + +<p> +Additionally, the QJACKCTL software provides a GUI visualization +of the virtual MIDI/audio patch-bays formed by the JACK part, +allowing the user a quick and easy way to 'hook it all up' as it +were, in any particular configuration they desire. +</p> + +<p> +For the sake of accuracy with this overview, it is worth noting +that Jazz++ itself is a virtual machine - it is a software emulation +of -hardware- based MIDI sequencers that were in common use years +ago. Jazz++ is of course much more capable than these old hardware +sequencers I speak of, which in their day were little more than +'drum machines' triggering sound events on a MIDI or otherwise +connected 'tip-and-ring patch cord configured' analogue synthesizer. +</p> + +<p> +Also note here, the virtual machine softsynth described in the +overview above, lacks one obvious component - the INPUT part. +It is basically a virtual MIDI synthesizer with all the bells, +knobs and whistles, but without a keyboard or anything else +'driving' it. Jazz++ is that part. The MIDI data produced by Jazz++ +is that MIDI input data the FLUIDSYNTH part accepts. +</p> + +<p> +Jazz++ can itself accept valid MIDI data from either the virtual +and/or 'real world' MIDI domains. This means, you can connect +a real MIDI synthesizer keyboard to Jazz++ as a MIDI data INPUT +part, and record notes played on that with Jazz++. Equally, you +could connect the same external MIDI keyboard as an INPUT part +to FLUIDSYNTH and use the virtual MIDI softsynth to replay the +notes you are playing, instead of the synthesizer's own hardware +kit. +</p> + +<p> +Finally, there are other virtual machines in software that +can be used as valid MIDI data INPUT parts here, such as the +program VKEYBD, which is a virtual onscreen MIDI keyboard GUI +with keys you click on with your mouse -- all these MIDI devices +be they virtual machines or not, can interact and interconnect +with each other, and thus possibly form very complex MIDI +sound production environments that traverse and inter-operate +across the software virtual and real hardware MIDI domains. +</p> <?php require_once('../include/footer.php'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-17 21:36:07
|
Revision: 540 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=540&view=rev Author: pstieber Date: 2008-05-17 14:36:05 -0700 (Sat, 17 May 2008) Log Message: ----------- Applied a slightly modified version of a patch provided by Donald B. Moore. Donald's changes. 1. Added GDB intro/plug, email pointer, obtrusion of thanks to bugreports page. 2. Changed wording on the Subversion page. 3. Reworked download content to properly document the existence of 'a non-release tarball release' being available via sourceforge. 4. Reworded some tex2rtf content. Pete's changes. 1. I removed the div tag at the beginning of the bug reports page. 2. I removed the OL tags from the bug reports page. 3. Changed gdb support for all three to 2 out of 3. The Visual Studio builds are not supported by gdb. 4. Added a link to the source forge bug tracker. 5. Changed some break tags to paragraph tags. 6. Wrapped lines at 80 columns to help poor souls that might edit on a terminal. Modified Paths: -------------- web/htdocs/bugreports/index.php web/htdocs/download/index.php web/htdocs/subversion/index.php web/htdocs/tex2rtf/index.php Modified: web/htdocs/bugreports/index.php =================================================================== --- web/htdocs/bugreports/index.php 2008-05-17 20:36:59 UTC (rev 539) +++ web/htdocs/bugreports/index.php 2008-05-17 21:36:05 UTC (rev 540) @@ -93,15 +93,15 @@ So if you are going to email us a bug or test report, start your email by including this 'common' information first. Here is a bare minimum example of that; -<br /> -<br /> +</p> +<p> <em> Hello, I am using Slackware 7.1 on an intel PC. I'm hoping to use Jazz++ with my Korg M3 keyboard. I don't know much about the MIDI interface, but it does plug into my computer's USB port. I have updated my version here, and it says "At revision 523."</em> -<br /> -<br /> +</p> +<p> It might not look like much, but this tells the Jazz++ developers a good many things about your hardware/software situation. It helps. Next, you would include some specifics regarding what you have found, or the problem you are @@ -132,8 +132,8 @@ If the problem you are describing relates to the interaction of Jazz++ with real world MIDI hardware, developers may require some extra information from you. They will let you know if this is so, and what they need you to do. -<br/> -<br/> +</p> +<p> <u>Note:</u> At the time of this writing, (May 2008), the immediate goal of the Jazz++ developers is to get the code stable and running on all 3 currently supported platforms, and have it capable of loading and replaying a midi @@ -143,7 +143,7 @@ to replay a midi composition via an externally connected MIDI capable device and run into troubles, it might help the development team if you retry the same operation using your computer's MIDI 'softsynth' setup instead and -report (in the same email posting) if that solved the issue or not. +report (preferably in the same email posting) if that solved the issue or not. </p> <p> <u>If the Jazz++ binary you've compiled crashes [SEGFAULT]</u>; Firstly, try @@ -170,6 +170,12 @@ this might be so. </p> <p> +GDB, the GNU Project debugger, is a widely used software program debugging +tool. It will run on 2 of the 3 platforms Jazz++ is currently supporting +(Linux and Mac), and most linux distributions defaultly install gdb as +part of their respective 'software developers suite' set of packages. +</p> +<p> To create a backtrace using the 'gdb' debugger, go into your <TT>~/Jazz++/TestInstall/bin</TT> directory, and run your jazz binary with gdb by issuing the following command; @@ -234,13 +240,14 @@ Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 140049561757408 (LWP 4137)] snd_seq_port_subscribe_set_sender (info=0x7fffdc63f540, addr=0x0) at seq.c:2432 -2432 memcpy(&info->sender, addr, sizeof(*addr)); +2432 memcpy(&info->sender, addr, sizeof(*addr)); (gdb) </pre> <p> -Now, at the (gdb) prompt, issue the 'bt' command - this will generate the backtrace for us ; +Now, at the (gdb) prompt, issue the 'bt' command - this will generate the +backtrace for us; </p> <pre> @@ -275,6 +282,17 @@ because invariably you will be asked to do this by the developers anyway if your bug report is about Jazz++ crashing. </p> +<p> +Once you have finished getting all these bits of information together for us, +please include them in your report to +<a name="SourceForge Bug Tracker" href="http://sourceforge.net/tracker/?group_id=104252&atid=637412"> +the SourceForge bug tracker for Jazz++</a> +</p> +<p> +The Jazz++ developers wish to thank all people who contribute to the +Jazz++ project, by way of bug reports, error reports, or emails telling +us of their experience - it all counts! Thank You for your support! +</p> <?php require_once('../include/footer.php'); ?> Modified: web/htdocs/download/index.php =================================================================== --- web/htdocs/download/index.php 2008-05-17 20:36:59 UTC (rev 539) +++ web/htdocs/download/index.php 2008-05-17 21:36:05 UTC (rev 540) @@ -16,13 +16,32 @@ <TD class="mainCopy"> <H2>Downloading Jazz++</H2> <P> -Currently, 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 yet. If you still want to give the source tarball -a try, you first 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. +Currently, only a source tarball is available, It is of limited functionality, +and many features are as yet unimplemented and/or simply not enabled. It has +been made available solely as a placeholder for things to come, and +historically remarks where the current development initiative of the Jazz++ +project started out. </P> <P> +You would probably have more success attempting to build the source obtained +from our Subversion repository. At the moment, only the source in Subversion +is truly indicative of the current 'state-of-play' with the Jazz++ code. +</P> +<P> +Simply put -- we aren't ready to produce binary distributions yet, and the +same goes for release tarballs : there are none, not yet. We encourage people +to get a little involved, give building the Jazz++ source from our Subversion +respository a try, and report on what they find. Things like this help +eventuate release binary and tarball dates, however at present (May 2008) it +is impossible to accurately predict when in the future these dates might be. +</P> +<P> +If you still want to just give the currently available 'minimal functionality' +source tarball a try, you will first need to compile and install a non-stock +build of wxWidgets 2.8.7 to build Jazz++ itself. 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> Modified: web/htdocs/subversion/index.php =================================================================== --- web/htdocs/subversion/index.php 2008-05-17 20:36:59 UTC (rev 539) +++ web/htdocs/subversion/index.php 2008-05-17 21:36:05 UTC (rev 540) @@ -29,7 +29,7 @@ </p> <p> -The code in the Subversion repository can be unstable at times. Building the +The code in the Subversion repository can be unstable at times. Building the code will take a little effort on your part, but we have provided detailed instructions for building the source code, so this process should also be possible for "non-developers" to complete successfully. @@ -38,8 +38,9 @@ <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 where we are creating binaries to download, -we hope you will give building Jazz++ from Subversion a try. +added. Until we reach the point where we are creating binaries for people to +download, we hope and encourage you to give building Jazz++ from Subversion a +try. </p> <p> Modified: web/htdocs/tex2rtf/index.php =================================================================== --- web/htdocs/tex2rtf/index.php 2008-05-17 20:36:59 UTC (rev 539) +++ web/htdocs/tex2rtf/index.php 2008-05-17 21:36:05 UTC (rev 540) @@ -68,9 +68,9 @@ the wxWidgets developers list suggests to us that the tex2rtf source may be removed from wxWidgets altogether at some future time. Even now, the tex2rtf utility is not defaultly built or installed as part of the current wxWidgets -installation process....which is unfortunate, because the developers of the -current Jazz++ project still wish to use this utility for document conversion -tasks within the current Jazz++ source tree. +installation process any more....which is unfortunate, because the developers +of the current Jazz++ project still wish to use this utility for document +conversion tasks inside the current Jazz++ source tree. </p> <h4>Into the future</h4> <p> @@ -80,8 +80,8 @@ a short discussion, the current Jazz++ developers decided to investigate whether it was possible to create a fork of the tex2rtf inside the Jazz++ source tree itself. After consulting with the tex2rtf's original author Julian -Smart and getting his kind approval and blessings, the tex2rtf utility has now -become part of the Jazz++ source tree. +Smart, and obtaining his kind approval and blessings, the tex2rtf utility has +now become part of the Jazz++ source tree. </p> <p> If you have any questions about tex2rtf, join one of our mailing lists and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-17 20:37:47
|
Revision: 539 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=539&view=rev Author: pstieber Date: 2008-05-17 13:36:59 -0700 (Sat, 17 May 2008) Log Message: ----------- Added a latency example provided by Donald B. Moore. Added Paths: ----------- web/htdocs/soundsamples/ web/htdocs/soundsamples/latency-example-1.mp3 Added: web/htdocs/soundsamples/latency-example-1.mp3 =================================================================== (Binary files differ) Property changes on: web/htdocs/soundsamples/latency-example-1.mp3 ___________________________________________________________________ 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-16 20:43:32
|
Revision: 538 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=538&view=rev Author: pstieber Date: 2008-05-16 13:43:25 -0700 (Fri, 16 May 2008) Log Message: ----------- 1. Added the gold stars page to the navigation panel on the left. 2. Changed some text in the gold stars page. Modified Paths: -------------- web/htdocs/goldstars/index.php web/htdocs/include/leftnav.php Modified: web/htdocs/goldstars/index.php =================================================================== --- web/htdocs/goldstars/index.php 2008-05-16 19:20:41 UTC (rev 537) +++ web/htdocs/goldstars/index.php 2008-05-16 20:43:25 UTC (rev 538) @@ -17,8 +17,9 @@ <H2>Gold Stars</H2> <p> -This idea was borrowed from the cygwin site. This page recognizes people who -made outstanding contributions to the development of Jazz++. +This idea for this page was borrowed from the cygwin site. This page +recognizes people who have made outstanding contributions to the +development of Jazz++. </p> <ul> Modified: web/htdocs/include/leftnav.php =================================================================== --- web/htdocs/include/leftnav.php 2008-05-16 19:20:41 UTC (rev 537) +++ web/htdocs/include/leftnav.php 2008-05-16 20:43:25 UTC (rev 538) @@ -11,4 +11,5 @@ <p><a href="/buildingjazz/">Building Jazz++</a></p> <p><a href="/bugreports/">Reporting Bugs</a></p> <p><a href="/credits/">Credits</a></p> +<p><a href="/goldstars/">Gold Stars</a></p> <p><img src="/graphics/jazz.jpg" alt="Jazz++ Midi Sequencer" /></p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 19:20:52
|
Revision: 537 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=537&view=rev Author: pstieber Date: 2008-05-16 12:20:41 -0700 (Fri, 16 May 2008) Log Message: ----------- Added a new gold star page. Added Paths: ----------- web/htdocs/goldstars/ web/htdocs/goldstars/index.php Added: web/htdocs/goldstars/index.php =================================================================== --- web/htdocs/goldstars/index.php (rev 0) +++ web/htdocs/goldstars/index.php 2008-05-16 19:20:41 UTC (rev 537) @@ -0,0 +1,35 @@ +<!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>Gold Stars</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>Gold Stars</H2> + +<p> +This idea was borrowed from the cygwin site. This page recognizes people who +made outstanding contributions to the development of Jazz++. +</p> + +<ul> +<li>Donald B. Moore - For significant contributions to the web documentation. +</ul> + +<?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-16 19:09:01
|
Revision: 536 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=536&view=rev Author: pstieber Date: 2008-05-16 12:08:33 -0700 (Fri, 16 May 2008) Log Message: ----------- Applied a patch provided by Donald B. Moore. I changed 'Reporting Bugs' to a link to the page. Modified Paths: -------------- web/htdocs/subversion/index.php Modified: web/htdocs/subversion/index.php =================================================================== --- web/htdocs/subversion/index.php 2008-05-16 19:02:41 UTC (rev 535) +++ web/htdocs/subversion/index.php 2008-05-16 19:08:33 UTC (rev 536) @@ -21,37 +21,54 @@ 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 part, but we have provided instructions for -building the source code, so this should also be possible for "non-developers" -to complete successfully. +code will take a little effort on your part, but we have provided detailed +instructions for building the source code, so this process should also be +possible for "non-developers" to complete successfully. </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 building Jazz++ from Subversion a try. +added. Until we reach the point where we are creating binaries to download, +we hope you will give building Jazz++ from Subversion a try. </p> + +<p> +If you do build Jazz++ from the Subversion repository to try it out, and in +that process think you have discovered a bug or other problem with the way +Jazz++ currently performs, please read our +<a href="/bugreports/">Reporting Bugs</a> +page to find out exactly how you can get together the relevant information +needed to help developers improve and refine Jazz++. +</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'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 19:02:53
|
Revision: 535 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=535&view=rev Author: pstieber Date: 2008-05-16 12:02:41 -0700 (Fri, 16 May 2008) Log Message: ----------- Applied a patch provided by Donald B. Moore and reformatted some content. Modified Paths: -------------- web/htdocs/documentation/index.php Modified: web/htdocs/documentation/index.php =================================================================== --- web/htdocs/documentation/index.php 2008-05-16 18:59:34 UTC (rev 534) +++ web/htdocs/documentation/index.php 2008-05-16 19:02:41 UTC (rev 535) @@ -20,12 +20,16 @@ and this portion of the web site is still under construction. This means you may not find the answer you are looking for here, and you may also find that the platform/OS of your choice might not yet be mentioned here. +</p> +<p> In fact, right now this section may only be of interest to Linux users, but do not despair!! The revised documentation for the new 'revitalized' Jazz++ project is in the process of being re-written, and so updates to this and other pages of our website are always forthcoming. +</p> +<p> If you would like to stay informed of updates to this documentation and to Jazz++ itself, consider joining our jazzplusplus-updates mailing list to receive email notifications of these events. @@ -44,20 +48,21 @@ <h3>Using Jazz++ with Linux on the x86/x86_64 PC</h3> <p> -Introduction: Years ago when this project first came to my attention, +Introduction: Years ago when the Jazz++ project first came to my attention, using it with Linux on the PC was a much different proposition to what is possible today on this platform/OS. Although it would be -entirely possible to create a midi score with jazz, (in the same way +entirely possible to create a MIDI score with jazz, (in the same way this text is being produced with a text-editor), the whole point of -the operation would be to write a midi score you could actually hear. +the exercise would be to compose a MIDI score you could actually hear. </p> <p> -Back then with Linux, making sound via midi applications meant having -midi *hardware*. This may have taken the form of a midi adapter plugged -in the PC's soundcard gameport (in MPU-401 mode) with a real world -midi instrument(s) attached to that, or else a midi capable soundcard -with a hardware based sound synthesis chip to make the actual sound. +Back then with Linux, making sound via MIDI applications meant having +MIDI *hardware*. This may have taken the form of a MIDI adapter plugged +in the PC's serial port or soundcard gameport (in MPU-401 mode), with a real +world MIDI instrument(s) attached to that, or else a MIDI capable soundcard +with a hardware based MIDI sound synthesis chip to make the actual sound. +(so called 'MIDI/synth' capable soundcards) In that latter case, the soundcard necessarily had to be supported by Linux drivers, and in that respect these drivers were more than likely using the now deprecated 'OSS' sound system modules. @@ -74,11 +79,11 @@ <p> The result of these many advances and changes over time, means Linux -users are no longer constrained by the need of having actual midi -capable hardware and hardware synthesis chips, to obtain good sound -production with midi applications like jazz. Instead of having one +users are no longer constrained by the need of having actual MIDI +capable hardware or a MIDI/synth capable soundcard, to obtain good sound +production with MIDI applications like jazz. Instead of having one or more hardware sound synthesis chips (be they on a soundcard or -in a midi musical instrument) to produce the sound(s), we can now +in a MIDI musical instrument) to produce the sound(s), we can now use a software application to achieve the same ends, and many folks loosely refer to these software applications as being 'softsynths'. </p> @@ -87,7 +92,7 @@ For many years now, users with Windows on their PC have had a distinct advantage over Linux users on the PC, because virtually every sound card (and/or onboard sound chip) typically ships with proprietary -drivers that enable the use of that hardware as a 'softsynth' in +Windows drivers that enable the use of that hardware as a 'softsynth' in conjunction with the underlying Windows sound API supports. In effect, Windows users could come to the website, download jazz and install it, and be making noise in under 2 minutes with very little @@ -99,22 +104,25 @@ Hardware based sound synthesis and Linux on the PC: Thanks to all the great work done by the ALSA team over the years, Linux now has much better driver supports for the various soundcards on the market today -that have hardware based sound synthesis chips as part of their design. +that have hardware based MIDI/synths chips as part of their design. +</p> +<p> However, at this point documentation detailing the configuration and use of such soundcard hardware with Linux and Jazz++ will be the focus of future efforts here. Why? Simply because the majority of -people out there on the x86 PC don't have hardware synthesis chips -as part of their sound hardware. They need to know how to setup a +people out there on the x86 PC don't have a hardware MIDI/synth soundcard +as part of their computer's hardware. They need to know how to setup a 'softsynth' in Linux if they don't have this sort of soundcard or -any 'real' midi hardware to hear Jazz++ with...and believe me, this +any 'real' MIDI hardware to hear Jazz++ with...and believe me, this will be 80% or more of people out there using Linux and the PC. +</p> +<p> I will however include a section here soon listing all the sound cards of this type that are currently supported under Linux, and later document configuration details here for use with Jazz++. </p> - <?php require_once('../include/footer.php'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 18:59:37
|
Revision: 534 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=534&view=rev Author: pstieber Date: 2008-05-16 11:59:34 -0700 (Fri, 16 May 2008) Log Message: ----------- Fixed a typo found by Donald B. Moore and reformatted. Modified Paths: -------------- web/htdocs/bugreports/index.php Modified: web/htdocs/bugreports/index.php =================================================================== --- web/htdocs/bugreports/index.php 2008-05-16 18:47:23 UTC (rev 533) +++ web/htdocs/bugreports/index.php 2008-05-16 18:59:34 UTC (rev 534) @@ -16,137 +16,264 @@ <TD class="mainCopy"> <H2>Reporting Bugs in Jazz++</H2> -<p>In the early stages of any software project, a significant amount of 'bug testing' is undertaken by both the developers and interested users alike, to try and ensure the software is as bug-free as possible when it is finally released for general use. This is exactly where Jazz++ is at present...in the early stages of development... and it's why the developers of Jazz++ encourage people to download Jazz++ from the svn repository -- they want you to try and build the software yourself, try it out, and report back on what you discover during and after this process. +<p> +In the early stages of any software project, a significant amount of +'bug testing' is undertaken by both the developers and interested users +alike, to try and ensure the software is as bug-free as possible when it +is finally released for general use. This is exactly where Jazz++ is at +present...in the early stages of development... and it's why the developers +of Jazz++ encourage people to download Jazz++ from the svn repository -- they +want you to try and build the software yourself, try it out, and report back +on what you discover during and after this process. </p> -<p>The developers know that not all people necessarily have the skills and/or the -expertise to successfully build software from a svn repository on their own, and this is why we have included detailed documentation on the Jazz++ website, to help guide such people through this process as easily and painlessly as possible. We have created those instructions in a manner that allows even the inexperienced computer user to simply cut&paste the command instructions into their console window, and hopefully have the process complete successfully regardless of their own software knowledge and skills. +<p> +The developers know that not all people necessarily have the skills and/or the +expertise to successfully build software from a svn repository on their own, +and this is why we have included detailed documentation on the Jazz++ website, +to help guide such people through this process as easily and painlessly as +possible. We have created those instructions in a manner that allows even the +inexperienced computer user to simply cut&paste the command instructions +into their console window, and hopefully have the process complete +successfully regardless of their own software knowledge and skills. </p> -<p>However, sometimes things might go wrong - <u>the Jazz++ code may not compile on your computer</u>, it might <u>compile but when you try to run the program it crashes</u>, or else it might <u>compile and run but behave in a manner that is incorrect or unexpected</u>. At this stage it is entirely normal for a software project to display these characteristics, and these are <em>exactly</em> the sorts of bugs we are trying to uncover and eliminate from the Jazz++ code itself. People building Jazz++ from svn can help with this process regardless of their computing/software knowledge -- all you need to know is exactly what to cut&paste into the email you send reporting your experience. +<p> +However, sometimes things might go wrong - <u>the Jazz++ code may not compile +on your computer</u>, it might <u>compile but when you try to run the program +it crashes</u>, or else it might <u>compile and run but behave in a manner +that is incorrect or unexpected</u>. At this stage it is entirely normal for a +software project to display these characteristics, and these are +<em>exactly</em> the sorts of bugs we are trying to uncover and eliminate from +the Jazz++ code itself. People building Jazz++ from svn can help with this +process regardless of their computing/software knowledge -- all you need to +know is exactly what to cut&paste into the email you send reporting your +experience. </p> -<p>In the above paragraph I have exampled <u>the 3 most likely scenarios</u> encounted when compiling svn code of any software project in it's early development stages. Each scenario is a little different from the other when it comes to reporting the problem itself, but <u>please</u> supply the following 'common' content when reporting svn build or problems with the compiled Jazz++ binary itself. +<p> +In the above paragraph I have exampled <u>the 3 most likely scenarios</u> +encounted when compiling svn code of any software project in it's early +development stages. Each scenario is a little different from the other when it +comes to reporting the problem itself, but <u>please</u> supply the following +'common' content when reporting svn build or problems with the compiled Jazz++ +binary itself. </p> -<p>Always ensure you have the latest svn code, by updating your local copy of the Jazz++ svn tree. To do this, cd into your '~/jazzplusplus' directory (assuming you have your svn copy in your home directory) and issue the following command ; -<br /> -<br /> - svn update -<br /> -<br /> -This will result in one of two things happening -- your local tree will be updated to the latest version, or svn will report what (current) revision you have - "At revision 523." Always include this information in your emails, and it's always a good idea to go through this routine again, just <u>before</u> you send that email. The svn tree may have been updated while you were busy testing, and the problem you found may have already been fixed. +<p> +Always ensure you have the latest svn code, by updating your local copy of the +Jazz++ svn tree. To do this, cd into your '~/jazzplusplus' directory (assuming +you have your svn copy in your home directory) and issue the following command; </p> -<p>Be sure your email tells us something about your computer and what OS you are using. If you are running Windows, tell us which version of Windows you are using. If you are running Linux, tell us which distribution you are using and what release version you have, if you happen to be using something other than the x86 'PC' type machine, tell us that too. Same of course goes for Mac users, tell us which model of Mac you are using, along with which MacOS release. +<pre> +svn update +</pre> +<p> +This will result in one of two things happening -- your local tree will be +updated to the latest version, or svn will report what (current) revision you +have - "At revision 523." Always include this information in your emails, and +it's always a good idea to go through this routine again, just <u>before</u> +you send that email. The svn tree may have been updated while you were busy +testing, and the problem you found may have already been fixed. </p> -<p>If you are using Jazz++ with any real world MIDI hardware connected to your computer, be sure to tell us that too. What we are interested in knowing, is what brand/model of MIDI hardware that might be, and what the particulars of your MIDI to computer interface are...ie; which computer port your MIDI adapter plugs into. If you know your computer has a hardware based MIDI/synth soundcard and you're trying to use Jazz++ with it, we'd like to know about that as well...ie; include the brand/model of your soundcard. +<p> +Be sure your email tells us something about your computer and what OS you are +using. If you are running Windows, tell us which version of Windows you are +using. If you are running Linux, tell us which distribution you are using and +what release version you have, if you happen to be using something other than +the x86 'PC' type machine, tell us that too. Same of course goes for Mac users, +tell us which model of Mac you are using, along with which MacOS release. </p> -<p>So if you are going to email us a bug or test report, start your email by including this 'common' information first. Here is a bare minimum example of that ; +<p> +If you are using Jazz++ with any real world MIDI hardware connected to your +computer, be sure to tell us that too. What we are interested in knowing, is +what brand/model of MIDI hardware that might be, and what the particulars of +your MIDI to computer interface are...ie; which computer port your MIDI +adapter plugs into. If you know your computer has a hardware based MIDI/synth +soundcard and you're trying to use Jazz++ with it, we'd like to know about +that as well...ie; include the brand/model of your soundcard. +</p> +<p> +So if you are going to email us a bug or test report, start your email by +including this 'common' information first. Here is a bare minimum example +of that; <br /> <br /> -<em>Hello, - I am using Slackware 7.1 on an intel PC. I'm hoping to use Jazz++ with my Korg M3 keyboard. I don't know much about the MIDI interface, but it does plug into my computer's USB port. I have updated my version here, and it says "At revision 523."</em> +<em> +Hello, I am using Slackware 7.1 on an intel PC. I'm hoping to use Jazz++ with +my Korg M3 keyboard. I don't know much about the MIDI interface, but it does +plug into my computer's USB port. I have updated my version here, and it says +"At revision 523."</em> <br /> <br /> -It might not look like much, but this tells the Jazz++ developers a good many things about your hardware/software situation. It helps. Next, you would include some specifics regarding what you have found, or the problem you are having. Here's what the Jazz++ developers need from you to help solve those 3 most likely scenarios. +It might not look like much, but this tells the Jazz++ developers a good many +things about your hardware/software situation. It helps. Next, you would +include some specifics regarding what you have found, or the problem you are +having. Here's what the Jazz++ developers need from you to help solve those 3 +most likely scenarios. </p> -<p><u>If the Jazz++ source won't compile :</u> If you followed our instructions on how to build Jazz++ from the svn repository, you will have ended up with a file named 'BuildLog' in your local svn working directory where you compiled Jazz++. Assuming your local svn copy is in your home directory, the location of this file is ~/jazzplusplus/trunk/Build/BuildLog -- please attach this file to your email and send it to us, and we'll see if we can help you fix it. +<p> +<u>If the Jazz++ source won't compile :</u> If you followed our instructions on +how to build Jazz++ from the svn repository, you will have ended up with a file +named 'BuildLog' in your local svn working directory where you compiled Jazz++. +Assuming your local svn copy is in your home directory, the location of this +file is ~/jazzplusplus/trunk/Build/BuildLog -- please attach this file to your +email and send it to us, and we'll see if we can help you fix it. </p> -<p><u>If the Jazz++ source compiles but the resultant binary does strange or unexpected things :</u> Try to be as descriptive as you can about the problem you are experiencing, and tell us exactly what you are doing when this occurs. For example, telling us <em>"the track window jumps around unexpectedly"</em> is not very useful to us, but if you had instead reported <em>"When I stop replay and move the mouse over a section of a track to highlight and edit it, the moment I let go of the mouse button the track window jumps unexpectedly to the left."</em>...this sort of feedback is most useful, because it gives developers a real chance of recreating the problem on their own systems, and this is often the quickest path to an eventual solution. +<p> +<u>If the Jazz++ source compiles but the resultant binary does strange or +unexpected things :</u> Try to be as descriptive as you can about the problem +you are experiencing, and tell us exactly what you are doing when this occurs. +For example, telling us <em>"the track window jumps around unexpectedly"</em> +is not very useful to us, but if you had instead reported <em>"When I stop +replay and move the mouse over a section of a track to highlight and edit it, +the moment I let go of the mouse button the track window jumps unexpectedly to +the left."</em>...this sort of feedback is most useful, because it gives +developers a real chance of recreating the problem on their own systems, and +this is often the quickest path to an eventual solution. </p> -<p>If the problem you are describing relates to the interaction of Jazz++ with real world MIDI hardware, developers may require some extra information from you. They will let you know if this is so, and what they need you to do. +<p> +If the problem you are describing relates to the interaction of Jazz++ with +real world MIDI hardware, developers may require some extra information from +you. They will let you know if this is so, and what they need you to do. <br/> <br/> -<u>Note:</u> At the time of this writing, (May 2008), the immediate goal of the Jazz++ developers is to get the code stable and running on all 3 currently supported platforms, and have it capable of loading and replaying a midi composition correctly. A number of the developers have their own real world MIDI equipment, however a lot of the current development is being done with MIDI 'softsynths' instead. If you are trying to use the current Jazz++ code to replay a midi composition via an externally connected MIDI capable device and run into troubles, it might help the development team if you retry the same operation using your computer's MIDI 'softsynth' setup instead and report (in the same email posting) if that solved the issue or not. +<u>Note:</u> At the time of this writing, (May 2008), the immediate goal of +the Jazz++ developers is to get the code stable and running on all 3 currently +supported platforms, and have it capable of loading and replaying a midi +composition correctly. A number of the developers have their own real world +MIDI equipment, however a lot of the current development is being done with +MIDI 'softsynths' instead. If you are trying to use the current Jazz++ code +to replay a midi composition via an externally connected MIDI capable device +and run into troubles, it might help the development team if you retry the +same operation using your computer's MIDI 'softsynth' setup instead and +report (in the same email posting) if that solved the issue or not. </p> -<p><u>If the Jazz++ binary you've compiled crashes [SEGFAULT]</u> ; Firstly, try to accurately recreate the incident, so you can make Jazz++ crash anytime you like. In your email, tell us exactly how you are doing this -- telling us <em>"my Jazz++ binary crashes all of the time"</em> is not very useful, however if you had reported instead <em>"when I start Jazz++ and it pops up the window asking me to select my MIDI output device, I click on the qsynth device, but then everytime I click on 'OK' Jazz++ crashes"</em> , developers will have a better understanding of what you're experiencing. +<p> +<u>If the Jazz++ binary you've compiled crashes [SEGFAULT]</u>; Firstly, try +to accurately recreate the incident, so you can make Jazz++ crash anytime you +like. In your email, tell us exactly how you are doing this -- telling us +<em>"my Jazz++ binary crashes all of the time"</em> is not very useful, +however if you had reported instead <em>"when I start Jazz++ and it pops up +the window asking me to select my MIDI output device, I click on the qsynth +device, but then everytime I click on 'OK' Jazz++ crashes"</em>, developers +will have a better understanding of what you're experiencing. </p> -<p>In any event, we're more interested in having users who experience a crash of Jazz++, to try and get Jazz++ to crash again. If you followed our instructions on how to build Jazz++, the binary you have compiled already has debugging enabled. Once you know how to get Jazz++ to crash, (or if it repeatedly crashes mysteriously and you want to help the developers find out why and possibly help stop that from happening in the future), we need you to run your Jazz++ binary using a 'debugger', which is a piece of software capable of extracting the debug information from inside the (running) Jazz++ binary just as it crashes. This information is displayed in the human-readable form as a 'backtrace', and this information tells the Jazz++ developers exactly where in the code things are going astray, and typically indicate just why this might be so. +<p> +In any event, we're more interested in having users who experience a crash of +Jazz++, to try and get Jazz++ to crash again. If you followed our instructions +on how to build Jazz++, the binary you have compiled already has debugging +enabled. Once you know how to get Jazz++ to crash, (or if it repeatedly +crashes mysteriously and you want to help the developers find out why and +possibly help stop that from happening in the future), we need you to run +your Jazz++ binary using a 'debugger', which is a piece of software capable +of extracting the debug information from inside the (running) Jazz++ binary +just as it crashes. This information is displayed in the human-readable form +as a 'backtrace', and this information tells the Jazz++ developers exactly +where in the code things are going astray, and typically indicate just why +this might be so. </p> -<p>To create a backtrace using the 'gdb' debugger, go into your ~/Jazz++/TestInstall/bin directory, and run your jazz binary with gdb by issuing the following command ; -<br /> -<br /> +<p> +To create a backtrace using the 'gdb' debugger, go into your +<TT>~/Jazz++/TestInstall/bin</TT> directory, and run your jazz binary with gdb +by issuing the following command; +</p> +<pre> gdb jazz -<br /> -<br /> -This will start the gdb process, but it won't start jazz itself. You will be left at the (gdb) prompt, and your console output will look something like this ; -<br /> -<br /> - +</pre> +<p> +This will start the gdb process, but it won't start jazz itself. You will be +left at the (gdb) prompt, and your console output will look something like +this; +</p> +<pre> ~/Jazz++/TestInstall/bin# gdb jazz -<br />GNU gdb 6.4.90 -<br />Copyright (C) 2006 Free Software Foundation, Inc. +GNU gdb 6.4.90 +Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu" ...Using host libthread_db library "/lib/libthread_db.so.1". -<br /> -<br /> + (gdb) -<br /> -<br /> -Now start the jazz binary by issue the command 'run' at the (gdb) prompt ; -<br /> -<br /> +</pre> +<p> +Now start the jazz binary by issuing the command 'run' at the (gdb) prompt ; +</p> +<pre> (gdb) run -<br /> -<br /> -Now the jazz binary will start up, and this is the time for you to do whatever it is you do that can get jazz to crash, or else just wait for the crash to happen. Once the jazz binary does crash, your console output will look something like this ; -<br /> -<br />Starting program: /root/Jazz++/TestInstall/bin/jazz -<br />Failed to read a valid object file image from memory. -<br />[Thread debugging using libthread_db enabled] -<br />[New Thread 140049561757408 (LWP 4137)] -<br />JZProject::ReadConfiguration() ConfFileNameAndPath: -<br /> "/root/Jazz++/TestInstall/share/Jazz++/jazz.cfg" -<br />JZConfiguration::LoadConfig: -<br /> "/root/Jazz++/TestInstall/share/Jazz++/jazz.cfg" -<br />Include synthesizer configuration file "gs.jzi" -<br />FindFile: Immediate hit on file "gs.jzi" -<br />Include file "gsdrmset.jzi" -<br />FindFile: Immediate hit on file "gsdrmset.jzi" -<br />Include file "gmdrmnam.jzi" -<br />FindFile: Immediate hit on file "gmdrmnam.jzi" -<br />Include file "gsvoices.jzi" -<br />FindFile: Immediate hit on file "gsvoices.jzi" -<br />Include file "ctrlnam.jzi" -<br />FindFile: Immediate hit on file "ctrlnam.jzi" -<br />created client:port = 128:0 -<br />Input device count: 0 -<br />invalid output device, so selecting one -<br />no device found! +</pre> +<p> +Now the jazz binary will start up, and this is the time for you to do whatever +it is you do that can get jazz to crash, or else just wait for the crash to +happen. Once the jazz binary does crash, your console output will look +something like this; +</p> +<pre> -<br />Program received signal SIGSEGV, Segmentation fault. -<br />[Switching to Thread 140049561757408 (LWP 4137)] -<br />snd_seq_port_subscribe_set_sender (info=0x7fffdc63f540, addr=0x0) at seq.c:2432 -<br />2432 memcpy(&info->sender, addr, sizeof(*addr)); -<br /> -<br />(gdb) -<br /> -<br />Now, at the (gdb) prompt, issue the 'bt' command - this will generate the backtrace for us ; -<br /> -<br /> -<br />(gdb) bt -<br />#0 snd_seq_port_subscribe_set_sender (info=0x7fffdc63f540, addr=0x0) -<br /> at seq.c:2432 -<br />#1 0x0000000000426a59 in tAlsaPlayer::subscribe_inp (this=0xb68020, inp=0) -<br /> at ../../jazz/src/AlsaPlayer.cpp:225 -<br />#2 0x0000000000427926 in tAlsaPlayer (this=0xb68020, song=0x7f5fd45cc010) -<br /> at ../../jazz/src/AlsaPlayer.cpp:128 -<br />#3 0x0000000000423638 in tAlsaAudioPlayer (this=0xb68020, -<br /> pSong=0x7f5fd45cc010) at ../../jazz/src/AlsaDriver.cpp:127 -<br />#4 0x00000000004b9ec2 in JZProject (this=0x7f5fd45cc010) -<br /> at ../../jazz/src/Project.cpp:194 -<br />#5 0x0000000000498adc in JZJazzPlusPlusApplication::OnInit (this=0xafe690) -<br /> at ../../jazz/src/JazzPlusPlusApplication.cpp:127 -<br />#6 0x0000000000498f2a in wxAppConsole::CallOnInit (this=0xafe690) -<br /> at /usr/local/wx287/include/wx-2.8/wx/app.h:76 -<br />#7 0x000000000079a6fa in wxEntry () -<br />#8 0x0000000000498ea4 in main (argc=1, argv=0x7fffdc63fea8) -<br /> at ../../jazz/src/JazzPlusPlusApplication.cpp:63 -<br /> -<br /> +Starting program: /root/Jazz++/TestInstall/bin/jazz +Failed to read a valid object file image from memory. +[Thread debugging using libthread_db enabled] +[New Thread 140049561757408 (LWP 4137)] +JZProject::ReadConfiguration() ConfFileNameAndPath: + "/root/Jazz++/TestInstall/share/Jazz++/jazz.cfg" +JZConfiguration::LoadConfig: + "/root/Jazz++/TestInstall/share/Jazz++/jazz.cfg" +Include synthesizer configuration file "gs.jzi" +FindFile: Immediate hit on file "gs.jzi" +Include file "gsdrmset.jzi" +FindFile: Immediate hit on file "gsdrmset.jzi" +Include file "gmdrmnam.jzi" +FindFile: Immediate hit on file "gmdrmnam.jzi" +Include file "gsvoices.jzi" +FindFile: Immediate hit on file "gsvoices.jzi" +Include file "ctrlnam.jzi" +FindFile: Immediate hit on file "ctrlnam.jzi" +created client:port = 128:0 +Input device count: 0 +invalid output device, so selecting one +no device found! + +Program received signal SIGSEGV, Segmentation fault. +[Switching to Thread 140049561757408 (LWP 4137)] +snd_seq_port_subscribe_set_sender (info=0x7fffdc63f540, addr=0x0) at seq.c:2432 +2432 memcpy(&info->sender, addr, sizeof(*addr)); + +(gdb) + +</pre> +<p> +Now, at the (gdb) prompt, issue the 'bt' command - this will generate the backtrace for us ; +</p> +<pre> + +(gdb) bt +#0 snd_seq_port_subscribe_set_sender (info=0x7fffdc63f540, addr=0x0) + at seq.c:2432 +#1 0x0000000000426a59 in tAlsaPlayer::subscribe_inp (this=0xb68020, inp=0) + at ../../jazz/src/AlsaPlayer.cpp:225 +#2 0x0000000000427926 in tAlsaPlayer (this=0xb68020, song=0x7f5fd45cc010) + at ../../jazz/src/AlsaPlayer.cpp:128 +#3 0x0000000000423638 in tAlsaAudioPlayer (this=0xb68020, + pSong=0x7f5fd45cc010) at ../../jazz/src/AlsaDriver.cpp:127 +#4 0x00000000004b9ec2 in JZProject (this=0x7f5fd45cc010) + at ../../jazz/src/Project.cpp:194 +#5 0x0000000000498adc in JZJazzPlusPlusApplication::OnInit (this=0xafe690) + at ../../jazz/src/JazzPlusPlusApplication.cpp:127 +#6 0x0000000000498f2a in wxAppConsole::CallOnInit (this=0xafe690) + at /usr/local/wx287/include/wx-2.8/wx/app.h:76 +#7 0x000000000079a6fa in wxEntry () +#8 0x0000000000498ea4 in main (argc=1, argv=0x7fffdc63fea8) + at ../../jazz/src/JazzPlusPlusApplication.cpp:63 + + (gdb) -<br /> -<br /> -Cut&paste the above two sections of gdb console output (after the 'run' command) into your email when posting bug reports about Jazz++ crashing, and you will be <u>really</u> supplying developers with the information they require to help fix the problem, and you will be saving a lot of time as well, because invariably you will be asked to do this by the developers anyway if your bug report is about Jazz++ crashing. + +</pre> +<p> +Cut&paste the above two sections of gdb console output (after the 'run' +command) into your email when posting bug reports about Jazz++ crashing, and +you will be <u>really</u> supplying developers with the information they +require to help fix the problem. You will be saving a lot of time as well, +because invariably you will be asked to do this by the developers anyway if +your bug report is about Jazz++ crashing. </p> <?php require_once('../include/footer.php'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 18:47:35
|
Revision: 533 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=533&view=rev Author: pstieber Date: 2008-05-16 11:47:23 -0700 (Fri, 16 May 2008) Log Message: ----------- Added an entry for <pre></pre>. Modified Paths: -------------- web/htdocs/include/jazz.css Modified: web/htdocs/include/jazz.css =================================================================== --- web/htdocs/include/jazz.css 2008-05-16 18:25:23 UTC (rev 532) +++ web/htdocs/include/jazz.css 2008-05-16 18:47:23 UTC (rev 533) @@ -103,6 +103,11 @@ color: #000055 } +.mainCopy pre { + margin-left: 15%; + color: #000055 +} + .mainCopy dl { border: 1px dotted; background: #eeeeef; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 18:25:33
|
Revision: 532 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=532&view=rev Author: pstieber Date: 2008-05-16 11:25:23 -0700 (Fri, 16 May 2008) Log Message: ----------- Added Donald to the credits. Modified Paths: -------------- web/htdocs/credits/index.php Modified: web/htdocs/credits/index.php =================================================================== --- web/htdocs/credits/index.php 2008-05-16 18:23:17 UTC (rev 531) +++ web/htdocs/credits/index.php 2008-05-16 18:25:23 UTC (rev 532) @@ -37,6 +37,8 @@ <dd>Documentor.</dd> <dt>Matt Kelly</dt> <dd>Developer</dd> + <dt>Donald B Moore</dt> + <dd>Documentation &Testing</dd> </dl> <hr> <p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-16 18:23:27
|
Revision: 531 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=531&view=rev Author: pstieber Date: 2008-05-16 11:23:17 -0700 (Fri, 16 May 2008) Log Message: ----------- Applied a slightly modified version of a patch provided by Donald B. Moore. This is a first draft or the tex2rtf page. It described is a brief history of tex2rtf, it's relationship with wxWindows/Jazz++, along with details of current developments. The text also publicly acknowledges Julian Smart's efforts and thanks him for allowing us to fork his code. Pete's changes... Changes some formatting. Thanks for this Donald. Modified Paths: -------------- web/htdocs/tex2rtf/index.php Modified: web/htdocs/tex2rtf/index.php =================================================================== --- web/htdocs/tex2rtf/index.php 2008-05-15 18:48:19 UTC (rev 530) +++ web/htdocs/tex2rtf/index.php 2008-05-16 18:23:17 UTC (rev 531) @@ -14,7 +14,81 @@ ?> </TD> <TD class="mainCopy"> -<H2>Tex2RTF</H2> +<H2>Introduction to Tex2RTF</H2> + +<p> +Tex2RTF is a free, cross-platform document conversion utility. It accepts a +standard LaTeX subset, and can generate output in any of the following +formats; +<br /> +<br /> * ordinary RTF +<br /> * Windows Help hypertext RTF +<br /> * HTML +<br /> * wxHTML Help (the wxWidgets GUI library help file format) +<br /> +<br /> +Tex2RTF was originally written in 1995 by Julian Smart, a developer of the +then 'wxWindows' project. Julian is still an active developer on the +'wxWidgets' project -- which is the current evolution of the old 'wxWindows' +initiative. The current Jazz++ developers wish to publicly thank Julian for +all his fine work, and allowing us to create a fork of his code in the current +Jazz++ source tree. +</p> +<h3>Jazz++ and Tex2RTF </h3> +<h4>A brief history of Jazz++ and tex2rtf</h4> +<p> +In the beginning when the Jazz++ project was started, the decision was made to +utilize the then available wxWindows GUI library. Naturally enough, the +original developers of Jazz++ went on to incorporate a lot of the features +from the wxWindows GUI library into Jazz++ itself, and the Jazz++ binary had +a dependance on the external program 'wxhelp' being available to display +Jazz++'s builtin help information. The then Jazz++ source code also relied +upon the tex2rtf converter to produce files suitable for 'wxhelp' to use, +along with the generation of other user documentation in various formats +inside the Jazz++ source tree. +</p> +<p> +In fact, the wxWindows source also relied on the tex2rtf utility being +present, to build the included wxWindows documentation and (wx)help files +for the GUI library itself, and it may be the case that the tex2rtf utility +was created specifically for that purpose, and this is why it became part of +the old wxWindows source tree. Following on from this, the wxWindows release +would supply the tex2rtf utility, to be installed in the system path, so that +others developing wxWindows based projects had this converter available to +generate their project's own wxhelp and other documentation files. +</p> + +<h4>The present day</h4> +<p> +Over the years, wxWindows became wxWidgets, and ongoing development within the +wxWidgets project has seen a shift away from using it's own self-supplied +tex2rtf utility for document conversion, in favor of other document converters +and/or formats being used today. Although the tex2rtf source is still part of +the current wxWidgets tree, it is not used by wxWidgets anymore, and talk on +the wxWidgets developers list suggests to us that the tex2rtf source may be +removed from wxWidgets altogether at some future time. Even now, the tex2rtf +utility is not defaultly built or installed as part of the current wxWidgets +installation process....which is unfortunate, because the developers of the +current Jazz++ project still wish to use this utility for document conversion +tasks within the current Jazz++ source tree. +</p> +<h4>Into the future</h4> +<p> +The current Jazz++ project's leader, Pete Stieber, has a vested knowledge and +interest in the tex2rtf utility itself -- as it so happens, he uses it at +his place of work, as well as in the Jazz++ documentation build process. After +a short discussion, the current Jazz++ developers decided to investigate +whether it was possible to create a fork of the tex2rtf inside the Jazz++ +source tree itself. After consulting with the tex2rtf's original author Julian +Smart and getting his kind approval and blessings, the tex2rtf utility has now +become part of the Jazz++ source tree. +</p> +<p> +If you have any questions about tex2rtf, join one of our mailing lists and +send us an email -- I'm sure Pete can answer any queries you have regarding +tex2rtf. +</p> + <?php require_once('../include/footer.php'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pst...@us...> - 2008-05-15 18:48:42
|
Revision: 530 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=530&view=rev Author: pstieber Date: 2008-05-15 11:48:19 -0700 (Thu, 15 May 2008) Log Message: ----------- Added a Tex2RTF link and page for Donald to fill in ;-) Modified Paths: -------------- web/htdocs/include/leftnav.php Added Paths: ----------- web/htdocs/tex2rtf/ web/htdocs/tex2rtf/index.php Modified: web/htdocs/include/leftnav.php =================================================================== --- web/htdocs/include/leftnav.php 2008-05-15 17:34:43 UTC (rev 529) +++ web/htdocs/include/leftnav.php 2008-05-15 18:48:19 UTC (rev 530) @@ -7,6 +7,7 @@ <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="/tex2rtf/">Tex2RTF</a></p> <p><a href="/buildingjazz/">Building Jazz++</a></p> <p><a href="/bugreports/">Reporting Bugs</a></p> <p><a href="/credits/">Credits</a></p> Added: web/htdocs/tex2rtf/index.php =================================================================== --- web/htdocs/tex2rtf/index.php (rev 0) +++ web/htdocs/tex2rtf/index.php 2008-05-15 18:48:19 UTC (rev 530) @@ -0,0 +1,25 @@ +<!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>Tex2RTF</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>Tex2RTF</H2> +<?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. |