| If you use the following command-line options you do not need to do
anything at all, the MIDI channel messages for note on and note off
will automatically be routed to the specified pfields in the
instrument definitions. You can still use the other MIDI opcodes, such
as controllers. For instruments that use these options, you should
have one releasing envelope, and may need to rescale the MIDI
velocities to match your conventions for note loudness.
These options should replace the MIDI/Score interoperability opcodes!
--midi-key=N
Route MIDI note on message key number to pfield N as MIDI value [0-127].
--midi-key-cps=N
Route MIDI note on message key number to pfield N as cycles per second.
--midi-key-oct=N
Route MIDI note on message key number to pfield N as linear octave.
--midi-key-pch=N
Route MIDI note on message key number to pfield N as oct.pch (pitch class).
--midi-velocity=N
Route MIDI note on message velocity number to pfield N as MIDI value [0-127].
--midi-velocity-amp=N
Route MIDI note on message velocity number to pfield N as amplitude [0-0dbFS].
I've attached an example of an instrument definition that uses
--midi-key=4 --midi-velocity=5, you can see it's just the same as a
standard instrument except for the envelope and some amplitude
rescaling.
Regards,
Mike
-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com
On Sun, Aug 12, 2018 at 6:13 PM Tarmo Johannes wrote:
>
> Hi,
>
> There are various methods
> I am not sure if it helps you, sometimes I do things like:
>
> iamp = (p4==0) ? ampmidi(1.0) : p4
>
> - so I can start the instument both from score with given value or with midi
> event.
>
> tarmo
>
> On Sunday, August 12, 2018 12:57:28 PM EEST you wrote:
> > Is there an easy way to modify a csd that works with midiin so that it
> > also works from the score?
> >
> > Richard
> >
> > Csound mailing list
> > Csound@listserv.heanet.ie
> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > Send bugs reports to
> > https://github.com/csound/csound/issues
> > Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
|