Closed JeffFessler closed 2 years ago
Merging #110 (ef0cfcb) into master (78a0a99) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #110 +/- ##
=======================================
Coverage 97.38% 97.38%
=======================================
Files 2 2
Lines 344 344
=======================================
Hits 335 335
Misses 9 9
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 78a0a99...ef0cfcb. Read the comment docs.
Wow, this looks great! It would good to have it only run for a specific amount of time, so we can eventually run it in CI. The pattern I've used in #107 was
@sync begin
@async while !done
# refresh the plot
end
sleep(seconds)
done = true
end
There might be better ways to do this.
PS, do you want to join as a maintainer?
PS, do you want to join as a maintainer?
Yes, I would be happy to help in that way. I don't know anything about libportaudio but can help on the Julia side. Thanks!
Ok, I implemented the suggested @async
model, which was a nice trick for me to learn.
Perhaps another way would be to calculate the number of loop iterations from the duration and the buffer length and the sample size:
Niters = Int(seconds * sampling_rate / N)
I might slightly prefer that way, because it will look less mysterious to beginnners. Do you have a preference?
Do you have a preference?
Nope, whatever works!
Ok, I went with the loop approach and added a bit more documentation and now it is ready for review.
This looks good to me!
This looks good to me!
This PR provides an example of performing a real-time octave (down) shift using a crude FFT approach. I did not see any examples that show audio processing of an input stream and writing the results to an output stream and I wanted to have an illustration of that for students in my course.
This is independent of #107 though of course they both work on the examples/ directory.