Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

The Ekdahl FAR - Command language: Difference between revisions

From KNAS Wiki
No edit summary
No edit summary
Line 126: Line 126:
FAR 1.1:
FAR 1.1:
[irq]bw[0].pid[0].tf:82.5
[irq]bw[0].pid[0].tf:82.5
</pre>Where '[irq]' denotes that the message returned is in the ''info request-''category, that it pertains to the command ''bcf'' and has the value ''82.5''. Note that the returned ''command'' sent by an ''rqi''-command always uses the ''short name'' in order to preserve bandwidth.
</pre>Where '[irq]' denotes that the message returned is in the ''info request-''category, that it pertains to the command ''bcf'' / ''bw.pid.tf'' and has the value ''82.5''. Note that the returned ''command'' sent by an ''rqi''-command always uses the ''short name'' in order to preserve bandwidth. In the FAR 1.1 the return statement always returns the ''index'' of the ''module''(s) in question.


Most commands do not require any ''parameters'' when using the ''rqi''-command. The ''adcread''-command is an example of a ''command'' that <u>does</u> require a ''parameter'' when used with ''rqi''. The ''adcread'' command returns the last value read by the ''analog-to-digital converter'' in the ''Control box'', because there are 8 different channels the first ''parameter'' sets which channel to return the data for, hence executing the ''command''<pre>
Most commands do not require any ''parameters'' when using the ''rqi''-command. The ''adcread'' / ''datareturn''-command is an example of a ''command'' that <u>does</u> require a ''parameter'' when used with ''rqi''. The ''adcread / datareturn-''command returns the last value read by the ''analog-to-digital converter'' in the ''Control box'', because there are 8 different channels the first ''parameter'' sets which channel to return the data for, hence executing the ''command''<pre>
FAR < 1.1:
rqi:adcr:3
rqi:adcr:3
FAR 1.1:
rqi:controlbox.datareturn:3
</pre>will return the last data read on ''analog-to-digital convert'' channel 3.
</pre>will return the last data read on ''analog-to-digital convert'' channel 3.


== MIDI mapping ==
== MIDI mapping ==
To change how a certain ''MIDI message'' interacts with the Ekdahl FAR we need to change the ''commands'' or ''parameters'' sent when the message is received. The ''command'' responsible for mapping ''command strimgs'' to different ''MIDI messages'' is ''midieventhandler'' or ''mev'' for short. The first ''parameter'' of ''mev'' is the type of ''MIDI message'' that we want to remap
To change how a certain ''MIDI message'' interacts with the Ekdahl FAR we need to change the ''commands'' or ''parameters'' sent when the message is received.  


* ''noteon'' - Note on
'''FAR < 1.1:'''
* ''noteoff -'' Note off
 
* ''pat -'' Poly after touch
The ''command'' responsible for mapping ''command strings'' to different ''MIDI messages'' is ''midieventhandler'' or ''mev'' for short. The first ''parameter'' of ''mev'' is the type of ''MIDI message'' that we want to remap
* ''cat'' - Channel after touch
 
* ''pb'' - Pitch bend
* '''''noteon''''' - Note on
* ''pc'' - Program change
* '''''noteoff''' -'' Note off
* ''cc'' - Continuous controller
* '''''pat''' -'' Poly after touch
* '''''cat''''' - Channel after touch
* '''''pb''''' - Pitch bend
* '''''pc''''' - Program change
* '''''cc''''' - Continuous controller


The second ''parameter'' is the ''command string'' that is to be associated with the ''MIDI Message'' - with the exception of the ''cc''-type, here the second ''parameter'' is the ''controller number'' (0 - 127) and the <u>third</u> ''parameter'' is the ''command string''.
The second ''parameter'' is the ''command string'' that is to be associated with the ''MIDI Message'' - with the exception of the ''cc''-type, here the second ''parameter'' is the ''controller number'' (0 - 127) and the <u>third</u> ''parameter'' is the ''command string''.
'''FAR 1.1:'''
The ''commands'' responsible for mapping ''command strings'' to different ''MIDI messages'' are as follows


We can of course use the ''rqi''-command to check the current mapping, below we are asking what the current ''command string'' associated with the ''pitch bend'' ''MIDI message'' is<pre>
We can of course use the ''rqi''-command to check the current mapping, below we are asking what the current ''command string'' associated with the ''pitch bend'' ''MIDI message'' is<pre>