Skip to content

Commit

Permalink
Merge pull request #3 from pmcharrison/dev
Browse files Browse the repository at this point in the history
v0.2.3
  • Loading branch information
pmcharrison committed Sep 20, 2019
2 parents f2b615b + d9ecd2f commit 3d3d410
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 17 deletions.
26 changes: 13 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: parn94
Title: Implementation of Richard Parncutt's Psychoacoustic Harmony Algorithms
Version: 0.2.2
Version: 0.2.3
Authors@R: person("Peter", "Harrison", email = "p.m.c.harrison@qmul.ac.uk", role = c("aut", "cre"))
Description: This package presents an implementation of Richard Parncutt's psychoacoustic harmony analysis algorithms, as described in Parncutt & Strasburger (1994).
Depends: R (>= 3.4.0)
Expand All @@ -10,19 +10,19 @@ LazyData: true
RoxygenNote: 6.1.1
RdMacros: Rdpack
Imports:
assertthat,
magrittr,
hrep,
tibble,
purrr,
Rdpack,
assertthat (>= 0.2.1),
magrittr (>= 1.5),
hrep (>= 0.10.0.9000),
tibble (>= 2.1.3),
purrr (>= 0.3.2),
Rdpack (>= 0.11.0),
methods
Suggests:
testthat,
knitr,
rmarkdown,
ggplot2,
apa,
covr
testthat (>= 2.1.1),
knitr (>= 1.23),
rmarkdown (>= 1.11),
ggplot2 (>= 3.1.0.9000),
apa (>= 0.3.2),
covr (>= 3.2.1)
VignetteBuilder: knitr
Remotes: pmcharrison/hrep
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# parn94 0.2.3

* Added a `NEWS.md` file to track changes to the package.
* Updated to reflect new version of hrep package.
2 changes: 1 addition & 1 deletion R/add-complex-spectrum.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ get_template <- function(par) {
{hrep::sparse_pi_spectrum(.,
num_harmonics = par$template_num_harmonics,
roll_off = par$template_roll_off,
round = TRUE)} %>%
digits = 0)} %>%
(tibble::as_tibble) %>%
{magrittr::set_names(., c("interval", "weight"))}
}
2 changes: 1 addition & 1 deletion R/parn94.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ parn94 <- function(x, par = parn94_params(), ...) {
#' @rdname parn94
#' @export
parn94.default <- function(x, par = parn94_params(), ...) {
x <- hrep::sparse_pi_spectrum(x, round = TRUE, ...)
x <- hrep::sparse_pi_spectrum(x, digits = 0, ...)
parn94(x, par = par)
}

Expand Down
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
environment:
global:
USE_RTOOLS: true
R_REMOTES_STANDALONE: true

# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-multiplicity.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test_that("testing against legacy code", {
test(c(60, 64, 67), 2.835933, par = parn94_params(unit_amplitude_in_dB = 50))
test(c(61, 62, 63), 1.293558, par = parn94_params(unit_amplitude_in_dB = 70))

test(hrep::sparse_pi_spectrum(c(60, 64, 67), roll_off = 2, round = TRUE),
test(hrep::sparse_pi_spectrum(c(60, 64, 67), roll_off = 2, digits = 0),
2.899631)

# HarmonyParncutt::get_parncutt_sonority_analysis(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-pure_sonor.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_that("testing against legacy code", {
test(c(60, 64, 67), 0.6061362, par = parn94_params(unit_amplitude_in_dB = 50))
test(c(61, 62, 63), 0.01086485, par = parn94_params(unit_amplitude_in_dB = 70))

test(hrep::sparse_pi_spectrum(c(60, 64, 67), roll_off = 2, round = TRUE),
test(hrep::sparse_pi_spectrum(c(60, 64, 67), roll_off = 2, digits = 0),
0.6136948)

# HarmonyParncutt::get_parncutt_sonority_analysis(
Expand Down

0 comments on commit 3d3d410

Please sign in to comment.