diff options
author | miwi <miwi@FreeBSD.org> | 2007-12-19 07:19:54 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-12-19 07:19:54 +0800 |
commit | 418c2fbc6e3efb1e9c44c49816629bbea4a128ac (patch) | |
tree | ab270951ea6a02899014c2be850b8c4a4347d827 /audio/musica | |
parent | c336af0111d2d4284cae43300a6b286f398dea50 (diff) | |
download | freebsd-ports-gnome-418c2fbc6e3efb1e9c44c49816629bbea4a128ac.tar.gz freebsd-ports-gnome-418c2fbc6e3efb1e9c44c49816629bbea4a128ac.tar.zst freebsd-ports-gnome-418c2fbc6e3efb1e9c44c49816629bbea4a128ac.zip |
Musica is a GTK based MIDI player.
- Plays MIDI files on Linux machines with an OSS sound card interface.
- GTK based user interface supporting drag-and-drop for easy file
selection. Drag a MIDI file from the GNOME-ified Midnight Commander
to Musica's drop pocket and it automatically loads the file.
- Tempo adjustment, Play a MIDI file up to four times faster or slower.
- Fast forward. Skip those dull passages in a MIDI file.
WWW: http://www-ict.its.tudelft.nl/~erik/open-source/musica
PR: ports/118839
Submitted by: Pietro Cerutti <gahr at gahr.ch>
Diffstat (limited to 'audio/musica')
-rw-r--r-- | audio/musica/Makefile | 27 | ||||
-rw-r--r-- | audio/musica/distinfo | 3 | ||||
-rw-r--r-- | audio/musica/files/patch-src_channel2device.cc | 11 | ||||
-rw-r--r-- | audio/musica/files/patch-src_dnd.cc | 11 | ||||
-rw-r--r-- | audio/musica/files/patch-src_events.cc | 37 | ||||
-rw-r--r-- | audio/musica/files/patch-src_gui.cc | 183 | ||||
-rw-r--r-- | audio/musica/files/patch-src_help.cc | 11 | ||||
-rw-r--r-- | audio/musica/files/patch-src_main.cc | 29 | ||||
-rw-r--r-- | audio/musica/files/patch-src_ossmidi.cc | 21 | ||||
-rw-r--r-- | audio/musica/files/patch-src_program2device.cc | 11 | ||||
-rw-r--r-- | audio/musica/files/patch-src_readmidi.cc | 12 | ||||
-rw-r--r-- | audio/musica/files/patch-src_sequence.cc | 13 | ||||
-rw-r--r-- | audio/musica/pkg-descr | 10 |
13 files changed, 379 insertions, 0 deletions
diff --git a/audio/musica/Makefile b/audio/musica/Makefile new file mode 100644 index 000000000000..bb4c85aaaa43 --- /dev/null +++ b/audio/musica/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: musica +# Date created: 18 December 2007 +# Whom: Pietro Cerutti <gahr@gahr.ch> +# +# $FreeBSD$ + +PORTNAME= musica +PORTVERSION= 1.1.4 +CATEGORIES= audio +MASTER_SITES= http://www-ict.its.tudelft.nl/~erik/open-source/musica/ \ + http://www.gahr.ch/FreeBSD/musica/ + +MAINTAINER= gahr@gahr.ch +COMMENT= GTK based midi player + +USE_GNOME= gtk12 + +GNU_CONFIGURE= yes +USE_GMAKE= yes + +PLIST_FILES= bin/musica + +post-patch: + ${REINPLACE_CMD} -e 's|char|const char|g' \ + ${WRKSRC}/src/*.xpm ${WRKSRC}/include/pixmaps.hh + +.include <bsd.port.mk> diff --git a/audio/musica/distinfo b/audio/musica/distinfo new file mode 100644 index 000000000000..5646cc549567 --- /dev/null +++ b/audio/musica/distinfo @@ -0,0 +1,3 @@ +MD5 (musica-1.1.4.tar.gz) = c235cf2e5075f85e419bfb4c9f378b26 +SHA256 (musica-1.1.4.tar.gz) = fc5ed92942a97d16c68168ed4e25c297a581f15d976c112bd160f5a8d41cf621 +SIZE (musica-1.1.4.tar.gz) = 135754 diff --git a/audio/musica/files/patch-src_channel2device.cc b/audio/musica/files/patch-src_channel2device.cc new file mode 100644 index 000000000000..df657292f5c0 --- /dev/null +++ b/audio/musica/files/patch-src_channel2device.cc @@ -0,0 +1,11 @@ +--- src/channel2device.cc.orig 2007-12-18 19:44:10.000000000 +0100 ++++ src/channel2device.cc 2007-12-18 19:44:31.000000000 +0100 +@@ -45,7 +45,7 @@ + + + +-static char *deviceType = "channel-to-device"; ++static char deviceType[] = "channel-to-device"; + + + diff --git a/audio/musica/files/patch-src_dnd.cc b/audio/musica/files/patch-src_dnd.cc new file mode 100644 index 000000000000..2cf9a7293de9 --- /dev/null +++ b/audio/musica/files/patch-src_dnd.cc @@ -0,0 +1,11 @@ +--- src/dnd.cc.orig 2007-12-18 19:45:04.000000000 +0100 ++++ src/dnd.cc 2007-12-18 19:45:56.000000000 +0100 +@@ -221,7 +221,7 @@ + + static void makeDropStyles(void) + { +- GdkColor color; ++ GdkColor color = { 0,0,0,0 }; + int i; + + if(eventBoxDefaultStyle == 0) diff --git a/audio/musica/files/patch-src_events.cc b/audio/musica/files/patch-src_events.cc new file mode 100644 index 000000000000..6d6c3d000cfe --- /dev/null +++ b/audio/musica/files/patch-src_events.cc @@ -0,0 +1,37 @@ +--- src/events.cc.orig 1999-06-09 12:14:04.000000000 +0200 ++++ src/events.cc 2007-12-18 19:09:20.000000000 +0100 +@@ -30,7 +30,8 @@ + # include <config.h> + #endif + +-#include <iostream.h> ++#include <iostream> ++using namespace std; + + #ifdef STDC_HEADERS + # include <string.h> +@@ -267,8 +268,7 @@ + // + //------------------------------------------------------------------------- + +-midiMetaTextEvent::midiMetaTextEvent(long int dT = 0L, midiEvent *n = 0, +- char *t = 0) : ++midiMetaTextEvent::midiMetaTextEvent(long int dT, midiEvent *n, char *t) : + midiEvent(dT, n) + { + if(t == 0) +@@ -602,10 +602,10 @@ + // + //------------------------------------------------------------------------- + +-midiSequencerSpecificEvent::midiSequencerSpecificEvent(long int dT = 0L, +- midiEvent *n = 0, +- unsigned char *d = 0, +- int l = 0) : ++midiSequencerSpecificEvent::midiSequencerSpecificEvent(long int dT, ++ midiEvent *n, ++ unsigned char *d, ++ int l) : + midiEvent(dT, n) + { + if(d == 0) diff --git a/audio/musica/files/patch-src_gui.cc b/audio/musica/files/patch-src_gui.cc new file mode 100644 index 000000000000..f0b7eb34555a --- /dev/null +++ b/audio/musica/files/patch-src_gui.cc @@ -0,0 +1,183 @@ +--- src/gui.cc.orig 1999-06-09 12:14:04.000000000 +0200 ++++ src/gui.cc 2007-12-18 19:55:33.000000000 +0100 +@@ -31,7 +31,9 @@ + #endif + + #include <stdio.h> +-#include <iostream.h> ++#include <iostream> ++using namespace std; ++ + #include <ctype.h> + #include <assert.h> + +@@ -101,79 +103,59 @@ + static GTimer *midiTimer; + static gulong currentTime = 0; + ++static gchar fileEntry[] = "/_File"; ++static gchar fileOpenEntry[] = "/File/_Open..."; ++static gchar fileSep1Entry[] = "/File/sep1"; ++static gchar fileQuitEntry[] = "/File/_Quit"; ++static gchar editEntry[] = "/_Edit"; ++static gchar editPlayEntry[] = "/Edit/_Play options..."; ++static gchar editDevEntry[] = "/Edit/_Device options..."; ++static gchar midiEntry[] = "/_Midi"; ++static gchar midiNotesOffEntry[] = "/Midi/All notes off"; ++static gchar midiResetEntry[] = "/Midi/Reset"; ++static gchar helpEntry[] = "/_Help"; ++static gchar helpAboutEntry[] = "/Help/_About ..."; ++static gchar helpSep1Entry[] = "/Help/sep1"; ++static gchar helpCopyEntry[] = "/Help/_Copying ..."; ++static gchar branchEntry[] = "<Branch>"; ++static gchar lastBranchEntry[] = "<LastBranch>"; ++static gchar controlDEntry[] = "<control>D"; ++static gchar controlOEntry[] = "<control>O"; ++static gchar controlPEntry[] = "<control>P"; ++static gchar controlQEntry[] = "<control>Q"; ++static gchar separatorEntry[] = "<Separator>"; ++ + static GtkItemFactoryEntry menu_items[] = + { +- {"/_File", 0, +- 0, 0, +- "<Branch>"}, +- +- {"/File/_Open...", "<control>O", +- GTK_SIGNAL_FUNC(fileOpenCallback), 0, +- 0}, +- +- {"/File/sep1", 0, +- 0, 0, +- "<Separator>"}, +- +- {"/File/_Quit", "<control>Q", +- GTK_SIGNAL_FUNC(gtk_main_quit), 0, +- 0}, +- +- +- {"/_Edit", 0, +- 0, 0, +- "<Branch>"}, +- +- {"/Edit/_Play options...", "<control>P", +- GTK_SIGNAL_FUNC(optionsPlayCallback), 0, +- 0}, +- +- {"/Edit/_Device options...", "<control>D", +- GTK_SIGNAL_FUNC(optionsDeviceCallback), 0, +- 0}, +- +- +- {"/_Midi", 0, +- 0, 0, +- "<Branch>"}, +- +- {"/Midi/All notes off", 0, +- 0, 0, +- 0}, +- +- {"/Midi/Reset", 0, +- 0, 0, +- 0}, +- +- +- {"/_Help", 0, +- 0, 0, +- "<LastBranch>"}, +- +- {"/Help/_About ...", 0, +- GTK_SIGNAL_FUNC(helpAboutCallback), 0, +- 0}, +- +- {"/Help/sep1", 0, +- 0, 0, +- "<Separator>"}, +- +- {"/Help/_Copying ...", 0, +- GTK_SIGNAL_FUNC(helpCopyingCallback), 0, +- 0} ++ {fileEntry, NULL, NULL, NULL, branchEntry}, ++ {fileOpenEntry, controlOEntry, GTK_SIGNAL_FUNC(fileOpenCallback), 0, NULL}, ++ {fileSep1Entry, NULL, NULL, 0, separatorEntry}, ++ {fileQuitEntry, controlQEntry, GTK_SIGNAL_FUNC(gtk_main_quit), 0, NULL}, ++ {editEntry, NULL, NULL, 0, branchEntry}, ++ {editPlayEntry, controlPEntry, GTK_SIGNAL_FUNC(optionsPlayCallback), 0, NULL}, ++ {editDevEntry, controlDEntry, GTK_SIGNAL_FUNC(optionsDeviceCallback), 0, NULL}, ++ {midiEntry, NULL, NULL, NULL, branchEntry}, ++ {midiNotesOffEntry, NULL, NULL, 0, NULL}, ++ {midiResetEntry, NULL, NULL, 0, NULL}, ++ {helpEntry, NULL, NULL, 0, lastBranchEntry}, ++ {helpAboutEntry, NULL, GTK_SIGNAL_FUNC(helpAboutCallback), 0, NULL}, ++ {helpSep1Entry, NULL, NULL, 0, separatorEntry}, ++ {helpCopyEntry, NULL, GTK_SIGNAL_FUNC(helpCopyingCallback), 0, NULL} + }; + ++static gchar stringEntry[] = "STRING"; ++static gchar textplainEntry[] = "text/plain"; + + static GtkTargetEntry target_table[] = + { +- { "STRING", 0, 0 }, +- { "text/plain", 0, 0 } ++ { stringEntry, 0, 0 }, ++ { textplainEntry, 0, 0 } + }; + + + typedef struct + { +- char **pixmap; ++ const char **pixmap; + char *text; + char *tooltip_text; + GtkSignalFunc callback; +@@ -181,15 +163,24 @@ + GtkWidget *widget; + } toolbarEntry; + ++static char rewindEntry[] = "Rewind"; ++static char rewindEntryDescr[] = "Rewind MIDI file"; ++static char stopEntry[] = "Stop"; ++static char stopEntryDescr[] = "Stop playing and shut off all MIDI controllers"; ++static char playEntry[] = "Play"; ++static char playEntryDescr[] = "Play MIDI file"; ++static char pauseEntry[] = "Pause"; ++static char pauseEntryDescr[] = "Pause playing"; ++static char ffwdEntry[] = "Ffwd"; ++static char ffwdEntryDescr[] = "Fast forward"; + + static toolbarEntry toolbar_items[] = + { +- { rewind_xpm, "Rewind", "Rewind MIDI file", GTK_SIGNAL_FUNC(rewindCallback), 0, 0}, +- { stop_xpm, "Stop", +- "Stop playing and shut off all MIDI controllers", GTK_SIGNAL_FUNC(stopCallback), 0, 0}, +- { play_xpm, "Play", "Play MIDI file", GTK_SIGNAL_FUNC(playCallback), 0, 0}, +- { pause_xpm, "Pause", "Pause playing", GTK_SIGNAL_FUNC(pauseCallback), 0, 0}, +- { fastforward_xpm, "Ffwd", "Fast forward", 0, 0, 0} ++ { rewind_xpm, rewindEntry, rewindEntryDescr, GTK_SIGNAL_FUNC(rewindCallback), NULL, NULL}, ++ { stop_xpm, stopEntry, stopEntryDescr, GTK_SIGNAL_FUNC(stopCallback), NULL, NULL}, ++ { play_xpm, playEntry, playEntryDescr, GTK_SIGNAL_FUNC(playCallback), NULL, NULL}, ++ { pause_xpm, pauseEntry, pauseEntryDescr, GTK_SIGNAL_FUNC(pauseCallback), NULL, NULL}, ++ { fastforward_xpm, ffwdEntry, ffwdEntryDescr, NULL, NULL, NULL} + }; + + +@@ -212,7 +203,7 @@ + + + +-GtkWidget *createMainWindow(char *filename = 0) ++GtkWidget *createMainWindow(char *filename) + { + GtkWidget *mainVbox; + GtkWidget *hbox; +@@ -509,7 +500,7 @@ + { + pmap = gdk_pixmap_create_from_xpm_d(window->window, &mask, + &style->bg[GTK_STATE_NORMAL], +- toolbar_items[i].pixmap); ++ (gchar **)toolbar_items[i].pixmap); + pixmap = gtk_pixmap_new(pmap, mask); + // FIXME: is this enough to destroy pmap and mask? + gdk_pixmap_unref(pmap); diff --git a/audio/musica/files/patch-src_help.cc b/audio/musica/files/patch-src_help.cc new file mode 100644 index 000000000000..dc491a011d09 --- /dev/null +++ b/audio/musica/files/patch-src_help.cc @@ -0,0 +1,11 @@ +--- src/help.cc.orig 2007-12-18 19:46:20.000000000 +0100 ++++ src/help.cc 2007-12-18 19:46:34.000000000 +0100 +@@ -59,7 +59,7 @@ + + + +-static char *copyingText = ++static char copyingText[] = + PACKAGE " " VERSION " - a MIDI player\n\n" \ + "Copyright (C) 1999, Erik Mouw (J.A.K.Mouw@its.tudelft.nl)\n\n" \ + "This program is free software; you can redistribute it and/or modify " \ diff --git a/audio/musica/files/patch-src_main.cc b/audio/musica/files/patch-src_main.cc new file mode 100644 index 000000000000..3f9611d0bd4b --- /dev/null +++ b/audio/musica/files/patch-src_main.cc @@ -0,0 +1,29 @@ +--- src/main.cc.orig 2007-12-18 19:46:50.000000000 +0100 ++++ src/main.cc 2007-12-18 19:48:06.000000000 +0100 +@@ -59,7 +59,7 @@ + + + +- ++static char deviceName[] = "/dev/sequencer"; + + int main(int argc, char *argv[]) + { +@@ -79,7 +79,7 @@ + // create some MIDI devices + // first a "real" device: the Roland HP330 on the external MIDI port + rolandHp330 = new ossSequencer("External MIDI port"); +- rolandHp330->setDevice("/dev/sequencer", 0); ++ rolandHp330->setDevice(deviceName, 0); + rolandHp330->open(); + + // map all channels on channel 0 (the default receive channel) +@@ -98,7 +98,7 @@ + + // another "real" device: the EMU 8000 synthesiser on the SB 64 AWE Gold + sbAwe64 = new ossSequencer("SB AWE 64"); +- sbAwe64->setDevice("/dev/sequencer", 1); ++ sbAwe64->setDevice(deviceName, 1); + sbAwe64->open(); + + diff --git a/audio/musica/files/patch-src_ossmidi.cc b/audio/musica/files/patch-src_ossmidi.cc new file mode 100644 index 000000000000..b8a103af950d --- /dev/null +++ b/audio/musica/files/patch-src_ossmidi.cc @@ -0,0 +1,21 @@ +--- src/ossmidi.cc.orig 2007-12-18 19:48:23.000000000 +0100 ++++ src/ossmidi.cc 2007-12-18 19:50:01.000000000 +0100 +@@ -32,7 +32,8 @@ + + #include <assert.h> + +-#include <iostream.h> ++#include <iostream> ++using namespace std; + #include <stdio.h> + #include <errno.h> + +@@ -63,6 +64,8 @@ + + #ifdef HAVE_LINUX_SOUNDCARD_H + # include <linux/soundcard.h> ++#else ++# include <sys/soundcard.h> + #endif + + #ifdef HAVE_SYS_IOCTL_H diff --git a/audio/musica/files/patch-src_program2device.cc b/audio/musica/files/patch-src_program2device.cc new file mode 100644 index 000000000000..e5122f36e434 --- /dev/null +++ b/audio/musica/files/patch-src_program2device.cc @@ -0,0 +1,11 @@ +--- src/program2device.cc.orig 2007-12-18 19:56:19.000000000 +0100 ++++ src/program2device.cc 2007-12-18 19:56:34.000000000 +0100 +@@ -45,7 +45,7 @@ + + + +-static char *deviceType = "program-to-device"; ++static char deviceType[] = "program-to-device"; + + + diff --git a/audio/musica/files/patch-src_readmidi.cc b/audio/musica/files/patch-src_readmidi.cc new file mode 100644 index 000000000000..b0cb9ab39190 --- /dev/null +++ b/audio/musica/files/patch-src_readmidi.cc @@ -0,0 +1,12 @@ +--- src/readmidi.cc.orig 2007-12-18 19:57:34.000000000 +0100 ++++ src/readmidi.cc 2007-12-18 19:57:44.000000000 +0100 +@@ -30,7 +30,8 @@ + # include "config.h" + #endif + +-#include <iostream.h> ++#include <iostream> ++using namespace std; + #include <stdio.h> + #include <errno.h> + diff --git a/audio/musica/files/patch-src_sequence.cc b/audio/musica/files/patch-src_sequence.cc new file mode 100644 index 000000000000..bdac8488cbd9 --- /dev/null +++ b/audio/musica/files/patch-src_sequence.cc @@ -0,0 +1,13 @@ +--- src/sequence.cc.orig 2007-12-18 19:57:14.000000000 +0100 ++++ src/sequence.cc 2007-12-18 19:59:18.000000000 +0100 +@@ -52,8 +52,10 @@ + + + ++#ifdef TIMING_DEBUG + static long int lastNextTime = 0L; + static int lastNextTrack = 0; ++#endif + + + diff --git a/audio/musica/pkg-descr b/audio/musica/pkg-descr new file mode 100644 index 000000000000..fa5525bd7e0c --- /dev/null +++ b/audio/musica/pkg-descr @@ -0,0 +1,10 @@ +Musica is a GTK based MIDI player. + +- Plays MIDI files on Linux machines with an OSS sound card interface. +- GTK based user interface supporting drag-and-drop for easy file + selection. Drag a MIDI file from the GNOME-ified Midnight Commander + to Musica's drop pocket and it automatically loads the file. +- Tempo adjustment, Play a MIDI file up to four times faster or slower. +- Fast forward. Skip those dull passages in a MIDI file. + +WWW: http://www-ict.its.tudelft.nl/~erik/open-source/musica |