coolbutuseless / tr808r

TR-808 Drum Machine for R
https://coolbutuseless.github.io/package/tr808r/
MIT License
40 stars 0 forks source link

no audio drivers are available #1

Open AlexINSERM opened 2 years ago

AlexINSERM commented 2 years ago

Hello and thank you for your package. In love in my youth with the English band 808State, I immediately wanted to try it but I have the following error message: Erreur dans play.default(x, rate, ...) : no audio drivers are available Can you help me please ?

Alex

coolbutuseless commented 2 years ago

This seems like an issue with the audio package, not tr808r.

I assume that you have an audio device on your system, and can hear other sounds on your computer.

Can you see if this code works for you?

audio::play(sin(1:10000/20))

If that code fails, then it means that you have a problem with the audio package detecing your system. This may be a known problem for your system or you may have to report the issue to the audio developers.

Could you post the output of sessionInfo() and Sys.info() on your system?

stragu commented 2 years ago

I get the same issue on Ubuntu 20.04 with R 4.2.0

Hopefully this helps:

> tr808()
BPM: 96  FPS: 25.6
SPACE to play/pause
'c' to clear current pattern
's' to save tr808 state (load with 'state = ...' argument)
't' to copy tweetable text to clipboard/print to console
'1'-'8' to toggle pattern for playback
SHIFT + '1'-'8' to jump immediately to this pattern (usually best when PAUSED)
+/- Up/Down to adjust BPM
Starting Event Loop. Press ESC in window to quit. Waiting for input
Error in play.default(x, rate, ...) : no audio drivers are available
> audio::play(sin(1:10000/20))
Error in play.default(sin(1:10000/20)) : no audio drivers are available
> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C               LC_TIME=en_AU.UTF-8       
 [4] LC_COLLATE=en_AU.UTF-8     LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tr808r_0.1.1

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   cluster_2.1.3     splines_4.2.0     MASS_7.3-57       lattice_0.20-45  
 [6] R6_2.5.1          eventloop_0.1.1   tools_4.2.0       pkgbuild_1.3.1    parallel_4.2.0   
[11] grid_4.2.0        nlme_3.1-157      mgcv_1.8-40       vegan_2.6-2       audio_0.1-10     
[16] cli_3.3.0         withr_2.5.0       remotes_2.4.2     rprojroot_2.0.3   permute_0.9-7    
[21] crayon_1.5.1      processx_3.5.3    Matrix_1.4-1      callr_3.7.0       ps_1.7.0         
[26] curl_4.3.2        compiler_4.2.0    prettyunits_1.1.1
> Sys.info()
                                              sysname 
                                              "Linux" 
                                              release 
                                  "5.13.0-41-generic" 
                                              version 
"#46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022" 
                                              machine 
                                             "x86_64"