View Issue Details

IDProjectCategoryView StatusLast Update
0000235OpenMPTFeature Requestpublic2012-03-14 13:17
ReporterSuperSega Assigned To 
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionno change required 
Platformx86OSWindowsOS Version7
Product VersionOpenMPT 1.19.04.00 (upgrade first) 
Summary0000235: channel plugin switch
Description

I thought of this feature that quite honestly sounds feasible to me, it's already done in the current version of openmpt just not the way i'm gonna put it. It's basically this, an new effect (let's call it Jxx bare with me) that basically refers to a plugin by the number of it's value.

putting in a value on a channel for the first time would turn on the plugin for the channel, and typing in the same command on any row afterwards would turn it off.

also a combination of plugins would just simulate plugin chains, the first plugin call would call a plugin (and also it's chains if it's already chained) and a different call afterwards would make a temporary chain with the last plugin chained being ouput to that one, and if the next plugin called was not after the first one (because apparently as i understand you can only chain consecutive plugins) then you could describe the behaviour for that second call to either switch the plugin being run (in practice turning off the first one) or simply to be ignored.

ok sorry for all the abstractness, this should make it clearer.

so let's say plugin 00 is Flanger (unchained) plugin 01 is Echo (unchained).

you're on your channel 0 on the 0'th pattern, you have some melody c4 d4 e4 d4 f4 etc it fills up the whole channel on that pattern. on the 5th row you have as the effect J00 what it does is turn on flanger as a channel plugin but ONLY starting on that 5th row, so the first 4 rows we had notes with no flanger and the fifth row you got flanger. THEN on the 30th row you type J00 (again) now the flanger turn off and the melody continues to the end of the pattern in channel 0 without any flanger.

then on the next pattern, (effectly the second pattern, we'll call it the 1'th pattern whatever) you have the same melody and of course there's no plugin being processed UNTIL on row 10 you type J00 and flanger turns on, but then on row 15 you type J01 and the flanger is still on but now it's routed to echo, we conclude this scenario with typing afterwards j01 on pattern 30 and j00 on pattern 40 and echo goes first then flanger OR (alternate conclusion) we typed J00 on pattern 30 and both turn off because flanger was being routed to echo.

and if plugin 00 was chained to plugin 01 to plugin 04 then you could do J00 and then J05 afterwards and that'd be alright.

the whole chaining thing isn't TOO important i would be happy if we could get this to happen with just one plugin at a time because so many times have I been like "UGH i just want there to be flanger on this chord for a couple of seconds instead of making a whole new instrument with the same sample."

Steps To Reproduce

so to get this to work you'd need some variables to tell openmpt when a plugin is being used on a channel temporarily and when it can stop (by default set to end of song if no second call) or something like that, the whole trickiness of this i think is getting a channel plugin to be temporary, that's basically the thing here. I'd be willing to help (or do it myself with some help and encouragement) but I brought this up also because I'm not sure if it's already available somehow or been talked about before, but all I know is that it would be a great enhancement. I mean i would use it All the time.

and it doesn't sound impossible or anything so i think it's really worth the work it would take.

Additional Information

you can contact me at neodampf@gmail.com

TagsNo tags attached.
Attached Files
PluginSwitch.7z (5,723 bytes)
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2012-03-12 13:23

administrator   ~0000653

You could adjust the Dry/Wet to achieve what you want - for example use the parametered macro preset type "Macro controls plugin dry/wet ratio" and then put that macro on an unused channel, assign the plugin that should be switched on/off to that channel and then call Z00 to mute the macro and Z7F to enable it.

SuperSega

SuperSega

2012-03-12 17:53

reporter   ~0000655

but doesn't this solution still force the same plugin to be assigned to a channel for the whole song? what I wanted was a way to flexibly call different plugins at different times on the same channel.

Saga Musix

Saga Musix

2012-03-13 18:09

administrator   ~0000656

Well, you can execute the Dry/Wet macro on another channel as well, as long as either
1) the plugin in question is assigned to the channel as a channel plugin
2) the channel has no channel plugin, but the plugin is assigned to an (dummy) instrument on that channel that is triggered when executing the Dry/Wet macro.

It sure might not be the most convenient way to do this, but at the moment it's all we've got.

SuperSega

SuperSega

2012-03-13 19:59

reporter   ~0000657

ok well that means that the feature is unimplemented.
Listen can i get help on it? I just need someone who'd be willing to answer my questions and i'd work on it myself. I mean if no one is willing to do it I will try, I just need one person who's familiar with the code of the program to help guide me.

Saga Musix

Saga Musix

2012-03-13 20:42

administrator   ~0000658

Last edited: 2012-03-13 22:19

I'd say this feature would be rather difficult to implement if you have no experience with the OpenMPT code, but you are welcome to try.

Please consider the attached example file and see if toggling plugins like that is really too complicated for you.

I doubt that the feature as you suggest it (or at least how I understand it) would work very well, anyway: It appears that you want to allow any plugin to be inserted into a channel at any time. Please consider:


  • If there is already a plugin chain on that channel, where in the chain would you insert the plugin? Plugin chains cannot point backwards, so if you already have plugin 1 point to plugin 3 and now you want to enable plugin 2 on that channel, it would have to be inserted after plugin 1. So the plugin chain would be 1->2->3. However, what happens now if plugin 2 points to plugin 4?

  • What would you do if the plugin you want to enable on a channel is already part of a different plugin chain on another channel? As soon as you insert the plugin on another channel, you insert all the other channels (and the other plugin's output) on that channel as well. Good luck finding a solution for that that won't give you a headache.


Building plugin chains on the fly is not a good idea at all. Your description was rather fuzzy and I believe if someone would implement dynamic plugin re-routing in OpenMPT it would confuse just anyone, because you have to consider so many things when changing plugin outputs. And I don't even want to know what kind of weird behaviours this would spawn as soon as OpenMPT gets modular routing.

If, on the other hand, you want a simply "bypass" toggle for every plugin, that is exactly what my attached exampel file does. I think it would be possible to implement a new bypass macro / effect that would always work - independent on which channel it is placed and no matter what plugins are assigned to that channel. I think something like that has even been requested before and it's certainly doable.

SuperSega

SuperSega

2012-03-13 22:15

reporter   ~0000659

ok, i have an idea. I'll start calling this command θxx.

how about, when you call θxx on a channel and there is already a plugin there, you add it to the end of the chain only if it's value is greater than the last plugin on the chain. if it's less than or equal to the last plugin on the chain then you ignore the command all together. So plugin 1->3 on a channel and you type θ02, it does nothing. but if you type θ04 it links on plugin 4 to the chain 1->3->4, then if you type θ04 again afterwards, it removes plugin 4 and the chain is back to 1->3.

The same rule could be applied to instrument plugins, as long as the θxx command is a value of a plugin larger than the last plugin on the chain, it seems reasonable that you could add it to the end of the chain in that case as well.
I know then it would also make the functionality of θxx to be chaining on a plugin not in channel logic, but in instrument logic when typed on a channel with notes entered by an instrument with plugins after the command before it is called off.
But that would be very useful.

Also a keypoint here, i didn't forget, if you remove θ04 (by typing it a second time, while it's actually got other plugins after it, eg 1->3->4->5, you could just treat the situation as removing 5 first then 4.
So
θ04 θ04
... ...
... ...
θ05 = θ05
... ...
... ...
θ04 θ05
... θ04

As for that second problem, I'm sorry but I'm not sure i understand what a "plugin channel" is, if i'm getting the context here right i might assume that's what you had in the example file you uploaded. If that's the case then I admit that problem sounds confusing, but since the method of having an effect on one channel affect all channel outputs would not play nice with this functionality, we could just deal with it by ignoring the θxx command in the condition that you have a song using plugin channels at all.

I believe this endeavor is extremely worthwhile, as confusing as all of this could become I don't think it's not worth it. Please let me know of all the other conflicts this feature could create, i'm really serious about getting this to happen, thank you.

Saga Musix

Saga Musix

2012-03-13 22:26

administrator   ~0000660


As for that second problem, I'm sorry but I'm not sure i understand what a "plugin channel" is

corrected plugin channel => plugin chain

There are clearly too many "ifs" in that description for my taste. I guess that's also why you won't get any similar features in any other host (at least not that I'm aware of). Moving plugin chains around is not really not a simple thing and OpenMPT's current implementation of plugin chaining is already obscure in some points. You cannot simply say that plugin is part of one plugin chain on channel x but not part of the same plugin chain on channel y. And that's exactly what is going to confuse everyone, because once you remove a plugin from a chain, it will vanish on all channels that made use of that chain, and that way you can easily break those chains. For this idea to work, you'd have to be able to duplicate VST plugins on the fly, which is not really something what the VST SDK provides (you'd be really lucky if it worked).

Can you give a clear example where you could benefit from this mechanism and where using e.g. a bypass toggle would not solve your problem?

SuperSega

SuperSega

2012-03-14 05:58

reporter   ~0000662

hmmm.

you're right. I'm kind of starting to lose enthusiasm over the idea now. Not because of whether or not it's doable, (cause I didn't mean double-instanced plugins, i meant that θxx would add to the plugin chain itself.)
i think i'm happy with the way i did it before, it's just that i just finished this really long song that i had worked on for 2 weeks, so that probably increased the desire for different functions, but i put myself on a deadline so it was more stressful, but now that i'm done i think i can get more used to the way i did it before with practice.

thanks for all the replies, keep up the good work!

Saga Musix

Saga Musix

2012-03-14 13:17

administrator   ~0000663

Well, there's certainly always room for improvements, so if you have any good ideas that don't include too many "ifs" in the way they work, please let us know. :)

Issue History

Date Modified Username Field Change
2012-03-11 22:21 SuperSega New Issue
2012-03-12 13:23 Saga Musix Note Added: 0000653
2012-03-12 17:53 SuperSega Note Added: 0000655
2012-03-13 18:09 Saga Musix Note Added: 0000656
2012-03-13 19:59 SuperSega Note Added: 0000657
2012-03-13 20:42 Saga Musix Note Added: 0000658
2012-03-13 20:43 Saga Musix File Added: PluginSwitch.7z
2012-03-13 22:15 SuperSega Note Added: 0000659
2012-03-13 22:19 Saga Musix Note Edited: 0000658
2012-03-13 22:26 Saga Musix Note Added: 0000660
2012-03-14 05:58 SuperSega Note Added: 0000662
2012-03-14 06:00 SuperSega Resolution open => fixed
2012-03-14 06:00 SuperSega Description Updated
2012-03-14 13:17 Saga Musix Note Added: 0000663
2012-03-14 13:17 Saga Musix Status new => closed
2012-03-14 13:17 Saga Musix Resolution fixed => no change required