Diferencia entre revisiones de «Audio en Linux»
Ir a la navegación
Ir a la búsqueda
Sin resumen de edición |
Sin resumen de edición |
||
Línea 17: | Línea 17: | ||
$ aplay -c 2 -f S16_LE -r 44100 /dev/urandom | $ aplay -c 2 -f S16_LE -r 44100 /dev/urandom | ||
== Scripts == | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
# music.sh | |||
# Music without external files | |||
# Author: Antonio Macchi | |||
# Used in ABS Guide with permission. | |||
# /dev/dsp default = 8000 frames per second, 8 bits per frame (1 byte), | |||
#+ 1 channel (mono) | |||
duration=2000 # If 8000 bytes = 1 second, then 2000 = 1/4 second. | |||
volume=$'\xc0' # Max volume = \xff (or \x00). | |||
mute=$'\x80' # No volume = \x80 (the middle). | |||
function mknote () # $1=Note Hz in bytes (e.g. A = 440Hz :: | |||
{ #+ 8000 fps / 440 = 16 :: A = 16 bytes per second) | |||
for t in `seq 0 $duration` | |||
do | |||
test $(( $t % $1 )) = 0 && echo -n $volume || echo -n $mute | |||
done | |||
} | |||
e=`mknote 49` | |||
g=`mknote 41` | |||
a=`mknote 36` | |||
b=`mknote 32` | |||
c=`mknote 30` | |||
cis=`mknote 29` | |||
d=`mknote 27` | |||
e2=`mknote 24` | |||
n=`mknote 32767` | |||
# European notation. | |||
echo -n "$g$e2$d$c$d$c$a$g$n$g$e$n$g$e2$d$c$c$b$c$cis$n$cis$d \ | |||
$n$g$e2$d$c$d$c$a$g$n$g$e$n$g$a$d$c$b$a$b$c" | aplay | |||
# dsp = Digital Signal Processor | |||
exit # A "bonny" example of an elegant shell script! | |||
</syntaxhighlight> | |||
Fuente: [http://www.tldp.org/LDP/abs/html/devref1.html] | |||
== Enlaces == | == Enlaces == |
Revisión del 09:07 18 jun 2015
de wv +cue a wav
shnsplit -f in.cue in.wv
el programa está en el paquete shntool y necesitas en paquete wavpack, que son los codecs
de wav a mp3
En la terminal se puede usar el programa lame
Otro uso de lame puede ser comprimir mp3:
$ lame -b 32 1.mp3 1c.mp3
Comandos varios
$ aplay -c 2 -f S16_LE -r 44100 /dev/urandom
Scripts
#!/bin/bash
# music.sh
# Music without external files
# Author: Antonio Macchi
# Used in ABS Guide with permission.
# /dev/dsp default = 8000 frames per second, 8 bits per frame (1 byte),
#+ 1 channel (mono)
duration=2000 # If 8000 bytes = 1 second, then 2000 = 1/4 second.
volume=$'\xc0' # Max volume = \xff (or \x00).
mute=$'\x80' # No volume = \x80 (the middle).
function mknote () # $1=Note Hz in bytes (e.g. A = 440Hz ::
{ #+ 8000 fps / 440 = 16 :: A = 16 bytes per second)
for t in `seq 0 $duration`
do
test $(( $t % $1 )) = 0 && echo -n $volume || echo -n $mute
done
}
e=`mknote 49`
g=`mknote 41`
a=`mknote 36`
b=`mknote 32`
c=`mknote 30`
cis=`mknote 29`
d=`mknote 27`
e2=`mknote 24`
n=`mknote 32767`
# European notation.
echo -n "$g$e2$d$c$d$c$a$g$n$g$e$n$g$e2$d$c$c$b$c$cis$n$cis$d \
$n$g$e2$d$c$d$c$a$g$n$g$e$n$g$a$d$c$b$a$b$c" | aplay
# dsp = Digital Signal Processor
exit # A "bonny" example of an elegant shell script!
Fuente: [1]
Enlaces
http://music.stackexchange.com/questions/3103/software-for-microtonal-midi
https://news.ycombinator.com/item?id=8750127
http://www.microsiervos.com/archivo/mundoreal/20-a-20000-hz.html