MMMZZZZ / Syntherrupter

Powerful MIDI interrupter with touchscreen for up to 6 tesla coils and 16 voices per coil.
Mozilla Public License 2.0
23 stars 4 forks source link

Modulation Wheel(Enhancement) #36

Open PoleTransformer opened 2 years ago

PoleTransformer commented 2 years ago

Please disregard my previous issue. The noises go away after increasing power. There is one idea I do want to pitch. I noticed the modulation wheel acts more like a tremelo wheel that changes the volume of the output. Is there anyway to change this to pitch variation instead of volume variation?

MMMZZZZ commented 2 years ago

Hi @WayneSeng

Glad to hear your issue wasn‘t caused by a bug! I assume you were just under the limit where arcs start to form such that occasionally ontimes close together would cause a single discharge with popping sound. I‘d ask you for the future to close the old issue and open a new one instead of editing it into something completely different. Main reason being that I don‘t get notified about your edit and may miss it or start hunting a bug that doesn‘t exist.

Now for the modulation wheel. There is no config option available right now that‘d do that. However, there is the pitch bend command. Usually, keyboards have a pitch bend and a modulation wheel, and both are supported by Syntherrupter. Also, I don‘t know of any „standard“ MIDI command that would allow for oscillating pitch (like the modulation command) so I wonder how common that is… Long story short, if you want an oscillating pitch you need to do it on your PC, keyboard or whatever you‘re using. If your software supports such a feature, I‘m pretty sure it‘ll be done using the pitch bend command (and will thus work with Syntherrupter). If your software doesn‘t support it, one could rather easily write such a thing in python f.ex.

Kind regards, Max

PoleTransformer commented 2 years ago

Thanks @MMMZZZZ I will keep that in mind. It was a bit late and driving me a bit crazy as to why this was happening and of course it was me the entire time, so I apologize about that.

I am aware of the pitch bend command, however my DAW(Ardour) doesn't have a way to easily automate pitch bend commands. So when I needed to add vibrato to some parts of a song, I had to manually drag my mouse and change the automation timeline for pitch bend. And... If there is a way to easily add automation that I don't know off, please try to point me in the right direction. Anyway, im likely wrong, but the modulation on a MIDI keyboard can be configured for tremolo or vibrato right? On Syntherrupter, adding CC 1(modulation) adds tremolo, but it shouldn't be too hard to implement vibrato as well?

I didn't think about writing something in Python. I may try to implement a virtual LFO that outputs pitch bend commands after lets say a keyboard shortcut. I then record this automation in Ardour.

Appreciate it, Wayne

MMMZZZZ commented 2 years ago

Hi @WayneSeng,

I did some reading about tremolo and MIDI and found surprisingly little information. tl;dr seems to be that it's done using pitch bend commands and that there're no channel controllers for it. So I'll likely implement it via NRPNs.

So far there's only one LFO which is only used for the modulation, meaning any channel that enables modulation will be in sync and at the same frequency as all others. A simple tremolo implementation would use the same LFO, so same frequency (and phase) again. By your experience, would that be okay?

Kind regards, Max

PoleTransformer commented 2 years ago

Thanks @MMMZZZZ.

I honestly don't have as much experience either. I also don't own a synthesizer, so im not exactly sure if you can configure the modulation wheel for tremelo or vibrato.

That would be ok, but maybe you can use a unused CC effect to control the LFO frequency and another for the depth. This can give a bit more control over the sound.

Thanks, Wayne

MMMZZZZ commented 2 years ago

Hello again @WayneSeng,

I think you slightly misunderstood me. The LFO is controllable in frequency (via SysEx parameter 0x68 or 0x69, corresponding to the Syfoh commands midi-lfo-freq and midi-lfo-bpm)

My main question was whether or not it is sufficient to have only one LFO (frequency) that controls the tremolo and modulation effect on all channels? Note that the LFO amplitude would be kept separate for all channels/usage cases. It's only about the frequency; whether or not that can be the same controllable one for all or not.

Kind regards, Max

PoleTransformer commented 2 years ago

Hi @MMMZZZZ

Im not very familiar with SysEx commands, but I will definitely check those out in the future.

Yes, it should be sufficient. In my MIDI instrument, I only used one frequency that controlled the modulation.

Thanks, Wayne

MMMZZZZ commented 2 years ago

Hi @WayneSeng,

First of all, sorry for confusing tremolo and vibrato. Also, I had in mind you wanted to control the pitch in addition to the modulation wheel, not with the modulation wheel. However, I feel like the latter one should be configured on your MIDI keyboard and/or your DAW (meaning, you control what MIDI messages are generated by moving that wheel/button/slider, instead of making Syntherrupter interpret standardized MIDI messages in a different way)

Anyways, I found out that vibrato is mentioned in revisions of the MIDI standard, though so far it's unclear to me how to properly implement it. Thus I decided that for now I won't touch this until I understand how. Nonetheless, I thought the feature request was a good idea so I came up with my own implementation.

Basically, you can control vibrato using a newly added non-registered parameter (NRPs should be supported by most decent MIDI editors/DAWs/...). Setting a value X causes a pitch oscillation to the same point as a pitch bend of X would cause. F.ex. with default settings a pitch bend of +4096 causes the pitch to increase by +1 semitone. Setting a vibrato of +4096 will thus cause a pitch oscillation reaching +1 (and -1) semitone. So it's the exact same amplitude/scale. It is thus also controlled - like pitch bend - by the pitch bend range parameter (standardized parameter to define the pitch bend range. Defaults to -2..2). As described previously, the frequency can be controlled by changing the LFO frequency (using Sysex). It defaults to 5Hz.

I currently don't have the hardware to do any testing but I thought you might want to try this anyways, therefore I attached the Tiva binaries with the changes (no new Nextion binaries required). Flash them as any firmware update if you want to try. Keep in mind that it's untested! I suggest trying with speakers/piezos connected to the output first before hooking it up to an actual tesla coil.

Syntherrupter_Firmwares_v4.2.1-vibrato.1_TivaOnly.zip Documentation of this new feature can be found here: vibrato/Documentation/Wiki/Custom MIDI Commands.md

Kind regards, Max