Skip to content

Commit

Permalink
rm beepr, add audio
Browse files Browse the repository at this point in the history
  • Loading branch information
franzbischoff committed Aug 20, 2018
1 parent 252b610 commit f173bda
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: A toolkit implementing the Matrix Profile concept that was created
License: MIT + file LICENSE
URL: https://github.com/franzbischoff/tsmp
BugReports: https://github.com/franzbischoff/tsmp/issues
Depends: R (>= 2.10), beepr, doSNOW, parallel, foreach
Depends: R (>= 2.10), audio, doSNOW, parallel, foreach
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export(simple.fast)
export(stamp)
export(stamp.par)
export(unconstrain.search)
import(audio)
import(beepr)
import(doSNOW)
import(foreach)
Expand Down
7 changes: 6 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->
tsmp 0.2.30
tsmp 0.2.14
===========

- Added SiMPle algorithm for sound data.
- Added FLUSS algorithm.
- Added \[find.chains()\] to look for chains primitives.
- Changed dependency from beepr to audio (actually beepr depends on
audio, so less dependencies)
- Added a `NEWS.md` file to track changes to the package.

tsmp 0.2.x
Expand Down
6 changes: 5 additions & 1 deletion NEWS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ knitr::opts_chunk$set(
)
```

# tsmp 0.2.30
# tsmp 0.2.14

* Added SiMPle algorithm for sound data.
* Added FLUSS algorithm.
* Added [find.chains()] to look for chains primitives.
* Changed dependency from beepr to audio (actually beepr depends on audio, so less dependencies)
* Added a `NEWS.md` file to track changes to the package.

# tsmp 0.2.x
Expand Down
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ Francisco Bischoff

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

# tsmp 0.2.30
# tsmp 0.2.14

- Added SiMPle algorithm for sound data.
- Added FLUSS algorithm.
- Added \[find.chains()\] to look for chains primitives.
- Changed dependency from beepr to audio (actually beepr depends on
audio, so less dependencies)
- Added a `NEWS.md` file to track changes to the package.

# tsmp 0.2.x
Expand Down
2 changes: 1 addition & 1 deletion R/mstomp.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mstomp <- function(data, window.size, must.dim = NULL, exc.dim = NULL, exclusion
on.exit(close(pb))
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}

## initialization
Expand Down
7 changes: 2 additions & 5 deletions R/mstomp_par.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' # using all dimensions
#' Sys.sleep(1) # sometimes sleep is needed if you run parallel multiple times in a row
#' mp <- mstomp.par(toy_data$data[1:100,], 30, verbose = 0)
#' @import beepr doSNOW foreach parallel
#' @import audio doSNOW foreach parallel

mstomp.par <- function(data, window.size, must.dim = NULL, exc.dim = NULL, exclusion.zone = 1 / 2, verbose = 2, n.workers = 2) {
eps <- .Machine$double.eps^0.5
Expand Down Expand Up @@ -140,10 +140,7 @@ mstomp.par <- function(data, window.size, must.dim = NULL, exc.dim = NULL, exclu
on.exit(close(pb), TRUE)
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
# # sound_path <- system.file("sounds/microwave_ping_mono.wav", package = "beepr")
# # sfx <- audio::load.wave(sound_path)
# on.exit(audio::play(sfx), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}

## initialize variable
Expand Down
2 changes: 1 addition & 1 deletion R/sdts_train.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ sdts.train <- function(data, label, window.size, beta = 1, pat.max = Inf, parall
on.exit(close(pb))
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}

for (i in 1:n.window.size) {
Expand Down
2 changes: 1 addition & 1 deletion R/simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ simple.fast <- function(data, window.size, exclusion.zone = 1 / 2, verbose = 2)
on.exit(close(pb))
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}

## compute necessary values
Expand Down
2 changes: 1 addition & 1 deletion R/stamp.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ stamp <- function(..., window.size, exclusion.zone = 1 / 2, s.size = Inf, verbos
on.exit(close(pb))
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}
# anytime must return the result always
on.exit(return(list(
Expand Down
2 changes: 1 addition & 1 deletion R/stamp_par.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ stamp.par <- function(..., window.size, exclusion.zone = 1 / 2, s.size = Inf, n.
on.exit(close(pb), TRUE)
}
if (verbose > 1) {
on.exit(beepr::beep(10), TRUE)
on.exit(audio::play(sounds[[1]]), TRUE)
}
# anytime must return the result always
on.exit(return(list(
Expand Down
Binary file added R/sysdata.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This is a point release fixing failing tests on CRAN.
* Changed dependency from beepr to audio (actually beepr depends on audio, so less dependencies).
* Added persons to DESCRIPTION as their code/research was implemented in this package.

## Test environments
* local Windows 10 install, R 3.5.1
Expand Down
10 changes: 7 additions & 3 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f173bda

Please sign in to comment.