Git Product home page Git Product logo

datagoboop's People

Contributors

akseong avatar jayesrule avatar sebwaz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

datagoboop's Issues

Poll: should wplay use console controls by default?

Made some changes to wplay and cplay in dev branch.

  • console controls now stops playback whenever input other than 'p' or 's' given
  • if eval_entry = TRUE any (single-line) input other than 'p' or 's' is also executed.

try:

bp2 <- bach()
wplay_controls <- TRUE
wplay(bp2)

eval_entry <- TRUE
wplay(bp2)
test <- 5^2
test

Q1: Should we get rid of the system wait, and just default to console controls?
Q2: Should eval_entry be TRUE by default? (have it on FALSE for now b/c it just seems a bit dodgy to execute commands entered somewhat by mistake)

Create tests

We gotta... figure what functions to test and how to test them.
Basically set up automatic tests to verify functionality before packaging.

`progbar` options

check functions for inclusion of progbar option (used by notes())

functions needing progbar option:

  • bach()
  • others ??

NA handling

a few functions need NA handling, e.g.

# doesn't work
wplay(sonify_hist(data=airquality, var=Ozone))

#works
wplay(sonify_hist(data=na.omit(airquality), var=Ozone))

not sure which other ones; this one just popped up when I was writing that blogpost.

new sonification type - event filigree

essentially, it would scan the data for a user-defined event (might just need to be a new column in a data frame), and play a pre-defined sound when the event occurs (e.g. moving average in a time series experiences a large drop, or voltage spikes in neuronal recordings)

Save to wav or audio file

Hi, I am very impressed by the work and trying to use the library on my project. Do you have a way to export the wplay audio into an audio file? The type of the wave is a num array. Thanks in advance!

Creative Cropping with the piano sample

Just had a thought about incorporating samples. Since the piano sample is so long, can we find a way to create a function where we specify our desired length and pitch, the function will then stretch the piano sample appropriately and then crop it afterwards?

Change how `add_inst` and functions based on instruments.rds work

  1. instruments.rds should be treated as a static data file. It should not be editable or stored globally.
  2. add_inst can be changed to create_inst which creates new instruments locally. Sound functions will look for these when playing sounds with unrecognized inst names.

`bach()` varnames + comments

bach() function could be a kind of built-in code tutorial if variable names were friendlier and code were commented

Save stereo .wav files properly

As used currently, seewave::savewav() will save only one ear of sound given a stereo input

I've worked around this for the shiny app using code like this, but such a fix should probably be implemented within the datagoboop package itself

wave_fname <- here::here("scatter", "www", "testwave.wav")
w <- sonify_mod(lm(as.formula("mpg ~ cyl"), data = mtcars))
tuneR::writeWave(tuneR::normalize(tuneR::Wave(left = w[1, ], right = w[2, ], samp.rate = 44100, bit = 16), unit = "16"), filename = wave_fname)

fix notes from devtools check

checking top-level files ... NOTE
Non-standard files/directories found at top level:
'example.Rmd' 'experiments' 'sounds'

checking R code for possible problems ... NOTE
notes: no visible global function definition for 'txtProgressBar'
notes: no visible binding for global variable 'progbar_title'
notes: no visible global function definition for 'setTxtProgressBar'
sonify_box: no visible global function definition for 'txtProgressBar'
sonify_box: no visible binding for global variable 'progbar_title'
sonify_box: no visible global function definition for
'setTxtProgressBar'
Undefined global functions or variables:
progbar_title setTxtProgressBar txtProgressBar
Consider adding
importFrom("utils", "setTxtProgressBar", "txtProgressBar")
to your NAMESPACE file.

checking Rd line widths ... NOTE
Rd file 'add_inst.Rd':
\examples lines wider than 100 characters:
# Generate a 250 Hz sawtooth wave and save it in the local folder using the save.wave() function from library(audio)
# Open the newly saved sound file and use it to specify a new synthesizer sound under the label "saw".

Rd file 'resynth.Rd':
\examples lines wider than 100 characters:
w <- resynth(hz = 360, dur = 1, env = c(1, 0), amp = rev(seq(0, 1, length.out = 6)), phi = rep(0, 6))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.