packages feed

Euterpea 2.0.6 → 2.0.7

raw patch · 39 files changed

+50/−722 lines, 39 filesdep ~HCodecsdep ~PortMididep ~bytestringPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: HCodecs, PortMidi, bytestring, containers, deepseq, random

API changes (from Hackage documentation)

+ Euterpea.Music: infixr 5 :=:
- Control.SF.SF: [runSF] :: SF a b -> (a -> (b, SF a b))
+ Control.SF.SF: [runSF] :: SF a b -> a -> (b, SF a b)
- Euterpea: importFile :: FilePath -> IO Either String Midi
+ Euterpea: importFile :: FilePath -> IO (Either String Midi)
- Euterpea.IO.Audio: writeWav :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap Signal p () a1 -> Music a2 -> IO ()
+ Euterpea.IO.Audio: writeWav :: (Clock p, ToMusic1 a, AudioSample a) => String -> [(InstrumentName, Instr (Signal p () a))] -> Music a -> IO ()
- Euterpea.IO.Audio: writeWavNorm :: (Clock p, ToMusic1 a2, AudioSample a1) => String -> InstrMap Signal p () a1 -> Music a2 -> IO ()
+ Euterpea.IO.Audio: writeWavNorm :: (Clock p, ToMusic1 a, AudioSample a) => String -> [(InstrumentName, Instr (Signal p () a))] -> Music a -> IO ()
- Euterpea.IO.Audio.BasicSigFuns: envASR :: (Clock p) => Double -> Double -> Double -> Signal p () Double
+ Euterpea.IO.Audio.BasicSigFuns: envASR :: Clock p => Double -> Double -> Double -> Signal p () Double
- Euterpea.IO.Audio.Basics: outA :: (Arrow a) => a b b
+ Euterpea.IO.Audio.Basics: outA :: Arrow a => a b b
- Euterpea.IO.Audio.CSound: oscil :: (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
+ Euterpea.IO.Audio.CSound: oscil :: forall {p} {a :: Type -> Type -> Type}. (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
- Euterpea.IO.Audio.CSound: oscil1 :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p Double Double
+ Euterpea.IO.Audio.CSound: oscil1 :: forall {a :: Type -> Type -> Type} {p}. (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p Double Double
- Euterpea.IO.Audio.CSound: oscil1i :: (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p Double Double
+ Euterpea.IO.Audio.CSound: oscil1i :: forall {a :: Type -> Type -> Type} {p}. (Clock p, ArrowChoice a, ArrowCircuit a) => Table -> Double -> Double -> ArrowP a p Double Double
- Euterpea.IO.Audio.CSound: oscili :: (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
+ Euterpea.IO.Audio.CSound: oscili :: forall {p} {a :: Type -> Type -> Type}. (Clock p, ArrowCircuit a) => Table -> Double -> ArrowP a p Double Double
- Euterpea.IO.Audio.CSound: oscils :: (Clock p, ArrowCircuit a) => Double -> ArrowP a p Double Double
+ Euterpea.IO.Audio.CSound: oscils :: forall {a :: Type -> Type -> Type} {p}. (Clock p, ArrowCircuit a) => Double -> ArrowP a p Double Double
- Euterpea.IO.Audio.CSound: rand :: () => Int -> ArrowP SF p Double Double
+ Euterpea.IO.Audio.CSound: rand :: Int -> ArrowP SF p Double Double
- Euterpea.IO.MIDI: data DeviceInfo
+ Euterpea.IO.MIDI: data () => DeviceInfo
- Euterpea.IO.MIDI: data Message
+ Euterpea.IO.MIDI: data () => Message
- Euterpea.IO.MIDI.FromMidi2: restructure :: (ToMusic1 a) => Music a -> Music (Pitch, Volume)
+ Euterpea.IO.MIDI.FromMidi2: restructure :: ToMusic1 a => Music a -> Music (Pitch, Volume)
- Euterpea.IO.MIDI.MEvent: perform :: (ToMusic1 a) => Music a -> Performance
+ Euterpea.IO.MIDI.MEvent: perform :: ToMusic1 a => Music a -> Performance
- Euterpea.IO.MIDI.MidiIO: data DeviceInfo
+ Euterpea.IO.MIDI.MidiIO: data () => DeviceInfo
- Euterpea.IO.MIDI.MidiIO: data Message
+ Euterpea.IO.MIDI.MidiIO: data () => Message
- Euterpea.IO.MIDI.Play: PlayParams :: Bool -> ChannelMapFun -> Maybe OutputDeviceID -> Time -> Music1 -> [MEvent] -> PlayParams
+ Euterpea.IO.MIDI.Play: PlayParams :: Bool -> ChannelMapFun -> Maybe OutputDeviceID -> Time -> (Music1 -> [MEvent]) -> PlayParams
- Euterpea.IO.MIDI.Play: musicToMsgs' :: (ToMusic1 a) => PlayParams -> Music a -> [(Time, MidiMessage)]
+ Euterpea.IO.MIDI.Play: musicToMsgs' :: ToMusic1 a => PlayParams -> Music a -> [(Time, MidiMessage)]
- Euterpea.Music: Modify :: Control -> (Music a) -> Music a
+ Euterpea.Music: Modify :: Control -> Music a -> Music a
- Euterpea.Music: Prim :: (Primitive a) -> Music a
+ Euterpea.Music: Prim :: Primitive a -> Music a

Files

− .git/FETCH_HEAD
@@ -1,1 +0,0 @@-d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc		branch 'master' of https://github.com/Euterpea/Euterpea2
− .git/HEAD
@@ -1,1 +0,0 @@-ref: refs/heads/master
− .git/ORIG_HEAD
@@ -1,1 +0,0 @@-8d88f6d82046f105cdce1bd722df40f1c77c7a7b
− .git/config
@@ -1,15 +0,0 @@-[core]-	repositoryformatversion = 0-	filemode = false-	bare = false-	logallrefupdates = true-	symlinks = false-	ignorecase = true-[submodule]-	active = .-[remote "origin"]-	url = https://github.com/Euterpea/Euterpea2.git-	fetch = +refs/heads/*:refs/remotes/origin/*-[branch "master"]-	remote = origin-	merge = refs/heads/master
− .git/description
@@ -1,1 +0,0 @@-Unnamed repository; edit this file 'description' to name the repository.
− .git/hooks/applypatch-msg.sample
@@ -1,15 +0,0 @@-#!/bin/sh-#-# An example hook script to check the commit log message taken by-# applypatch from an e-mail message.-#-# The hook should exit with non-zero status after issuing an-# appropriate message if it wants to stop the commit.  The hook is-# allowed to edit the commit message file.-#-# To enable this hook, rename this file to "applypatch-msg".--. git-sh-setup-commitmsg="$(git rev-parse --git-path hooks/commit-msg)"-test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}-:
− .git/hooks/commit-msg.sample
@@ -1,24 +0,0 @@-#!/bin/sh-#-# An example hook script to check the commit log message.-# Called by "git commit" with one argument, the name of the file-# that has the commit message.  The hook should exit with non-zero-# status after issuing an appropriate message if it wants to stop the-# commit.  The hook is allowed to edit the commit message file.-#-# To enable this hook, rename this file to "commit-msg".--# Uncomment the below to add a Signed-off-by line to the message.-# Doing this in a hook is a bad idea in general, but the prepare-commit-msg-# hook is more suited to it.-#-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')-# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"--# This example catches duplicate Signed-off-by lines.--test "" = "$(grep '^Signed-off-by: ' "$1" |-	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {-	echo >&2 Duplicate Signed-off-by lines.-	exit 1-}
− .git/hooks/fsmonitor-watchman.sample
@@ -1,114 +0,0 @@-#!/usr/bin/perl--use strict;-use warnings;-use IPC::Open2;--# An example hook script to integrate Watchman-# (https://facebook.github.io/watchman/) with git to speed up detecting-# new and modified files.-#-# The hook is passed a version (currently 1) and a time in nanoseconds-# formatted as a string and outputs to stdout all files that have been-# modified since the given time. Paths must be relative to the root of-# the working tree and separated by a single NUL.-#-# To enable this hook, rename this file to "query-watchman" and set-# 'git config core.fsmonitor .git/hooks/query-watchman'-#-my ($version, $time) = @ARGV;--# Check the hook interface version--if ($version == 1) {-	# convert nanoseconds to seconds-	$time = int $time / 1000000000;-} else {-	die "Unsupported query-fsmonitor hook version '$version'.\n" .-	    "Falling back to scanning...\n";-}--my $git_work_tree;-if ($^O =~ 'msys' || $^O =~ 'cygwin') {-	$git_work_tree = Win32::GetCwd();-	$git_work_tree =~ tr/\\/\//;-} else {-	require Cwd;-	$git_work_tree = Cwd::cwd();-}--my $retry = 1;--launch_watchman();--sub launch_watchman {--	my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')-	    or die "open2() failed: $!\n" .-	    "Falling back to scanning...\n";--	# In the query expression below we're asking for names of files that-	# changed since $time but were not transient (ie created after-	# $time but no longer exist).-	#-	# To accomplish this, we're using the "since" generator to use the-	# recency index to select candidate nodes and "fields" to limit the-	# output to file names only. Then we're using the "expression" term to-	# further constrain the results.-	#-	# The category of transient files that we want to ignore will have a-	# creation clock (cclock) newer than $time_t value and will also not-	# currently exist.--	my $query = <<"	END";-		["query", "$git_work_tree", {-			"since": $time,-			"fields": ["name"],-			"expression": ["not", ["allof", ["since", $time, "cclock"], ["not", "exists"]]]-		}]-	END--	print CHLD_IN $query;-	close CHLD_IN;-	my $response = do {local $/; <CHLD_OUT>};--	die "Watchman: command returned no output.\n" .-	    "Falling back to scanning...\n" if $response eq "";-	die "Watchman: command returned invalid output: $response\n" .-	    "Falling back to scanning...\n" unless $response =~ /^\{/;--	my $json_pkg;-	eval {-		require JSON::XS;-		$json_pkg = "JSON::XS";-		1;-	} or do {-		require JSON::PP;-		$json_pkg = "JSON::PP";-	};--	my $o = $json_pkg->new->utf8->decode($response);--	if ($retry > 0 and $o->{error} and $o->{error} =~ m/unable to resolve root .* directory (.*) is not watched/) {-		print STDERR "Adding '$git_work_tree' to watchman's watch list.\n";-		$retry--;-		qx/watchman watch "$git_work_tree"/;-		die "Failed to make watchman watch '$git_work_tree'.\n" .-		    "Falling back to scanning...\n" if $? != 0;--		# Watchman will always return all files on the first query so-		# return the fast "everything is dirty" flag to git and do the-		# Watchman query just to get it over with now so we won't pay-		# the cost in git to look up each individual file.-		print "/\0";-		eval { launch_watchman() };-		exit 0;-	}--	die "Watchman: $o->{error}.\n" .-	    "Falling back to scanning...\n" if $o->{error};--	binmode STDOUT, ":utf8";-	local $, = "\0";-	print @{$o->{files}};-}
− .git/hooks/post-update.sample
@@ -1,8 +0,0 @@-#!/bin/sh-#-# An example hook script to prepare a packed repository for use over-# dumb transports.-#-# To enable this hook, rename this file to "post-update".--exec git update-server-info
− .git/hooks/pre-applypatch.sample
@@ -1,14 +0,0 @@-#!/bin/sh-#-# An example hook script to verify what is about to be committed-# by applypatch from an e-mail message.-#-# The hook should exit with non-zero status after issuing an-# appropriate message if it wants to stop the commit.-#-# To enable this hook, rename this file to "pre-applypatch".--. git-sh-setup-precommit="$(git rev-parse --git-path hooks/pre-commit)"-test -x "$precommit" && exec "$precommit" ${1+"$@"}-:
− .git/hooks/pre-commit.sample
@@ -1,49 +0,0 @@-#!/bin/sh-#-# An example hook script to verify what is about to be committed.-# Called by "git commit" with no arguments.  The hook should-# exit with non-zero status after issuing an appropriate message if-# it wants to stop the commit.-#-# To enable this hook, rename this file to "pre-commit".--if git rev-parse --verify HEAD >/dev/null 2>&1-then-	against=HEAD-else-	# Initial commit: diff against an empty tree object-	against=4b825dc642cb6eb9a060e54bf8d69288fbee4904-fi--# If you want to allow non-ASCII filenames set this variable to true.-allownonascii=$(git config --bool hooks.allownonascii)--# Redirect output to stderr.-exec 1>&2--# Cross platform projects tend to avoid non-ASCII filenames; prevent-# them from being added to the repository. We exploit the fact that the-# printable range starts at the space character and ends with tilde.-if [ "$allownonascii" != "true" ] &&-	# Note that the use of brackets around a tr range is ok here, (it's-	# even required, for portability to Solaris 10's /usr/bin/tr), since-	# the square bracket bytes happen to fall in the designated range.-	test $(git diff --cached --name-only --diff-filter=A -z $against |-	  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0-then-	cat <<\EOF-Error: Attempt to add a non-ASCII file name.--This can cause problems if you want to work with people on other platforms.--To be portable it is advisable to rename the file.--If you know what you are doing you can disable this check using:--  git config hooks.allownonascii true-EOF-	exit 1-fi--# If there are whitespace errors, print the offending file names and fail.-exec git diff-index --check --cached $against --
− .git/hooks/pre-push.sample
@@ -1,53 +0,0 @@-#!/bin/sh--# An example hook script to verify what is about to be pushed.  Called by "git-# push" after it has checked the remote status, but before anything has been-# pushed.  If this script exits with a non-zero status nothing will be pushed.-#-# This hook is called with the following parameters:-#-# $1 -- Name of the remote to which the push is being done-# $2 -- URL to which the push is being done-#-# If pushing without using a named remote those arguments will be equal.-#-# Information about the commits which are being pushed is supplied as lines to-# the standard input in the form:-#-#   <local ref> <local sha1> <remote ref> <remote sha1>-#-# This sample shows how to prevent push of commits where the log message starts-# with "WIP" (work in progress).--remote="$1"-url="$2"--z40=0000000000000000000000000000000000000000--while read local_ref local_sha remote_ref remote_sha-do-	if [ "$local_sha" = $z40 ]-	then-		# Handle delete-		:-	else-		if [ "$remote_sha" = $z40 ]-		then-			# New branch, examine all commits-			range="$local_sha"-		else-			# Update to existing branch, examine new commits-			range="$remote_sha..$local_sha"-		fi--		# Check for WIP commit-		commit=`git rev-list -n 1 --grep '^WIP' "$range"`-		if [ -n "$commit" ]-		then-			echo >&2 "Found WIP commit in $local_ref, not pushing"-			exit 1-		fi-	fi-done--exit 0
− .git/hooks/pre-rebase.sample
@@ -1,169 +0,0 @@-#!/bin/sh-#-# Copyright (c) 2006, 2008 Junio C Hamano-#-# The "pre-rebase" hook is run just before "git rebase" starts doing-# its job, and can prevent the command from running by exiting with-# non-zero status.-#-# The hook is called with the following parameters:-#-# $1 -- the upstream the series was forked from.-# $2 -- the branch being rebased (or empty when rebasing the current branch).-#-# This sample shows how to prevent topic branches that are already-# merged to 'next' branch from getting rebased, because allowing it-# would result in rebasing already published history.--publish=next-basebranch="$1"-if test "$#" = 2-then-	topic="refs/heads/$2"-else-	topic=`git symbolic-ref HEAD` ||-	exit 0 ;# we do not interrupt rebasing detached HEAD-fi--case "$topic" in-refs/heads/??/*)-	;;-*)-	exit 0 ;# we do not interrupt others.-	;;-esac--# Now we are dealing with a topic branch being rebased-# on top of master.  Is it OK to rebase it?--# Does the topic really exist?-git show-ref -q "$topic" || {-	echo >&2 "No such branch $topic"-	exit 1-}--# Is topic fully merged to master?-not_in_master=`git rev-list --pretty=oneline ^master "$topic"`-if test -z "$not_in_master"-then-	echo >&2 "$topic is fully merged to master; better remove it."-	exit 1 ;# we could allow it, but there is no point.-fi--# Is topic ever merged to next?  If so you should not be rebasing it.-only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`-only_next_2=`git rev-list ^master           ${publish} | sort`-if test "$only_next_1" = "$only_next_2"-then-	not_in_topic=`git rev-list "^$topic" master`-	if test -z "$not_in_topic"-	then-		echo >&2 "$topic is already up to date with master"-		exit 1 ;# we could allow it, but there is no point.-	else-		exit 0-	fi-else-	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`-	/usr/bin/perl -e '-		my $topic = $ARGV[0];-		my $msg = "* $topic has commits already merged to public branch:\n";-		my (%not_in_next) = map {-			/^([0-9a-f]+) /;-			($1 => 1);-		} split(/\n/, $ARGV[1]);-		for my $elem (map {-				/^([0-9a-f]+) (.*)$/;-				[$1 => $2];-			} split(/\n/, $ARGV[2])) {-			if (!exists $not_in_next{$elem->[0]}) {-				if ($msg) {-					print STDERR $msg;-					undef $msg;-				}-				print STDERR " $elem->[1]\n";-			}-		}-	' "$topic" "$not_in_next" "$not_in_master"-	exit 1-fi--<<\DOC_END--This sample hook safeguards topic branches that have been-published from being rewound.--The workflow assumed here is:-- * Once a topic branch forks from "master", "master" is never-   merged into it again (either directly or indirectly).-- * Once a topic branch is fully cooked and merged into "master",-   it is deleted.  If you need to build on top of it to correct-   earlier mistakes, a new topic branch is created by forking at-   the tip of the "master".  This is not strictly necessary, but-   it makes it easier to keep your history simple.-- * Whenever you need to test or publish your changes to topic-   branches, merge them into "next" branch.--The script, being an example, hardcodes the publish branch name-to be "next", but it is trivial to make it configurable via-$GIT_DIR/config mechanism.--With this workflow, you would want to know:--(1) ... if a topic branch has ever been merged to "next".  Young-    topic branches can have stupid mistakes you would rather-    clean up before publishing, and things that have not been-    merged into other branches can be easily rebased without-    affecting other people.  But once it is published, you would-    not want to rewind it.--(2) ... if a topic branch has been fully merged to "master".-    Then you can delete it.  More importantly, you should not-    build on top of it -- other people may already want to-    change things related to the topic as patches against your-    "master", so if you need further changes, it is better to-    fork the topic (perhaps with the same name) afresh from the-    tip of "master".--Let's look at this example:--		   o---o---o---o---o---o---o---o---o---o "next"-		  /       /           /           /-		 /   a---a---b A     /           /-		/   /               /           /-	       /   /   c---c---c---c B         /-	      /   /   /             \         /-	     /   /   /   b---b C     \       /-	    /   /   /   /             \     /-    ---o---o---o---o---o---o---o---o---o---o---o "master"---A, B and C are topic branches.-- * A has one fix since it was merged up to "next".-- * B has finished.  It has been fully merged up to "master" and "next",-   and is ready to be deleted.-- * C has not merged to "next" at all.--We would want to allow C to be rebased, refuse A, and encourage-B to be deleted.--To compute (1):--	git rev-list ^master ^topic next-	git rev-list ^master        next--	if these match, topic has not merged in next at all.--To compute (2):--	git rev-list master..topic--	if this is empty, it is fully merged to "master".--DOC_END
− .git/hooks/pre-receive.sample
@@ -1,24 +0,0 @@-#!/bin/sh-#-# An example hook script to make use of push options.-# The example simply echoes all push options that start with 'echoback='-# and rejects all pushes when the "reject" push option is used.-#-# To enable this hook, rename this file to "pre-receive".--if test -n "$GIT_PUSH_OPTION_COUNT"-then-	i=0-	while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"-	do-		eval "value=\$GIT_PUSH_OPTION_$i"-		case "$value" in-		echoback=*)-			echo "echo from the pre-receive-hook: ${value#*=}" >&2-			;;-		reject)-			exit 1-		esac-		i=$((i + 1))-	done-fi
− .git/hooks/prepare-commit-msg.sample
@@ -1,42 +0,0 @@-#!/bin/sh-#-# An example hook script to prepare the commit log message.-# Called by "git commit" with the name of the file that has the-# commit message, followed by the description of the commit-# message's source.  The hook's purpose is to edit the commit-# message file.  If the hook fails with a non-zero status,-# the commit is aborted.-#-# To enable this hook, rename this file to "prepare-commit-msg".--# This hook includes three examples. The first one removes the-# "# Please enter the commit message..." help message.-#-# The second includes the output of "git diff --name-status -r"-# into the message, just before the "git status" output.  It is-# commented because it doesn't cope with --amend or with squashed-# commits.-#-# The third example adds a Signed-off-by line to the message, that can-# still be edited.  This is rarely a good idea.--COMMIT_MSG_FILE=$1-COMMIT_SOURCE=$2-SHA1=$3--/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"--# case "$COMMIT_SOURCE,$SHA1" in-#  ,|template,)-#    /usr/bin/perl -i.bak -pe '-#       print "\n" . `git diff --cached --name-status -r`-# 	 if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;-#  *) ;;-# esac--# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')-# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"-# if test -z "$COMMIT_SOURCE"-# then-#   /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"-# fi
− .git/hooks/update.sample
@@ -1,128 +0,0 @@-#!/bin/sh-#-# An example hook script to block unannotated tags from entering.-# Called by "git receive-pack" with arguments: refname sha1-old sha1-new-#-# To enable this hook, rename this file to "update".-#-# Config-# -------# hooks.allowunannotated-#   This boolean sets whether unannotated tags will be allowed into the-#   repository.  By default they won't be.-# hooks.allowdeletetag-#   This boolean sets whether deleting tags will be allowed in the-#   repository.  By default they won't be.-# hooks.allowmodifytag-#   This boolean sets whether a tag may be modified after creation. By default-#   it won't be.-# hooks.allowdeletebranch-#   This boolean sets whether deleting branches will be allowed in the-#   repository.  By default they won't be.-# hooks.denycreatebranch-#   This boolean sets whether remotely creating branches will be denied-#   in the repository.  By default this is allowed.-#--# --- Command line-refname="$1"-oldrev="$2"-newrev="$3"--# --- Safety check-if [ -z "$GIT_DIR" ]; then-	echo "Don't run this script from the command line." >&2-	echo " (if you want, you could supply GIT_DIR then run" >&2-	echo "  $0 <ref> <oldrev> <newrev>)" >&2-	exit 1-fi--if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then-	echo "usage: $0 <ref> <oldrev> <newrev>" >&2-	exit 1-fi--# --- Config-allowunannotated=$(git config --bool hooks.allowunannotated)-allowdeletebranch=$(git config --bool hooks.allowdeletebranch)-denycreatebranch=$(git config --bool hooks.denycreatebranch)-allowdeletetag=$(git config --bool hooks.allowdeletetag)-allowmodifytag=$(git config --bool hooks.allowmodifytag)--# check for no description-projectdesc=$(sed -e '1q' "$GIT_DIR/description")-case "$projectdesc" in-"Unnamed repository"* | "")-	echo "*** Project description file hasn't been set" >&2-	exit 1-	;;-esac--# --- Check types-# if $newrev is 0000...0000, it's a commit to delete a ref.-zero="0000000000000000000000000000000000000000"-if [ "$newrev" = "$zero" ]; then-	newrev_type=delete-else-	newrev_type=$(git cat-file -t $newrev)-fi--case "$refname","$newrev_type" in-	refs/tags/*,commit)-		# un-annotated tag-		short_refname=${refname##refs/tags/}-		if [ "$allowunannotated" != "true" ]; then-			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2-			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2-			exit 1-		fi-		;;-	refs/tags/*,delete)-		# delete tag-		if [ "$allowdeletetag" != "true" ]; then-			echo "*** Deleting a tag is not allowed in this repository" >&2-			exit 1-		fi-		;;-	refs/tags/*,tag)-		# annotated tag-		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1-		then-			echo "*** Tag '$refname' already exists." >&2-			echo "*** Modifying a tag is not allowed in this repository." >&2-			exit 1-		fi-		;;-	refs/heads/*,commit)-		# branch-		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then-			echo "*** Creating a branch is not allowed in this repository" >&2-			exit 1-		fi-		;;-	refs/heads/*,delete)-		# delete branch-		if [ "$allowdeletebranch" != "true" ]; then-			echo "*** Deleting a branch is not allowed in this repository" >&2-			exit 1-		fi-		;;-	refs/remotes/*,commit)-		# tracking branch-		;;-	refs/remotes/*,delete)-		# delete tracking branch-		if [ "$allowdeletebranch" != "true" ]; then-			echo "*** Deleting a tracking branch is not allowed in this repository" >&2-			exit 1-		fi-		;;-	*)-		# Anything else (is there anything else?)-		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2-		exit 1-		;;-esac--# --- Finished-exit 0
− .git/index

binary file changed (2532 → absent bytes)

− .git/info/exclude
@@ -1,6 +0,0 @@-# git ls-files --others --exclude-from=.git/info/exclude-# Lines that start with '#' are comments.-# For a project mostly in C, the following would be a good set of-# exclude patterns (uncomment them if you want to use them):-# *.[oa]-# *~
− .git/logs/HEAD
@@ -1,2 +0,0 @@-0000000000000000000000000000000000000000 8d88f6d82046f105cdce1bd722df40f1c77c7a7b Donya Quick <donyaquick@gmail.com> 1535156477 -0400	clone: from https://github.com/Euterpea/Euterpea2.git-8d88f6d82046f105cdce1bd722df40f1c77c7a7b d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc Donya Quick <donyaquick@gmail.com> 1537922762 -0400	pull --no-rebase --progress origin: Fast-forward
− .git/logs/refs/heads/master
@@ -1,2 +0,0 @@-0000000000000000000000000000000000000000 8d88f6d82046f105cdce1bd722df40f1c77c7a7b Donya Quick <donyaquick@gmail.com> 1535156477 -0400	clone: from https://github.com/Euterpea/Euterpea2.git-8d88f6d82046f105cdce1bd722df40f1c77c7a7b d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc Donya Quick <donyaquick@gmail.com> 1537922762 -0400	pull --no-rebase --progress origin: Fast-forward
− .git/logs/refs/remotes/origin/HEAD
@@ -1,1 +0,0 @@-0000000000000000000000000000000000000000 8d88f6d82046f105cdce1bd722df40f1c77c7a7b Donya Quick <donyaquick@gmail.com> 1535156477 -0400	clone: from https://github.com/Euterpea/Euterpea2.git
− .git/logs/refs/remotes/origin/master
@@ -1,1 +0,0 @@-8d88f6d82046f105cdce1bd722df40f1c77c7a7b d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc Donya Quick <donyaquick@gmail.com> 1537922666 -0400	fetch --progress --prune origin: fast-forward
− .git/objects/2c/39ac3b3d015b52d52ed6c96d86577060ad5735

binary file changed (5038 → absent bytes)

− .git/objects/51/d7405b33a961325d382e2e1c063fdbbd9476e2

binary file changed (1125 → absent bytes)

− .git/objects/89/a356e4e706425e0137fbc4647d4d79f7f79ee2

binary file changed (82 → absent bytes)

− .git/objects/a7/0504f785c4572afa4cf980332fe9b0f0da3245

binary file changed (296 → absent bytes)

− .git/objects/cd/8008b8f1f22e4ae847ff7bf4bc2b2ef134ef5e

binary file changed (136 → absent bytes)

− .git/objects/d2/7e2ddbce03ebd0f545186f1a6c4fe4c5320ebc

binary file changed (416 → absent bytes)

− .git/objects/dd/c626e76756b7bec1f4e4ea43cca1c68f354c19

binary file changed (242 → absent bytes)

− .git/objects/pack/pack-31bc5dbdb1840b806280b803877068804417e223.idx

binary file changed (12020 → absent bytes)

− .git/objects/pack/pack-31bc5dbdb1840b806280b803877068804417e223.pack

file too large to diff

− .git/packed-refs
@@ -1,2 +0,0 @@-# pack-refs with: peeled fully-peeled sorted -8d88f6d82046f105cdce1bd722df40f1c77c7a7b refs/remotes/origin/master
− .git/refs/heads/master
@@ -1,1 +0,0 @@-d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc
− .git/refs/remotes/origin/HEAD
@@ -1,1 +0,0 @@-ref: refs/remotes/origin/master
− .git/refs/remotes/origin/master
@@ -1,1 +0,0 @@-d27e2ddbce03ebd0f545186f1a6c4fe4c5320ebc
Euterpea.cabal view
@@ -1,9 +1,9 @@ name:           Euterpea
-version:        2.0.6
+version:        2.0.7
 Cabal-Version:  >= 1.8
 license:        BSD3
 license-file:	License
-copyright:      Copyright (c) 2008-2017 Euterpea authors
+copyright:      Copyright (c) 2008-2019 Euterpea authors
 category:       Sound, Music
 stability:      experimental
 build-type:     Custom
@@ -62,10 +62,10 @@         array>=0.5.0.0 && <=0.6,
         deepseq>=1.3.0.2 && <=1.5,
         random>=1.0.1.1 && <=1.2,
-        PortMidi==0.1.6.1,
+        PortMidi==0.2.0.0,
         HCodecs == 0.5.1,
-        stm >= 2.4 && <2.5,
-        containers>=0.5.5.1 && <0.6,
+        stm >= 2.4 && <2.6,
+        containers>=0.5.5.1 && <0.7,
         bytestring>=0.10.4.0 && <= 0.10.9,
         heap >= 1.0 && < 2.0,
         ghc-prim
Euterpea/IO/MIDI/MidiIO.lhs view
@@ -20,9 +20,10 @@ >                        getDefaultOutputDeviceID, getDefaultInputDeviceID,
 >                        openInput, openOutput, readEvents,
 >                        close, writeShort, getErrorText, terminate, initialize,
->                        PMError (NoError, BufferOverflow), PMStream,
+>                        PMStream, PMError (..),
 >                        PMEvent (..), PMMsg (PMMsg), 
->                        encodeMsg, decodeMsg)
+>                        encodeMsg, decodeMsg,
+>                        PMSuccess (..))
 > import Control.Exception (finally)
 > import Control.Concurrent
 > import Control.Concurrent.STM.TChan
@@ -206,9 +207,9 @@ > initializeMidi :: IO ()
 > initializeMidi = do
 >   e <- initialize
->   if e == NoError
->       then return ()
->       else reportError "initializeMidi" e
+>   case e of 
+>       Right _ -> return ()
+>       Left e' -> reportError "initializeMidi" e'
 
 terminateMidi calls the stop function on all elements of outDevMap
 and clears the mapping entirely.  It also clears outPort and inPort.
@@ -260,18 +261,16 @@ >     Nothing -> do
 >       r <- openInput devId
 >       case r of
->         Right e -> reportError "pollMidiCB" e
->         Left s -> addPort inPort (idid, s) >> input s
+>         Left  e -> reportError "pollMidiCB" e
+>         Right s -> addPort inPort (idid, s) >> input s
 >     Just s -> input s
 >   where
 >     input :: PMStream -> IO ()
 >     input s = do
 >       e <- readEvents s
 >       case e of
->         Right e -> if e == NoError
->           then return ()
->           else reportError "pollMidiCB" e
->         Left l -> do
+>         Left  e -> reportError "pollMidiCB" e
+>         Right l -> do
 >           now <- getTimeNow
 >           case mapMaybe (msgToMidi . decodeMsg . message) l of
 >             [] -> return ()
@@ -284,18 +283,16 @@ >     Nothing -> do
 >       r <- openInput devId
 >       case r of
->         Right e -> reportError "pollMIDI" e >> return Nothing
->         Left s -> addPort inPort (idid, s) >> input s
+>         Left  e -> reportError "pollMIDI" e >> return Nothing
+>         Right s -> addPort inPort (idid, s) >> input s
 >     Just s -> input s
 >   where
 >     input :: PMStream -> IO (Maybe (Time, [Message]))
 >     input s = do
 >       e <- readEvents s
 >       case e of
->         Right e -> if e == NoError
->           then return Nothing
->           else reportError "pollMIDI" e >> return Nothing
->         Left l -> do
+>         Left  e -> reportError "pollMIDI" e >> return Nothing
+>         Right l -> do
 >           now <- getTimeNow
 >           case mapMaybe (msgToMidi . decodeMsg . message) l of
 >             [] -> return Nothing
@@ -409,8 +406,8 @@ > midiOutRealTime' odid@(OutputDeviceID devId) = do
 >   s <- openOutput devId 1
 >   case s of
->     Right e -> reportError "Unable to open output device in midiOutRealTime'" e >> return Nothing
->     Left s -> do
+>     Left  e -> reportError "Unable to open output device in midiOutRealTime'" e >> return Nothing
+>     Right s -> do
 >       addPort outPort (odid, s)
 >       return $ Just (process odid, finalize odid)
 >   where
@@ -427,22 +424,22 @@ >     writeMsg s t m = do
 >               e <- writeShort s (PMEvent m (round (t * 1e3)))
 >               case e of
->                 NoError -> return ()
->                 _ -> reportError "midiOutRealTime'" e
+>                 Left e' -> reportError "midiOutRealTime'" e'
+>                 Right _ -> return ()
 >     finalize odid = do
 >       s <- lookupPort outPort odid
->       e <- maybe (return NoError) close s
+>       e <- maybe (return (Right NoError'NoData)) close s
 >       case e of
->         NoError -> return ()
->         _ -> reportError "midiOutRealTime'" e
+>         Left e' -> reportError "midiOutRealTime'" e'
+>         Right _ -> return ()
 
 
 > midiOutRealTime :: OutputDeviceID -> IO (Maybe ((Time, Message) -> IO (), IO ()))
 > midiOutRealTime odid@(OutputDeviceID devId) = do
 >   s <- openOutput devId 1
 >   case s of
->     Right e -> reportError "outputMidi" e >> return Nothing
->     Left s -> do
+>     Left  e -> reportError "outputMidi" e >> return Nothing
+>     Right s -> do
 >       ch <- atomically newTChan
 >       wait <- newEmptyMVar
 >       fin <- newEmptyMVar
@@ -492,9 +489,9 @@ >             writeMsg t m = do
 >               e <- writeShort s (PMEvent m (round (t * 1e3)))
 >               case e of
->                 NoError -> return False
->                 BufferOverflow -> putStrLn "overflow" >> threadDelay 10000 >> writeMsg t m
->                 _ -> reportError "outputMidi" e >> return True
+>                 Left BufferOverflow -> putStrLn "overflow" >> threadDelay 10000 >> writeMsg t m
+>                 Left e' -> reportError "outputMidi" e' >> return True
+>                 Right _ -> return False
 
 
 ---------------------
@@ -624,8 +621,8 @@ > midiInRealTime device callback = do
 >   r <- openInput device
 >   case r of
->     Right e -> reportError "midiInRealTime" e >> return Nothing
->     Left s -> do
+>     Left e -> reportError "midiInRealTime" e >> return Nothing
+>     Right s -> do
 >       fin <- newEmptyMVar
 >       forkIO (loop Nothing s fin)
 >       return (Just (putMVar fin () >> putMVar fin ()))
@@ -638,13 +635,11 @@ >         Nothing -> do
 >           e <- readEvents s
 >           case e of
->             Right e -> if e == NoError
->               then threadDelay 1000 >> loop start s fin
->               else do
+>             Left e -> do
 >                 reportError "midiInRealTime" e
 >                 callback (t, TrackEnd)
 >                 return ()
->             Left l -> do
+>             Right l -> do
 >               t <- getTimeNow
 >               sendEvts start t l
 >       where
Euterpea/Music.lhs view
@@ -338,10 +338,18 @@ > dur (Modify (Tempo r) m)  = dur m / r
 > dur (Modify _ m)          = dur m
 
+Update as of Euterpea 2.0.7: the cut and remove functions 
+previously used to permit zero-duration notes. This can cause
+some bad behavior with some synthesizers. The Note cases have
+been re-written to turn zero-duration notes into rests.
+These functions will still introduce zero-duration rests. 
+To remove all zero duration values, use removeZeros.
+
 > cut :: Dur -> Music a -> Music a
 > cut d m | d <= 0            = rest 0
-> cut d (Prim (Note oldD p))  = note (min oldD d) p
-> cut d (Prim (Rest oldD))    = rest (min oldD d)
+> cut d (Prim (Note oldD p))  =  let d' = max (min oldD d) 0
+>                                in if d'>0 then note d' p else rest 0
+> cut d (Prim (Rest oldD))    = rest (max (min oldD d) 0)
 > cut d (m1 :=: m2)           = cut d m1 :=: cut d m2
 > cut d (m1 :+: m2)           =  let  m'1  = cut d m1
 >                                     m'2  = cut (d - dur m'1) m2
@@ -349,10 +357,10 @@ > cut d (Modify (Tempo r) m)  = tempo r (cut (d*r) m)
 > cut d (Modify c m)          = Modify c (cut d m)
 
-
 > remove :: Dur -> Music a -> Music a
 > remove d m | d <= 0            = m
-> remove d (Prim (Note oldD p))  = note (max (oldD-d) 0) p
+> remove d (Prim (Note oldD p))  =  let d' = max (oldD-d) 0
+>                                   in  if d'>0 then note d' p else rest 0
 > remove d (Prim (Rest oldD))    = rest (max (oldD-d) 0)
 > remove d (m1 :=: m2)           = remove d m1 :=: remove d m2
 > remove d (m1 :+: m2)           =  let  m'1  = remove d m1
@@ -382,6 +390,7 @@ >        (m, Prim (Rest 0  ))  -> m
 >        (m1, m2)              -> m1 :=: m2
 > removeZeros (Modify c m)  = Modify c (removeZeros m)
+
 
 > type LazyDur = [Dur]
 > durL :: Music a -> LazyDur
ReadMe.txt view
@@ -1,5 +1,5 @@-Version 2.0.5
-Last modified: 26-June-2018
+Version 2.0.7
+Last modified: 14-May-2019
 Website: http://www.euterpea.com
  _____      _                             
 |  ___|    | |