--- seq24-0.8.7.orig/seq24-0.8.7.tar.gz.cdbs-config_list +++ seq24-0.8.7/seq24-0.8.7.tar.gz.cdbs-config_list @@ -0,0 +1 @@ +seq24-0.8.7/src/config.h.in --- seq24-0.8.7.orig/debian/seq24.1 +++ seq24-0.8.7/debian/seq24.1 @@ -0,0 +1,75 @@ +.TH Seq24 1 "February 9 2006" "Version 0.7.0" "Seq24 Manual Page" + +.SH NAME +Seq24 - Real time MIDI sequencer + + +.SH SYNOPSIS +.B seq24 +[\fIOPTIONS\fP] + + +.SH DESCRIPTION +.PP +\fISeq24\fP is a real-time midi sequencer. It was created to +provide a very simple interface for editing and playing +midi 'loops'. + + +.SH OPTIONS +.l +Seq24 accepts the following options: +.TP 8 +.B \-\-help +Display a list of all commandline options +.TP 8 +.B \-\-file \fI\fP +Load MIDI file on startup +.TP 8 +.B \-\-showmidi +Dumps incoming midi to screen +.TP 8 +.B \-\-priority +Runs higher priority with FIFO scheduler +.TP 8 +.B \-\-pass_sysex +Passes any incoming sysex messages to all outputs +.TP 8 +.B \-\-show_keys +Prints pressed key value +.TP 8 +.B \-\-jack_transport +seq24 will sync to JACK transport +.TP 8 +.B \-\-jack_master +seq24 will try to be JACK master +.TP 8 +.B \-\-jack_master_cond +JACK master will fail if there is already a master +.TP 8 +.B \-\-jack_start_mode \fI\fP +When seq24 is synced to JACK, the following play modes are available: + (0 = live mode) + (1 = song mode) (default) + + +.SH FILES +\fB$HOME\fP/.seq24rc stores the user settings for seq24. + + +.SH SUGGESTIONS AND BUG REPORTS +Any bugs found should be reported to the upstream author and/or package +maintainer. + + +.SH OTHER INFO +The project homepage is at http://www.filter24.org/seq24/. + +It is released under the GNU GPL license. + + +.SH AUTHOR +Seq24 was written by Rob C. Buse . + +This manual page was written by Dana Olson , +for the Ubuntu project (but may be used by others). --- seq24-0.8.7.orig/debian/copyright +++ seq24-0.8.7/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by Guenter Geiger (Debian/GNU) on +Wed, 9 Jul 2003 17:51:02 +0200. + +It was downloaded from + +Upstream Author: Rob C. Buse + +Copyright: + +This software is under the GPL version 2 (see /usr/share/common-licenses/GPL-2) + --- seq24-0.8.7.orig/debian/seq24.manpages +++ seq24-0.8.7/debian/seq24.manpages @@ -0,0 +1 @@ +debian/seq24.1 --- seq24-0.8.7.orig/debian/rules +++ seq24-0.8.7/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- + +DEB_TAR_SRCDIR := seq24-0.8.7 +DEB_INSTALL_DOCS_seq24 = build-tree/$(DEB_TAR_SRCDIR)/SEQ24 \ + build-tree/$(DEB_TAR_SRCDIR)/RTC + +DEB_AUTO_UPDATE_AUTOMAKE := 1.9 +DEB_AUTO_UPDATE_ACLOCAL := 1.9 +DEB_AUTO_UPDATE_AUTOCONF := 2.50 + +include /usr/share/cdbs/1/rules/tarball.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk + --- seq24-0.8.7.orig/debian/menu +++ seq24-0.8.7/debian/menu @@ -0,0 +1,8 @@ +?package(seq24):\ +needs="X11"\ +section="Apps/Sound"\ +title="Seq24"\ +command="/usr/bin/seq24"\ +hints="MIDI,Music Editor"\ +description="Seq24 is a simple MIDI sequencer."\ +icon="/usr/share/pixmaps/seq24.xpm" --- seq24-0.8.7.orig/debian/watch +++ seq24-0.8.7/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.filter24.org/seq24/download.html seq24-(.*)\.tar\.gz --- seq24-0.8.7.orig/debian/seq24.xpm +++ seq24-0.8.7/debian/seq24.xpm @@ -0,0 +1,105 @@ +/* XPM */ +static char * seq24_xpm[] = { +"32 32 70 1", +" c None", +". c #FFFFFF", +"+ c #DDDDDD", +"@ c #C5C5C5", +"# c #9F9F9F", +"$ c #B6B6B6", +"% c #EEEEEE", +"& c #EDEDED", +"* c #B7B7B7", +"= c #C4C4C4", +"- c #E0E0E0", +"; c #FBFBFB", +"> c #A9A9A9", +", c #D2D2D2", +"' c #666666", +") c #282828", +"! c #4C4C4C", +"~ c #777777", +"{ c #D3D3D3", +"] c #080808", +"^ c #DEDEDE", +"/ c #414141", +"( c #333333", +"_ c #292929", +": c #636363", +"< c #C6C6C6", +"[ c #494949", +"} c #000000", +"| c #F5F5F5", +"1 c #1C1C1C", +"2 c #D1D1D1", +"3 c #646464", +"4 c #898989", +"5 c #696969", +"6 c #C8C8C8", +"7 c #D5D5D5", +"8 c #141414", +"9 c #ACACAC", +"0 c #8A8A8A", +"a c #C1C1C1", +"b c #A4A4A4", +"c c #4F4F4F", +"d c #7B7B7B", +"e c #222222", +"f c #181818", +"g c #3E3E3E", +"h c #030303", +"i c #D6D6D6", +"j c #EAEAEA", +"k c #EFEFEF", +"l c #AEAEAE", +"m c #090909", +"n c #F7F7F7", +"o c #3A3A3A", +"p c #0E0E0E", +"q c #F1F1F1", +"r c #A6A6A6", +"s c #FCFCFC", +"t c #A2A2A2", +"u c #606060", +"v c #808080", +"w c #828282", +"x c #3C3C3C", +"y c #FEFEFE", +"z c #D0D0D0", +"A c #F8F8F8", +"B c #FAFAFA", +"C c #848484", +"D c #FDFDFD", +"E c #F2F2F2", +"................................", +"................................", +"................................", +"................................", +"................................", +"................................", +"++++++++++++++++++++++++++++++++", +"@####$%#####&*####=-#####;>%..=,", +"')!!!~{]!!!!^/(!!_: Wed, 03 Sep 2008 00:31:12 +0200 + +seq24 (0.8.7-2) unstable; urgency=low + + * Added 03_backspace patch from Jaakko Sipari to allow the Backspace + key to be used to remove notes, as well as the delete key + * Added myself to Uploaders + * Added missing .desktop file (Closes: #370015) + + -- Free Ekanayaka Mon, 01 Sep 2008 14:33:32 +0100 + +seq24 (0.8.7-1.1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes (LP: #236660): + - debian/control: Corrected typo in binary package Depends field. + - debian/seq24.desktop: Added basic desktop file + - debian/seq24.1: Added basic manpage + - debian/seq24.manpages: Added manpage listing for install scripts + - Added XSBC-Original-Maintainer + - debian/control: Add liblash-dev as a build-dependency per request + in #ubuntustudio/Freenode. + + -- Nathan Handler Sun, 01 Jun 2008 21:25:45 -0500 + +seq24 (0.8.7-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add 02_gcc_4.3.patch to fix GCC 4.3 FTBFS (Closes: #474843) + * debian/control: + - Bump Standards-Version to 3.7.3. + - Use Homepage: field for upstream URL. + + -- Chris Lamb Sat, 12 Apr 2008 01:03:36 +0100 + +seq24 (0.8.7-1ubuntu2) hardy; urgency=low + + * debian/control: Add liblash-dev as a build-dependency per request + in #ubuntustudio/Freenode. + + -- Daniel T Chen Sun, 06 Jan 2008 16:34:56 -0500 + +seq24 (0.8.7-1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable. Remaining changes: + - debian/control: Corrected typo in binary package Depends field. + - debian/seq24.desktop: Added basic desktop file + - debian/seq24.1: Added basic manpage + - debian/seq24.manpages: Added manpage listing for install scripts + * Added XSBC-Original-Maintainer + + -- Emmet Hikory Sat, 28 Apr 2007 18:12:42 +0900 + +seq24 (0.8.7-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Tue, 23 Jan 2007 09:36:32 +0100 + +seq24 (0.8.6-2ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/control: Corrected typo in binary package Depends field. + - debian/seq24.desktop: Added basic desktop file + - debian/seq24.1: Added basic manpage + - debian/seq24.manpages: Added manpage listing for install scripts + + -- Luke Yelavich Fri, 5 Jan 2007 21:29:56 +1100 + +seq24 (0.8.6-2) unstable; urgency=high + + * Applied patch to fix problem with Makefile generation (thanks + vorlon) + * Call autoconf *explicitly* when building, to ensure that our + configure script is built from macros that are reliably consistent + with the Makefile.in's generated by automake. Closes: #397902. + * Add autoconf to the build-depends for the above. + * high urgency, RC bugfix. + + -- Guenter Geiger (Debian/GNU) Fri, 17 Nov 2006 11:46:32 +0100 + +seq24 (0.8.6-1ubuntu3) edgy; urgency=low + + * Rebuilt due to libcairomm soname change. + + -- Daniel Holbach Thu, 21 Sep 2006 10:46:28 +0200 + +seq24 (0.8.6-1ubuntu2) edgy; urgency=low + + * debian/control: Corrected typo in binary package Depends field. + + -- Luke Yelavich Sat, 12 Aug 2006 09:28:50 +1000 + +seq24 (0.8.6-1ubuntu1) edgy; urgency=low + + * Merge from debian unstable. + + -- Luke Yelavich Sun, 6 Aug 2006 01:15:44 +1000 + +seq24 (0.8.6-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Tue, 16 May 2006 10:59:54 +0200 + +seq24 (0.8.3-1ubuntu1) dapper; urgency=low + + * debian/seq24.desktop: Added basic desktop file + * debian/seq24.1: Added basic manpage + * debian/seq24.manpages: Added manpage listing for install scripts + + -- Dana Olson Thu, 9 Mar 2006 03:23:33 -0500 + +seq24 (0.8.3-1) unstable; urgency=low + + * New upstream version + * updating automake automatically + * changed name of dump program to seq24_dump + * Moved to libgtkmm-2.4 + + -- Guenter Geiger (Debian/GNU) Wed, 8 Mar 2006 15:29:11 +0100 + +seq24 (0.7.0-2) unstable; urgency=low + + * Added optional libjack-dev build dep for backporting + + -- Guenter Geiger (Debian/GNU) Wed, 2 Nov 2005 17:54:03 +0100 + +seq24 (0.7.0-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Wed, 14 Sep 2005 15:04:36 +0200 + +seq24 (0.6.3-3) unstable; urgency=low + + * C++ transition + * Already recompiled against new JACK (closes: #317218) + + -- Guenter Geiger (Debian/GNU) Wed, 17 Aug 2005 16:29:59 +0200 + +seq24 (0.6.3-2) unstable; urgency=low + + * Recompile against new JACK + + -- Guenter Geiger (Debian/GNU) Tue, 26 Jul 2005 11:32:27 +0200 + +seq24 (0.6.3-1) unstable; urgency=low + + * New upstream version + * Added libjack-dev build dependenncy + + -- Guenter Geiger (Debian/GNU) Tue, 19 Apr 2005 10:36:17 +0200 + +seq24 (0.6.2-1) unstable; urgency=low + + * New upstream version + * added menufile (closes: #299392) + + -- Guenter Geiger (Debian/GNU) Wed, 16 Mar 2005 17:16:09 +0100 + +seq24 (0.5.3-2) unstable; urgency=low + + * Included thread join fix /provided by Joshua Kwan, thanks) (closes: + 283445) + + -- Guenter Geiger (Debian/GNU) Tue, 7 Dec 2004 11:18:17 +0100 + +seq24 (0.5.3-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Fri, 8 Oct 2004 18:42:34 +0200 + +seq24 (0.5.2-1) unstable; urgency=low + + * New upstream version + * Added homepage to description + * added watch file + + -- Guenter Geiger (Debian/GNU) Mon, 30 Aug 2004 17:49:16 +0200 + +seq24 (0.5.1-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Mon, 12 Jul 2004 16:30:18 +0200 + +seq24 (0.5.0-1) unstable; urgency=low + + * New upstream version + + -- Guenter Geiger (Debian/GNU) Sat, 8 May 2004 15:36:58 +0200 + +seq24 (0.4.4-1) unstable; urgency=low + + * New upstream release + * source as tarball + + -- Guenter Geiger (Debian/GNU) Fri, 23 Jan 2004 18:48:52 +0100 + +seq24 (0.4.3-1) unstable; urgency=low + + * Initial Release (closes: #223807). + + -- Guenter Geiger (Debian/GNU) Wed, 9 Jul 2003 17:51:02 +0200 + --- seq24-0.8.7.orig/debian/dirs +++ seq24-0.8.7/debian/dirs @@ -0,0 +1 @@ +usr/bin --- seq24-0.8.7.orig/debian/control +++ seq24-0.8.7/debian/control @@ -0,0 +1,18 @@ +Source: seq24 +Section: sound +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Guenter Geiger (Debian/GNU) +Uploaders: Free Ekanayaka +Build-Depends: debhelper (>> 4.0.0), automake1.9, autoconf, autotools-dev, cdbs, libgtkmm-2.4-dev, libasound2-dev, libjack0.100.0-dev | libjack-dev, liblash-dev +Standards-Version: 3.7.3 +Homepage: http://www.filter24.org/seq24/ + +Package: seq24 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Real time MIDI sequencer + Seq24 was created to provide a very simple interface for editing and + playing midi 'loops'. It is a very minimal sequencer that excludes the + bloated features of the large software sequencers and includes a small + subset that proved to be useful for live performances. --- seq24-0.8.7.orig/debian/install +++ seq24-0.8.7/debian/install @@ -0,0 +1,2 @@ +debian/seq24.xpm usr/share/pixmaps +debian/seq24.desktop usr/share/applications --- seq24-0.8.7.orig/debian/seq24.desktop +++ seq24-0.8.7/debian/seq24.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Seq24 +GenericName= +Comment=MIDI Sequencer +Icon=seq24 +Type=Application +Categories=AudioVideo;Audio; +Exec=seq24 +Terminal=false --- seq24-0.8.7.orig/debian/compat +++ seq24-0.8.7/debian/compat @@ -0,0 +1 @@ +4 --- seq24-0.8.7.orig/debian/patches/01_rename_dump.patch +++ seq24-0.8.7/debian/patches/01_rename_dump.patch @@ -0,0 +1,15 @@ +diff -ruN seq24-0.8.3-old/src/Makefile.am seq24-0.8.3/src/Makefile.am +--- seq24-0.8.3-old/src/Makefile.am 2006-02-03 05:57:28.000000000 +0100 ++++ seq24-0.8.3/src/Makefile.am 2006-03-08 15:10:25.000000000 +0100 +@@ -5,9 +5,9 @@ + CXXFLAGS = @CXXFLAGS@ $(DEPS_CFLAGS) $(GTKMM_CFLAGS) $(JACK_CFLAGS) -Wall + LDADD = $(DEPS_LIBS) $(GTKMM_LIBS) $(ALSA_LIBS) $(JACK_LIBS) + +-bin_PROGRAMS = seq24 dump ++bin_PROGRAMS = seq24 seq24_dump + +-dump_SOURCES = dump.cpp ++seq24_dump_SOURCES = dump.cpp + + seq24_SOURCES = \ + event.cpp mainwid.h midibus.h seqdata.cpp seqevent.cpp seqroll.cpp sequence.cpp \ --- seq24-0.8.7.orig/debian/patches/03_backspace.patch +++ seq24-0.8.7/debian/patches/03_backspace.patch @@ -0,0 +1,1249 @@ +diff -x .bzr -Nuar seq24-0.8.7/src/globals.h seq24-0.8.7+bzr6/src/globals.h +--- seq24-0.8.7/src/globals.h 2006-05-30 14:42:18.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/globals.h 2008-08-26 12:07:39.000000000 +0100 +@@ -169,6 +169,8 @@ + extern bool global_manual_alsa_ports; + + extern std::string global_filename; ++extern std::string last_used_dir; ++extern bool is_pattern_playing; + + extern bool global_print_keys; + +diff -x .bzr -Nuar seq24-0.8.7/src/mainwnd.cpp seq24-0.8.7+bzr6/src/mainwnd.cpp +--- seq24-0.8.7/src/mainwnd.cpp 2006-08-13 21:44:32.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/mainwnd.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -26,7 +26,9 @@ + #include "stop.xpm" + #include "perfedit.xpm" + #include "seq24.xpm" +- ++ ++bool is_pattern_playing = false; ++ + mainwnd::mainwnd(perform *a_p) + { + +@@ -279,6 +281,7 @@ + { + + FileSelection dialog( "Save As..." ); ++ dialog.set_filename(last_used_dir.c_str()); + int result = dialog.run(); + + //Handle the response: +@@ -303,6 +306,8 @@ + } + + global_filename = std::string( dialog.get_filename()); ++ last_used_dir.assign(dialog.get_filename()); ++ last_used_dir = last_used_dir.substr(0,last_used_dir.rfind("/")+1).c_str() ; + set_window_title_filename( global_filename ); + + break; +@@ -324,6 +329,7 @@ + mainwnd::file_open_dialog( void ) + { + FileSelection dialog( "Open..." ); ++ dialog.set_filename(last_used_dir.c_str()); + int result = dialog.run(); + + //Handle the response: +@@ -349,6 +355,8 @@ + } + + global_filename = std::string(dialog.get_filename()); ++ last_used_dir.assign(dialog.get_filename()); ++ last_used_dir = last_used_dir.substr(0,last_used_dir.rfind("/")+1).c_str() ; + set_window_title_filename( global_filename ); + + m_main_wid->reset(); +@@ -623,12 +631,13 @@ + + if ( a_ev->keyval == m_mainperf->m_key_start ) + { +- start_playing(); +- } +- +- if ( a_ev->keyval == m_mainperf->m_key_stop ) +- { +- stop_playing(); ++ if (is_pattern_playing) { ++ stop_playing(); ++ is_pattern_playing=false; ++ } else { ++ start_playing(); ++ is_pattern_playing=true; ++ } + } + + +diff -x .bzr -Nuar seq24-0.8.7/src/midifile.cpp seq24-0.8.7+bzr6/src/midifile.cpp +--- seq24-0.8.7/src/midifile.cpp 2006-05-18 02:31:23.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/midifile.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -570,7 +570,7 @@ + } + + +- if ((file_size - m_pos) > (int) sizeof (unsigned long)) ++ if ((file_size - m_pos) > (int) sizeof (unsigned int)) + { + + /* Get ID + Length */ +diff -x .bzr -Nuar seq24-0.8.7/src/optionsfile.cpp seq24-0.8.7+bzr6/src/optionsfile.cpp +--- seq24-0.8.7/src/optionsfile.cpp 2006-05-30 04:48:53.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/optionsfile.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -20,7 +20,7 @@ + + #include "optionsfile.h" + #include +- ++std::string last_used_dir; + optionsfile::optionsfile( string a_name ) : + configfile( a_name ) + { +@@ -177,6 +177,11 @@ + sscanf( m_line, "%ld", &flag ); + global_manual_alsa_ports = (bool) flag; + ++ /* last used dir */ ++ char *dir = " "; ++ line_after( &file, "[last-used-dir]" ); ++ last_used_dir.assign(m_line); ++ + file.close(); + + return true; +@@ -343,6 +348,10 @@ + << global_jack_start_mode << "\n\n"; + + ++ file << "\n\n\n[last-used-dir]\n\n" ++ << "# Last used directory.\n" ++ << last_used_dir << "\n\n"; ++ + file.close(); + return true; + +diff -x .bzr -Nuar seq24-0.8.7/src/perfroll.cpp seq24-0.8.7+bzr6/src/perfroll.cpp +--- seq24-0.8.7/src/perfroll.cpp 2006-05-30 02:36:07.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/perfroll.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -869,7 +869,7 @@ + + if ( a_p0->type == GDK_KEY_PRESS ){ + +- if ( a_p0->keyval == GDK_Delete ){ ++ if ( a_p0->keyval == GDK_Delete || a_p0->keyval == GDK_BackSpace ){ + + m_mainperf->push_trigger_undo(); + m_mainperf->get_sequence( m_drop_sequence )->del_selected_trigger(); +diff -x .bzr -Nuar seq24-0.8.7/src/q_rec.xpm seq24-0.8.7+bzr6/src/q_rec.xpm +--- seq24-0.8.7/src/q_rec.xpm 1970-01-01 01:00:00.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/q_rec.xpm 2008-08-26 12:07:39.000000000 +0100 +@@ -0,0 +1,24 @@ ++/* XPM */ ++static char * q_rec_xpm[] = { ++"36 14 7 1", ++" c None", ++". c #000000", ++"+ c #FFFFFF", ++"@ c #9E9E9E", ++"# c #FFBABA", ++"$ c #FF5454", ++"% c #B51E1E", ++" ...... ", ++" ...+..+... ", ++" ..+++@@+++.. . .... ", ++" .++++++++++. .. .. .. ", ++"..++++++++++.. .#. .. .. ", ++".++++++++++++. ......#$. .. .. ", ++".+..++++++..+. .#####$$$. .. .. ", ++".+@.++++++.@+. .$$$$$$$%. .. .. ", ++".++++++++++++. ......$%. .. .. ", ++"..+..++++..+.. .%. .. . .. ", ++" .+@.+..+.@+. .. .. ... ", ++" ..+++..+++.. . ..... ", ++" ...++++... . ", ++" ...... "}; +diff -x .bzr -Nuar seq24-0.8.7/src/quanize.xpm seq24-0.8.7+bzr6/src/quanize.xpm +--- seq24-0.8.7/src/quanize.xpm 1970-01-01 01:00:00.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/quanize.xpm 2008-08-26 12:07:39.000000000 +0100 +@@ -0,0 +1,19 @@ ++/* XPM */ ++static char * quanize_xpm[] = { ++"16 14 2 1", ++" c None", ++". c #000000", ++" ", ++" ", ++" .... ", ++" .. .. ", ++" .. .. ", ++" .. .. ", ++" .. .. ", ++" .. .. ", ++" .. .. ", ++" .. . .. ", ++" .. ... ", ++" ..... ", ++" . ", ++" "}; +diff -x .bzr -Nuar seq24-0.8.7/src/redo.xpm seq24-0.8.7+bzr6/src/redo.xpm +--- seq24-0.8.7/src/redo.xpm 1970-01-01 01:00:00.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/redo.xpm 2008-08-26 12:07:39.000000000 +0100 +@@ -0,0 +1,20 @@ ++/* XPM */ ++static char * redo_xpm[] = { ++"16 14 3 1", ++" c None", ++". c #000000", ++"+ c #65FF72", ++" . ", ++" .. ", ++" .+. ", ++" ........++. ", ++" .++++++++++. ", ++" .+......++. ", ++" .+. .+. ", ++" .+. .. ", ++" .+. . ", ++" .+. ", ++" .+. ", ++" .+........ ", ++" .++++++++. ", ++" .......... "}; +diff -x .bzr -Nuar seq24-0.8.7/src/seqedit.cpp seq24-0.8.7+bzr6/src/seqedit.cpp +--- seq24-0.8.7/src/seqedit.cpp 2006-05-30 15:04:52.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/seqedit.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -27,6 +27,7 @@ + + + #include "play.xpm" ++#include "q_rec.xpm" + #include "rec.xpm" + #include "thru.xpm" + #include "bus.xpm" +@@ -39,6 +40,8 @@ + #include "down.xpm" + #include "note_length.xpm" + #include "undo.xpm" ++#include "redo.xpm" ++#include "quanize.xpm" + #include "menu_empty.xpm" + #include "menu_full.xpm" + #include "sequences.xpm" +@@ -149,6 +152,7 @@ + m_menu_length = manage( new Menu()); + m_menu_bpm = manage( new Menu() ); + m_menu_bw = manage( new Menu() ); ++ m_menu_rec_vol = manage( new Menu() ); + + m_menu_midich = NULL; + m_menu_midibus = NULL; +@@ -226,6 +230,16 @@ + m_toggle_record->signal_clicked().connect( mem_fun( *this, &seqedit::record_change_callback)); + m_tooltips->set_tip( *m_toggle_record, "Records incoming midi data." ); + ++ m_toggle_q_rec = manage( new ToggleButton( )); ++ m_toggle_q_rec->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( q_rec_xpm )))); ++ m_toggle_q_rec->signal_clicked().connect( mem_fun( *this, &seqedit::q_rec_change_callback)); ++ m_tooltips->set_tip( *m_toggle_q_rec, "Quantized Record." ); ++ ++ m_button_rec_vol = manage( new Button()); ++ m_button_rec_vol->add( *manage( new Label("Vol"))); ++ m_button_rec_vol->signal_clicked().connect( SigC::bind( mem_fun( *this, &seqedit::popup_menu), m_menu_rec_vol )); ++ m_tooltips->set_tip( *m_button_rec_vol, "Rec. Volume" ); ++ + m_toggle_thru = manage( new ToggleButton( )); + m_toggle_thru->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( thru_xpm )))); + m_toggle_thru->signal_clicked().connect( mem_fun( *this, &seqedit::thru_change_callback)); +@@ -235,6 +249,8 @@ + m_toggle_record->set_active( m_seq->get_recording()); + m_toggle_thru->set_active( m_seq->get_thru()); + ++ dhbox->pack_end( *m_button_rec_vol, false, false, 4); ++ dhbox->pack_end( *m_toggle_q_rec, false, false, 4); + dhbox->pack_end( *m_toggle_record, false, false, 4); + dhbox->pack_end( *m_toggle_thru, false, false, 4); + dhbox->pack_end( *m_toggle_play, false, false, 4); +@@ -347,6 +363,16 @@ + m_menu_bw->items().push_back(MenuElem("8", SigC::bind(mem_fun(*this,&seqedit::set_bw), 8 ))); + m_menu_bw->items().push_back(MenuElem("16", SigC::bind(mem_fun(*this,&seqedit::set_bw), 16 ))); + ++ /* record volume */ ++ m_menu_rec_vol->items().push_back(MenuElem("Free", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 0 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 8", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 127 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 7", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 111 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 6", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 95 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 5", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 79 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 4", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 63 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 3", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 47 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 2", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 31 ))); ++ m_menu_rec_vol->items().push_back(MenuElem("Fixed 1", SigC::bind(mem_fun(*this,&seqedit::set_rec_vol), 15 ))); + + /* music scale */ + m_menu_scale->items().push_back(MenuElem(c_scales_text[0], SigC::bind(mem_fun(*this,&seqedit::set_scale), c_scale_off ))); +@@ -647,6 +673,23 @@ + m_tooltips->set_tip( *m_button_undo, "Undo." ); + + m_hbox2->pack_start( *m_button_undo , false, false ); ++ ++ /* redo */ ++ m_button_redo = manage( new Button()); ++ m_button_redo->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( redo_xpm )))); ++ m_button_redo->signal_clicked().connect( mem_fun( *this, &seqedit::redo_callback)); ++ m_tooltips->set_tip( *m_button_redo, "Redo." ); ++ ++ m_hbox2->pack_start( *m_button_redo , false, false ); ++ ++ /* quantize shortcut */ ++ m_button_quanize = manage( new Button()); ++ m_button_quanize->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( quanize_xpm )))); ++ m_button_quanize->signal_clicked().connect( SigC::bind(mem_fun(*this,&seqedit::do_action), quantize_notes,0 )); ++ m_tooltips->set_tip( *m_button_quanize, "Quantize Selection." ); ++ ++ m_hbox2->pack_start( *m_button_quanize , false, false ); ++ + m_hbox2->pack_start( *(manage(new VSeparator( ))), false, false, 4); + + /* tools button */ +@@ -1068,10 +1111,12 @@ + m_initial_snap = a_snap; + m_seqroll_wid->set_snap( m_snap ); + m_seqevent_wid->set_snap( m_snap ); ++ m_seq->set_snap_tick(a_snap); + } + + + ++ + void + seqedit::set_note_length( int a_note_length ) + { +@@ -1188,6 +1233,11 @@ + } + + ++void ++seqedit::set_rec_vol( int a_rec_vol ) ++{ ++ m_seq->set_rec_vol( a_rec_vol ); ++} + + + void +@@ -1213,6 +1263,11 @@ + m_seq->set_recording( m_toggle_record->get_active() ); + } + ++void ++seqedit::q_rec_change_callback( void ) ++{ ++ m_seq->set_quanized_rec( m_toggle_q_rec->get_active() ); ++} + + void + seqedit::undo_callback( void ) +@@ -1227,6 +1282,18 @@ + + + void ++seqedit::redo_callback( void ) ++{ ++ m_seq->pop_redo( ); ++ ++ m_seqroll_wid->redraw(); ++ m_seqtime_wid->redraw(); ++ m_seqdata_wid->redraw(); ++ m_seqevent_wid->redraw(); ++} ++ ++ ++void + seqedit::thru_change_callback( void ) + { + m_mainperf->get_master_midi_bus()->set_sequence_input( true, m_seq ); +diff -x .bzr -Nuar seq24-0.8.7/src/seqedit.h seq24-0.8.7+bzr6/src/seqedit.h +--- seq24-0.8.7/src/seqedit.h 2006-05-30 07:24:11.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/seqedit.h 2008-08-26 12:07:39.000000000 +0100 +@@ -92,6 +92,7 @@ + /* time signature, beats per measure, beat width */ + Menu *m_menu_bpm; + Menu *m_menu_bw; ++ Menu *m_menu_rec_vol; + + + sequence *m_seq; +@@ -120,6 +121,8 @@ + HScrollbar *m_hscroll_new; + + Button *m_button_undo; ++ Button *m_button_redo; ++ Button *m_button_quanize; + + Button *m_button_tools; + +@@ -160,9 +163,12 @@ + + Button *m_button_bw; + Entry *m_entry_bw; ++ ++ Button *m_button_rec_vol; + + ToggleButton *m_toggle_play; + ToggleButton *m_toggle_record; ++ ToggleButton *m_toggle_q_rec; + ToggleButton *m_toggle_thru; + + RadioButton *m_radio_select; +@@ -205,6 +211,7 @@ + + void set_bpm( int a_beats_per_measure ); + void set_bw( int a_beat_width ); ++ void set_rec_vol( int a_rec_vol ); + void set_measures( int a_length_measures ); + void apply_length( int a_bpm, int a_bw, int a_measures ); + long get_measures( void ); +@@ -220,8 +227,10 @@ + void name_change_callback( void ); + void play_change_callback( void ); + void record_change_callback( void ); ++ void q_rec_change_callback( void ); + void thru_change_callback( void ); + void undo_callback( void ); ++ void redo_callback( void ); + + void set_data_type( unsigned char a_status, + unsigned char a_control = 0 ); +diff -x .bzr -Nuar seq24-0.8.7/src/seqevent.cpp seq24-0.8.7+bzr6/src/seqevent.cpp +--- seq24-0.8.7/src/seqevent.cpp 2006-05-29 06:19:55.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/seqevent.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -907,7 +907,7 @@ + + if ( a_p0->type == GDK_KEY_PRESS ){ + +- if ( a_p0->keyval == GDK_Delete ){ ++ if ( a_p0->keyval == GDK_Delete || a_p0->keyval == GDK_BackSpace ){ + + m_seq->push_undo(); + m_seq->mark_selected(); +diff -x .bzr -Nuar seq24-0.8.7/src/seqroll.cpp seq24-0.8.7+bzr6/src/seqroll.cpp +--- seq24-0.8.7/src/seqroll.cpp 2006-05-29 05:58:37.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/seqroll.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -471,128 +471,145 @@ + + + +-void seqroll::draw_events_on( Glib::RefPtr a_draw ) +-{ +- +- +- long tick_s; +- long tick_f; +- int note; +- +- int note_x; +- int note_width; +- int note_y; +- int note_height; +- +- bool selected; +- +- int velocity; +- +- draw_type dt; +- +- +- +- int start_tick = m_scroll_offset_ticks ; +- int end_tick = (m_window_x * m_zoom) + m_scroll_offset_ticks; +- +- sequence *seq = NULL; +- for( int method=0; method<2; ++method ){ +- +- if ( method == 0 && m_drawing_background_seq ){ +- +- if ( m_perform->is_active( m_background_sequence )){ +- seq =m_perform->get_sequence( m_background_sequence ); +- } +- else{ +- method++; +- } +- } +- else if ( method == 0 ){ +- method++; +- } +- +- +- if ( method==1){ +- seq = m_seq; +- } +- +- /* draw boxes from sequence */ +- m_gc->set_foreground( m_black ); +- seq->reset_draw_marker(); +- +- while ( (dt = seq->get_next_note_event( &tick_s, &tick_f, ¬e, +- &selected, &velocity )) != DRAW_FIN ){ +- +- if ( (tick_s >= start_tick && tick_s <= end_tick) || +- ((dt == DRAW_NORMAL_LINKED) && +- (tick_f >= start_tick && tick_f <= end_tick))){ +- +- /* turn into screen corrids */ +- note_x = tick_s / m_zoom; +- note_y = c_rollarea_y -(note * c_key_y) - c_key_y - 1 + 2; +- note_height = c_key_y - 3; +- +- //printf( "drawing note[%d] tick_start[%d] tick_end[%d]\n", +- // note, tick_start, tick_end ); +- +- int in_shift = 0; +- int length_add = 0; +- +- if ( dt == DRAW_NORMAL_LINKED ){ +- +- note_width = (tick_f - tick_s) / m_zoom; +- if ( note_width < 1 ) note_width = 1; +- +- } +- else { +- note_width = 8 / m_zoom; +- } +- +- if ( dt == DRAW_NOTE_ON ){ +- +- in_shift = 0; +- length_add = 2; +- } +- +- if ( dt == DRAW_NOTE_OFF ){ +- +- in_shift = -1; +- length_add = 1; +- } +- +- note_x -= m_scroll_offset_x; +- note_y -= m_scroll_offset_y; +- +- m_gc->set_foreground(m_black); +- /* draw boxes from sequence */ ++void seqroll::draw_events_on( Glib::RefPtr a_draw ) { + +- if ( method == 0 ) +- m_gc->set_foreground( m_dk_grey ); +- +- a_draw->draw_rectangle(m_gc,true, +- note_x, +- note_y, +- note_width, +- note_height); +- +- /* draw inside box if there is room */ +- if ( note_width > 3 ){ +- +- if ( selected ) +- m_gc->set_foreground(m_red); +- else +- m_gc->set_foreground(m_white); +- +- if ( method == 1 ) +- a_draw->draw_rectangle(m_gc,true, +- note_x + 1 + in_shift, +- note_y + 1, +- note_width - 3 + length_add, +- note_height - 3); +- } +- } +- } +- } ++ long tick_s; ++ long tick_f; ++ int note; ++ ++ int note_x; ++ int note_width; ++ int note_y; ++ int note_height; ++ ++ bool selected; ++ ++ int velocity; ++ ++ draw_type dt; ++ ++ ++ ++ int start_tick = m_scroll_offset_ticks ; ++ int end_tick = (m_window_x * m_zoom) + m_scroll_offset_ticks; ++ ++ sequence *seq = NULL; ++ for( int method=0; method<2; ++method ) { ++ ++ if ( method == 0 && m_drawing_background_seq ){ ++ ++ if ( m_perform->is_active( m_background_sequence )){ ++ seq =m_perform->get_sequence( m_background_sequence ); ++ } else { ++ method++; ++ } ++ } else if ( method == 0 ){ ++ method++; ++ } ++ ++ ++ if ( method==1){ ++ seq = m_seq; ++ } ++ ++ /* draw boxes from sequence */ ++ m_gc->set_foreground( m_black ); ++ seq->reset_draw_marker(); ++ ++ while ( (dt = seq->get_next_note_event( &tick_s, &tick_f, ¬e, &selected, &velocity )) != DRAW_FIN ) { ++ ++ if ( (tick_s >= start_tick && tick_s <= end_tick) || ++ ( (dt == DRAW_NORMAL_LINKED) && (tick_f >= start_tick && tick_f <= end_tick)) ++ ) { ++ ++ /* turn into screen corrids */ ++ note_x = tick_s / m_zoom; ++ note_y = c_rollarea_y -(note * c_key_y) - c_key_y - 1 + 2; ++ note_height = c_key_y - 3; ++ ++// printf( "DEBUG: drawing note[%d] tick_s[%d] tick_f[%d] start_tick[%d] end_tick[%d]\n", ++// note, tick_s, tick_f, start_tick, end_tick ); ++// printf( "DEBUG: seq.get_lenght() = %d\n", m_seq->get_length()); ++ ++ int in_shift = 0; ++ int length_add = 0; ++ ++ if ( dt == DRAW_NORMAL_LINKED ){ ++ ++ if (tick_f >= tick_s) { ++ note_width = (tick_f - tick_s) / m_zoom; ++ if ( note_width < 1 ) note_width = 1; ++ } else { ++ note_width = (m_seq->get_length() - tick_s) / m_zoom; ++ } ++ ++ } else { ++ note_width = 16 / m_zoom; ++ } ++ ++ if ( dt == DRAW_NOTE_ON ){ ++ in_shift = 0; ++ length_add = 2; ++ } ++ ++ if ( dt == DRAW_NOTE_OFF ){ ++ in_shift = -1; ++ length_add = 1; ++ } ++ ++ note_x -= m_scroll_offset_x; ++ note_y -= m_scroll_offset_y; ++ ++ m_gc->set_foreground(m_black); ++ /* draw boxes from sequence */ ++ ++ if ( method == 0 ) ++ m_gc->set_foreground( m_dk_grey ); ++ ++ a_draw->draw_rectangle( m_gc,true, ++ note_x, ++ note_y, ++ note_width, ++ note_height); ++ if (tick_f < tick_s) { ++ a_draw->draw_rectangle( m_gc,true, ++ 0, ++ note_y, ++ tick_f/m_zoom, ++ note_height); ++ } ++ ++ /* draw inside box if there is room */ ++ if ( note_width > 3 ){ ++ ++ if ( selected ) ++ m_gc->set_foreground(m_red); ++ else ++ m_gc->set_foreground(m_white); ++ ++ if ( method == 1 ) ++ if (tick_f >= tick_s) { ++ a_draw->draw_rectangle( m_gc,true, ++ note_x + 1 + in_shift, ++ note_y + 1, ++ note_width - 3 + length_add, ++ note_height - 3); ++ } else { ++ a_draw->draw_rectangle( m_gc,true, ++ note_x + 1 + in_shift, ++ note_y + 1, ++ note_width , ++ note_height - 3); ++ a_draw->draw_rectangle( m_gc,true, ++ 0, ++ note_y + 1, ++ (tick_f/m_zoom) - 3 + length_add, ++ note_height - 3); ++ } ++ } ++ } ++ } ++ } + } + + +@@ -1249,9 +1266,22 @@ + { + bool ret = false; + ++ if ( a_p0->keyval == GDK_space ){ ++ if (is_pattern_playing) { ++ m_perform->stop_jack(); ++ m_perform->stop(); ++ is_pattern_playing=false; ++ } else { ++ m_perform->position_jack( false ); ++ m_perform->start( false ); ++ m_perform->start_jack( ); ++ is_pattern_playing=true; ++ } ++ } ++ + if ( a_p0->type == GDK_KEY_PRESS ){ + +- if ( a_p0->keyval == GDK_Delete ){ ++ if ( a_p0->keyval == GDK_Delete || a_p0->keyval == GDK_BackSpace ){ + + m_seq->push_undo(); + m_seq->mark_selected(); +diff -x .bzr -Nuar seq24-0.8.7/src/sequence.cpp seq24-0.8.7+bzr6/src/sequence.cpp +--- seq24-0.8.7/src/sequence.cpp 2006-05-30 02:44:51.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/sequence.cpp 2008-08-26 12:07:39.000000000 +0100 +@@ -31,6 +31,7 @@ + m_playing = false; + m_was_playing = false; + m_recording = false; ++ m_quanized_rec = false; + m_thru = false; + m_queued = false; + +@@ -38,12 +39,14 @@ + + m_time_beats_per_measure = 4; + m_time_beat_width = 4; ++ m_rec_vol = 0; + + //m_tag = 0; + + m_name = c_dummy; + m_bus = 0; + m_length = 4 * c_ppqn; ++ m_snap_tick = c_ppqn / 4; + m_midi_channel = 0; + + /* no notes are playing */ +@@ -78,7 +81,7 @@ + lock(); + + if (m_list_undo.size() > 0 ){ +- ++ m_list_redo.push( m_list_event ); + m_list_event = m_list_undo.top(); + m_list_undo.pop(); + verify_and_link(); +@@ -88,6 +91,21 @@ + unlock(); + } + ++void ++sequence::pop_redo( void ) ++{ ++ lock(); ++ ++ if (m_list_redo.size() > 0 ){ ++ m_list_undo.push( m_list_event ); ++ m_list_event = m_list_redo.top(); ++ m_list_redo.pop(); ++ verify_and_link(); ++ unselect(); ++ } ++ ++ unlock(); ++} + + void + sequence::push_trigger_undo( void ) +@@ -114,6 +132,7 @@ + + if (m_list_trigger_undo.size() > 0 ){ + ++ m_list_trigger_redo.push( m_list_trigger ); + m_list_trigger = m_list_trigger_undo.top(); + m_list_trigger_undo.pop(); + } +@@ -170,6 +189,14 @@ + unlock(); + } + ++void ++sequence::set_rec_vol( long a_rec_vol ) ++{ ++ lock(); ++ m_rec_vol = a_rec_vol; ++ unlock(); ++} ++ + long + sequence::get_bw( void ) + { +@@ -416,12 +443,13 @@ + list::iterator i; + list::iterator on; + list::iterator off; ++ bool end_found = false; + + lock(); + + for ( i = m_list_event.begin(); i != m_list_event.end(); i++ ){ + (*i).clear_link(); +- (*i).unmark(); ++ (*i).unmark(); + } + + on = m_list_event.begin(); +@@ -435,7 +463,8 @@ + + /* get next possible off node */ + off = on; off++; +- ++ end_found = false; ++ + while ( off != m_list_event.end() ){ + + /* is a off event, == notes, and isnt +@@ -449,11 +478,32 @@ + (*off).link( &(*on) ); + (*on).mark( ); + (*off).mark( ); ++ end_found = true; + + break; + } + off++; + } ++ if (!end_found) { ++ off = m_list_event.begin(); ++ while ( off != on){ ++ if ( (*off).is_note_off() && ++ (*off).get_note() == (*on).get_note() && ++ ! (*off).is_marked() ){ ++ ++ /* link + mark */ ++ (*on).link( &(*off) ); ++ (*off).link( &(*on) ); ++ (*on).mark( ); ++ (*off).mark( ); ++ end_found = true; ++ ++ break; ++ } ++ off++; ++ ++ } ++ } + } + on++; + } +@@ -491,6 +541,7 @@ + { + list::iterator on; + list::iterator off; ++ bool end_found = false; + + lock(); + +@@ -506,7 +557,7 @@ + + /* get next element */ + off = on; off++; +- ++ end_found = false; + while ( off != m_list_event.end()){ + + /* is a off event, == notes, and isnt +@@ -518,11 +569,33 @@ + /* link */ + (*on).link( &(*off) ); + (*off).link( &(*on) ); ++ end_found = true; + + break; + } + off++; + } ++ ++ if (!end_found) { ++ off = m_list_event.begin(); ++ while ( off != on){ ++ ++ /* is a off event, == notes, and isnt ++ selected */ ++ if ( (*off).is_note_off() && ++ (*off).get_note() == (*on).get_note() && ++ ! (*off).is_linked() ){ ++ ++ /* link */ ++ (*on).link( &(*off) ); ++ (*off).link( &(*on) ); ++ end_found = true; ++ ++ break; ++ } ++ off++; ++ } ++ } + } + on++; + } +@@ -632,8 +705,8 @@ + + time = (*i).get_timestamp(); + +- if ( time < *a_tick_s ) *a_tick_s = time; +- if ( time > *a_tick_f ) *a_tick_f = time; ++ if ((*i).is_note_on() && ( time < *a_tick_s )) *a_tick_s = time; ++ if ((*i).is_note_off() && (time > *a_tick_f )) *a_tick_f = time; + + note = (*i).get_note(); + +@@ -747,24 +820,40 @@ + long a_tick_f, int a_note_l, select_action_e a_action) + { + int ret=0; ++ ++ long tick_s; ++ long tick_f; ++ + list::iterator i; + + lock(); + + for ( i = m_list_event.begin(); i != m_list_event.end(); i++ ){ + +- if( (*i).is_note_off() && +- (*i).get_timestamp() >= a_tick_s && +- (*i).get_note() <= a_note_h && +- (*i).get_note() >= a_note_l ){ +- +- +- if ( (*i).is_linked() ){ +- ++ if( (*i).get_note() <= a_note_h && ++ (*i).get_note() >= a_note_l ) { ++ ++ if ( (*i).is_linked() ) { + event *ev = (*i).get_linked(); +- +- if ( ev->get_timestamp() <= a_tick_f ){ +- ++ ++ if ( (*i).is_note_off() ) { ++ tick_s = ev->get_timestamp(); ++ tick_f = (*i).get_timestamp(); ++ } ++ ++ if ( (*i).is_note_on() ) { ++ tick_f = ev->get_timestamp(); ++ tick_s = (*i).get_timestamp(); ++ } ++ ++ if ( ++ ( (tick_s <= tick_f) && ++ ((tick_s <= a_tick_f) && (tick_f >= a_tick_s)) ) || ++ ( (tick_s > tick_f) && ++ ((tick_s <= a_tick_f) || (tick_f >= a_tick_s)) ) ) ++ ++ { ++ + if ( a_action == e_select || + a_action == e_select_one ) + { +@@ -787,39 +876,32 @@ + ret = 1; + break; + } +- } +- } +- } ++ ++ } + +- if ( ! (*i).is_linked() && +- ( (*i).is_note_on() || +- (*i).is_note_off() ) && +- (*i).get_timestamp() >= a_tick_s - 16 && +- (*i).get_timestamp() <= a_tick_f && +- (*i).get_note() <= a_note_h && +- (*i).get_note() >= a_note_l ) { ++ ++ } else { ++ tick_s = tick_f = (*i).get_timestamp(); ++ if ( tick_s >= a_tick_s - 16 && tick_f <= a_tick_f) { + +- if ( a_action == e_select || +- a_action == e_select_one ) +- { +- (*i).select( ); +- ret++; +- if ( a_action == e_select_one ) +- break; +- } +- if ( a_action == e_is_selected ) +- { +- if ( (*i).is_selected()) +- { +- ret = 1; +- break; ++ if ( a_action == e_select || a_action == e_select_one ) { ++ (*i).select( ); ++ ret++; ++ if ( a_action == e_select_one ) ++ break; ++ } ++ if ( a_action == e_is_selected ) { ++ if ( (*i).is_selected()) { ++ ret = 1; ++ break; ++ } ++ } ++ if ( a_action == e_would_select ) { ++ ret = 1; ++ break; ++ } + } +- } +- if ( a_action == e_would_select ) +- { +- ret = 1; +- break; +- } ++ } + } + } + +@@ -918,11 +1000,11 @@ + sequence::move_selected_notes( long a_delta_tick, int a_delta_note ) + { + event e; +- ++ bool noteon=false; ++ long timestamp=0; ++ + lock(); +- + mark_selected(); +- + list::iterator i; + + for ( i = m_list_event.begin(); i != m_list_event.end(); i++ ){ +@@ -934,11 +1016,29 @@ + e = (*i); + e.unmark(); + +- if ( (e.get_timestamp() + a_delta_tick) >= 0 && +- (e.get_note() + a_delta_note) >= 0 && ++ if ( (e.get_note() + a_delta_note) >= 0 && + (e.get_note() + a_delta_note) < c_num_keys ){ + +- e.set_timestamp( e.get_timestamp() + a_delta_tick ); ++ noteon = e.is_note_on(); ++ timestamp = e.get_timestamp() + a_delta_tick; ++ ++ if (timestamp > m_length) { ++ timestamp = timestamp - m_length; ++ } ++ ++ if (timestamp < 0) { ++ timestamp = m_length + timestamp; ++ } ++ ++ if ((timestamp==0) && !noteon) { ++ timestamp = m_length-2; ++ } ++ ++ if ((timestamp==m_length) && noteon) { ++ timestamp = 0; ++ } ++ ++ e.set_timestamp( timestamp ); + e.set_note( e.get_note() + a_delta_note ); + e.select(); + +@@ -1101,19 +1201,29 @@ + off = (*i).get_linked(); + + long length = +- off->get_timestamp() - +- on->get_timestamp() + ++ off->get_timestamp() + + a_delta_tick; +- on->unmark(); + +- if ( length < 1 ) +- length = 1; ++ //If timestamp + delta is greater that m_length we do round robbin magic ++ if (length > m_length) { ++ length = length - m_length; ++ } ++ ++ if (length < 0) { ++ length = m_length + length; ++ } ++ ++ if (length==0) { ++ length = m_length-2; ++ } ++ ++ on->unmark(); + + /* copy event */ + e = *off; + e.unmark(); + +- e.set_timestamp( on->get_timestamp() + length ); ++ e.set_timestamp( length ); + add_event( &e ); + } + } +@@ -1500,6 +1610,15 @@ + } + + link_new(); ++ ++ if ( m_quanized_rec ){ ++ if (a_ev->is_note_off()) { ++ select_note_events( a_ev->get_timestamp(), a_ev->get_note(), ++ a_ev->get_timestamp(), a_ev->get_note(), e_select); ++ quanize_events( EVENT_NOTE_ON, 0, m_snap_tick, 1 , true ); ++ ++ } ++ } + /* update view */ + + unlock(); +@@ -2091,7 +2210,6 @@ + while( i != m_list_trigger.end() ){ + + if ( i->m_selected ){ +- + ret = i->m_tick_start; + } + +@@ -2791,6 +2909,28 @@ + return m_recording; + } + ++void ++sequence::set_snap_tick( int a_st ) ++{ ++ lock(); ++ m_snap_tick = a_st; ++ unlock(); ++} ++ ++void ++sequence::set_quanized_rec( bool a_qr ) ++{ ++ lock(); ++ m_quanized_rec = a_qr; ++ unlock(); ++} ++ ++ ++bool ++sequence::get_quanidez_rec( ) ++{ ++ return m_quanized_rec; ++} + + + void +@@ -3101,7 +3241,10 @@ + else { + timestamp_delta = (a_snap_tick - timestamp_remander) / a_divide; + } +- ++ if ((timestamp_delta + timestamp) >= m_length) { ++ timestamp_delta = - e.get_timestamp() ; ++ } ++ + e.set_timestamp( e.get_timestamp() + timestamp_delta ); + quantized_events.push_front(e); + +diff -x .bzr -Nuar seq24-0.8.7/src/sequence.h seq24-0.8.7+bzr6/src/sequence.h +--- seq24-0.8.7/src/sequence.h 2006-05-29 05:17:06.000000000 +0100 ++++ seq24-0.8.7+bzr6/src/sequence.h 2008-08-26 12:07:39.000000000 +0100 +@@ -83,7 +83,9 @@ + trigger m_trigger_clipboard; + + stack < list < event > >m_list_undo; ++ stack < list < event > >m_list_redo; + stack < list < trigger > >m_list_trigger_undo; ++ stack < list < trigger > >m_list_trigger_redo; + + /* markers */ + list < event >::iterator m_iterator_play; +@@ -111,6 +113,7 @@ + bool m_was_playing; + bool m_playing; + bool m_recording; ++ bool m_quanized_rec; + bool m_thru; + bool m_queued; + +@@ -139,12 +142,14 @@ + /* length of sequence in pulses + should be powers of two in bars */ + long m_length; ++ long m_snap_tick; + + /* these are just for the editor to mark things + in correct time */ + //long m_length_measures; + long m_time_beats_per_measure; + long m_time_beat_width; ++ long m_rec_vol; + + /* locking */ + mutex m_mutex; +@@ -179,6 +184,7 @@ + + void push_undo (void); + void pop_undo (void); ++ void pop_redo (void); + + void push_trigger_undo (void); + void pop_trigger_undo (void); +@@ -199,6 +205,7 @@ + + void set_bw (long a_beat_width); + long get_bw (void); ++ void set_rec_vol (long a_rec_vol); + + void set_song_mute (bool a_mute); + bool get_song_mute (void); +@@ -246,6 +253,9 @@ + + void set_recording (bool); + bool get_recording (); ++ void set_snap_tick( int a_st ); ++ void set_quanized_rec( bool a_qr ); ++ bool get_quanidez_rec( ); + + void set_thru (bool); + bool get_thru (); --- seq24-0.8.7.orig/debian/patches/02_gcc_4.3.patch +++ seq24-0.8.7/debian/patches/02_gcc_4.3.patch @@ -0,0 +1,22 @@ +diff -urNad seq24-0.8.7.orig/src/event.cpp seq24-0.8.7/src/event.cpp +--- seq24-0.8.7.orig/src/event.cpp 2006-06-02 04:20:20.000000000 +0100 ++++ seq24-0.8.7/src/event.cpp 2008-04-08 17:15:03.000000000 +0100 +@@ -18,6 +18,7 @@ + // + //----------------------------------------------------------------------------- + #include "event.h" ++#include + + event::event() + { +diff -urNad seq24-0.8.7.orig/src/font.cpp seq24-0.8.7/src/font.cpp +--- seq24-0.8.7.orig/src/font.cpp 2006-03-28 05:37:00.000000000 +0100 ++++ seq24-0.8.7/src/font.cpp 2008-04-08 17:18:15.000000000 +0100 +@@ -25,6 +25,7 @@ + #include "font_b.xpm" + + #include ++#include + + font::font( ) + { --- seq24-0.8.7.orig/debian/patches/00_propaganda.patch +++ seq24-0.8.7/debian/patches/00_propaganda.patch @@ -0,0 +1,15 @@ +diff -ruN seq24-0.7.0-old/src/globals.h seq24-0.7.0/src/globals.h +--- seq24-0.7.0-old/src/globals.h 2005-07-21 01:59:16.000000000 +0200 ++++ seq24-0.7.0/src/globals.h 2005-09-14 16:33:05.000000000 +0200 +@@ -133,7 +133,10 @@ + string ( "\n" )+ + string ( "Copyright (c) 2005 Rob C. Buse\n" )+ + string ( "Released under the GNU Public License, see\n" )+ +- string ( "COPYING for details.\n" ) ++ string ( "COPYING for details.\n" )+ ++ string ( "\n" )+ ++ string ( "Debian package by Gunter Geiger, bug reports to\n" )+ ++ string ( "bugs.debian.org/seq24" ) + ); + + const char c_font_6_12[] = "-*-fixed-medium-r-*--12-*-*-*-*-*-*";