Version 1.45

Discussion and support for general JUCE issues

Version 1.45

Postby jules » Wed Oct 10, 2007 4:52 pm

It's taken two months to get this one out of the door, which is pretty slow for me! No surprises in here for those of you who've been using the sourceforge tip, but it's now an "official" version, and here are the changes:

* big new project in the "extras" folder - a basic audio plugin host! Currently it loads VSTs on PC/Mac, and lets you put them together in a filter graph, which it plays. Hosting functionality is very basic at the moment, but I'm laying down a good architecture to hopefully develop into a full cross-platform plugin host.
* audio plugins: The AudioFilterBase and AudioFilterEditor classes have moved into the main juce tree, and been renamed as AudioProcessor and AudioProcessorEditor. This means you can remove these files from your plugin projects, and should search-and-replace any instances of the old names with the new ones.
* audio plugins: the processBlock() call in AudioFilterBase has been simplified in AudioProcessor. It now just takes a single buffer for all input and output channels, and the accumulate parameter has gone. This will mean tweaking your plugin code, but will probably make it much less complicated.
* audio plugins: AudioProcessor requires a few more methods to be implemented by your plugin than AudioFilterBase did: getInputChannelName, getOutputChannelName, isInputChannelStereoPair, isOutputChannelStereoPair, getLatencySamples (which supersedes the old macro for setting the latency). These are all quite simple to add.
* audio plugins: new methods AudioProcessor::beginParameterChangeGesture() and endParameterChangeGesture() let you tell the host when a parameter-change action starts and finishes.
* audio plugins: new method AudioProcessor::updateHostDisplay() to tell the host that something about your plugin has changed and that it should refresh its display.
* new class: FileSearchPathListComponent, for letting the user edit a FileSearchPath.
* new class: FileDragAndDropTarget, which replaces the old method Component::filesDropped. To use it, just make your component inherit from FileDragAndDropTarget, and it'll receive external file drops. This provides more functionality than the old method, allowing you to track the drag enter/exit/movements as well as just reacting to the drop itself.
* added a critical section option to ReferenceCountedArray
* refactored and added features to the Socket class, replacing it with StreamableSocket (basically the same as the original class), and DatagramSocket.
* refactored the OpenGLComponent, adding new classes OpenGLPixelFormat and OpenGLContext
* A component's KeyListeners are now called before its keyPressed method, so if you want to intercept keys and stop them getting sent to the component, you can add a keylistener and comsume the events.
* added an option to choose a Midi output device to the AudioDeviceManager and AudioDeviceSelectorComponent
* updated the included version of libpng

I'd particularly recommend anyone doing plugins to update to this version, as there are some fairly important RTAS and VST fixes in here.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Wed Oct 10, 2007 5:59 pm

Sweet. I'll port my rompler synth project tomorrow.

Is the VST 2.3 SDK still supported?
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby jules » Wed Oct 10, 2007 6:22 pm

Is the VST 2.3 SDK still supported?


I've left the code in there, but TBH haven't tested it. Let me know if I've broken anything. (But is there still a reason to use 2.3? 2.4 is pretty similar, and there aren't any hosts that can't load 2.4 plugins, are there?)
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Wed Oct 10, 2007 7:01 pm

Not sure really. There was a discussion on KvR where some people claimed older hosts can't load 2.4, some popular older versions of Logic or Cubase if I recall.

So I figured I'll go with 2.3 for the time being.
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby chkn » Wed Oct 10, 2007 11:57 pm

Very Cool :D !

Any chance to implement a getHostName() method into the AudioProcessor?

In certain cases its important to know which host is running the plugin.
chkn
JUCE UberWeenie
 
Posts: 865
Joined: Thu Mar 08, 2007 6:17 pm

Postby jules » Thu Oct 11, 2007 9:23 am

chkn wrote:Very Cool :D !

Any chance to implement a getHostName() method into the AudioProcessor?

In certain cases its important to know which host is running the plugin.


Sure, I can add one of those.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Thu Oct 11, 2007 12:02 pm

So, without the accumulate thingy... I assume accumulation is the default mode then? Or should I clear the buffer?

edit: Also, the JUCE_CALLTYPE macro thingamajig has disappeared in the demo. I assume I should do that too?
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby jules » Thu Oct 11, 2007 12:14 pm

No, you just replace the contents with whatever you want as your output. That's explained in the comments, I think.

Yes, the JUCE_CALLTYPE stuff is redundant now, so you can lose that.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Thu Oct 11, 2007 12:29 pm

Okiday.

I think VST2.3 support is officially broken.
I get an array of errors regarding undefined kVstSmpteXXfps constants, and I don't think those are in the 2.3 SDK.

Could be wrong though.
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby jules » Thu Oct 11, 2007 12:42 pm

Ok. I guess it's just a case of defining those constants if it's using 2.3. If you can give me a list of the offenders, I'll add them (I don't have a 2.3 SDK to try it myself any more).
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Thu Oct 11, 2007 1:07 pm

It's in the VST wrapper, the switch statement at line 791. All the kVstSmptexxx constants. That's it.

(I tested it by commenting the switch out and setting the rate and fps variables directly, after which it builds and runs fine. Yay!)
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby Rock Hardbuns » Thu Oct 11, 2007 1:16 pm

They come from an enumeration in aeffectx.h. They don't look like they are subject to change so I'm going to hard code the values for now.
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby jules » Thu Oct 11, 2007 1:50 pm

ok, I'll hard-code those in along with the other ones at line 91.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Postby Rock Hardbuns » Thu Oct 11, 2007 6:42 pm

Hm. Hard coding, or copying the enum, doesn't work it seems. Debugger says info.framerate is set to a random looking number.

Come to think of it, does the 2.3 spec even support frame rates?

edit > Apparently it does support frame rates! I don't know why I'm getting a strange number there though.

edit2 >
The number in question is 0xCCCCCC or -858993460. It is consistent across hosts.

edit3 > Hold your horses there sonny! Isn't the switch supposed to be on ti->smpteFrameRate as opposed to info.framerate? I mean, we are filling the info struct based on the ti struct... right?
Rock Hardbuns
JUCE UberWeenie
 
Posts: 332
Joined: Tue Nov 22, 2005 1:10 am
Location: Global scope

Postby kraken » Thu Oct 11, 2007 7:45 pm

yeah julian messed up the structs.
anyway it's a no-brainer to fix it...
Image
User avatar
kraken
JUCE UberWeenie
 
Posts: 1063
Joined: Wed Feb 09, 2005 10:31 am
Location: Venice, Italy

Next

Return to General JUCE discussion

Who is online

Users browsing this forum: Google Feedfetcher, jpo and 7 guests