Diferencia entre revisiones de «Taller de distorsión»
Sin resumen de edición |
Sin resumen de edición |
||
| Línea 193: | Línea 193: | ||
* https://github.com/Ttl/spice-audio-tools | * https://github.com/Ttl/spice-audio-tools | ||
=Archivo de WAV de entrada, WAV de salida= | |||
<pre> | |||
.title wave input | |||
* Consulte "8.2.9 Filesource (PWL sourced from file)" en el manual. | |||
* Consulte "Code Model Element" en el manual de usuario de Ngspice. | |||
* "%v represents a single-ended voltage port ..." | |||
* "Square brackets ([ ]) are used to enclose vector input nodes." | |||
a1 %v([in]) filesrc | |||
.model filesrc filesource (file="in.dat" amploffset=[0] amplscale=[100] timeoffset=0 timescale=1 timerelative=false amplstep=false) | |||
.model 1n4148 D(IS=2.5n N=1.9 BV=100 RS=1) | |||
r1 in out 1k | |||
d1 out 0 1n4148 | |||
d2 0 out 1n4148 | |||
.control | |||
* Consulte "13.5.56 General Form: Pre_<command>" en el manual. | |||
* Pre_<command>: execute commands prior to parsing the circuit | |||
pre_shell python wavtospice.py clean.wav in.dat | |||
tran 0.02m 10 | |||
wrdata out.dat v(out) | |||
shell python spicetowav.py out.dat out.wav | |||
.endc | |||
</pre> | |||