Skip to content

Instantly share code, notes, and snippets.

View ssfrr's full-sized avatar

Spencer Russell ssfrr

View GitHub Profile
using Makie, GeometryTypes, Colors
using Reactive
using Juno
using DSP
using LibSndFile, FileIO
using PortAudio, SampledSignals
using BenchmarkTools
N = 1024 # size of audio read
N2 = N÷2+1 # size of rfft output
using Makie, GeometryTypes
using PortAudio
N = 1024 # size of audio read
N2 = N÷2+1 # size of rfft output
D = 200 # number of bins to display
M = 200 # amount of history to keep
src = PortAudioStream(1, 2, blocksize=N)
buf = Array{Float32}(N)
fftbuf = Array{Complex{Float32}}(N2)
~/j/Makie ❯❯❯ j6 -e 'Pkg.test("Makie")' ⏎ master
INFO: Computing test dependencies for Makie...
WARNING: unknown WAV commit f0ed3cdd, metadata may be ahead of package cache
INFO: Installing VisualRegressionTests v0.1.0
INFO: Building FFTW
INFO: Building SpecialFunctions
INFO: Building ImageMagick
INFO: Testing Makie
WARNING: Gtk not loaded. err: ArgumentError("Module Gtk not found in current path.\nRun `Pkg.add(\"Gtk\")` to install the Gtk package.")
Scene scene:

Based on a long-running conversation, mostly on slack with @oxinabox and @c42f, with a little bit @evizero. One issue that led to it is the desire to do XML reports of test runs, which exposes some issues with the extension mechanisms currently in place for Base.Test. I think to figure out how much rearchitecting is necessary we should answer a few questions.

Desired Features

oxinabox says DataStructures.jl has some testing-related hacks, we should investigate what they've had to do to see what might be needed in Base.Test

using Makie
using PortAudio
"""
Slide the values in the given matrix to the right by 1.
The rightmosts column is discarded and the leftmost column is
left alone.
"""
function shift1!(buf::AbstractMatrix)
for col in size(buf,2):-1:2
julia> Pkg.build("ZMQ")
INFO: Building ZMQ
INFO: Attempting to create directory /home/sfr/.julia/v0.6/ZMQ/deps/downloads
INFO: Directory /home/sfr/.julia/v0.6/ZMQ/deps/downloads already exists
INFO: Downloading file https://github.com/zeromq/zeromq3-x/releases/download/v3.2.5/zeromq-3.2.5.tar.gz
INFO: Done downloading file https://github.com/zeromq/zeromq3-x/releases/download/v3.2.5/zeromq-3.2.5.tar.gz
INFO: Attempting to create directory /home/sfr/.julia/v0.6/ZMQ/deps/src
INFO: Directory /home/sfr/.julia/v0.6/ZMQ/deps/src already exists
INFO: Attempting to create directory /home/sfr/.julia/v0.6/ZMQ/deps
INFO: Directory /home/sfr/.julia/v0.6/ZMQ/deps already exists
using PlotlyJS
# SVG Path construction
addmove!(io, x, y) = write(io, "M $x $y")
addlineto!(io, x, y) = write(io, " L $x $y")
addclose!(io) = write(io, " Z")
"""
Makes a set of connected lines that go through the points defined by xs and ys
by adding the appropriate SVG commands to the given IO.