Audio chain : am I right?


#1

Hi Jules and Jucers

It’s not really a question, but more like a confirmation. I just want to make sure I correctly understood how Audio stuff works in Juce.

Let’s say I want to implement an audio signal chain :
[Midi Input]->[MIDI processor]->[Virtual instrument]->[Virtual Effect(s)]

I should

  • create an AudioProcessorGraph instance
  • populate it (with several instances of both AudioGraphIOProcessor and AudioProcessor)
  • then create an AudioProcessorPlayer instance
  • call AudioProcessorPlayer::setProcessor with my AudioProcessorGraph
  • finally, call AudioDeviceManager::addAudioCallback with my AudioProcessorPlayer instance

Is this right ?

Now let’s assume I want the following chain :
[Audio (from wave file)->[Virtual Effect(s)]

In this case, I should create a new class which inherits both AudioSourcePlayer and AudioProcessor (so it can be added to an AudioProcessorGraph , via it’s addNode method), to read the wave file. Right ?
Or should I create a new class which inherits AudioGraphIOProcessor and which calls AudioSourcePlayer::audioDeviceIOCallback inside it’s processBlock method ?

Does what I say even make sense ??? :slight_smile:


#2

That first bit sounds right, and I used the code on this post <http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=3505> to wrap an AudioSource and put it into an AudioProcessorGraph.

I hope that helps…


#3

[quote=“Assembler”]That first bit sounds right, and I used the code on this post <http://www.rawmaterialsoftware.com/viewtopic.php?f=4&t=3505> to wrap an AudioSource and put it into an AudioProcessorGraph.

I hope that helps…[/quote]
So…the second bit is wrong ? :smiley:
EDIT : Ok I had a look at the post you mentioned, all is clear now :smiley:

By the way mate, I think you and me are trying to do the same thing, by looking at your other posts , which I found very intersesting (especially the one about “Transport”)


#4

Oh God no. You’ve stolen my ideas. Time to wear a saucepan on my head so no more get stolen.

We might be trying to do exactly the same thing. I suppose in the long run I’d like to build something enormous, but for now, a little Hammerhead type sequencer with VST support is proving enough of a challenge.
I hope you have a little bit more luck than me, as I am a little stuck at the moment with this transport business. I feel very much up the shallow end with all the other things being posted in the forum, in this new weird language with & and * in funny places. I’m trying to get my head around all the required bits of the API so I can jam them together… at the moment, the closest I have to play/stop is changing the soundcard settings.

Share your findings! Good Luck!


#5

Oh man, it’s been a while “we” can read over saucepans, and aluminium hats, mouhahaha. Well, I think a lot of people doing music software are trying to make transport stuff :slight_smile:

I think it’s far from being simple, especially if you start thinking about the synchronization problems !

[quote]
I feel very much up the shallow end with all the other things being posted in the forum, in this new weird language with & and * in funny places. I’m trying to get my head around all the required bits of the API so I can jam them together… at the moment, the closest I have to play/stop is changing the soundcard settings.

Share your findings! Good Luck![/quote]

I already did a full reverse engineering of Juce Audio Classes to UML. I think it helps a lot to understand how the thing works. If you’re interested in the diagrams, PM me with your email and I’ll sed you the class diagrams as jpgs :smiley:


#6

Diniaz, I sent a you PM, thank you for your offer!


#7

Done !