|
From: <pst...@us...> - 2013-01-05 23:08:24
|
Revision: 938
http://sourceforge.net/p/jazzplusplus/code/938
Author: pstieber
Date: 2013-01-05 23:08:20 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Separated some code into new source modules.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
trunk/jazz/src/Synth.cpp
trunk/jazz/src/Track.cpp
trunk/jazz/src/Track.h
trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj
trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj.filters
trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj
trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Added Paths:
-----------
trunk/jazz/src/DrumEnums.h
trunk/jazz/src/DrumUtilities.cpp
trunk/jazz/src/DrumUtilities.h
trunk/jazz/src/SysexChannel.cpp
trunk/jazz/src/SysexChannel.h
Added: trunk/jazz/src/DrumEnums.h
===================================================================
--- trunk/jazz/src/DrumEnums.h (rev 0)
+++ trunk/jazz/src/DrumEnums.h 2013-01-05 23:08:20 UTC (rev 938)
@@ -0,0 +1,40 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#pragma once
+
+enum DrumInstrumentParameter
+{
+ drumPitch = 0x18,
+ drumTva = 0x1a,
+ drumPan = 0x1c,
+ drumReverb = 0x1d,
+ drumChorus = 0x1e
+};
+
+enum DrumInstrumentParameterIndex
+{
+ drumPitchIndex = 0,
+ drumTvaIndex,
+ drumPanIndex,
+ drumReverbIndex,
+ drumChorusIndex,
+ numDrumParameters
+};
Property changes on: trunk/jazz/src/DrumEnums.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/jazz/src/DrumUtilities.cpp
===================================================================
--- trunk/jazz/src/DrumUtilities.cpp (rev 0)
+++ trunk/jazz/src/DrumUtilities.cpp 2013-01-05 23:08:20 UTC (rev 938)
@@ -0,0 +1,69 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#include "DrumUtilities.h"
+
+#include "DrumEnums.h"
+
+#include <cassert>
+
+//*****************************************************************************
+//*****************************************************************************
+int drumParam2Index(int par)
+{
+ switch (par)
+ {
+ case drumPitch:
+ return(drumPitchIndex);
+ case drumTva:
+ return(drumTvaIndex);
+ case drumPan:
+ return(drumPanIndex);
+ case drumReverb:
+ return(drumReverbIndex);
+ case drumChorus:
+ return(drumChorusIndex);
+ default:
+ assert(0);
+ }
+ return 0;
+}
+
+//*****************************************************************************
+//*****************************************************************************
+int drumIndex2Param(int index)
+{
+ switch (index)
+ {
+ case drumPitchIndex:
+ return drumPitch;
+ case drumTvaIndex:
+ return drumTva;
+ case drumPanIndex:
+ return drumPan;
+ case drumReverbIndex:
+ return drumReverb;
+ case drumChorusIndex:
+ return drumChorus;
+ default:
+ assert(0);
+ }
+ return 0;
+}
Property changes on: trunk/jazz/src/DrumUtilities.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/jazz/src/DrumUtilities.h
===================================================================
--- trunk/jazz/src/DrumUtilities.h (rev 0)
+++ trunk/jazz/src/DrumUtilities.h 2013-01-05 23:08:20 UTC (rev 938)
@@ -0,0 +1,24 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#pragma once
+
+int drumParam2Index(int par);
+int drumIndex2Param(int index);
Property changes on: trunk/jazz/src/DrumUtilities.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/src/Makefile.am 2013-01-05 23:08:20 UTC (rev 938)
@@ -47,6 +47,7 @@
Dialogs/TransposeDialog.cpp \
Dialogs/VelocityDialog.cpp \
Dialogs.cpp \
+DrumUtilities.cpp \
DynamicArray.cpp \
ErrorMessage.cpp \
Events.cpp \
@@ -100,6 +101,7 @@
StringReadWrite.cpp \
StringUtilities.cpp \
Synth.cpp \
+SysexChannel.cpp \
ToolBar.cpp \
Track.cpp \
TrackFrame.cpp \
@@ -144,6 +146,8 @@
Dialogs/TransposeDialog.cpp \
Dialogs/VelocityDialog.cpp \
Dialogs.cpp \
+DrumEnums.h \
+DrumUtilities.h \
DynamicArray.cpp \
ErrorMessage.cpp \
Events.cpp \
@@ -198,6 +202,7 @@
StringReadWrite.cpp \
StringUtilities.cpp \
Synth.cpp \
+SysexChannel.cpp \
ToolBar.cpp \
Track.cpp \
TrackFrame.cpp \
@@ -302,6 +307,7 @@
StringReadWrite.h \
StringUtilities.h \
Synth.h \
+SysexChannel.h \
ToolBar.h \
TrackFrame.h \
Track.h \
Modified: trunk/jazz/src/Synth.cpp
===================================================================
--- trunk/jazz/src/Synth.cpp 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/src/Synth.cpp 2013-01-05 23:08:20 UTC (rev 938)
@@ -22,17 +22,16 @@
#include "Synth.h"
+//#include "eventwin.h"
+#include "Globals.h"
+#include "JazzPlusPlusApplication.h"
+#include "Player.h"
+#include "SysexChannel.h"
#include "Track.h"
-#include "Player.h"
-#include "JazzPlusPlusApplication.h"
-//#include "eventwin.h"
#include "TrackWindow.h"
-#include "Globals.h"
+#include <cassert>
#include <cstdlib>
-
-#include <assert.h>
-
#include <string>
using namespace std;
Added: trunk/jazz/src/SysexChannel.cpp
===================================================================
--- trunk/jazz/src/SysexChannel.cpp (rev 0)
+++ trunk/jazz/src/SysexChannel.cpp 2013-01-05 23:08:20 UTC (rev 938)
@@ -0,0 +1,34 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#include "SysexChannel.h"
+
+int sysex_channel(int Channel)
+{
+ if (Channel < 10)
+ {
+ return(Channel);
+ }
+ else if (Channel == 10)
+ {
+ return 0;
+ }
+ return Channel - 1;
+}
Property changes on: trunk/jazz/src/SysexChannel.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/jazz/src/SysexChannel.h
===================================================================
--- trunk/jazz/src/SysexChannel.h (rev 0)
+++ trunk/jazz/src/SysexChannel.h 2013-01-05 23:08:20 UTC (rev 938)
@@ -0,0 +1,23 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#pragma once
+
+int sysex_channel(int Channel);
Property changes on: trunk/jazz/src/SysexChannel.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/src/Track.cpp 2013-01-05 23:08:20 UTC (rev 938)
@@ -23,12 +23,14 @@
#include "Track.h"
#include "Configuration.h"
+#include "DrumUtilities.h"
#include "Dialogs/TrackDialog.h"
#include "Globals.h"
#include "JazzPlusPlusApplication.h"
#include "Player.h"
#include "Song.h"
#include "Synth.h"
+#include "SysexChannel.h"
#include "TrackWindow.h"
#include <cassert>
@@ -203,59 +205,6 @@
return msec;
}
-int sysex_channel(int Channel)
-{
- if (Channel < 10)
- {
- return(Channel);
- }
- else if (Channel == 10)
- {
- return 0;
- }
- return Channel - 1;
-}
-
-int drumParam2Index(int par)
-{
- switch (par)
- {
- case drumPitch:
- return(drumPitchIndex);
- case drumTva:
- return(drumTvaIndex);
- case drumPan:
- return(drumPanIndex);
- case drumReverb:
- return(drumReverbIndex);
- case drumChorus:
- return(drumChorusIndex);
- default:
- assert(0);
- }
- return 0;
-}
-
-int drumIndex2Param(int index)
-{
- switch (index)
- {
- case drumPitchIndex:
- return drumPitch;
- case drumTvaIndex:
- return drumTva;
- case drumPanIndex:
- return drumPan;
- case drumReverbIndex:
- return drumReverb;
- case drumChorusIndex:
- return drumChorus;
- default:
- assert(0);
- }
- return 0;
-}
-
JZDrumInstrumentParameter::JZDrumInstrumentParameter(JZNrpn *par)
: mPitch(par->mLsb.GetControlValue()),
mpNext(0)
Modified: trunk/jazz/src/Track.h
===================================================================
--- trunk/jazz/src/Track.h 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/src/Track.h 2013-01-05 23:08:20 UTC (rev 938)
@@ -23,8 +23,9 @@
#ifndef JZ_TRACK_H
#define JZ_TRACK_H
+#include "DrumEnums.h"
+#include "DynamicArray.h"
#include "Events.h"
-#include "DynamicArray.h"
#include "NamedValue.h"
#include <string>
@@ -155,8 +156,6 @@
int length,
unsigned char* dd);
-int sysex_channel(int Channel);
-
enum ModulationSysexParameter
{
mspModPitchControl = 0,
@@ -284,28 +283,6 @@
mspUseForRhythm = 0x15
};
-enum DrumInstrumentParameter
-{
- drumPitch = 0x18,
- drumTva = 0x1a,
- drumPan = 0x1c,
- drumReverb = 0x1d,
- drumChorus = 0x1e
-};
-
-enum DrumInstrumentParameterIndex
-{
- drumPitchIndex = 0,
- drumTvaIndex,
- drumPanIndex,
- drumReverbIndex,
- drumChorusIndex,
- numDrumParameters
-};
-
-int drumParam2Index(int par);
-int drumIndex2Param(int index);
-
class JZDrumInstrumentParameterList;
//*****************************************************************************
Modified: trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj
===================================================================
--- trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj 2013-01-05 23:08:20 UTC (rev 938)
@@ -298,6 +298,7 @@
<ClCompile Include="..\src\Dialogs.cpp" />
<ClCompile Include="..\src\Dialogs\AudioSettingsDialog.cpp" />
<ClCompile Include="..\src\Dialogs\SamplesDialog.cpp" />
+ <ClCompile Include="..\src\DrumUtilities.cpp" />
<ClCompile Include="..\src\DynamicArray.cpp" />
<ClCompile Include="..\src\ErrorMessage.cpp" />
<ClCompile Include="..\src\EventFrame.cpp" />
@@ -355,6 +356,7 @@
<ClCompile Include="..\src\StringReadWrite.cpp" />
<ClCompile Include="..\src\StringUtilities.cpp" />
<ClCompile Include="..\src\Synth.cpp" />
+ <ClCompile Include="..\src\SysexChannel.cpp" />
<ClCompile Include="..\src\ToolBar.cpp" />
<ClCompile Include="..\src\Track.cpp" />
<ClCompile Include="..\src\TrackFrame.cpp" />
@@ -404,6 +406,8 @@
<ClInclude Include="..\src\Dialogs.h" />
<ClInclude Include="..\src\Dialogs\AudioSettingsDialog.h" />
<ClInclude Include="..\src\Dialogs\SamplesDialog.h" />
+ <ClInclude Include="..\src\DrumEnums.h" />
+ <ClInclude Include="..\src\DrumUtilities.h" />
<ClInclude Include="..\src\DynamicArray.h" />
<ClInclude Include="..\src\ErrorMessage.h" />
<ClInclude Include="..\src\EventFrame.h" />
@@ -463,6 +467,7 @@
<ClInclude Include="..\src\StringReadWrite.h" />
<ClInclude Include="..\src\StringUtilities.h" />
<ClInclude Include="..\src\Synth.h" />
+ <ClInclude Include="..\src\SysexChannel.h" />
<ClInclude Include="..\src\ToolBar.h" />
<ClInclude Include="..\src\Track.h" />
<ClInclude Include="..\src\TrackFrame.h" />
Modified: trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj.filters
===================================================================
--- trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj.filters 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/vc10/JazzPlusPlus-VC10.vcxproj.filters 2013-01-05 23:08:20 UTC (rev 938)
@@ -154,6 +154,8 @@
<ClCompile Include="..\src\Dialogs\QuantizeDialog.cpp">
<Filter>Dialog Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\DrumUtilities.cpp" />
+ <ClCompile Include="..\src\SysexChannel.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\AsciiMidiFile.h" />
@@ -310,6 +312,9 @@
<ClInclude Include="..\src\Dialogs\QuantizeDialog.h">
<Filter>Dialog Source Files</Filter>
</ClInclude>
+ <ClInclude Include="..\src\DrumEnums.h" />
+ <ClInclude Include="..\src\DrumUtilities.h" />
+ <ClInclude Include="..\src\SysexChannel.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\src\Makefile.am" />
Modified: trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj
===================================================================
--- trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj 2013-01-05 23:08:20 UTC (rev 938)
@@ -301,6 +301,7 @@
<ClCompile Include="..\src\Dialogs.cpp" />
<ClCompile Include="..\src\Dialogs\AudioSettingsDialog.cpp" />
<ClCompile Include="..\src\Dialogs\SamplesDialog.cpp" />
+ <ClCompile Include="..\src\DrumUtilities.cpp" />
<ClCompile Include="..\src\DynamicArray.cpp" />
<ClCompile Include="..\src\ErrorMessage.cpp" />
<ClCompile Include="..\src\EventFrame.cpp" />
@@ -358,6 +359,7 @@
<ClCompile Include="..\src\StringReadWrite.cpp" />
<ClCompile Include="..\src\StringUtilities.cpp" />
<ClCompile Include="..\src\Synth.cpp" />
+ <ClCompile Include="..\src\SysexChannel.cpp" />
<ClCompile Include="..\src\ToolBar.cpp" />
<ClCompile Include="..\src\Track.cpp" />
<ClCompile Include="..\src\TrackFrame.cpp" />
@@ -407,6 +409,8 @@
<ClInclude Include="..\src\Dialogs.h" />
<ClInclude Include="..\src\Dialogs\AudioSettingsDialog.h" />
<ClInclude Include="..\src\Dialogs\SamplesDialog.h" />
+ <ClCompile Include="..\src\DrumEnums.h" />
+ <ClCompile Include="..\src\DrumUtilities.h" />
<ClInclude Include="..\src\DynamicArray.h" />
<ClInclude Include="..\src\ErrorMessage.h" />
<ClInclude Include="..\src\EventFrame.h" />
@@ -466,6 +470,7 @@
<ClInclude Include="..\src\StringReadWrite.h" />
<ClInclude Include="..\src\StringUtilities.h" />
<ClInclude Include="..\src\Synth.h" />
+ <ClInclude Include="..\src\SysexChannel.h" />
<ClInclude Include="..\src\ToolBar.h" />
<ClInclude Include="..\src\Track.h" />
<ClInclude Include="..\src\TrackFrame.h" />
Modified: trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters
===================================================================
--- trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters 2013-01-05 23:08:20 UTC (rev 938)
@@ -8,6 +8,7 @@
<ClCompile Include="..\src\Configuration.cpp" />
<ClCompile Include="..\src\ControlEdit.cpp" />
<ClCompile Include="..\src\Dialogs.cpp" />
+ <ClCompile Include="..\src\DrumUtilities.cpp" />
<ClCompile Include="..\src\DynamicArray.cpp" />
<ClCompile Include="..\src\ErrorMessage.cpp" />
<ClCompile Include="..\src\EventFrame.cpp" />
@@ -65,6 +66,7 @@
<ClCompile Include="..\src\StringReadWrite.cpp" />
<ClCompile Include="..\src\StringUtilities.cpp" />
<ClCompile Include="..\src\Synth.cpp" />
+ <ClCompile Include="..\src\SysexChannel.cpp" />
<ClCompile Include="..\src\ToolBar.cpp" />
<ClCompile Include="..\src\Track.cpp" />
<ClCompile Include="..\src\TrackFrame.cpp" />
@@ -162,6 +164,8 @@
<ClInclude Include="..\src\Configuration.h" />
<ClInclude Include="..\src\ControlEdit.h" />
<ClInclude Include="..\src\Dialogs.h" />
+ <ClCompile Include="..\src\DrumEnums.h" />
+ <ClCompile Include="..\src\DrumUtilities.h" />
<ClInclude Include="..\src\DynamicArray.h" />
<ClInclude Include="..\src\ErrorMessage.h" />
<ClInclude Include="..\src\EventFrame.h" />
@@ -221,6 +225,7 @@
<ClInclude Include="..\src\StringReadWrite.h" />
<ClInclude Include="..\src\StringUtilities.h" />
<ClInclude Include="..\src\Synth.h" />
+ <ClInclude Include="..\src\SysexChannel.h" />
<ClInclude Include="..\src\ToolBar.h" />
<ClInclude Include="..\src\Track.h" />
<ClInclude Include="..\src\TrackFrame.h" />
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-01-04 00:21:30 UTC (rev 937)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-01-05 23:08:20 UTC (rev 938)
@@ -474,6 +474,18 @@
>
</File>
<File
+ RelativePath="..\src\DrumEnums.h"
+ >
+ </File>
+ <File
+ RelativePath="..\src\DrumUtilities.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\DrumUtilities.h"
+ >
+ </File>
+ <File
RelativePath="..\src\DynamicArray.cpp"
>
</File>
@@ -954,6 +966,14 @@
>
</File>
<File
+ RelativePath="..\src\SysexChannel.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\SysexChannel.h"
+ >
+ </File>
+ <File
RelativePath="..\src\ToolBar.cpp"
>
</File>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|