magnetophon / DigiDrie

A monster monophonic synth, written in faust.
GNU Affero General Public License v3.0
21 stars 0 forks source link

MIDI parameter value type and range #30

Closed ryukau closed 4 years ago

ryukau commented 4 years ago

I made plugin to working state. You can try it on master. Following command should build the plugin into plugin/dpf/bin.

cd DigiDrie
git submodule update --init --recursive # If you haven't done.

cd plugin/dpf
make -j

Currently it only support MIDI note-on/off.

Following parameters have a bit of portability issue.

DPF requires raw MIDI handling. So it's not problem on there.

However, VST 3 abstructs MIDI away, and sends MIDI parameters in range of [0.0, 1.0].

In my opinion, MIDI parameter on DSP code is better in range of [0.0, 1.0], because:

What do you think?

magnetophon commented 4 years ago

I made plugin to working state

Cool! I won't have time today, I think, but I'll test soon!

I think if I set all midi parameters to [0..1], the synth won't work using just the faust code, it would need your code to work in the first place.

I could put it behind a variable?

ryukau commented 4 years ago

I think if I set all midi parameters to [0..1], the synth won't work using just the faust code, it would need your code to work in the first place.

Thanks for clearing up. I think it's better to leave it as current state, so that Faust code works without UI code.

I'd like to ask one thing here. Please remove [scale:int] metadata from following MIDI parameters.

Faust generated code declares those parameters as FAUSTFLOAT, so I can provide high resolution data to DSP when possible.

I could put it behind a variable?

Sorry, I don't get what you mean. My English is bad here. Could you provide more infomation?

ryukau commented 4 years ago

I added MIDI support for aftertouch, mod wheel and pitch bend. It's on master branch.

magnetophon commented 4 years ago

Following command should build the plugin

Yes! We have a working plugin! :D Thank you!

Please remove [scale:int]

Done, in the faust branch.

I could put it behind a variable?

I meant to do:

afterTouch(0) = midiGroup(vslider("Channel Aftertouch[midi:chanpress 12]", 0, 0, 127, 1) )/127;
afterTouch(1) = midiGroup(vslider("Channel Aftertouch[midi:chanpress 12]", 0, 0, 1, 1) );

ryukau_build = 1;

foo = afterTouch(ryukau_build);

When I did that with the HPF, I got very, very long build times. I'm still investigating why that is. In the meantime, I'm happy we don't need the above code!

I added MIDI support for aftertouch, mod wheel and pitch bend.

Works great,mostly. I'll open separate issues for bugs and feature requests, so we can stay organised.

I think we can close this now, right?

ryukau commented 4 years ago

Yes, separating issues is better.

For testing, I only have Casio GZ-5 as a MIDI keyboard, which only has limited capability for pitch bend and mod wheel. So any feedback is welcome!

magnetophon commented 4 years ago

For testing, I only have Casio GZ-5 as a MIDI keyboard

Well, at least you are "on brand" for the oscillators! ;)

I don't have any MIDI hardware at all where I am now. I haven't tested the MIDI modulation yet, but we can do that using Mamba or VMPK or just a DAW.

ryukau commented 4 years ago

Thanks for the information. I'll try them for testing.

You may be surprised by how tiny the key of GZ-5. White key barely has the width of 1cm.

magnetophon commented 4 years ago

Ardour's keys are even smaller! ;)