Setting/freezing "neutral" value on spring-loaded control?

Post Reply
River Cricket
Posts: 136
Joined: Sat Dec 20, 2014 6:53 am

Setting/freezing "neutral" value on spring-loaded control?

Post by River Cricket »

Maybe the topic is self-explanatory, but just in case:

I have a spring-loaded control. It outputs between 0-127, and if I don't touch it, it outputs 63 or 64.

I have a Buzz Machine* with a setting bound to the MIDI control. Assuming (for the sake of keeping things simple) that it has values between 0-127 as well, I would like it to remain at 32 when I'm not using the control, instead of 63/64.
* - Actually a VSTi, but if worst comes to worst I can just route it through an Effect.

Is there any way to either (in rough order of preference):

1. Bind a push-button control to "freeze" the MIDI control at its current value, releasing it only when I need to move it? (so, move controller down halfway, push button, let go of controller, do other things, setting value stays at 32'ish)

2. Set "63" to equal "32", with the resulting imbalance handled intelligently? (i.e., full 0 on the control is still 0 on the Buzz setting, 127 on the control would be 127 on the Buzz setting)

The closest thing I could find on Google was this thread on cockos forums, but it's for Reaper, and I'll only ditch Buzz when they pry it away from my cold dead hands!
Last edited by River Cricket on Mon Oct 05, 2015 8:47 pm, edited 1 time in total.
River Cricket
Posts: 136
Joined: Sat Dec 20, 2014 6:53 am

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by River Cricket »

[quote="River Cricket"][/quote]
I've been looking into this all day now - seems I could maybe do this in PyBuzz, but there's no real documentation other than the old "read through the included .py files and try to make sense of them" (another BuzzChurch casualty, maybe?). I hate to pester anyone, but I get the feeling this is something that would take five, maybe ten minutes for someone who's used to PyBuzz, versus a week or more for me to stumble my way through it. :cry:
User avatar
onecircles
Posts: 333
Joined: Wed Mar 26, 2014 7:07 am

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by onecircles »

Interesting question. Some vst can take the midi values you pass them and constrain them within any 2 arbitrary points, so the center of those two points become your new center. So if you can define a range for a midi controller within the vst you are using that would be one way to accomplish this.

Some midi controllers can define the upper and lower values for a parameter that they are controlling. So your midi controller may have the ability to do this itself.

Faders are a better fit for parameters that you want to play or automate around a sweet spot, because you can set them there, and move them as you like. Also when you let them go they just sit there!

What are you making?
elekt
Posts: 106
Joined: Mon Nov 21, 2011 11:29 pm

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by elekt »

I'd start by looking here:
For 1. Maybe it's possible to use midiTriggerList from this package http://thepiz.org/pizmidi/?p=pizmidi
For 2. To map a pitch wheel like it sounds you're using, use either midiCurve http://thepiz.org/pizmidi/?p=midiCurve or midiPBCurve http://thepiz.org/pizmidi/?p=midiPBCurve and then convert with midiConverter3 to CC values.

Or a combination of those two.
There could be other ways to do it. Definitely possible in Bidule (which you can use as vst), but it's $$. Piz stuff is good tho, and pvst is a great host for them.
User avatar
mcbpete
Posts: 381
Joined: Tue Nov 22, 2011 9:45 pm

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by mcbpete »

I'm away from my Buzz machine but my first thought is use PeerCtrl and in the value mapping graph on the right create a graph (assigned to the volume parameter) that has 0 mapped to 0 and at ~63 add another point mapping it to 32, and another at 128 mapped to 128. Basics of PeerCtrl - https://www.youtube.com/watch?v=XQVYUf2BN8Q
River Cricket
Posts: 136
Joined: Sat Dec 20, 2014 6:53 am

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by River Cricket »

onecircles wrote:Interesting question. Some vst can take the midi values you pass them and constrain them within any 2 arbitrary points, so the center of those two points become your new center. So if you can define a range for a midi controller within the vst you are using that would be one way to accomplish this.

Some midi controllers can define the upper and lower values for a parameter that they are controlling. So your midi controller may have the ability to do this itself.
The controller doesn't have such a feature, and even if one or two of the VSTs I used had a range-defining feature, not all do, so that option's out as well.
onecircles wrote:Faders are a better fit for parameters that you want to play or automate around a sweet spot, because you can set them there, and move them as you like. Also when you let them go they just sit there!
If I had a fader, I'd use it - I'm not that stupid. :)
onecircles wrote:What are you making?
Basically I'm trying to layer a keyboard part over a drum and bassline. It's in a weird syncopated meter and it's easiest for me to play the part "live", rather than muck about with pattern editing. I'm using a joystick (routed through Fergo JoystickMIDI) for expression (adjusting cutoff and/or ADSR on the fly), and it's self-centering, which limits what I can actually express with.

I'm well aware that there are other sorts of controllers out there that are better equipped for the job, with knobs and mod wheels and sliders and faders galore. I'm thoroughly uninterested in purchasing one.
elekt wrote:I'd start by looking here:
For 1. Maybe it's possible to use midiTriggerList from this package http://thepiz.org/pizmidi/?p=pizmidi
For 2. To map a pitch wheel like it sounds you're using, use either midiCurve http://thepiz.org/pizmidi/?p=midiCurve or midiPBCurve http://thepiz.org/pizmidi/?p=midiPBCurve and then convert with midiConverter3 to CC values.

Or a combination of those two.
There could be other ways to do it. Definitely possible in Bidule (which you can use as vst), but it's $$. Piz stuff is good tho, and pvst is a great host for them.
Holy SMOKES, why wouldn't Google show me pages like that!? I felt my mouth actually water a little looking over that list. :dance:

I've never used VST effects in this way, though, so what exactly is the process for using these in Buzz?

I tried loading a VST synth (using Polac VST instead of VSTi, so I'll have an input), then connecting one of these machines to it, but it doesn't seem to actually be affecting the input when I start using the synth.

Image
elekt
Posts: 106
Joined: Mon Nov 21, 2011 11:29 pm

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by elekt »

Here are the relevant pvst docs, it's a breeze:

Midi in device http://www.xlutop.com/buzz/pvstdocs/main.html#33
Midi send http://www.xlutop.com/buzz/pvstdocs/main.html#30
River Cricket
Posts: 136
Joined: Sat Dec 20, 2014 6:53 am

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by River Cricket »

elekt wrote:Here are the relevant pvst docs, it's a breeze:

Midi in device http://www.xlutop.com/buzz/pvstdocs/main.html#33
Midi send http://www.xlutop.com/buzz/pvstdocs/main.html#30
Oh man, closer and closer!

I tried connecting the machines like in the diagram, but it still isn't working - just to break down what I'm doing, so maybe you can catch the noob mistake I'm making:

1. Start new file, just to assure a "blank slate".
2. New VSTi, load with synth.
3. New VST, load with the midiCCReset VST for testing purposes.
4. Bind "Thru" in midiCCReset VST to my button.
5. Bind a random control in the synth VSTi to my joystick.
6. Right-click VST, Midi Send to my synth VSTi (as illustrated in http://www.xlutop.com/buzz/pvstdocs/main.html#30)
7. Connect VST (with midiCCReset) to Master.
8a. Connect VSTi to VST.
OR 8b. Connect VSTi to VST and to Master.
OR 8c. Connect VSTi to Master, connect cheapo Do-Nothing machine to VST
9. Regardless of which 8 option I take, the end result is the same: The joystick affects the synth control regardless of whether or not I'm holding the button assigned to "Thru" in midiCCReset. I can see the Thru value changing in the midiCCReset Parameters window when I push the button, so I know it's getting input.

For what it's worth, Polac MIDI In just shows the same port Buzz is already using, and if I try to select it it tells me it's already in use.

If there's a piz machine you're more familiar with, I don't mind using that instead for testing purposes. I'm probably overlooking something really basic here, so thanks in advance for dealing with my rookie mistakes :)
elekt
Posts: 106
Joined: Mon Nov 21, 2011 11:29 pm

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by elekt »

I'm away from civilization (buzz) for a couple weeks, so maybe someone (ags) can pitch in, but: pvst needs the midi port exclusively, so it can't be selected in buzz prefs at the same time. I'd start with that.

I'm not familiar with all of the piz plugins, but it's essentially a modular system and it's very likely you'll come up with an ensemble that does what you want. Keep tweaking, you'll most likely get it.




Unless ags gets to it first.
ags
Posts: 169
Joined: Sat Nov 26, 2011 4:06 pm

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by ags »

Q1
Using the Thru on midiCCReset like you said should do what you want.
I couldn't get it to work in Buzz on this PC though. Don't have time to to investigate will update later. Two things though:
  • All the piz plugins except audioToCC should be loaded as generators in PVSTi
  • Sounds like your synth is receiving the MIDI direct from the controller as well as from midiCCRest (because youre using the device set in Buzz prefs (speculation) and you have the synth set to listen to MIDI in its right-click menu(more speculation)) ?
    The joystick affects the synth control regardless of whether or not I'm holding the button assigned to "Thru" in midiCCReset.
Q2
Possible natively using BTD PeerCtrl as mcbpete said..
This method does use the MIDI input selected in Buzz' own View>Preferences>MIDI Input menu.
  • Right click -> Assignment Settings (If it doesn't open, see below)
  • Click "No Assign" on the left so it's highlighted
  • Select Target machine in drop down and it's Target param in middle column
  • Hit MIDI CC Settings, choose the controller you want & the channel (move one to see when CC# & Chan. it is.) then OK
  • Back on the Assignment Settings, Hit Update on the left & it's bound (These are saved with the song; unlike native buzz right-click bindings(or are they too now? I forget))
  • You can use the envelope editor to map the CC's range to the param's range.
It'll stop moving if the PeerCtrl doesn't have either
  • MIDI Focus (top right of Buzz, left of the Audio Driver setting (you can lock it here)
  • MIDI Input Channel set correctly in the right-click menu for the PeerCtrl. (Then receives w/o focus)
PeerCtrl Window doesn't open?
  • Get http://buzzmachines.com/utils/Buzzfixkit021217.zip
  • Close Buzz and run it (ignore all warnings)
  • I Agree -> Setup -> Extract Stygmates Envelope.ocx & Register Envelope.ocx -> Next (Stygmates gives you the grid in the background IIRC)
  • Now it should work
etruscan
Posts: 85
Joined: Wed Nov 23, 2011 10:10 am

Re: Setting/freezing "neutral" value on spring-loaded contro

Post by etruscan »

Regarding the PyBuzz route, here is a script I wrote which maps CC values from a MIDI controller in the way that you describe:

https://vid.me/e/glxU

In the example, the unaltered MIDI cc is mapped to ATrackParam on the Jeskola Gain called 'Unmapped'; the mapped MIDI is mapped to ATrackParam on the one below it. (I chose ATrackParam because it goes 0-127.) The PyBuzz script is shown on the left.

(I know you want to send MIDI CC data to a VSTi; I can do this with PyBuzz, but it was simpler to put this example together without VSTs.)

The mapping is as follows:

Input value 0 - 63: map to 0 - 32
Input value 64 -127: map to 32 - 127

I haven't tried using it to control anything but I imagine it will feel weird because you have to move the controller 3x as fast when it's below 64 to achieve the same effect as when it's above 64. Maybe a quadratic curve would be smoother to use?

Update:

Here's a quadratic fit for comparison to the other two:

https://vid.me/e/SaXM

Let me know if you want to give this method a try and I can help out . . .
Post Reply