COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 04-25-2012, 12:40 PM   #81
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

Quote:
How would one apply the "OR" option mentioned in the SDK?
EDIT: actually I forgot how this works. ivstaudioprocessor.h has these constants which OR together subcategories already. So what you are reading relates to combining the FX subcategory with an FX type. You can't put multiple FX types and have your plugin appear in multiple places in Cubase's plugin menu.

Code:
const CString kFxAnalyzer			= "Fx|Analyzer";	///< Scope, FFT-Display,...
const CString kFxDelay				= "Fx|Delay";		///< Delay, Multi-tap Delay, Ping-Pong Delay...
const CString kFxDistortion			= "Fx|Distortion";	///< Amp Simulator, Sub-Harmonic, SoftClipper...
const CString kFxDynamics			= "Fx|Dynamics";	///< Compressor, Expander, Gate, Limiter, Maximizer, Tape Simulator, EnvelopeShaper...
const CString kFxEQ					= "Fx|EQ";			///< Equalization, Graphical EQ...
const CString kFxFilter				= "Fx|Filter";		///< WahWah, ToneBooster, Specific Filter,...
const CString kFx					= "Fx";				///< others type (not categorized)
const CString kFxInstrument			= "Fx|Instrument";	///< Fx which could be loaded as Instrument too
const CString kFxInstrumentExternal	= "Fx|Instrument|External";	///< Fx which could be loaded as Instrument too and is external (wrapped Hardware)
const CString kFxSpatial			= "Fx|Spatial";		///< MonoToStereo, StereoEnhancer,...
const CString kFxGenerator			= "Fx|Generator";	///< Tone Generator, Noise Generator...
const CString kFxMastering			= "Fx|Mastering";	///< Dither, Noise Shaping,...
const CString kFxModulation			= "Fx|Modulation";	///< Phaser, Flanger, Chorus, Tremolo, Vibrato, AutoPan, Rotary, Cloner...
const CString kFxPitchShift			= "Fx|Pitch Shift";	///< Pitch Processing, Pitch Correction,...
const CString kFxRestoration		= "Fx|Restoration";	///< Denoiser, Declicker,...
const CString kFxReverb				= "Fx|Reverb";		///< Reverberation, Room Simulation, Convolution Reverb...
const CString kFxSurround			= "Fx|Surround";	///< dedicated to surround processing: LFE Splitter, Bass Manager...
const CString kFxTools				= "Fx|Tools";		///< Volume, Mixer, Tuner...

const CString kInstrument			= "Instrument";			///< Effect used as instrument (sound generator), not as insert
const CString kInstrumentDrum		= "Instrument|Drum";	///< Instrument for Drum sounds
const CString kInstrumentSampler	= "Instrument|Sampler";	///< Instrument based on Samples
const CString kInstrumentSynth		= "Instrument|Synth";	///< Instrument based on Synthesis
const CString kInstrumentSynthSampler = "Instrument|Synth|Sampler";	///< Instrument based on Synthesis and Samples
const CString kInstrumentExternal	= "Instrument|External";///< External Instrument (wrapped Hardware)

const CString kSpatial				= "Spatial";		///< used for SurroundPanner
const CString kSpatialFx			= "Spatial|Fx";		///< used for SurroundPanner and as insert effect
const CString kOnlyRealTime			= "OnlyRT";			///< indicates that it supports only realtime process call, no processing faster than realtime
const CString kOnlyOfflineProcess	= "OnlyOfflineProcess";	///< used for offline processing Plug-in (will not work as normal insert Plug-in)

const CString kMono					= "Mono";			///< used for Mono only Plug-in [optional]
const CString kStereo				= "Stereo";			///< used for Stereo only Plug-in [optional]
const CString kSurround				= "Surround";		///< used for Surround only Plug-in [optional]
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)

Last edited by olilarkin; 04-26-2012 at 07:26 AM.
olilarkin is offline   Reply With Quote
Old 04-26-2012, 03:56 PM   #82
pylorca
Human being with feelings
 
Join Date: Apr 2009
Posts: 191
Default

Hi guys,

I'm trying WDL-OL in my plugins.
Beta testers have reported me a bug in harrison mixbuss mac

I have posted the bug description in github https://github.com/olilarkin/wdl-ol/issues/6


this also applies to earlier versions of WDL (not only wdl-ol)
Cheers!
pylorca is offline   Reply With Quote
Old 04-26-2012, 06:07 PM   #83
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

Quote:
Originally Posted by pylorca View Post
Hi guys,

I'm trying WDL-OL in my plugins.
Beta testers have reported me a bug in harrison mixbuss mac

I have posted the bug description in github https://github.com/olilarkin/wdl-ol/issues/6
Cheers!
iplug passes a zero if a channel is not connected. so mono in means mono out. i'm not sure why that code is that way. if the block section is unmodified, you may be reading both channels and then deciding in the middle of the process whether to use the right side, or leave it hanging in the mist to wither and die... it looks unsafe to me somehow.

perhaps another reason to keep the zero around might be if interleaved buffers are involved. if you don't fill the unused channel with a zero, that might be the junk you are hearing.
cerberus is offline   Reply With Quote
Old 04-26-2012, 08:24 PM   #84
pylorca
Human being with feelings
 
Join Date: Apr 2009
Posts: 191
Default

Hi!

I have tried fill second channel with 0, but it does the same.
I also happens on stereo tracks.

this code works well on all hosts, except in mixbuss, I don't know why yet.

Cheers
pylorca is offline   Reply With Quote
Old 04-27-2012, 01:06 AM   #85
caseyjames
Human being with feelings
 
caseyjames's Avatar
 
Join Date: Jul 2009
Posts: 610
Default

Hi,

I'm really interested in using maximilian with the wdl-ol but in the example the sln says NOTWORKING. What does it all mean? Is it a lost cause?

Also, I made a python3 version of the duplicate script if you want it. Just a couple of tweaks.

EDIT:
I tested it and it seems to make sound but its really really loud. Is that the issue that has cast this as 'not working'?

Last edited by caseyjames; 04-27-2012 at 01:14 AM.
caseyjames is offline   Reply With Quote
Old 04-27-2012, 02:00 AM   #86
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

casey - i'm sure it's possible to get the maximillian example working on windows, but i didn't have time. As you say the output is way louder than it should be. It works on Mac though. I would be interested in your Python3 script.

pylorca - there does appear to be a bug when muting/un-muting channels with IPlug AUs in Ardour/Mixbuss. Didn't see it happen with any other plugins, so I guess it can be fixed in IPlug's code.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)

Last edited by olilarkin; 04-27-2012 at 02:41 AM.
olilarkin is offline   Reply With Quote
Old 04-28-2012, 05:56 AM   #87
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default VST3 and subCategories

Quote:
Originally Posted by olilarkin View Post
EDIT: actually I forgot how this works. ivstaudioprocessor.h has these constants which OR together subcategories already. So what you are reading relates to combining the FX subcategory with an FX type. You can't put multiple FX types and have your plugin appear in multiple places in Cubase's plugin menu.
Thanks Oli. It seems that one can edit those strings to define the sub-category name as it appears in Cubase/Nuendo's plug-in selection menus (Studio One appears to ignore the sub-category designation). I would expect this comes up for many devs, e.g. if one's plug-in were a channel strip. I notice that some 3rd party VST3 built from other frameworks than wdl-ol do appear under sub-categories that are not defined in the SDK. (e.g. Waves Vocal Rider and WavesTune appear under a "Vocal" sub-menu.)

I wasn't able to figure out how to add new categories, but that would seem to a more proper way.
cerberus is offline   Reply With Quote
Old 04-28-2012, 01:25 PM   #88
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

if you change the text Vst::PlugType::EFFECT_TYPE_VST3 to just EFFECT_TYPE_VST3 in IPlug_include_in_plug_src.h

you can then do things like #define EFFECT_TYPE_VST3 "Instrument|MyCategory" or #define EFFECT_TYPE_VST3 "Fx|MyCategory" in resource.h to create your own category.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 04-29-2012, 09:02 AM   #89
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

i've just merged "buses" into "next" and modified the way EFFECT_TYPE_VST3 works as described in the previous post, since it seems sensible. This will break old VST3 builds, so you'll need to update your resource.h files.

significant new features are:

- multiple output buses for drumsynths etc in AudioUnits/VST3

a synth with a channel io like #define PLUG_CHANNEL_IO "0-2 0-4 0-6 0-8"

will have 4 stereo buses of output. NOTE: mono buses are not supported at present

- name individual input/output channels (VST2)
- name input/output buses in AudioUnits/VST3

the IPlugSidechain example demonstrates how to do that
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-01-2012, 08:39 AM   #90
SparkyColdfire
Human being with feelings
 
Join Date: Feb 2012
Posts: 12
Default

Thanks Oli, your continuing developement is much appreciated by the user community.
SparkyColdfire is offline   Reply With Quote
Old 05-01-2012, 03:34 PM   #91
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

just been working on some updates for chunks based plugins. I never really needed to use chunks before and was always getting confused between the various Serialize/UnSerialize methods (which ones to override, possibly due to problems in the original implementation)

I think I have reworked it a nice way now (but need to test some more and make sure I didn't break anything). The IPlugChunks example seems to work.

https://github.com/olilarkin/wdl-ol/tree/chunks

basically now you only ever override SerializeState / UnserializeState if using chunks, making sure to call IPlugBase::SerializeParams() / IPlugBase::UnserializeParams() at the end of the method.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-02-2012, 11:37 AM   #92
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

if anyone has a spare moment could they try this VST2 binary on a 32 bit OSX host and see if they experience the same bug as cerberus does in this video:

http://dl.dropbox.com/u/33721778/IPlugChunks.vst.zip

http://www.cerberusaudio.com/a/chunktooth.mov
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-02-2012, 12:06 PM   #93
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: Holland
Posts: 2,766
Default

Quote:
Originally Posted by olilarkin View Post
if anyone has a spare moment could they try this VST2 binary on a 32 bit OSX host and see if they experience the same bug as cerberus does in this video:

http://dl.dropbox.com/u/33721778/IPlugChunks.vst.zip
Yeah, I have the same issue. If I add IPlugChunks, but don't change anything (or just choose one of the presets), then everything seems OK. But as soon as I change anything, then only the bars that I have changed seem to come back, the bars I haven't touched are zeroed.
Tale is offline   Reply With Quote
Old 05-02-2012, 01:11 PM   #94
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by olilarkin View Post
if anyone has a spare moment could they try this VST2 binary on a 32 bit OSX host and see if they experience the same bug as cerberus does in this video:

http://dl.dropbox.com/u/33721778/IPlugChunks.vst.zip

http://www.cerberusaudio.com/a/chunktooth.mov
Confirmed here as well, using 32 bit REAPER 4.23pre6 on OS X 10.7.3.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-02-2012, 04:09 PM   #95
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

thanks for testing. I worked out the problem.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-03-2012, 10:35 AM   #96
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

confirmed that this issue is solved for the example.

however my own source code doesn't seem like it can work with the "chunks" branch, because it forces SerializeState to be called early and often in the constructor, e.g. when MakeDefaultPreset is called.

in my case: SerializeState can't run before the constructor has finished running, all the controls are drawn, and changes that affect control states can actually be applied. There is no "state" before the u.i. is drawn, there are only "params". isn't this the same case for everyone?
cerberus is offline   Reply With Quote
Old 05-03-2012, 10:56 AM   #97
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

I don't think you should rely on the GUI existing before SerializeState gets called.

If you need to pull values from the controls, test that the GUI exists and fill some defaults in if not. When you create your presets with MakePresetFromBlob() / MakePresetFromChunk() those presets should contain the serialized data that could come from the controls.

MakeDefaultPreset() previously didn't work at all with chunks (unless you override Un/SerializeParams) which it used to call
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-03-2012, 11:28 AM   #98
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

Quote:
Originally Posted by olilarkin View Post
I don't think you should rely on the GUI existing before SerializeState gets called.
putting this design question aside for a moment... i think this is sane advice, but i have a lot to learn yet.
Quote:
Originally Posted by olilarkin View Post
If you need to pull values from the controls, test that the GUI exists and fill some defaults in if not. When you create your presets with MakePresetFromBlob() / MakePresetFromChunk() those presets should contain the serialized data that could come from the controls.

MakeDefaultPreset() previously didn't work at all with chunks (unless you override Un/SerializeParams) which it used to call
do we need to conflate presets and chunks just because one is using chunks for the state? i don't expect presets to change anything that isn't an enumerated IParam ( i.e. controls that can't be automated). So i am not using MakePresetFromBlob() or MakePresetFromChunk(). i was getting results with MakePreset() and MakeDefaultPreset() because they didn't affect the state data.

anyway i will talk with some colleagues about how my expectations, and my design are flawed... thank you for your help, oli!
cerberus is offline   Reply With Quote
Old 05-04-2012, 10:50 AM   #99
SparkyColdfire
Human being with feelings
 
Join Date: Feb 2012
Posts: 12
Default

This is a really good discussion. I just got my saving/loading thing working in my plugin, but I had to structure it in a peculiar way, so hopefully your new ideas here Oli will help. Previously, I needed to consider a preset to be the entire state. Which is to say that the preset contained normal parameters as well as a chunk that contained the rest of the data needed to form the complete state. This was unfortunate because I expected the presets could be a subset of the entire state.

Take the example of a simple 3 band EQ plugin. Let’s say that it contains 3 knobs to represent your tone, and an on-off switch. The preset should certainly contain your three knob positions, but it’s debatable whether it should contain the state of the on/off switch. In my case, I didn’t really want the preset to contain the full state. If I have the plugin turned off, and I load the preset, I want to load the correct tone settings, and then turn it on later when I need it. This would be is similar to the buttons on your car radio. When you select a preset radio station, it doesn’t restore the entire state of the radio you had when you set that station.

OTOH, if I load a project in my DAW, I would like the entire state to be restored including the on/off switch state. Will your new structure allow this differentiation between presets and complete state, or are they still considered the same (maybe this is just the way hosts work, I don’t know, I’m kinda new to this).
SparkyColdfire is offline   Reply With Quote
Old 05-05-2012, 01:53 AM   #100
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

I don't think you can separate state and presets like that. If you implement your own preset mechanism (as many plug-ins do) it should be possible, but not when it is the host that provides the functionality to save programs, e.g. fxp, aupreset etc. I implemented fxp/fxb saving in IPlug, but it has to store exactly the same thing that the host would store if you tried to save a program/bank from the host for compatibility.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-07-2012, 09:12 AM   #101
SparkyColdfire
Human being with feelings
 
Join Date: Feb 2012
Posts: 12
Default

That's too bad. Yes, I was going to implement a separate presets mechanism for things other than the complete state, but haven't gotten to that yet. Thanks for the info.
SparkyColdfire is offline   Reply With Quote
Old 05-07-2012, 01:11 PM   #102
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

The problem that Pylorca spotted with IPlug plugins in Mixbuss/Ardour turned out to be in their code - it should be fixed for the next release of Ardour 2.8x / Mixbuss, and doesn't occur in the Ardour3 beta.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-09-2012, 02:56 PM   #103
caseyjames
Human being with feelings
 
caseyjames's Avatar
 
Join Date: Jul 2009
Posts: 610
Default

Here is that Python 3 script. I'm going to dig into the maximilian example to see what its not working, do you have any suspicions as to where I can start looking?

Code:
#!/usr/bin/python

# Python shell script for Duplicating IPlug Projects
# Oli Larkin 2011 http://www.olilarkin.co.uk
# License: WTFPL http://sam.zoy.org/wtfpl/COPYING
# Modified from this script by Bibha Tripathi http://code.activestate.com/recipes/435904-sedawk-python-script-to-rename-subdirectories-of-a/
# Author accepts no responsibilty for wiping your hd

# NOTES:
# not designed to be fool proof- think carefully about what you choose for a project name
# best to stick to standard characters in your project names - avoid spaces, numbers and dots
# windows users need to install python 2 (not tested with 3) and set it up so you can run it from the command line
# see http://www.voidspace.org.uk/python/articles/command_line.shtml
# this involves adding the python folder e.g. C:\Python27\ to your %PATH% environment variable
# to get the debugging setup on mac, you have to rename IPlugEffect/IPlugEffect.xcodeproj/oli.pbxuser to match your OSX username,

# USAGE:
# duplicate.py [inputprojectname] [outputprojectname] [manufacturername]

# TODO:
# - indentation of directory structure
# - variable manufacturer name


from __future__ import generators

import fileinput, glob, string, sys, os, re
from os.path import join
from shutil import copytree, ignore_patterns, rmtree

#tabs = 0
#newsubfolder = False

VERSION = "0.7.3"

# binary files that we don't want to do find and replace inside
FILTERED_FILE_EXTENSIONS = [".ico",".icns", ".pdf", ".png", ".zip", ".exe", ".wav", ".aif"]

def checkdirname(name, searchproject):
	"check if directory name matches with the given pattern"
	print( "")
	if name == searchproject:
#	if name == searchproject + ".xcodeproj":
		return True
	else:
		return False

def replacestrs(filename, s, r):
	files = glob.glob(filename)
	
	for line in fileinput.input(files,inplace=1):
		line.find(s)
		line = line.replace(s, r)
		sys.stdout.write(line)

def dirwalk(dir, searchproject, replaceproject, searchman, replaceman):
#	global tabs, newsubfolder
	for f in os.listdir(dir):
		fullpath = os.path.join(dir, f)
		
		if os.path.isdir(fullpath) and not os.path.islink(fullpath):
			#if(newsubfolder):
			#	newsubfolder = False
			#else:
			#	tabs+=1
			#	newsubfolder = True
			if checkdirname(f, searchproject + ".xcodeproj"):
				os.rename(fullpath, os.path.join(dir, replaceproject + ".xcodeproj"))
				fullpath = os.path.join(dir, replaceproject + ".xcodeproj")
				
				print( 'recursing in main xcode project directory: ')
				for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
					yield x
			elif checkdirname(f, searchproject + "-ios.xcodeproj"):
				os.rename(fullpath, os.path.join(dir, replaceproject + "-ios.xcodeproj"))
				fullpath = os.path.join(dir, replaceproject + "-ios.xcodeproj")
				
				print( 'recursing in IOS xcode project directory: ')
				for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
					yield x
			elif (f ==  "ios_wrapper"):
				print( 'recursing in ios_wrapper directory: ')
				for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
					yield x
			elif (f ==  "app_wrapper"):
					print( 'recursing in app_wrapper directory: ')
					for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
						yield x
			elif (f ==  "resources"):
					print( 'recursing in resources directory: ')
					for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
						yield x
			elif (f ==  "installer"):
					print( 'recursing in installer directory: ')
					for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
						yield x
			elif (f ==  "manual"):
					print( 'recursing in manual directory: ')
					for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
						yield x
			elif (f ==  "English.lproj"):
					print( 'recursing in interface builder localised directory: ')
					for x in dirwalk(fullpath, searchproject, replaceproject, searchman, replaceman):
						yield x
		#elif (newsubfolder):
			#newsubfolder = False
			#tabs-=1
			
		if os.path.isfile(fullpath):
			tabstring = ""
			#for tab in range(0,tabs):
			#	tabstring += "\t"
			
			filename = os.path.basename(fullpath)
			newfilename = filename.replace(searchproject, replaceproject)
			base, extension = os.path.splitext(filename)
			
			if (not(extension in FILTERED_FILE_EXTENSIONS)):
				print( tabstring + 'Replacing project name strings in file', filename)
				replacestrs(fullpath, searchproject, replaceproject)
				
				print( tabstring + 'Replacing captitalized project name strings in file', filename)
				replacestrs(fullpath, searchproject.upper(), replaceproject.upper())
				
				print( tabstring + 'Replacing manufacturer name strings in file', filename)
				replacestrs(fullpath, searchman, replaceman)
			else:
				print( tabstring + 'NOT replacing name strings in file', filename)
			
			if filename != newfilename:
				print( tabstring + 'Renaming file ' + filename + ' to ' + newfilename)
				os.rename(fullpath, os.path.join(dir, newfilename))
	
			yield f, fullpath	
		else:
			yield f, fullpath

def main():
	global VERSION
	print( "\nIPlug Project Duplicator v" + VERSION + " by Oli Larkin ------------------------------\n")
	
	if len(sys.argv) != 4:
		print( "Usage: duplicate.py inputprojectname outputprojectname [manufacturername]")
		sys.exit(1)
	else:
		input=sys.argv[1]
		output=sys.argv[2]
		manufacturer=sys.argv[3]

		if ' ' in input:
			print( "error: input project name has spaces")
			sys.exit(1)
			
		if ' ' in output:
			print( "error: output project name has spaces")
			sys.exit(1)
		
		if ' ' in manufacturer:
			print( "error: manufacturer name has spaces")
			sys.exit(1)
		
		# remove a trailing slash if it exists
		if input[-1:] == "/":
			input = input[0:-1]
		
		if output[-1:] == "/":
			output = output[0:-1]
			
		#check that the folders are OK
		if os.path.isdir(input) == False:
			print( "error: input project not found")
			sys.exit(1)
				
		if os.path.isdir(output):
			print( "error: output folder allready exists")
			sys.exit(1)
		#	rmtree(output)
				
		print( "copying " + input + " folder to " + output)
		copytree(input, output, ignore=ignore_patterns('*.exe', '*.dmg', '*.pkg', '*.mpkg', '*.svn', '*.ncb', '*.suo', '*.sdf', 'build-*', '*.layout', '*.depend', '.DS_Store' ))
		cpath = os.path.join(os.getcwd(), output)

		#replace manufacturer name strings
		for dir in dirwalk(cpath, input, output, "AcmeInc", manufacturer):
			pass
		
		#xcuserfile = output + "/" + output + ".xcodeproj/oli.pbxuser"
		#vsuserfile = + output + "/" + output + ".vcxproj.user
		
		#ans = raw_input("import default debug setups? y/n ...")

		#if ans == "y":
		#	print( "\n renaming the file " + xcuserfile
		#	osxun = raw_input("enter your osx username ...")
		#	if ' ' in osxun:
		#		print( "error: spaces in user name"
		#		sys.exit(1)
		#	else:
		#		nxcuserfile = xcuserfile.replace("wdlce", osxun);
		#		os.rename(xcuserfile, nxcuserfile)
			
		#elif ans == "n":
		#	print( "\n not renaming the file " + xcuserfile + " debugging setup will be lost"
		#	#print( "\n not renaming the file " + vsuserfile

		print( "\ndone - don't forget to change PLUG_UNIQUE_ID and PLUG_MFR_ID in resource.h")
		
if __name__ == '__main__':
	main()
caseyjames is offline   Reply With Quote
Old 05-11-2012, 06:57 AM   #104
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

Quote:
Originally Posted by olilarkin View Post
MakeDefaultPreset() previously didn't work at all with chunks (unless you override Un/SerializeParams) which it used to call
ty for pointing that out.

Quote:
Originally Posted by SparkyColdfire View Post
... I would like the entire state to be restored including the on/off switch state. Will your new structure allow this differentiation between presets and complete state, or are they still considered the same (maybe this is just the way hosts work, I don’t know, I’m kinda new to this).
i'm working on this... i think it is possible to separate these concerns entirely except when desired. i have it mostly working, but i have a bug where the de-facto default preset can get overwritten when the user saves a new preset. perhaps it's because i'm not calling MakeDefaultPreset()...
cerberus is offline   Reply With Quote
Old 05-11-2012, 08:40 PM   #105
caseyjames
Human being with feelings
 
caseyjames's Avatar
 
Join Date: Jul 2009
Posts: 610
Default WDL-OL without example project?

Hey, is it possible to include the WDL-OL into another project without using the python script/examples as a base? How would I go about that?

I am using a qt based library (not gui). I have both it and wdl-ol building examples fine independently but I am having trouble combining the projects to get the baseline components up and running.

Is it just a matter of adding the includes or are there other settings that I need to match.

The complexity of the other library's build seems much greater.

Any tips would be greatly appreciated. This project is finally coming along but I'm stuck at getting the big components up in running in the same project.

p.s. I also noted that in the Maximilian example the bug has to do with the adsr envelope. I poked around at it and noticed some mismatches between floats and doubles but I wasn't able to figure out what was wrong other that that none of the conditionals in the adsr ever seemed to pass when watching the debugger. If I remove the adsr the volume is less off into the billions.
caseyjames is offline   Reply With Quote
Old 05-14-2012, 07:21 AM   #106
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

Quote:
Originally Posted by caseyjames View Post
Hey, is it possible to include the WDL-OL into another project without using the python script/examples as a base? How would I go about that?
What functionality does the QT stuff provide? It would make more sense I think to add the source code from the other project to the WDL-OL xcode/vs projects, or maybe build it as a static library (in qt compiler etc) and link to it. I'm not familiar with QT so I don't know how feasible this is.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-14-2012, 07:59 AM   #107
caseyjames
Human being with feelings
 
caseyjames's Avatar
 
Join Date: Jul 2009
Posts: 610
Default

Its managing database stuff.

I am going to try today to move the Qt to the WDL buy I'm less optimistic about that direction.

There is a whole qmake compilation process for Qt that I think complicates things.

If I do have to end up moving WDL. Are there many vs2010 setting that need to be set apart from including the c/h files?
caseyjames is offline   Reply With Quote
Old 05-14-2012, 09:25 AM   #108
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

Not many. You can inspect the .props and .vcxproj files to find out the details. You don't have to link to IPlug and Lice static libraries if you don't want to, and removing those library dependencies (but including all relavant source code in the main build) might make the build a bit simpler, although it will take longer.

I think building your QT stuff as a static lib is probably the way to go, then you don't mess too much with the nice project folder structure I made in WDL-OL :-)
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)

Last edited by olilarkin; 05-15-2012 at 12:21 AM.
olilarkin is offline   Reply With Quote
Old 05-15-2012, 02:19 PM   #109
Keith99
Human being with feelings
 
Join Date: May 2012
Location: North Yorkshire, England
Posts: 2
Default

Hi, I have been using the WDL-OL recently and it is really excellent work. It could well be the answer to creating all the different plugin formats. I just have some issues e.g. when opening the resource view in Visual Studio 2010 (full version) I get a crash and all resources wiped. This means I cant use resources but have to load from data. Anyway I just wondered if there was an update due at any time?
thanks
Keith99 is offline   Reply With Quote
Old 05-15-2012, 02:39 PM   #110
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

I use VS2010 express so I haven't tried the resource editor. I guess there is a problem due to the .rc files i edited by hand. If you can detail the problem as an "issue" at the github page, I will take a closer look if I can get a copy of VS2010 pro.

I have done a lot of work on WDL-OL lately, but it's all on the "next" branch. When I am happy with it I'll merge it to master.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-16-2012, 04:59 AM   #111
Keith99
Human being with feelings
 
Join Date: May 2012
Location: North Yorkshire, England
Posts: 2
Default

Sure will do. I got the full visual studio free from the academic alliance.
Keith99 is offline   Reply With Quote
Old 05-19-2012, 02:56 PM   #112
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

Is there anyone here developing for ProTools using WDL-OL? I have implemented preliminary support for AAX Native and it would be good to try it with some other devs. Let me know.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-21-2012, 02:27 AM   #113
tonhelm
Human being with feelings
 
Join Date: Feb 2008
Posts: 23
Default I'm in

hey Oli,
that's great news!
I've already tried to get a working rtas version of DC8C, but didn't succeed yet. I've only checked it out on windows, though. I remember, that I had issues with MSVC 8 a few years ago, when it was the current version. So maybe it's just a MSVC 8 issue on my end.
I was looking into both the RTAS and AAX sdk. And AAX seemed to be much more user friendly to me (but I might be wrong). I just didn't find the time yet to dive deeper into it. But I'd love to help you with testing. AAX would be a killer feature for WDL-OL. Might be the first framework that supports AAX!

Tony
tonhelm is offline   Reply With Quote
Old 05-21-2012, 02:42 AM   #114
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

what problems do you have with MSVC 8? (VS2005 right?) I never managed to build a working RTAS debug build, but the release version works.
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-21-2012, 04:52 AM   #115
tonhelm
Human being with feelings
 
Join Date: Feb 2008
Posts: 23
Default

Quote:
Originally Posted by olilarkin View Post
what problems do you have with MSVC 8? (VS2005 right?) I never managed to build a working RTAS debug build, but the release version works.
Sorry, my memory is very vague about it :-) And I didn't keep the error reports. IIRC the errors were winlib related and had nothing to do with WDL.
But I'll give RTAS another, deeper try and report back.

When I tried out WDL for the first time with VS2005 a few years ago, I had similar issues. In the end I got it working, but only for release builds (what you wrote for your rtas builds).
With VS2010 WDL/iPlug worked out of the box
tonhelm is offline   Reply With Quote
Old 05-21-2012, 05:48 AM   #116
A_SN
Human being with feelings
 
Join Date: Aug 2011
Posts: 89
Default

Hi Oli I'm trying to move from Tale's thing to yours for good, but I'm having a few problems with my code (in Xcode 3):

Code:
SplineEQ.h:71: error: no matching function for call to 'IControl::IControl(IPlugBase*&, IRECT*&)'

the code being

class IDrawControl : public IControl
{
public:
	IDrawControl(IPlugBase *pPlug, IRECT *pR, inst_t *parent_inst) : IControl(pPlug, pR) { ci = parent_inst; }
I have no idea why I can't call IControl() for that

Code:
SplineEQ.cpp:1703: error: no matching function for call to 'IKnobControl::IKnobControl(IPlugBase*&, IRECT*&, int&, EDirection&, double&)'

The function being:

IKnobInvisibleControl::IKnobInvisibleControl(IPlugBase* pPlug, IRECT* pR, int paramIdx, inst_t *parent_inst, EDirection direction, double gearing)
:   IKnobControl(pPlug, pR, paramIdx, direction, gearing)
{
	ci = parent_inst;
}
I guess it's a similar problem to the one above?

Code:
SplineEQ.cpp:1496: error: 'kFileOpen' is not a member of 'IGraphics'
SplineEQ.cpp:1507: error: 'kFileSave' is not a member of 'IGraphics'
((IGraphics *) ci->pGraphics)->PromptForFile(&fileName, IGraphics::kFileSave, "", "dat");
What do you use for open/save file dialogs? kFileSave and kFileOpen don't work anymore.

Code:
SplineEQ.cpp:1739: error: no matching function for call to 'IGraphics::PromptUserInput(IKnobInvisibleControl* const, IParam*)'

from

mPlug->GetGUI()->PromptUserInput(this, mPlug->GetParam(mParamIdx));
Not sure what to do about that either.

Also is there any way to make builds that run on OS X 10.4 and has anyone been able to make PowerPC targets?
A_SN is offline   Reply With Quote
Old 05-21-2012, 06:28 AM   #117
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

1 - Your IControls need to take an IRect rather than an IRect* in the constructor

2 - change IGraphics::kFileSave etc -> kFileSave

3 - you can add MACOSX_DEPLOYMENT_TARGET = 10.4 to common.xcconfig and for ppc support add ppc to the ARCHS/Architectures setting for each target. I have no idea if it will work though, there will probably be some problems
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-23-2012, 04:45 AM   #118
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

oli, would you please describe the meaning of, and purpose/use case for: "IPlug version numbers" ? ( as mentioned here https://github.com/olilarkin/wdl-ol/...4ce73cd1154838 )
cerberus is offline   Reply With Quote
Old 05-23-2012, 05:55 AM   #119
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 915
Default

Well I guess that schwa put it there in case the way that IPlug restores state got changed... So that host projects or presets saved with a previous version could be dealt with. If your plugin does chunks its worth adding the plugin version number in a similar way- that means that later on if you add a parameter you can do something special to deal with it
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 05-23-2012, 06:54 PM   #120
cerberus
Human being with feelings
 
Join Date: Nov 2009
Location: memory
Posts: 634
Default

ty oli...

i'm still working on a better solution to this:
Quote:
Originally Posted by SparkyColdfire View Post
That's too bad. Yes, I was going to implement a separate presets mechanism for things other than the complete state, but haven't gotten to that yet. Thanks for the info.
what i'm doing for chunks in vst3 seems unnecessarily complicated: i'm calling RestorePreset(0) and also overriding PresetsChangedByHost()... whatever it takes to get chunks runing properly.

also i've added back some lines of code which were in wdl-ce, where i have chunks working for vst2 and audio units.

i observe that in vst2: VSTDispatch() (seemingly coming from the host -> vst2 api ) seems to call UnserializeState(), but this option isn't implemented in IPlugVST3. therefore at present, we need to modify our src to force the chunk-related methods to run in vst3.

however, since we don't have the address of the chunk which we would need to call UnserializeState() directly, we need to call it circuitously. (have i gotten all that correct?)

is this what steinberg intends? could a more platform-consistent solution exist for vst3 chunks?

Last edited by cerberus; 05-23-2012 at 07:18 PM.
cerberus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:23 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.