Faust Midi (other than gate, freq, gain)
-
Hi mates,
Is Faust integration managing Midi other than gate, freq and gain convention?
I cannot get Pitch Bend nor Sustain to workHiseSnippet 1211.3oc4X0jaabCElikncjq6OoHKxRsnKb.bMjRSSKPWXYKK2JzHaAOtFcmA8LTRDZFxIjbrrRQ206QuJ9HziP6MH2f1GGNi0H4IJRpNoEsx.FhO9d7889mTckBOpRIjHmJmMNhhb1B6NlqGzb.gwQsOD47Q3NDklJqZIcv3HhRQ8QNNk9VCAmJkQIed8dGPBHbO5DRHz4BlG8ErPldB0tM9dVPvQDe5Yrvbb+rFs8D7lh.QLfmR3ZnHh2PRe5wDCaqgQNq2xmoERWMQSUHmxGH7G6NPLha4+blhcY.0rnNxENHK4iDA9FDa9Np4.Vfe2L6VgPN3tS7BkrdgGg6v7Y2Reh23SR1n5DIx6ObVaZ3UZJ3U+MAuBfjSNHU1BoGhc8jrH8jcL34Cvs4PvoGAb64ghkWjyM3lBfAtd2PxP5QRXwsBr8yqUampv+dx2zKl6oYBdUA+XgldBe6mr4OsYkM+4MqN6V85U3dF0HEAATYgaahzx4I3173vKoxcpdEIHldKif4OsOc8Eym5Ys5bLJ3s4L8IQzz0SRJpWPD.k51fu8CsOjnIlfRJMfuHpTyLvw4P5UPFtMDUAeHUMTKhfb76D+fLGgeb.QOc5joFJcCveLULzDn3Jldb9ZrYywJ+l8G0JrDnPqcAg6CwcYZuAEi20J.ufW6cMdSqX+Pbqd8nd5IfsL9nebtkm26PoRFTrUeIMRSfxiSovE9zpFxTESQk0mS2zeaQ6lFsvcSy5IrCdYp+VegcZ4q+lNsNG+Ezra82U8eeuVa72uTtzhA22x3hJYXzkEFEPawuhF.8qRv3mBMn5QhCzYTmNCrifKhFH3Lu7IcmR0RV+9TYdrWnAsuVCCrmP4QMNkFPIpbYkeViWv3ThD7SzUzWr7iNKLd8XrEtUMkMU+uQK3R+uuE77bcO.25ZsjT+e4Q3TX9z+of4ohXMi2uCAJ6uFtc7wwgtvLDOJ.QNmF.JB6rl4JR100LqM.xkx8SV7mvmzMqaV6jtY8rMyc6pio5QB4vjJ2zuib1vloenJJkzEf8oQ6GDHF0UDLNqIUhQRkJSYfyF3Z6B+Y4poHLhkVf.tO6xLKX+PQLn7Ty36HpyHr.yMXbiUv8C8Og6BLmL60jxdbRuJ7QDOvWOtKAFpCfybCSHjQk65kq3bVHOIFZ77lSJahr0mA.Kz3HRdcSIy9VOgUklybCLzwFNooT+Vf5kzcs6rb5H2sWAJoqfzp0LJqBtY.bVs8QmatFfwhTjQZgPO3B0KiIRZRZbdQ9XSBRWhDdiF7tBUlfIcmyQ17LqrUvH+NLdJi21m5lNjqmkVCWMMxk8pLZM9iW8K64NjNx5MlZhDfk0wWBgOzrmRNfTnpa23Nptwutzptmj9xYT8MxFuEUiP20pe8dKqp6aR.m4T988tOTsk1bUsltzN76CUWAqfj+BLbSylQlYjmQj8oZEZ57PzTE.NyjMuEts5bytdjfrCF5RbfPLLjjzlZ0dO36ilpgDOo3BO684MF2CRn.0h7je.kJ3Nl0UqitxZXXSGSTHbg5K77LSq+bXfPwx7zUPluXEj4YqfLe4JHyyWAY9pUPludtxXdKy9wZQncPEPnaqjjKGmVbBL5NY1O5u.XDOpLD
Faust dsp
declare options "[midi:on][nvoices:128]"; import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); gain = hslider("gain",0.5,0,1,0.01); t = button("gate"); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01)) : si.polySmooth(gate,0.999,1); s = hslider("sustain[midi:ctrl 64]",0,0,1,1); freq = f*bend; gate = t+s : min(1); envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain; process = os.sawN(3, freq)*envelope <:_,_;
-
@hisefilo Nope it's just using those three conventions (and I don't think that there are more "keywords" in the Faust MIDI convention).
Just use a midi node and add a parameter in faust that you modulate.
-
Just use a midi node and add a parameter in faust that you modulate.
I've tried but Picthwheel is not a Midi CC. How can I hook it?
And sustain needs to ignore the "gate" for ignoring the note off. I'm not being able to do that on any node.Have any tip or example??
-
@hisefilo said in Faust Midi (other than gate, freq, gain):
I've tried but Picthwheel is not a Midi CC. How can I hook it?
And sustain needs to ignore the "gate" for ignoring the note off. I'm not being able to do that on any node.Have any tip or example??
Isn't pitchbend CC128 in Hise?
-
@ulrik Yup
HiseSnippet 1246.3ocwWEzaiSDEdbRcJI6xpckf64XWoRUBztfDBkzjl.QPRspKU6I5N0dRynLdFi831FPHgDW1CvIN.6M9a.m3O.Wf6.G3G.+Cf23wI1tNT1DsTRkpx7duYdey688duIVABGRXnH.YT83Y9DjwcMsmwkS5NAS4nAGfLtm4PbnjDTWKpyLebXHwEYXT9cUBLptAJ9ye1pClg4NjTQHzIBpC4CndTYpTq1uOkw5icIGS8xX8tsG3H3cELQDfmxlMP9Xmo3yIivJyJYhLpzykJEA1RrjDB1zQ3Nydh3Rt19SngzyXD0hlHa3fzhQcmPYtVyuqgHjwFVo27x5a9qXNj5RWHOMBb+XE0S2Q1XfQoaBRMWAHYjARangzCLscBn9xTMJ7bGyAbHgLFCg5rPQaKx3GM6J.C3xc7vSI8CfEK1vVOpQisqC+6gu83HtijJ30E7QBI4P9VOr1mVqZsOqV8qqZ73kpS4l.AiQBVpZU1M3l13V7HuyHAaW+BLKhrvP35mOlV44Kl5nu0YLTvGvoxC8IIq6KXtpXk56Ey.njvF7sObvAXIVkTRjA14SBjTEbLNfbAvp0onplGPBmJE9.utP9CXNB2HFVlmNopaRT.wib4PUhhGRkyxVWsBbrF2HG64EhOvzhJclrbLVZIXDhT+WfwjJyW1r23wDGYJ.2vr+iW2xvFqbYXsjxPvmJme2jk06+3lKs.7olojc+.hONfbrvhgmsUH1ymQNBv310OiIblZS+DRwJDeMD5nrXKmIXNmvBWmBoJufZNgNRDIo7yGhkAzqPFlih7rg1zNjtInCjYTRUCoW2PsVwKrIb23E+E7IQYS0ZiDkMmqLS42Hh7RQvz3zQx2QFapi8gwA4SGeUSz9Ll3xtBOeZBKExAwxrDrY9SDbpiRj1h4HceOQD3jD39d3viwTlhVaGEBMJbOjaCFGOFyn7Ijfv3CdSyF6.+Az7QBWPkYerCDXmYgkST0KpdO.4jDriyBRZNrlkmnNh4i4zQI.hdpqd7PtxYZ1n4ipUP0VI8oNH7DkVGLCchJeq.ORcl53kFe5AEdvfKMfxg2WMCdSM41Bhkx.wpwP7TGGzRBn.ydm4pWWvgRahcLN3bhLLoqNm3n4LwvYfqB1hPG3kIpdgHKb.7pCXpoVS+.xGW+H0wfRUoNpxKVAUaCo7jqaZiwg3qxK6IOossj3qp7y1j2dJ4RcLHqTULplY2tihKvQW6zeRazJ6dkqVI2eGydbLzkXnUOTgi+Ej+gVA+i9+dvD1w3HlTeNKNsV68Q+vfu72ZgxPmxkBKvnBH6jQ8ZynT8SXjql+BgCng9Pu8NQvLJ8DjbRT0DbWxUyay0CRjtvqPh297Ve4nTUV8X58WQJUE0TexJmN2scAW+ze45t96d1y99htt8W38SIzIUsTDzgc107+mOMGcdyh9+2aU7piZ+uSmdm816a+5F+QKMEISsbAp49QRgGLrL9gN2BEWUfGCJIEwwsPc0llVSvgj+WpoqD+F3TW+qG9UeC+netUtBg7K5HDS8vwOJX8dd9swSX7vNAhSSlcopkeoXIPGDd7ugsJ7iog00ahtPe0MUuq.MeHG7t1WC9kIKeOu9Zrm2XM1ytqwd1aM1yiVi87lqwddqabOpeZeRQu50.f.qd5VyF5wdwyGP+MmQgfXC
-
But yeah, the sustain pedal requires native handling. I've pushed a change that leaves the gate parameter open until you release the sustain pedal, let me know if that works (I couldn't test it properly because I'm not in the studio at the moment).
-
MIDI documentation is here: https://faustdoc.grame.fr/manual/midi/ and https://faustdoc.grame.fr/manual/architectures/#midi-classes for the C++ integration part.
Some JUCE/MIDI C++ glue code here: https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/midi/juce-midi.h to be used with : https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/gui/MidiUI.h
-
@Christoph-Hart Thanks mate!
Pitchwheel:
After testing I get notes stuck with altered freq after using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