All Projects → HSU-ANT → Acme.jl

HSU-ANT / Acme.jl

Licence: other
ACME.jl - Analog Circuit Modeling and Emulation for Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to Acme.jl

Audiokit
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Stars: ✭ 8,827 (+11828.38%)
Mutual labels:  audio
Allegro5
The official Allegro 5 git repository. Pull requests welcome!
Stars: ✭ 1,165 (+1474.32%)
Mutual labels:  audio
Redoflacs
Parallel BASH commandline FLAC compressor, verifier, organizer, analyzer, and retagger
Stars: ✭ 71 (-4.05%)
Mutual labels:  audio
Node Audio
Graph-based audio api for Node.js based on LabSound and JUCE
Stars: ✭ 67 (-9.46%)
Mutual labels:  audio
Commercialdetection
GSOC 2015 project for Red Hen Labs
Stars: ✭ 69 (-6.76%)
Mutual labels:  audio
Beep
A little package that brings sound to any Go application. Suitable for playback and audio-processing.
Stars: ✭ 1,168 (+1478.38%)
Mutual labels:  audio
Bizhawk
BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
Stars: ✭ 1,138 (+1437.84%)
Mutual labels:  emulation
Deprecated Lame Mirror
[DEPRECATED] Old, Semi-official mirror of the CVS repository of the LAME MP3 encoder.
Stars: ✭ 73 (-1.35%)
Mutual labels:  audio
Bibleify Desktop
🖥️Simple & fast bible app with dramatized audio built with Electron, React, Rematch & Realm
Stars: ✭ 70 (-5.41%)
Mutual labels:  audio
Opus
Modern audio compression for the internet.
Stars: ✭ 1,171 (+1482.43%)
Mutual labels:  audio
Audioswitch
An Android audio management library for real-time communication apps.
Stars: ✭ 69 (-6.76%)
Mutual labels:  audio
Web Audio Javascript Webassembly Sdk Interactive Audio
🌐 Superpowered Web Audio JavaScript and WebAssembly SDK for modern web browsers. Allows developers to implement low-latency interactive audio features into web sites and web apps with a friendly Javascript API. https://superpowered.com
Stars: ✭ 68 (-8.11%)
Mutual labels:  audio
Llvm8
Statically recompiling CHIP8 to Windows and macOS using LLVM
Stars: ✭ 71 (-4.05%)
Mutual labels:  emulation
Audio
This is a library for declarative use of Web Audio API with Angular
Stars: ✭ 67 (-9.46%)
Mutual labels:  audio
Modernflyouts
A modern Fluent Design replacement for the old Metro themed flyouts present in Windows.
Stars: ✭ 1,173 (+1485.14%)
Mutual labels:  audio
Openframeworks
openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
Stars: ✭ 8,652 (+11591.89%)
Mutual labels:  audio
Unidbg
Allows you to emulate an Android ARM32 and/or ARM64 native library, and an experimental iOS emulation
Stars: ✭ 1,168 (+1478.38%)
Mutual labels:  emulation
Ltkdifmu Userscript
No more Audio and Visual ads. Allows AFK, Allows AdBlock, on all radios from AudioAddict including www.di.fm and more.
Stars: ✭ 74 (+0%)
Mutual labels:  audio
Awesome Web Audio
A list of resources and projects to help learn about audio
Stars: ✭ 73 (-1.35%)
Mutual labels:  audio
Dspi
Digital Signal Processing (or Pi). Adventures in making my Raspberry Pi 3 realtime, and running audio DSP.
Stars: ✭ 71 (-4.05%)
Mutual labels:  audio

ACME.jl - Analog Circuit Modeling and Emulation for Julia

Join the chat at https://gitter.im/HSU-ANT/ACME.jl Documentation Documentation DOI

CI codecov Coverage Status

ACME is a Julia package for the simulation of electrical circuits, focusing on audio effect circuits. It allows to programmatically describe a circuit in terms of elements and connections between them and then automatically derive a model for the circuit. The model can then be run on varying input data.

ACME is based on the method described in M. Holters, U. Zölzer, "A Generalized Method for the Derivation of Non-Linear State-Space Models from Circuit Schematics".

Installation

If you have not done so already, download and install Julia. (Any version starting with 1.0 should be fine; earlier ACME versions support Julia starting with version 0.3.)

To install ACME, start Julia and run:

Pkg.add("ACME")

This will download ACME and all of its dependencies.

First steps

We will demonstrate ACME by modeling a simple diode clipper. The first step is to load ACME:

using ACME

Now we create the circuit description:

circ = @circuit begin
    j_in = voltagesource()
    r1 = resistor(1e3)
    c1 = capacitor(47e-9)
    d1 = diode(is=1e-15)
    d2 = diode(is=1.8e-15)
    j_out = voltageprobe()
    j_in[+] ⟷ r1[1]
    j_in[-] ⟷ gnd
    r1[2] ⟷ c1[1] ⟷ d1[+] ⟷ d2[-] ⟷ j_out[+]
    gnd ⟷ c1[2] ⟷ d1[-] ⟷ d2[+] ⟷ j_out[-]
end

The first six lines inside the begin/end block instantiate circuit elements. Specifying a voltagesource() sets up a voltage source as an input, i.e. the voltage it sources will be specified when running the model. Alternatively, one can instantiate a constant voltage source for say 9V with voltagesource(9). The resistor and capacitor calls take the resistance in ohm and the capacitance in farad, respectively, as arguments. For the diode, one may specify the saturation current is as done here and/or the emission coefficient η. Finally, desired outputs are denoted by adding probes to the circuit; in this case a voltageprobe() will provide voltage as output.

The remaining four lines specify connections, either among element pins as in j_in[+] ⟷ r1[1], which connects the + pin of the input voltage to pin 1 of the resistor, or among pins and named nets as in j_in[-] ⟷ gnd, which connects the - pin of the input voltage source to a net named gnd. Note that naming nets is only for the sake of readability; there is nothing special about them and the names are arbitrary. As can be seen in the last two lines, multiple pins can be connected at once.

It is also possible to specify connections following the element definition (separated by commas), in which case the element name may be omitted. However, one can only connect to elements defined before. Thus, above circuit could also be entered as:

circ = @circuit begin
    j_in = voltagesource(), [-] ⟷ gnd
    r1 = resistor(1e3), [1] ⟷ j_in[+]
    c1 = capacitor(47e-9), [1] ⟷ r1[2], [2] ⟷ gnd
    d1 = diode(is=1e-15), [+] ⟷ r1[2], [-] ⟷ gnd
    d2 = diode(is=1.8e-15), [+] ⟷ gnd, [-] ⟷ r1[2]
    j_out = voltageprobe(), [+] ⟷ r1[2], [-] ⟷ gnd
end

Now that the circuit has been set up, we need to turn it into a model. This could hardly be any easier:

model = DiscreteModel(circ, 1/44100)

The second argument specifies the sampling interval, the reciprocal of the sampling rate, here assumed to be the typical 44100 Hz.

Now we can process some input data. It has to be provided as a matrix with one row per input (just one in the example) and one column per sample. So for a sinusoid at 1 kHz lasting one second, we do

y = run!(model, [sin(2π*1000/44100*n) for c in 1:1, n in 0:44099])

The output y now likewise is a matrix with one row for the one probe we have added to the circuit and one column per sample.

In the likely event that you would like to process real audio data, take a look at the WAV package for reading writing WAV files.

Note that the solver used to solve the non-linear equation when running the model saves solutions to use as starting points in the future. Model execution will therefore become faster after an initial learning phase. Nevertheless, ACME is at present more geared towards computing all the model matrices than to actually running the model. More complex circuits may run intolerably slow or fail to run altogether.

Moving on

There is some documentation available for how to use ACME. Additionally, you can take a look at the examples that can be found in the examples directory below Pkg.dir("ACME").

If you would like to extend and improve ACME, that's great! But unfortunately, there is no developer documentation as of now, so you will to delve into the source code to figure out how things work, or try to ask on gitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].