Juce 1.54 to Modules conversion

Discussion and support for general JUCE issues

Juce 1.54 to Modules conversion

Postby kurt6string » Mon Mar 05, 2012 9:52 am

Aloha,

I had an existing audio application written against Juce 1.54.27 on a PC.
Time to convert from old to new (modularized) juce? 6 hours, mostly because I modified the audio classes and had to port the changes. Then, the same day I ported the source code to a brand new iMac/xcode 4.3 system. Time to convert? 2 hours.

So, one day's hard labor to update my PC version, AND port it to the macintosh. It doesn't get any better than that. Oh, I have about 5 hours or so total (recent) experience on a mac so far. The fact that JUCE takes care of all the heavy lifting by creating the mac project files probably saved me a week or two of frustration right there. Not to mention how long it would have taken me to come up to speed on 'standard mac programs'.

Jules, you're a miracle worker.

Kurt
User avatar
kurt6string
JUCE UberWeenie
 
Posts: 126
Joined: Sun Dec 04, 2011 3:21 am
Location: Kapolei, Hawaii

Re: Juce 1.54 to Modules conversion

Postby jules » Tue Mar 06, 2012 10:26 am

Thanks!

6 hours sounds like a long time to me though - if you can think of anything I could have done to speed it up, let me know!
User avatar
jules
Fearless Leader
 
Posts: 17192
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Juce 1.54 to Modules conversion

Postby TheVinn » Wed Mar 07, 2012 1:11 am

kurt6string wrote:I modified the audio classes and had to port the changes.


You mean, you made your own modifications to Juce audio classes?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2975
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Juce 1.54 to Modules conversion

Postby kurt6string » Wed Mar 07, 2012 7:41 am

Yes, I added some methods to AudioProcessor and had to implement them in those classes that inherited from it.
For example:

Code: Select all
set/getBypassThreshold(float thresholdInDb)


If I want to switch from guitar amp A (clean/verse) to guitar amp B (dirty/lead) then when I execute the switch I want to immediately being hearing guitar amp B (lead), while guitar amp A is allowed to continue processing, letting reverb and delay tailoff's to sound until it gets quiet enough to bypass it. And when bypassed it doesn't consume any cpu cycles.

I couldn't find any way to add that functionality other than deep in the heart of the vst/audiounit plugin instances etc. If you know of a better way I'd appreciate your thoughts Vinn, I was a newbie then (now I'm obsessive) says the forum.
Last edited by kurt6string on Fri Mar 09, 2012 9:42 pm, edited 2 times in total.
User avatar
kurt6string
JUCE UberWeenie
 
Posts: 126
Joined: Sun Dec 04, 2011 3:21 am
Location: Kapolei, Hawaii

Re: Juce 1.54 to Modules conversion

Postby kurt6string » Wed Mar 07, 2012 9:31 am

6 hours seems like a long time


That had nothing to do with juce, A lot of that time was spent in 'systems management' and bringing the new mac online with the pc etc. This is the first xcode/visual studio cross-platform thing I've done. Lots of learning. Also, I've modified the juce audio classes and needed to bring those changes into the audio module(s) of juce.

As far as juce was concerned it was painless.
User avatar
kurt6string
JUCE UberWeenie
 
Posts: 126
Joined: Sun Dec 04, 2011 3:21 am
Location: Kapolei, Hawaii

Re: Juce 1.54 to Modules conversion

Postby TheVinn » Wed Mar 07, 2012 4:40 pm

kurt6string wrote:Yes, I added some methods to AudioProcessor and had to implement them in those classes that inherited from it.
For example:

Code: Select all
set/getBypassThreshold(float thresholdInDb)


If I want to switch from guitar amp A (clean/verse) to guitar amp B (dirty/lead) then when I execute the switch I want to immediately being hearing guitar amp B (lead), while guitar amp A is allowed to continue processing, letting reverb and delay tailoff's to sound until it gets quiet enough to bypass it. And when bypassed it doesn't consume an cpu cycles.

I couldn't find any way to add that functionality other than deep in the heart of the vst/audiounit plugin instances etc. If you know of a better way I'd appreciate your thoughts Vinn, I was a newbie then (now I'm obsessive) says the forum.


Changing Juce sources is a last resort. I would have made a new abstract interface ("KurtAudioProcessor") with the added function, then used a dynamic_cast to convert a pointer to AudioProcessor to pointer to KurtAudioProcessor to get the required interface. This way you don't have to modify Juce to do what you need.

I would also immediately post something in the forum - maybe your feature is revolutionary and deserves to be added to Juce?
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2975
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: Juce 1.54 to Modules conversion

Postby kurt6string » Fri Mar 09, 2012 9:39 pm

Thanks for the thoughts Vinn. I'm hesitant to suggest changes to juce yet as I don't have enough experience on it, and had no idea at all when I did the mods on the pc if they would work on other platforms. Now that I've got the pc and the mac I'm feeling a bit better about the portability of the changes but will have to do some cleanup work and see if I can implement these changes without going directly into the au/vst plugin instance classes - which is where the real work happend. It might be better to implement the capability at the AudioProcessorGraph level. I'll look into that when I have a chance.
User avatar
kurt6string
JUCE UberWeenie
 
Posts: 126
Joined: Sun Dec 04, 2011 3:21 am
Location: Kapolei, Hawaii

Re: Juce 1.54 to Modules conversion

Postby yairadix » Sun Mar 11, 2012 12:04 pm

TheVinn wrote:Changing Juce sources is a last resort. I would have made a new abstract interface ("KurtAudioProcessor") with the added function, then used a dynamic_cast to convert a pointer to AudioProcessor to pointer to KurtAudioProcessor to get the required interface. This way you don't have to modify Juce to do what you need.

I would also immediately post something in the forum - maybe your feature is revolutionary and deserves to be added to Juce?


We had a similar situation, where we added for AU plugins the ability to type in a parameter value and have it translated to the internal 0-1 parameter value range (relevant thread - http://rawmaterialsoftware.com/viewtopic.php?f=8&t=7900#p45743).

As it requires modifying the AU wrapper, and the Introjucer doesn't give me a choice of which AU wrapper code to use, it seems that I have to modify the juce sources. So I keep a repo of juce and I regularly merge juce tip to it. Any better ideas would be very welcome.
User avatar
yairadix
JUCE UberWeenie
 
Posts: 130
Joined: Fri Jul 23, 2010 10:38 pm


Return to General JUCE discussion

Who is online

Users browsing this forum: Google Feedfetcher, TheVinn and 6 guests