Comments (2)
In general, yes, play(node::AudioNode)
adds the node to the render chain, and other methods of play
typically wrap the thing inside an AudioNode
and then call play
on that node.
Also, correct that returning a short buffer in a render
call is an indication that the node has no more content and it's done.
I agree the way the input is handled in the render tree is not obvious, but you can think about it in a functional context, where you're calling the render
function with the input as one of the arguments. Most AudioNode
s ignore the root input, but the InputRenderer
just returns it, sort of looping it around.
Maybe I'm being dense but I'm not sure what issue you're describing. Do you have a more complete example that shows the issue? ArrayRenderer
shouldn't be feeding input into an InputRenderer
, and the assertion you're referring to is making sure that the block from the hardware input is the same
size as the hardware block size, which it should be.
from audioio.jl.
In general, yes, play(node::AudioNode) adds the node to the render chain, and other methods of play typically wrap the thing inside an AudioNode and then call play on that node.
My specific confusion regarding that point is that InputNode
really just passes through the audio signal. so play(AudioInput())
plays back the audio input only because the hardware input is passed through InputNode
. I found the name play
misleading, because if what you do is, for example play(a_node_that_stores_all_its_input)
, then you're actually recording an audio stream. I don't think the name necessarily has to change, though.
It just seems like nodes that take in audio and produce audio should be able to be composed together, and so there should be some specification, maybe, for what a node needs to be in order to be composed together. For example, maybe I test an FM modulator, say SinOsc(40*AudioInput()+400)
by attaching its input to the output of ArrayRenderer
(using something like https://github.com/goretkin/AudioIO.jl/blob/master/src/nodes.jl#L508). You can argue that instead of using ArrayRenderer
you should have something like an ArrayStream
.
Similarly, something else that confused me initially, but I think I've come around, is that device_input
really does mean device_input
. Nodes should be able to have multiple inputs, and so control inputs, like to control the frequency of SinOsc
probably are better off, as currently is, as nodes that are passed to nodes, and the higher node is responsible for calling render
on the lower node, passing device_input
.
(Along the lines of "contract" it might be worthwhile to state that if nodes need long-term access to values in device_input
, or any output of render
, then they should make a copy. Also, something should be written about how signals are "pulled" through instead of "pushed" through (or something like that).)
I think the package is really great! I've had a lot of fun.
from audioio.jl.
Related Issues (20)
- WARNING: libportaudio: Input overflowed HOT 4
- AudioIO should have a `versioninfo` method
- [PkgEval] AudioIO may have a testing issue on Julia 0.3 (2014-10-17) HOT 4
- Playing a file with a sample rate != 44100 does not work
- Use Wav.jl for opening .wav files HOT 4
- support writemime
- Support auto samplerate conversion
- Warning: libportaudio: Input overflowed HOT 7
- The play()-function is broken HOT 2
- SinOsc should take an initial phase HOT 2
- AudioIO uses deprecated Dict syntax
- Close audio stream when nothing is playing HOT 1
- Hook into FileIO `load` `save` mechanism
- Real Time audio recording examples missing HOT 5
- Coordinate various audio and DSP packages HOT 10
- PaStream as Ptr{Void} loses information about the data stream HOT 1
- Make Error in Fedora 23 HOT 1
- not working in Julia version 0.5.0-rc3+0 HOT 2
- Info about upcoming removal of packages in the General registry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audioio.jl.