|
From: <pst...@us...> - 2009-01-19 22:55:30
|
Revision: 687
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=687&view=rev
Author: pstieber
Date: 2009-01-19 21:43:48 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
1. Removed trailing white space.
2. Started replacing tab characters with white space.
Modified Paths:
--------------
branches/jazz-4.1.3/src/about.cpp
branches/jazz-4.1.3/src/about.h
branches/jazz-4.1.3/src/alsaplay.cpp
branches/jazz-4.1.3/src/alsaplay.h
branches/jazz-4.1.3/src/alsathru.cpp
branches/jazz-4.1.3/src/alsathru.h
branches/jazz-4.1.3/src/arpeggio.cpp
branches/jazz-4.1.3/src/arpeggio.h
branches/jazz-4.1.3/src/audio.cpp
branches/jazz-4.1.3/src/audio.h
branches/jazz-4.1.3/src/audiodrv.cpp
branches/jazz-4.1.3/src/audiodrv.h
branches/jazz-4.1.3/src/command.cpp
branches/jazz-4.1.3/src/command.h
branches/jazz-4.1.3/src/config.h
branches/jazz-4.1.3/src/ctrledit.cpp
branches/jazz-4.1.3/src/ctrledit.h
branches/jazz-4.1.3/src/dialogs.cpp
branches/jazz-4.1.3/src/dialogs.h
branches/jazz-4.1.3/src/dynarray.cpp
branches/jazz-4.1.3/src/dynarray.h
branches/jazz-4.1.3/src/eventlst.cpp
branches/jazz-4.1.3/src/eventlst.h
branches/jazz-4.1.3/src/events.cpp
branches/jazz-4.1.3/src/events.h
branches/jazz-4.1.3/src/eventwin.cpp
branches/jazz-4.1.3/src/eventwin.h
branches/jazz-4.1.3/src/filter.cpp
branches/jazz-4.1.3/src/filter.h
branches/jazz-4.1.3/src/freqtab.cpp
branches/jazz-4.1.3/src/freqtab.h
branches/jazz-4.1.3/src/genmeldp.cpp
branches/jazz-4.1.3/src/genmeldp.h
branches/jazz-4.1.3/src/genmeldy.cpp
branches/jazz-4.1.3/src/genmeldy.h
branches/jazz-4.1.3/src/gs_dlg1.cpp
branches/jazz-4.1.3/src/gs_dlg2.cpp
branches/jazz-4.1.3/src/gs_dlgs.h
branches/jazz-4.1.3/src/guitar.cpp
branches/jazz-4.1.3/src/guitar.h
branches/jazz-4.1.3/src/harmony.cpp
branches/jazz-4.1.3/src/harmony.h
branches/jazz-4.1.3/src/harmonyp.cpp
branches/jazz-4.1.3/src/harmonyp.h
branches/jazz-4.1.3/src/hbanalyz.cpp
branches/jazz-4.1.3/src/hbanalyz.h
branches/jazz-4.1.3/src/jazz.cpp
branches/jazz-4.1.3/src/jazz.h
branches/jazz-4.1.3/src/maction.cpp
branches/jazz-4.1.3/src/maction.h
branches/jazz-4.1.3/src/mapper.cpp
branches/jazz-4.1.3/src/mapper.h
branches/jazz-4.1.3/src/mascfile.cpp
branches/jazz-4.1.3/src/mascfile.h
branches/jazz-4.1.3/src/midinet.c
branches/jazz-4.1.3/src/midinet.h
branches/jazz-4.1.3/src/mstdfile.cpp
branches/jazz-4.1.3/src/mstdfile.h
branches/jazz-4.1.3/src/pianowin.cpp
branches/jazz-4.1.3/src/pianowin.h
branches/jazz-4.1.3/src/player.cpp
branches/jazz-4.1.3/src/player.h
branches/jazz-4.1.3/src/random.cpp
branches/jazz-4.1.3/src/random.h
branches/jazz-4.1.3/src/rhythm.cpp
branches/jazz-4.1.3/src/rhythm.h
branches/jazz-4.1.3/src/samplcmd.cpp
branches/jazz-4.1.3/src/samplcmd.h
branches/jazz-4.1.3/src/sampldlg.cpp
branches/jazz-4.1.3/src/sampldlg.h
branches/jazz-4.1.3/src/sample.cpp
branches/jazz-4.1.3/src/sample.h
branches/jazz-4.1.3/src/samplwin.cpp
branches/jazz-4.1.3/src/samplwin.h
branches/jazz-4.1.3/src/shuffle.cpp
branches/jazz-4.1.3/src/shuffle.h
branches/jazz-4.1.3/src/sig2.cpp
branches/jazz-4.1.3/src/sig2.h
branches/jazz-4.1.3/src/signali.h
branches/jazz-4.1.3/src/slidrwin.cpp
branches/jazz-4.1.3/src/slidrwin.h
branches/jazz-4.1.3/src/song.cpp
branches/jazz-4.1.3/src/song.h
branches/jazz-4.1.3/src/splcmplx.cpp
branches/jazz-4.1.3/src/splcmplx.h
branches/jazz-4.1.3/src/synth.cpp
branches/jazz-4.1.3/src/synth.h
branches/jazz-4.1.3/src/toolbar.cpp
branches/jazz-4.1.3/src/toolbar.h
branches/jazz-4.1.3/src/track.cpp
branches/jazz-4.1.3/src/track.h
branches/jazz-4.1.3/src/trackwin.cpp
branches/jazz-4.1.3/src/trackwin.h
branches/jazz-4.1.3/src/util.cpp
branches/jazz-4.1.3/src/util.h
branches/jazz-4.1.3/src/winaudio.cpp
branches/jazz-4.1.3/src/winaudio.h
Modified: branches/jazz-4.1.3/src/about.cpp
===================================================================
--- branches/jazz-4.1.3/src/about.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/about.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "about.h"
#include "config.h"
Modified: branches/jazz-4.1.3/src/about.h
===================================================================
--- branches/jazz-4.1.3/src/about.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/about.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#define JAZZ_VERSION "4.1.3"
Modified: branches/jazz-4.1.3/src/alsaplay.cpp
===================================================================
--- branches/jazz-4.1.3/src/alsaplay.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/alsaplay.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,16 +17,16 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
/*
* Changes
*
- * 2000.03.18 Takashi Iwai <iw...@ww...>
- * - Modified for ALSA 0.5.x.
- * You'll need the latest CVS version of ALSA-lib, which is expected
- * to be released as ver.0.5.7.
- * - The input/output devices are selected via a pop-up window
- * like OSS driver mode.
+ * 2000.03.18 Takashi Iwai <iw...@ww...>
+ * - Modified for ALSA 0.5.x.
+ * You'll need the latest CVS version of ALSA-lib, which is expected
+ * to be released as ver.0.5.7.
+ * - The input/output devices are selected via a pop-up window
+ * like OSS driver mode.
*/
#include "alsaplay.h"
@@ -136,7 +136,7 @@
}
}
-void tAlsaPlayer::SetSoftThru(int on, int idev, int odev)
+void tAlsaPlayer::SetSoftThru(int on, int idev, int odev)
{
if (idev != ithru || odev != othru) {
ithru = idev;
@@ -205,7 +205,7 @@
}
}
-// set the name of this client
+// set the name of this client
void tAlsaPlayer::set_client_info(snd_seq_t *handle, const char *name) {
if (snd_seq_set_client_name(handle, (char *)name) < 0) {
perror("ioctl");
@@ -215,12 +215,13 @@
// create a new port
int tAlsaPlayer::create_port(snd_seq_t *handle, const char *name)
{
- return snd_seq_create_simple_port(handle, (char *)name,
- SND_SEQ_PORT_CAP_READ |
- SND_SEQ_PORT_CAP_SUBS_READ |
- SND_SEQ_PORT_CAP_WRITE |
- SND_SEQ_PORT_CAP_SUBS_WRITE,
- SND_SEQ_PORT_TYPE_MIDI_GENERIC);
+ return snd_seq_create_simple_port(
+ handle, (char *)name,
+ SND_SEQ_PORT_CAP_READ |
+ SND_SEQ_PORT_CAP_SUBS_READ |
+ SND_SEQ_PORT_CAP_WRITE |
+ SND_SEQ_PORT_CAP_SUBS_WRITE,
+ SND_SEQ_PORT_TYPE_MIDI_GENERIC);
}
@@ -246,9 +247,9 @@
{
case StatKeyOn:
{
- tKeyOn *k = e->IsKeyOn();
+ tKeyOn *k = e->IsKeyOn();
set_event_header(&ev, e->Clock, SND_SEQ_EVENT_NOTEON);
- ev.data.note.channel = k->Channel;
+ ev.data.note.channel = k->Channel;
ev.data.note.note = k->Key;
ev.data.note.velocity = k->Veloc;
rc = write(&ev, now);
@@ -257,9 +258,9 @@
case StatKeyOff:
{
- tKeyOff *k = e->IsKeyOff();
+ tKeyOff *k = e->IsKeyOff();
set_event_header(&ev, e->Clock, SND_SEQ_EVENT_NOTEOFF);
- ev.data.note.channel = k->Channel;
+ ev.data.note.channel = k->Channel;
ev.data.note.note = k->Key;
ev.data.note.velocity = k->OffVeloc;
rc = write(&ev, now);
@@ -268,76 +269,76 @@
case StatProgram:
{
- tProgram *k = e->IsProgram();
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_PGMCHANGE);
- ev.data.control.channel = k->Channel;
- ev.data.control.value = k->Program;
- rc = write(&ev, now);
+ tProgram *k = e->IsProgram();
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_PGMCHANGE);
+ ev.data.control.channel = k->Channel;
+ ev.data.control.value = k->Program;
+ rc = write(&ev, now);
}
break;
case StatKeyPressure:
{
- tKeyPressure *k = e->IsKeyPressure();
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_KEYPRESS);
- ev.data.note.channel = k->Channel;
- ev.data.note.note = k->Key;
- ev.data.note.velocity = k->Value;
- rc = write(&ev, now);
+ tKeyPressure *k = e->IsKeyPressure();
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_KEYPRESS);
+ ev.data.note.channel = k->Channel;
+ ev.data.note.note = k->Key;
+ ev.data.note.velocity = k->Value;
+ rc = write(&ev, now);
}
break;
case StatChnPressure:
{
- tChnPressure *k = e->IsChnPressure();
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_CHANPRESS);
- ev.data.control.channel = k->Channel;
- ev.data.control.value = k->Value;
- rc = write(&ev, now);
+ tChnPressure *k = e->IsChnPressure();
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_CHANPRESS);
+ ev.data.control.channel = k->Channel;
+ ev.data.control.value = k->Value;
+ rc = write(&ev, now);
}
break;
case StatControl:
{
- tControl *k = e->IsControl();
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_CONTROLLER);
- ev.data.control.channel = k->Channel;
- ev.data.control.param = k->Control;
- ev.data.control.value = k->Value;
- rc = write(&ev, now);
+ tControl *k = e->IsControl();
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_CONTROLLER);
+ ev.data.control.channel = k->Channel;
+ ev.data.control.param = k->Control;
+ ev.data.control.value = k->Value;
+ rc = write(&ev, now);
}
break;
case StatPitch:
{
- tPitch *k = e->IsPitch();
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_PITCHBEND);
- ev.data.control.channel = k->Channel;
- ev.data.control.value = k->Value;
- rc = write(&ev, now);
+ tPitch *k = e->IsPitch();
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_PITCHBEND);
+ ev.data.control.channel = k->Channel;
+ ev.data.control.value = k->Value;
+ rc = write(&ev, now);
}
break;
case StatSetTempo:
{
int bpm = e->IsSetTempo()->GetBPM();
- int us = (int)( 60.0E6 / (double)bpm );
- set_event_header(&ev, e->Clock, SND_SEQ_EVENT_TEMPO);
- snd_seq_ev_set_queue_tempo(&ev, queue, us);
- rc = write(&ev, now);
+ int us = (int)( 60.0E6 / (double)bpm );
+ set_event_header(&ev, e->Clock, SND_SEQ_EVENT_TEMPO);
+ snd_seq_ev_set_queue_tempo(&ev, queue, us);
+ rc = write(&ev, now);
}
break;
case StatSysEx:
{
tSysEx *s = e->IsSysEx();
- // prepend 0xf0
- char *buf = new char[s->Length + 1];
- buf[0] = 0xF0;
- memcpy(buf + 1, s->Data, s->Length);
- set_event_header(&ev, e->Clock, s->Length + 1, buf);
- rc = write(&ev, now);
- delete [] buf;
+ // prepend 0xf0
+ char *buf = new char[s->Length + 1];
+ buf[0] = 0xF0;
+ memcpy(buf + 1, s->Data, s->Length);
+ set_event_header(&ev, e->Clock, s->Length + 1, buf);
+ rc = write(&ev, now);
+ delete [] buf;
}
break;
@@ -367,7 +368,7 @@
snd_seq_ev_set_fixed(&ev);
ev.type = SND_SEQ_EVENT_ECHO;
if (write(&ev) < 0)
- break;
+ break;
}
snd_seq_flush_output(handle);
}
@@ -406,7 +407,7 @@
snd_seq_ev_set_variable(ev, len, ptr);
}
-int tAlsaPlayer::start_timer(long clock)
+int tAlsaPlayer::start_timer(long clock)
{
int time_base = Song->TicksPerQuarter;
int cur_speed = Song->GetTrack(0)->GetCurrentSpeed(clock);
@@ -489,7 +490,7 @@
void tAlsaPlayer::recd_event(snd_seq_event_t *ev)
{
tEvent *e = 0;
- switch (ev->type)
+ switch (ev->type)
{
case SND_SEQ_EVENT_NOTEON:
@@ -573,20 +574,20 @@
if (client == this->client)
continue;
err = snd_seq_get_any_client_info (handle, client, &cinfo);
- if (err < 0)
+ if (err < 0)
continue;
for (port = 0; port < cinfo.num_ports; port++)
{
snd_seq_get_any_port_info (handle, client, port, &pinfo);
if ((pinfo.capability & cap) == cap) {
snd_seq_addr_t a;
- memset(&a, 0, sizeof(a));
- a.client = pinfo.client;
- a.port = pinfo.port;
- char buf[500];
- strcpy(buf, cinfo.name);
- strcat(buf, " ");
- strcat(buf, pinfo.name);
+ memset(&a, 0, sizeof(a));
+ a.client = pinfo.client;
+ a.port = pinfo.port;
+ char buf[500];
+ strcpy(buf, cinfo.name);
+ strcat(buf, " ");
+ strcat(buf, pinfo.name);
list.add(buf, a);
}
}
Modified: branches/jazz-4.1.3/src/alsaplay.h
===================================================================
--- branches/jazz-4.1.3/src/alsaplay.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/alsaplay.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef ALSAPLAY
#define ALSAPLAY
@@ -73,7 +73,7 @@
snd_seq_addr_t self; // my address
int queue; // queue
int inp_dev, outp_dev; // input/output device index
-
+
int installed;
static int create_port(snd_seq_t *handle, const char *name);
Modified: branches/jazz-4.1.3/src/alsathru.cpp
===================================================================
--- branches/jazz-4.1.3/src/alsathru.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/alsathru.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,23 +17,23 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
/*
* Changes
*
- * 2000.03.18 Takashi Iwai <iw...@ww...>
- * - Modified for ALSA 0.5.x
- * - Thru-connection is done inside ALSA sequencer core if
- * USE_DIRECT_CONNECTION is defined in alsathru.h.
- * It reduces latency.
- * However, if jazz program is terminated abnormally by ctrl-c,
- * or signal, the established connection will remain.
- * You'll need to disconnect it via aconnect program (included
- * in alsa-utils) manually.
- * If USE_DIRECT_CONNECTION is not defined (as default), soft-
- * thru is done. The event goes thru via either forked child
- * or a thread.
- *
+ * 2000.03.18 Takashi Iwai <iw...@ww...>
+ * - Modified for ALSA 0.5.x
+ * - Thru-connection is done inside ALSA sequencer core if
+ * USE_DIRECT_CONNECTION is defined in alsathru.h.
+ * It reduces latency.
+ * However, if jazz program is terminated abnormally by ctrl-c,
+ * or signal, the established connection will remain.
+ * You'll need to disconnect it via aconnect program (included
+ * in alsa-utils) manually.
+ * If USE_DIRECT_CONNECTION is not defined (as default), soft-
+ * thru is done. The event goes thru via either forked child
+ * or a thread.
+ *
*/
@@ -50,8 +50,8 @@
#include "alsaplay.h"
/*
-** midi thru for alsa. it creates a new process (because threads dont work
-** with wxwin) that copies from input to output.
+** midi thru for alsa. it creates a new process (because threads dont work
+** with wxwin) that copies from input to output.
*/
tAlsaThru::tAlsaThru()
@@ -160,7 +160,7 @@
// thread version
-void tAlsaThru::stopworker(int sig)
+void tAlsaThru::stopworker(int sig)
{
running = 0;
snd_seq_close(handle);
@@ -178,7 +178,7 @@
return 0;
}
-void tAlsaThru::Start()
+void tAlsaThru::Start()
{
if (!running)
pthread_create(&worker, (void *)0, startworker, (void *)this);
@@ -187,7 +187,7 @@
void tAlsaThru::Stop()
{
if (running)
- pthread_kill(worker, SIGHUP);
+ pthread_kill(worker, SIGHUP);
}
@@ -198,13 +198,13 @@
static snd_seq_t *static_handle; // ugly!!
-void tAlsaThru::stopworker(int sig)
+void tAlsaThru::stopworker(int sig)
{
snd_seq_close(static_handle);
exit(0);
}
-void tAlsaThru::Start()
+void tAlsaThru::Start()
{
if (!running) {
worker = fork();
Modified: branches/jazz-4.1.3/src/alsathru.h
===================================================================
--- branches/jazz-4.1.3/src/alsathru.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/alsathru.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef alsathru_h
Modified: branches/jazz-4.1.3/src/arpeggio.cpp
===================================================================
--- branches/jazz-4.1.3/src/arpeggio.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/arpeggio.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "arpeggio.h"
#include "trackwin.h"
@@ -207,23 +207,23 @@
#include "../bitmaps/help.xpm"
static tToolDef tdefs[] = {
- { MEN_LOAD, FALSE, 0, tb_open },
- { MEN_SAVE, FALSE, 1, tb_save },
- { MEN_GEN, FALSE, 0, tb_rrggen },
- { MEN_RANDOM, FALSE, 0, tb_alea},
- { MEN_PLAY, FALSE, 1, tb_play },
- { MEN_HELP, FALSE, 0, tb_help }
+ { MEN_LOAD, FALSE, 0, tb_open },
+ { MEN_SAVE, FALSE, 1, tb_save },
+ { MEN_GEN, FALSE, 0, tb_rrggen },
+ { MEN_RANDOM, FALSE, 0, tb_alea},
+ { MEN_PLAY, FALSE, 1, tb_play },
+ { MEN_HELP, FALSE, 0, tb_help }
};
#else
static tToolDef tdefs[] = {
- { MEN_LOAD, FALSE, 0, "tb_open", "load settings" },
- { MEN_SAVE, FALSE, 1, "tb_save", "save settings" },
- { MEN_GEN, FALSE, 0, "tb_rrggen", "generate" },
- { MEN_RANDOM, FALSE, 0, "tb_alea", "random arpeggio" },
- { MEN_PLAY, FALSE, 1, "tb_play", "play" },
- { MEN_HELP, FALSE, 0, "tb_help", "help" }
+ { MEN_LOAD, FALSE, 0, "tb_open", "load settings" },
+ { MEN_SAVE, FALSE, 1, "tb_save", "save settings" },
+ { MEN_GEN, FALSE, 0, "tb_rrggen", "generate" },
+ { MEN_RANDOM, FALSE, 0, "tb_alea", "random arpeggio" },
+ { MEN_PLAY, FALSE, 1, "tb_play", "play" },
+ { MEN_HELP, FALSE, 0, "tb_help", "help" }
};
#endif
@@ -301,7 +301,7 @@
char * fname = file_selector(default_filename, "Load Arpeggio", 0, 0, "*.apg");
if (fname) {
int x;
- ifstream is(fname);
+ ifstream is(fname);
is >> x; // version
is >> step_count;
is >> note_count;
@@ -330,7 +330,7 @@
{
char * fname = file_selector(default_filename, "Save Arpeggio", 1, 0, "*.apg");
if (fname) {
- ofstream os(fname);
+ ofstream os(fname);
os << 1 << endl; // version
os << step_count << " ";
os << note_count << " ";
Modified: branches/jazz-4.1.3/src/arpeggio.h
===================================================================
--- branches/jazz-4.1.3/src/arpeggio.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/arpeggio.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef arpeggio_h
#define arpeggio_h
Modified: branches/jazz-4.1.3/src/audio.cpp
===================================================================
--- branches/jazz-4.1.3/src/audio.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/audio.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
@@ -81,16 +81,16 @@
long offset = 0;
if (first) {
if (clock >= buffer_clock)
- offset = set.Ticks2Samples(clock - buffer_clock);
- else {
- // output starts somewhere in the middle of a sample
- long data_offs = set.Ticks2Samples(buffer_clock - clock);
- data += data_offs;
- length -= data_offs;
- if (length <= 0)
- return;
- }
- first = 0;
+ offset = set.Ticks2Samples(clock - buffer_clock);
+ else {
+ // output starts somewhere in the middle of a sample
+ long data_offs = set.Ticks2Samples(buffer_clock - clock);
+ data += data_offs;
+ length -= data_offs;
+ if (length <= 0)
+ return;
+ }
+ first = 0;
}
// compute number of samples to put into this buffer
@@ -102,7 +102,7 @@
length -= count;
b += offset;
while (count--)
- *b++ += *data++;
+ *b++ += *data++;
}
@@ -115,16 +115,16 @@
if (first) {
- if (to_smpl > 0 && to_smpl < length)
- length = to_smpl;
+ if (to_smpl > 0 && to_smpl < length)
+ length = to_smpl;
if (fr_smpl > 0 && fr_smpl < length) {
- data += fr_smpl;
- length -= fr_smpl;
- }
- first = FALSE;
- if (length <= 0)
- return;
+ data += fr_smpl;
+ length -= fr_smpl;
+ }
+ first = FALSE;
+ if (length <= 0)
+ return;
}
int count = BUFSHORTS;
@@ -134,7 +134,7 @@
// update length and copy data
length -= count;
while (count--)
- *b++ += *data++;
+ *b++ += *data++;
}
@@ -179,7 +179,7 @@
}
speed = 22050;
channels = 1;
- bits = 16; // dont change!!
+ bits = 16; // dont change!!
for (i = 0; i < MAXPOLY; i++)
voices[i] = new tSampleVoice(*this);
@@ -250,18 +250,18 @@
if (!wxFileExists(fname))
{
// try to prepend the spl_path
- char tmp[128];
- strcpy(tmp, spl_path);
- strcat(tmp, "/");
- strcat(tmp, fname);
- strcpy(fname, tmp);
+ char tmp[128];
+ strcpy(tmp, spl_path);
+ strcat(tmp, "/");
+ strcat(tmp, fname);
+ strcpy(fname, tmp);
}
if (!wxFileExists(fname))
{
- char buf[500];
- sprintf(buf, "File not found: \"%s\"", fname);
- wxMessageBox(buf, "Error", wxOK);
- continue;
+ char buf[500];
+ sprintf(buf, "File not found: \"%s\"", fname);
+ wxMessageBox(buf, "Error", wxOK);
+ continue;
}
assert(0 <= key && key < MAXSMPL);
samples[key]->SetFilename(fname);
@@ -271,9 +271,9 @@
samples[key]->SetPitch(pitch);
if (samples[key]->Load())
{
- char buf[500];
- sprintf(buf, "could not load \"%s\"", samples[key]->GetFilename());
- wxMessageBox(buf, "Error", wxOK);
+ char buf[500];
+ sprintf(buf, "could not load \"%s\"", samples[key]->GetFilename());
+ wxMessageBox(buf, "Error", wxOK);
}
if (samplewin[key])
samplewin[key]->Redraw();
@@ -573,11 +573,11 @@
speedstr = 0;
for (int i = 0; speedtxt[i]; i++) {
strlist.Append((wxObject *)speedtxt[i]); // ???
- if (atol(speedtxt[i]) == speed)
- speedstr = copystring(speedtxt[i]);
+ if (atol(speedtxt[i]) == speed)
+ speedstr = copystring(speedtxt[i]);
}
if (!speedstr)
- speedstr = copystring(speedtxt[0]);
+ speedstr = copystring(speedtxt[0]);
enable = Midi->GetAudioEnabled();
stereo = (set.GetChannels() == 2);
@@ -622,27 +622,27 @@
Midi->SetAudioEnabled(enable);
if (Config(C_EnableAudio) != enable) {
- Config(C_EnableAudio) = enable;
- Config.Put(C_EnableAudio, enable);
+ Config(C_EnableAudio) = enable;
+ Config.Put(C_EnableAudio, enable);
}
if (Config(C_OssBug1) != ossbug1) {
- Config(C_OssBug1) = ossbug1;
+ Config(C_OssBug1) = ossbug1;
Config.Put(C_OssBug1, ossbug1);
}
if (Config(C_OssBug2) != ossbug2) {
- Config(C_OssBug2) = ossbug2;
+ Config(C_OssBug2) = ossbug2;
Config.Put(C_OssBug2, ossbug2);
}
if (Config(C_DuplexAudio) != duplex_audio) {
- Config(C_DuplexAudio) = duplex_audio;
+ Config(C_DuplexAudio) = duplex_audio;
Config.Put(C_DuplexAudio, duplex_audio);
}
if (enable)
- set.ReloadSamples();
+ set.ReloadSamples();
wxEndBusyCursor();
wxForm::OnOk();
}
@@ -1078,25 +1078,25 @@
case MEN_AUDIO_LOAD:
{
char * fname = file_selector(default_filename, "Load Sample Set", 0, has_changed, "*.spl");
- if (fname)
- Load(fname);
- return 1;
+ if (fname)
+ Load(fname);
+ return 1;
}
case MEN_AUDIO_SAVE_AS:
{
char * fname = file_selector(default_filename, "Save Sample Set", 1, has_changed, "*.spl");
- if (fname)
- Save(fname);
- return 1;
+ if (fname)
+ Save(fname);
+ return 1;
}
case MEN_AUDIO_SAVE:
{
if (strcmp(default_filename, "noname.spl") == 0)
- return OnMenuCommand(MEN_AUDIO_SAVE_AS);
- Save(default_filename);
- return 1;
+ return OnMenuCommand(MEN_AUDIO_SAVE_AS);
+ Save(default_filename);
+ return 1;
}
case MEN_AUDIO_GLOBAL:
@@ -1110,10 +1110,10 @@
case MEN_AUDIO_NEW:
if (spl_dialog == 0 && glb_dialog == 0)
{
- if (wxMessageBox("Clear Sample Set?", "Confirm", wxYES_NO) == wxNO)
- return 1;
- for (int i = 0; i < MAXSMPL; i++)
- samples[i]->Clear();
+ if (wxMessageBox("Clear Sample Set?", "Confirm", wxYES_NO) == wxNO)
+ return 1;
+ for (int i = 0; i < MAXSMPL; i++)
+ samples[i]->Clear();
}
return 1;
Modified: branches/jazz-4.1.3/src/audio.h
===================================================================
--- branches/jazz-4.1.3/src/audio.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/audio.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef audio_h
#define audio_h
@@ -286,17 +286,17 @@
return channels * (bits == 8 ? 1L : 2L) * num_samples;
}
- long speed; // samples / second
- int channels; // mono = 1, stereo = 2
- int bits; // must be 16!
+ long speed; // samples / second
+ int channels; // mono = 1, stereo = 2
+ int bits; // must be 16!
Bool softsync; // enable software midi/audio sync
enum { MAXSMPL = 128 };
tSample *samples[MAXSMPL];
tSampleWin *samplewin[MAXSMPL];
- long ticks_per_minute; // midi speed for audio/midi sync
+ long ticks_per_minute; // midi speed for audio/midi sync
double clocks_per_buffer;
- long start_clock; // when did play start
+ long start_clock; // when did play start
int event_index;
Modified: branches/jazz-4.1.3/src/audiodrv.cpp
===================================================================
--- branches/jazz-4.1.3/src/audiodrv.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/audiodrv.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,14 +17,14 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
#include "config.h"
#include "audiodrv.h"
-#include "jazz.h" // MIN and MAX
+#include "jazz.h"
#include <unistd.h>
#include <stdlib.h>
#include <sys/ioctl.h>
@@ -83,7 +83,7 @@
long GetPlayPosition() {
count_info cinfo;
if (ioctl(player->dev, SNDCTL_DSP_GETOPTR, &cinfo) == -1)
- perror("SNDCTL_DSP_GETOPTR");
+ perror("SNDCTL_DSP_GETOPTR");
return (cinfo.bytes - cinfo.ptr) / sizeof(short);
}
@@ -116,7 +116,7 @@
if (caps & DSP_CAP_REALTIME)
; // fprintf(stderr, AUDIO " supports REALTIME, good!\n");
if (caps & DSP_CAP_DUPLEX)
- can_duplex = 1; // good soundcard!
+ can_duplex = 1; // good soundcard!
if (!(caps & DSP_CAP_TRIGGER))
fprintf(stderr, "no CAP_TRIGGER support!\n");
else
@@ -252,7 +252,7 @@
if (reset)
{
if (ioctl(dev, SNDCTL_DSP_RESET, 0) == -1)
- perror("SNDCTL_DSP_RESET");
+ perror("SNDCTL_DSP_RESET");
}
else {
if (ioctl (dev, SNDCTL_DSP_SYNC, NULL) < 0)
@@ -331,7 +331,7 @@
if (read(dev, b, BUFBYTES) != BUFBYTES) {
// oss bug? It send EINTR?? on first read..
if (errno != EINTR && errno != EAGAIN)
- perror("read");
+ perror("read");
recbuffers.UndoRequest();
break;
}
@@ -379,9 +379,9 @@
if (new_speed != curr_speed) {
if (ioctl(seqfd, SNDCTL_TMR_TEMPO, &new_speed) < 0)
// this sometimes happens with mpu-401 timer
- ; // perror("SNDCTL_TMR_TEMPO");
+ ; // perror("SNDCTL_TMR_TEMPO");
else
- curr_speed = new_speed;
+ curr_speed = new_speed;
// xview has reentrancy problems!!
// TrackWin->DrawSpeed(curr_speed);
}
Modified: branches/jazz-4.1.3/src/audiodrv.h
===================================================================
--- branches/jazz-4.1.3/src/audiodrv.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/audiodrv.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef audiodrv_h
#define audiodrv_h
Modified: branches/jazz-4.1.3/src/command.cpp
===================================================================
--- branches/jazz-4.1.3/src/command.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/command.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
@@ -89,7 +89,7 @@
}
}
if (!found)
- ScaleKeys[0] = 1; // avoid loop in Member()
+ ScaleKeys[0] = 1; // avoid loop in Member()
}
else
@@ -114,7 +114,7 @@
for (i = 0; i < 128; i++)
keys[i % 12] += cmd.Keys[i];
- min = (unsigned long)-1; // max ulong
+ min = (unsigned long)-1; // max ulong
scale = 0;
for (s = 0; s < 12; s++)
{
@@ -565,10 +565,10 @@
DestTrack = dt;
DestClock = dc;
- EraseSource = 0; // no
- EraseDestin = 1; // yes
- InsertSpace = 0; // no
- RepeatClock = -1; // -1L
+ EraseSource = 0; // no
+ EraseDestin = 1; // yes
+ InsertSpace = 0; // no
+ RepeatClock = -1; // -1L
Reverse = DestTrack > Filter->FromTrack;
if (Reverse)
@@ -610,23 +610,23 @@
tEvent *e = Iterator.Range(Filter->FromClock, Filter->ToClock);
while (e)
{
- long NewClock = e->Clock + DeltaClock;
- if (NewClock >= StopClock)
- break;
+ long NewClock = e->Clock + DeltaClock;
+ if (NewClock >= StopClock)
+ break;
- if (Filter->IsSelected(e))
- {
- tEvent *cpy = e->Copy();
- cpy->Clock = NewClock;
- tmp.Put(cpy);
- }
+ if (Filter->IsSelected(e))
+ {
+ tEvent *cpy = e->Copy();
+ cpy->Clock = NewClock;
+ tmp.Put(cpy);
+ }
- e = Iterator.Next();
- if (!e)
- {
- e = Iterator.First();
- DeltaClock += Filter->ToClock - Filter->FromClock;
- }
+ e = Iterator.Next();
+ if (!e)
+ {
+ e = Iterator.First();
+ DeltaClock += Filter->ToClock - Filter->FromClock;
+ }
}
}
@@ -639,14 +639,14 @@
long DeltaClock = StopClock - StartClock;
while (e)
{
- if (Filter->IsSelected(e))
- {
- tEvent *c = e->Copy();
- c->Clock += DeltaClock;
- d->Kill(e);
- d->Put(c);
- }
- e = Iterator.Next();
+ if (Filter->IsSelected(e))
+ {
+ tEvent *c = e->Copy();
+ c->Clock += DeltaClock;
+ d->Kill(e);
+ d->Put(c);
+ }
+ e = Iterator.Next();
}
d->Cleanup();
}
@@ -659,9 +659,9 @@
tEvent *e = Iterator.Range(Filter->FromClock, Filter->ToClock);
while (e)
{
- if (Filter->IsSelected(e))
- s->Kill(e);
- e = Iterator.Next();
+ if (Filter->IsSelected(e))
+ s->Kill(e);
+ e = Iterator.Next();
}
s->Cleanup();
}
@@ -674,9 +674,9 @@
tEvent *e = Iterator.Range(StartClock, StopClock);
while (e)
{
- if (Filter->IsSelected(e))
- d->Kill(e);
- e = Iterator.Next();
+ if (Filter->IsSelected(e))
+ d->Kill(e);
+ e = Iterator.Next();
}
d->Cleanup();
}
@@ -826,7 +826,7 @@
sval = array.Random();
if (add)
sval -= array.Size()/2;
- break;
+ break;
default:
break;
@@ -834,27 +834,29 @@
switch (destin)
{
- case veloc: {
+ case veloc:
+ {
if (add)
- sval = k->Veloc + sval;
+ sval = k->Veloc + sval;
if (sval > 127)
sval = 127;
- if (sval < 1)
- sval = 1;
+ if (sval < 1)
+ sval = 1;
tKeyOn *c = (tKeyOn *)k->Copy();
t->Kill(k);
- c->Veloc = sval;
+ c->Veloc = sval;
t->Put(c);
}
break;
- case key: {
+ case key:
+ {
if (add)
- sval = k->Key + sval;
+ sval = k->Key + sval;
if (sval > 127)
sval = 127;
- if (sval < 1)
- sval = 1;
+ if (sval < 1)
+ sval = 1;
tKeyOn *c = (tKeyOn *)k->Copy();
t->Kill(k);
c->Key = sval;
@@ -862,19 +864,21 @@
}
break;
- case length: {
- if (add)
- sval = k->Length + sval;
- if (sval < 1)
- sval = 1;
- tKeyOn *c = (tKeyOn *)k->Copy();
+ case length:
+ {
+ if (add)
+ sval = k->Length + sval;
+ if (sval < 1)
+ sval = 1;
+ tKeyOn *c = (tKeyOn *)k->Copy();
t->Kill(k);
c->Length = sval;
t->Put(c);
}
break;
- case clock: {
+ case clock:
+ {
tKeyOn *c = (tKeyOn *)k->Copy();
c->Clock += sval;
if (c->Clock < 0)
@@ -894,4 +898,3 @@
}
}
}
-
Modified: branches/jazz-4.1.3/src/command.h
===================================================================
--- branches/jazz-4.1.3/src/command.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/command.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef command_h
@@ -51,7 +51,7 @@
int Prev(int Key);
int Transpose(int Key, int Steps);
int FitInto(int Key);
- static int Analyze(tFilter *f); // returns ScaleNr
+ static int Analyze(tFilter *f); // returns ScaleNr
};
@@ -132,8 +132,8 @@
long Quantize(long Clock, int islen);
public:
long QntClocks;
- int NoteStart; // yes
- int NoteLength; // no
+ int NoteStart; // yes
+ int NoteLength; // no
int Delay; // zero
int Groove; // zero
tCmdQuantize(tFilter *f, long QntClocks, int groove, int delay);
@@ -155,7 +155,7 @@
class tCmdSetChannel : public tCommand
{
public:
- int NewChannel; // 0
+ int NewChannel; // 0
tCmdSetChannel(tFilter *f, int NewChannel);
virtual void ExecuteEvent(tTrack *t, tEvent *e);
};
@@ -177,10 +177,10 @@
int DestTrack;
long DestClock;
- int EraseSource; // no
- int EraseDestin; // yes
- int InsertSpace; // no
- long RepeatClock; // -1L
+ int EraseSource; // no
+ int EraseDestin; // yes
+ int InsertSpace; // no
+ long RepeatClock; // -1L
tCmdCopy(tFilter *f, long DestTrack, long DestClock);
virtual void ExecuteTrack(tTrack *t);
Modified: branches/jazz-4.1.3/src/config.h
===================================================================
--- branches/jazz-4.1.3/src/config.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/config.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef config_h
#define config_h
Modified: branches/jazz-4.1.3/src/ctrledit.cpp
===================================================================
--- branches/jazz-4.1.3/src/ctrledit.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/ctrledit.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
@@ -179,8 +179,8 @@
{
int k = Clock2i(e->Clock);
if (sticky)
- while (i < k)
- array[i++] = val;
+ while (i < k)
+ array[i++] = val;
val = GetValue(e);
array[k] = val;
}
@@ -255,12 +255,12 @@
tControl *cpy;
while (e) {
if(IsCtrlEdit(e))
- if (Clock2Val(e->Clock) != e->IsControl()->Value) {
- cpy = e->Copy()->IsControl();
- cpy->Value = Clock2Val(e->Clock);
- track->Kill(e);
- track->Put(cpy);
- }
+ if (Clock2Val(e->Clock) != e->IsControl()->Value) {
+ cpy = e->Copy()->IsControl();
+ cpy->Value = Clock2Val(e->Clock);
+ track->Kill(e);
+ track->Put(cpy);
+ }
e=iter.Next();
}
}
@@ -364,7 +364,7 @@
: tCtrlEditBase(0, 127, parent, label, xoff, x, y, w, h, 1)
{
ctrl_num = CtrlNum;
- if (ctrl_num == 10) // panpot
+ if (ctrl_num == 10) // panpot
array.SetNull(64);
}
@@ -541,8 +541,8 @@
while (e) {
if (!parent->SnapSel->Selected || parent->Filter->IsSelected(e) )
{
- k = e->IsKeyPressure();
- if (k) track->Kill(k);
+ k = e->IsKeyPressure();
+ if (k) track->Kill(k);
}
e = iter.Next();
}
@@ -555,28 +555,28 @@
while (e) {
if (!parent->SnapSel->Selected || parent->Filter->IsSelected(e) )
{
- keyon = e->IsKeyOn();
- if (keyon) {
- key_clk = keyon->Clock+1;
- key_end = keyon->Clock + keyon->Length;
- key_val = keyon->Key;
- key_cha = keyon->Channel;
- }
- if (key_val>0)
- {
- int i,temp=0;
- for (long iclk=key_clk;iclk<key_end && iclk<to_clk;iclk +=8) {
- i = Clock2i(iclk);
- // SN++ Ein neues Event wird nur erzeut wenn sich der Wert aendert
- // und der Wert groesser als 0 ist.
- if (array[i] > 0 && array[i] != temp) {
- after = new tKeyPressure(iclk,key_cha,key_val,array[i]);
- track->Put(after);
- temp = array[i];
- }
- }
- key_val = -1;
- }
+ keyon = e->IsKeyOn();
+ if (keyon) {
+ key_clk = keyon->Clock+1;
+ key_end = keyon->Clock + keyon->Length;
+ key_val = keyon->Key;
+ key_cha = keyon->Channel;
+ }
+ if (key_val>0)
+ {
+ int i,temp=0;
+ for (long iclk=key_clk;iclk<key_end && iclk<to_clk;iclk +=8) {
+ i = Clock2i(iclk);
+ // SN++ Ein neues Event wird nur erzeut wenn sich der Wert aendert
+ // und der Wert groesser als 0 ist.
+ if (array[i] > 0 && array[i] != temp) {
+ after = new tKeyPressure(iclk,key_cha,key_val,array[i]);
+ track->Put(after);
+ temp = array[i];
+ }
+ }
+ key_val = -1;
+ }
}
e = iter.Next();
}
@@ -587,14 +587,18 @@
e = iter.Range(from_clk, to_clk);
tKeyPressure *cpy;
while (e) {
- if (!parent->SnapSel->Selected || parent->Filter->IsSelected(e)) {
+ if (!parent->SnapSel->Selected || parent->Filter->IsSelected(e))
+ {
if(e->IsKeyPressure())
- if (Clock2Val(e->Clock) != e->IsKeyPressure()->Value) {
- cpy = e->Copy()->IsKeyPressure();
- cpy->Value = Clock2Val(e->Clock);
- track->Kill(e);
- track->Put(cpy);
- }
+ {
+ if (Clock2Val(e->Clock) != e->IsKeyPressure()->Value)
+ {
+ cpy = e->Copy()->IsKeyPressure();
+ cpy->Value = Clock2Val(e->Clock);
+ track->Kill(e);
+ track->Put(cpy);
+ }
+ }
}
e = iter.Next();
}
@@ -655,39 +659,40 @@
// SN++ events nur im apply-mode loeschen!
if (!ctrlmode) {
while (e)
- {
- if (IsCtrlEdit(e))
- track->Kill(e);
- e = iter.Next();
- }
+ {
+ if (IsCtrlEdit(e))
+ track->Kill(e);
+ e = iter.Next();
+ }
// find any previous events
- if (sticky) {
+ if (sticky)
+ {
e = iter.Range(0, from_clock-1 );
while (e)
- {
- if (IsCtrlEdit(e))
- {
- old_val = GetValue(e);
- }
- e = iter.Next();
- }
+ {
+ if (IsCtrlEdit(e))
+ {
+ old_val = GetValue(e);
+ }
+ e = iter.Next();
+ }
}
// SN++ set-Mode
// create new events
long clock;
for (clock = from_clock; clock < to_clock; clock += 8)
+ {
+ int new_val = Clock2Val(clock);
+
+ if (old_val != new_val)
{
- int new_val = Clock2Val(clock);
-
- if (old_val != new_val)
- {
- e = NewEvent(clock, new_val);
- track->Put(e);
- old_val = new_val;
- }
+ e = NewEvent(clock, new_val);
+ track->Put(e);
+ old_val = new_val;
}
+ }
} else {
// edit mode: Erzeugt keine neuen Events sondern aendert den Wert
// bestehender Events.
@@ -695,13 +700,13 @@
tChnPressure *cpy;
while (e) {
if(IsCtrlEdit(e))
- if (Clock2Val(e->Clock) != GetValue(e)) {
- cpy = e->Copy()->IsChnPressure();
- cpy->Value = Clock2Val(e->Clock);
- track->Kill(e);
- track->Put(cpy);
- }
- e=iter.Next();
+ if (Clock2Val(e->Clock) != GetValue(e)) {
+ cpy = e->Copy()->IsChnPressure();
+ cpy->Value = Clock2Val(e->Clock);
+ track->Kill(e);
+ track->Put(cpy);
+ }
+ e=iter.Next();
}
}
Modified: branches/jazz-4.1.3/src/ctrledit.h
===================================================================
--- branches/jazz-4.1.3/src/ctrledit.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/ctrledit.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
Modified: branches/jazz-4.1.3/src/dialogs.cpp
===================================================================
--- branches/jazz-4.1.3/src/dialogs.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/dialogs.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
@@ -77,16 +77,16 @@
qnt.Execute();
EventWin->Redraw();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
wxForm::OnOk();
}
void tQuantizeDlg::OnHelp()
{
- if (EventWin->NextWin)
- HelpInstance->ShowTopic("Quantize");
- else
- HelpInstance->ShowTopic("Pianowin Quantize");
+ if (EventWin->NextWin)
+ HelpInstance->ShowTopic("Quantize");
+ else
+ HelpInstance->ShowTopic("Pianowin Quantize");
}
void tQuantizeDlg::EditForm(wxPanel *panel)
@@ -132,13 +132,13 @@
cln.Execute();
EventWin->Redraw();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
wxForm::OnOk();
}
void tCleanupDlg::OnHelp()
{
- HelpInstance->ShowTopic("Cleanup");
+ HelpInstance->ShowTopic("Cleanup");
}
void tCleanupDlg::EditForm(wxPanel *panel)
@@ -205,7 +205,7 @@
int tShiftDlg::Steps = 0;
tShiftDlg::tShiftDlg(tEventWin *w, tFilter *f, long unit)
-: wxForm( USED_WXFORM_BUTTONS )
+ : wxForm( USED_WXFORM_BUTTONS )
{
Filter = f;
Song = f->Song;
@@ -221,13 +221,13 @@
cmd.Execute();
EventWin->Redraw();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
wxForm::OnOk();
}
void tShiftDlg::OnHelp()
{
- HelpInstance->ShowTopic("Shift");
+ HelpInstance->ShowTopic("Shift");
}
@@ -289,15 +289,15 @@
tCmdTranspose trn(Filter, Notes, Scale, FitIntoScale);
trn.Execute();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
else
- EventWin->Redraw();
+ EventWin->Redraw();
wxForm::OnOk();
}
void tTransposeDlg::OnHelp()
{
- HelpInstance->ShowTopic("Transpose");
+ HelpInstance->ShowTopic("Transpose");
}
@@ -438,13 +438,13 @@
cmd.Execute();
EventWin->Redraw();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
wxForm::OnOk();
}
void tLengthDlg::OnHelp()
{
- HelpInstance->ShowTopic("Length");
+ HelpInstance->ShowTopic("Length");
}
@@ -488,13 +488,13 @@
cmd.Execute();
EventWin->Redraw();
if (EventWin->NextWin)
- EventWin->NextWin->Redraw();
+ EventWin->NextWin->Redraw();
wxForm::OnOk();
}
void tDeleteDlg::OnHelp()
{
- HelpInstance->ShowTopic("Delete");
+ HelpInstance->ShowTopic("Delete");
}
void tDeleteDlg::EditForm(wxPanel *panel)
@@ -561,7 +561,7 @@
void tMidiDeviceDlg::OnHelp()
{
- HelpInstance->ShowTopic("MIDI device");
+ HelpInstance->ShowTopic("MIDI device");
}
void tMidiDeviceDlg::EditForm(wxPanel *panel)
@@ -625,13 +625,13 @@
Track->Cleanup();
Win->Redraw();
if (Win->NextWin)
- Win->NextWin->Redraw();
+ Win->NextWin->Redraw();
wxForm::OnOk();
}
void tEventDlg::OnHelp()
{
- HelpInstance->ShowTopic("Piano Window");
+ HelpInstance->ShowTopic("Piano Window");
}
// --------------------------- ChannelEvent ----------------------------
@@ -646,7 +646,7 @@
tChEventDlg(tChannelEvent *e, tEventWin *w, tTrack *t)
: tEventDlg(e, w, t)
{
- Channel = e->Channel + 1; // 1..16
+ Channel = e->Channel + 1; // 1..16
}
void EditForm(wxPanel *panel);
void OnOk();
@@ -932,20 +932,20 @@
for (i = 0, j = 0; j <= jstop; j += k, i++)
{
- sscanf( str + j, "%02x %n", &d[i], &k );
+ sscanf( str + j, "%02x %n", &d[i], &k );
- if (d[i] == 0xf7)
- break;
+ if (d[i] == 0xf7)
+ break;
}
int found = 0;
for (i = 0; i < 256; i++)
{
- if (d[i] == 0xf7)
- {
- found = 1;
- break;
- }
+ if (d[i] == 0xf7)
+ {
+ found = 1;
+ break;
+ }
}
if (found)
@@ -992,9 +992,9 @@
if (uptr)
{
- sprintf( label2, "First data byte is at offset %d, value %02x (%d decimal)", uptr - Event->IsSysEx()->Data + 1, *uptr, *uptr );
- Add(wxMakeFormMessage(label2));
- Add(wxMakeFormNewLine());
+ sprintf( label2, "First data byte is at offset %d, value %02x (%d decimal)", uptr - Event->IsSysEx()->Data + 1, *uptr, *uptr );
+ Add(wxMakeFormMessage(label2));
+ Add(wxMakeFormNewLine());
}
}
else
@@ -1042,12 +1042,12 @@
case StatProgram:
e = new tProgram(Clock, Channel, Pitch);
break;
- case StatSetTempo:
+ case StatSetTempo:
e = new tSetTempo(Clock, 100);
break;
- case StatSysEx:
- e = new tSysEx(Clock, (uchar*) "", 0);
- break;
+ case StatSysEx:
+ e = new tSysEx(Clock, (uchar*) "", 0);
+ break;
}
}
return e;
@@ -1069,10 +1069,11 @@
{
case StatKeyOn:
#ifdef AUDIO
- if (t->GetAudioMode()) {
+ if (t->GetAudioMode())
+ {
if (!Midi->IsPlaying())
- Midi->EditSample(e->IsKeyOn()->Key);
- break;
+ Midi->EditSample(e->IsKeyOn()->Key);
+ break;
}
#endif
str = "Key On";
Modified: branches/jazz-4.1.3/src/dialogs.h
===================================================================
--- branches/jazz-4.1.3/src/dialogs.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/dialogs.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef dialogs_h
@@ -37,11 +37,11 @@
{
public:
- static Bool NoteStart; // 1
- static Bool NoteLength; // 0
- static long QntStep; // 1/16
- static int Groove; // -x .. +x
- static int Delay; // -x .. +x
+ static Bool NoteStart; // 1
+ static Bool NoteLength; // 0
+ static long QntStep; // 1/16
+ static int Groove; // -x .. +x
+ static int Delay; // -x .. +x
tFilter *Filter;
tSong *Song;
@@ -60,7 +60,7 @@
{
public:
- static long lowLimit; // 1/32
+ static long lowLimit; // 1/32
static Bool shortenOverlaps;
tFilter *Filter;
@@ -96,7 +96,7 @@
class tShiftDlg : public wxForm
{
public:
- static int Steps; // 0
+ static int Steps; // 0
long Unit;
tFilter *Filter;
@@ -116,7 +116,7 @@
{
public:
- static int Notes; // 0
+ static int Notes; // 0
static Bool FitIntoScale;
static long Scale;
@@ -138,7 +138,7 @@
{
public:
- static int NewChannel; // 0
+ static int NewChannel; // 0
tFilter *Filter;
tSong *Song;
@@ -199,7 +199,7 @@
tEventWin *EventWin;
public:
- static Bool LeaveSpace; // 1
+ static Bool LeaveSpace; // 1
tDeleteDlg(tEventWin *w, tFilter *f);
void EditForm(wxPanel *panel);
Modified: branches/jazz-4.1.3/src/dynarray.cpp
===================================================================
--- branches/jazz-4.1.3/src/dynarray.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/dynarray.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "dynarray.h"
#include <assert.h>
@@ -27,7 +27,7 @@
tUniqIds::tUniqIds()
: array(0)
{
- array[0] = 1; // 0 is an invalid id
+ array[0] = 1; // 0 is an invalid id
}
int tUniqIds::Get()
Modified: branches/jazz-4.1.3/src/dynarray.h
===================================================================
--- branches/jazz-4.1.3/src/dynarray.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/dynarray.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef dynarray_h
#define dynarray_h
@@ -161,7 +161,7 @@
tUniqIds();
int Get();
void Get(int id);
- int Put(int id); // returns no of pending references to id
+ int Put(int id); // returns no of pending references to id
};
Modified: branches/jazz-4.1.3/src/eventlst.cpp
===================================================================
--- branches/jazz-4.1.3/src/eventlst.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/eventlst.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "eventlst.h"
#include "trackwin.h"
@@ -521,17 +521,17 @@
#include "../bitmaps/help.xpm"
static tToolDef tdefs[] = {
- { MEN_ACCEPT, FALSE, 0, tb_accept },
- { MEN_CANCEL, FALSE, 1, tb_cancel },
- { MEN_HELP, FALSE, 0, tb_help }
+ { MEN_ACCEPT, FALSE, 0, tb_accept },
+ { MEN_CANCEL, FALSE, 1, tb_cancel },
+ { MEN_HELP, FALSE, 0, tb_help }
};
#else
static tToolDef tdefs[] = {
- { MEN_ACCEPT, FALSE, 0, "tb_accept", "accept changes" },
- { MEN_CANCEL, FALSE, 1, "tb_cancel", "discard changes" },
- { MEN_HELP, FALSE, 0, "tb_help", "help" }
+ { MEN_ACCEPT, FALSE, 0, "tb_accept", "accept changes" },
+ { MEN_CANCEL, FALSE, 1, "tb_cancel", "discard changes" },
+ { MEN_HELP, FALSE, 0, "tb_help", "help" }
};
#endif
Modified: branches/jazz-4.1.3/src/eventlst.h
===================================================================
--- branches/jazz-4.1.3/src/eventlst.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/eventlst.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef eventlst_h
#define eventlst_h
Modified: branches/jazz-4.1.3/src/events.cpp
===================================================================
--- branches/jazz-4.1.3/src/events.cpp 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/events.cpp 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#include "wx.h"
#pragma hdrstop
Modified: branches/jazz-4.1.3/src/events.h
===================================================================
--- branches/jazz-4.1.3/src/events.h 2009-01-19 17:58:10 UTC (rev 686)
+++ branches/jazz-4.1.3/src/events.h 2009-01-19 21:43:48 UTC (rev 687)
@@ -17,7 +17,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
-*/
+*/
#ifndef events_h
@@ -84,7 +84,7 @@
FILE *fd;
public:
- int TicksPerQuarter; // nach Open bekannt
+ int TicksPerQuarter;
int nTracks;
virtual int Open(char *fname);
@@ -171,44 +171,44 @@
* normale Events (mit Kanal)
*/
-#define StatKeyOff 0x80
-#define StatKeyOn 0x90
-#define StatKeyPressure 0xA0 // Key pressure
-#define StatControl 0xB0
-#define StatProgram 0xC0
-#define StatChnPressure 0xD0 // SN++ Channel pressure
-#define StatPitch 0xE0
+#define StatKeyOff 0x80
+#define StatKeyOn 0x90
+#define StatKeyPressure 0xA0 // Key pressure
+#define StatControl 0xB0
+#define StatProgram 0xC0
+#define StatChnPressure 0xD0 // SN++ Channel pressure
+#define StatPitch 0xE0
/*
* Meta-Events (no channel)
*/
-#define StatSysEx 0xF0
-#define StatSongPtr 0xF2
-#define StatSongSelect 0xF3
-#define StatTuneRequest 0xF6
+#define StatSysEx 0xF0
+#define StatSongPtr 0xF2
+#define StatSongSelect 0xF3
+#define StatTuneRequest 0xF6
#define StatMidiClock 0xf8
#define StatStartPlay 0xfa
#define StatContPlay 0xfb
#define StatStopPlay 0xfc
-#define StatText 0x01
-#define StatCopyright 0x02
-#define StatTrackName 0x03
-#define StatMarker 0x06
-#define StatEndOfTrack 0x2F
-#define StatSetTempo 0x51
-#define StatMtcOffset 0x54
-#define StatTimeSignat 0x58
-#define StatKeySignat 0x59
+#define StatText 0x01
+#define StatCopyright 0x02
+#define StatTrackName 0x03
+#define StatMarker 0x06
+#define StatEndOfTrack 0x2F
+#define StatSetTempo 0x51
+#define StatMtcOffset 0x54
+#define StatTimeSignat 0x58
+#define StatKeySignat 0x59
-#define StatUnknown 0x00
+#define StatUnknown 0x00
// proprietary event status
#define StatJazzMeta 0x7F
-#define LastClock (0x7fffffffL)
-#define KilledClock (0x80000000L)
+#define LastClock (0x7fffffffL)
+#define KilledClock (0x80000000L)
@@ -292,31 +292,31 @@
void UnKill() { edb(); Clock &= ~KilledClock; }
int IsKilled() { edb(); return (Clock & KilledClock) != 0; }
- virtual tMetaEvent *IsMetaEvent() { edb(); return 0; }
+ virtual tMetaEvent *IsMetaEvent() { edb(); return 0; }
virtual tChannelEvent *IsChannelEvent() { edb(); return 0; }
- virtual tKeyOn *IsKeyOn() { edb(); return 0; }
- virtual tKeyOff *IsKeyOff() { edb(); return 0; }
- virtual tPitch *IsPitch() { edb(); return 0; }
- virtual tControl *IsControl() { edb(); return 0; }
- virtual tProgram *IsProgram() { edb(); return 0; }
- virtual tSysEx *IsSysEx() { edb(); return 0; }
- virtual tSongPtr *IsSongPtr() { edb(); return 0; }
- virtual tMidiClock *IsMidiClock() { edb(); return 0; }
- virtual tStartPlay *IsStartPlay() { edb(); return 0; }
- virtual tContPlay *IsContPlay() { edb(); return 0; }
- virtual tStopPlay *IsStopPlay() { edb(); return 0; }
- virtual tText *IsText() { edb(); return 0; }
- virtual tCopyright *IsCopyright() { edb(); return 0; }
- virtual tTrackName *IsTrackName() { edb(); return 0; }
- virtual tMarker *IsMarker() { edb(); return 0; }
- virtual tSetTempo *IsSetTempo() { edb(); return 0; }
- virtual tMtcOffset *IsMtcOffset() { edb(); return 0; }
- virtual tTimeSignat *IsTimeSignat() { edb(); return 0; }
- virtual tKeySignat *IsKeySignat() { edb(); return 0; }
+ virtual tKeyOn *IsKeyOn() { edb(); return 0; }
+ virtual tKeyOff *IsKeyOff() { edb(); return 0; }
+ virtual tPitch *IsPitch() { edb(); return 0; }
+ virtual tControl *IsControl() { edb(); return 0; }
+ virtual tProgram *IsProgram() { edb(); return 0; }
+ virtual tSysEx *IsSysEx() { edb(); return 0; }
+ virtual tSongPtr *IsSongPtr() { edb(); return 0; }
+ virtual tMidiClock *IsMidiClock() { edb(); return 0; }
+ virtual tStartPlay *IsStartPlay() { edb(); return 0; }
+ virtual tContPlay *IsContPlay() { edb(); return 0; }
+ virtual tStopPlay *IsStopPlay() { edb(); return 0; }
+ virtual tText *IsText() { edb(); return 0; }
+ virtual tCopyright *IsCopyright() { edb(); return 0; }
+ virtual tTrackName *IsTrackName() { edb(); return 0; }
+ virtual tMarker *IsMarker() { edb(); return 0; }
+ virtual tSetTempo *IsSetTempo() { edb(); return 0; }
+ virtual tMtcOffset *IsMtcOffset() { edb(); return 0; }
+ virtual tTimeSignat *IsTimeSignat() { edb(); return 0; }
+ virtual tKeySignat *IsKeySignat() { edb(); return 0; }
virtual tKeyPressure *IsKeyPressure() { edb(); return 0; }
- virtual tJazzMeta *IsJazzMeta() { edb(); return 0; }
- virtual tChnPressure *IsChnPressure() { edb(); return 0; }
+ virtual tJazzMeta *IsJazzMeta() { edb(); return 0; }
+ virtual tChnPressure *IsChnPressure() { edb(); return 0; }
virtual int Write(tWriteBase &io) { edb(); return io.Write(this); }
@@ -324,9 +324,9 @@
{
edb();
if ((unsigned long)e.Clock > (unsigned long)Clock)
- ...
[truncated message content] |