The Ekdahl FAR - Command reference: Difference between revisions

From KNAS Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:
|module
|module
|m
|m
|[module number]
|[module number (0)]
|Sets the current ''module''. This command is intended for future versions of the Ekdahl FAR that may have more than one ''string module.'' Currently '0' is the only valid ''parameter''
|Sets the current ''module''. This command is intended for future versions of the Ekdahl FAR that may have more than one ''string module.'' Currently '0' is the only valid ''parameter''
|-
|-
Line 146: Line 146:
|Debugging command to test the min/max value for a given ''channel''
|Debugging command to test the min/max value for a given ''channel''
|}
|}
beep{{docnav
The ''local'' commands as of this writing (2025-01-26) are:
{| class="wikitable"
|+
!Long name
!Short name
!Parameters
!Description
|-
|bow
|bow
|[bow (0)]
|Sets the ''current bow.'' This command is intended for future versions of the Ekdahl FAR that may have more than one ''bow'' per ''string module.'' Currently '0' is the only valid ''parameter''
|-
|bowpid
|bpid
|<nowiki>[conditional (0|1)]</nowiki>
|Sets whether the [[wikipedia:Proportional–integral–derivative_controller|Proprtional-Integral-Deriviate controller]] is on or off. For all normal operation, the ''PID'' should be turned on. If it is turned off the instrument will not be able to play specific frequencies, but will only respond to ''bowmotordirectpwm''-commands
|-
|bowpidki
|bpki
|[float]
|Sets the ''ki''-value of the ''PID''
|-
|bowpidkp
|bpkp
|[float]
|Sets the ''kp-''value of the ''PID''
|-
|bowpidkd
|bpkd
|[float]
|Sets the ''kd''-value of the ''PID''
|-
|bowpidintegratorerror
|bpie
|[float]
|Sets the minimum ''error value'' required in between the ''set point'' and the ''process variable'' for the integrator part of the ''PID'' to initiate correction
|-
|bowpidmaxerror
|bpme
|[float]
|Sets the maximum error correction attempted in each call to the ''PID loop''
|-
|bowpidr
|bpir
|none
|Resets all data stored by the ''PID''
|-
|bowpidpeakerror
|bpperr
|none
|Returns the last ''error value'' measured in between the ''set point'' and the ''process variable''
|-
|bowcontrolfrequecy
|bcf
|[float]
|Sets the frequency (in Hertz) that the ''bowing motor'' should attempt to run at
|-
|bowcontrolfundamental
|bcu
|[float]
|Sets the ''fundamental frequency'' that all ''harmonics'' are using as its base for calculations
|-
|bowcontrolharmonic
|bch
|[float]
|Sets the ''harmonic number'' to use to calculate the ''motor speed''. See ''bowcontrolharmonicadd'' and ''bowcontrolharmonicbase''
|-
|bowcontrolharmonicadd
|bcha
|[float]
|Sets the number of ''harmonic numbers'' to add or remove to the value given in ''bowcontrolharmonic'' and ''bowcontrolharmonicbase''. Can be negative values
|-
|bowcontrolharmonicbase
|bchb
|[float]
|Sets the ''harmonic number'' to use to calculate the ''motor speed'' but uses the value set by ''bowcontrolharmonicbasenote'' as its base. Includes any value set by ''bowcontrolharmonicadd'' and overwrites any value set by ''bowcontrolharmonic''
|-
|bowcontrolharmonicbasenote
|bchbn
|[midi key (0-127)]
|Sets the ''MIDI'' key to use as the base for ''bowcontrolharmonicbase''
|-
|bowcontrolharmonicshift
|bchsh
|[value (-32767 - 32767)]
|Sets how much to shift the ''motor speed'' away from the ''harmonic number'' set by ''bowcontrolharmonic'' or ''bowcontrolharmonicbase''. The ''harmonic shift'' is dependent on the range set by ''bowcontrolharmonicshiftrange''. Also see ''bowcontrolharmonicshift5''
|-
|bowcontrolharmonicshiftrange
|bchsr
|[harmonics (0-36)]
|Sets the range of the ''bowcontrolharmonicshift''-command. The ''parameter'' given denotes how many ''harmonic numbers'' to shift from the current ''harmonic number'' when the maximum ''harmonic shift'' has been set.
|-
|bowcontrolharmonicshift5
|bchs5
|[value (-32767 - 32767)]
|Sets how much to shift the ''motor speed'' away from the ''harmonic number'' set by ''bowcontrolharmonic'' or ''bowcontrolharmonicbase''. Unlike ''bowcontrolharmonicshift'' this value is <u>always</u> calculated on a range of 5 octaves, meaning a maximum ''harmonic shift'' will equal 5 times the amount of ''harmonic ratios'' in the current ''harmonic table''. This value is added to the ''harmonic shift'' set by ''bowcontrolharmonicshift''
|-
|bowcontrolspeedmode
|bcsm
|<nowiki>[mode (0|1)]</nowiki>
|Sets the ''speed mode'' where ''0 = Automatic'' and ''1 = Manual''. The only difference in between these two modes is that ''Automatic'' will automatically turn off the motor when the bow has been set in its ''rest position'' and no frequency changing ''commands'' have been sent within the time period given by ''bowmotortimeout''
|-
|
|
|
|
|}
a{{docnav
|[[The Ekdahl FAR - Command langue|Command language]]
|[[The Ekdahl FAR - Command langue|Command language]]
|[[The Ekdahl FAR - Specifications|Specifications]]
|[[The Ekdahl FAR - Specifications|Specifications]]
}}
}}

Revision as of 15:42, 26 January 2025

Introduction

The commands in the Ekdahl FAR are using a certain naming convention to make it more clear which parts of the instrument a certain command is dealing with. Furthermore commands can be global or local, global commands change settings that will affect the entire instrument, local commands change settings depending on previously set commands. The idea of local commands is a future-proofing of the Ekdahl FAR firmware and can generally be ignored for the time being. The first part of many command-names are a prefix that denotes category, the global categories as of this writing (2025-01-26) are:

  • global* - commands that have a global reach
  • midi* - commands that deal with MIDI
  • adc* - commands that deal with the Control box and its analog-to-digital converter
  • expressionparser - commands that deal with how commands are interpreted and parsed, mainly used for debugging
  • test* - commands made for testing and debugging

The global commands as of this writing (2025-01-26) are:

Long name Short name Parameters Description
requestinfo rqi [command]:[optional parameters] Uses a command-name to retrieve rather than set information associated with it, some commands have no information associated and will return nothing. Some commands require the use of optional parameters to specify which information that is to be retrieved.
module m [module number (0)] Sets the current module. This command is intended for future versions of the Ekdahl FAR that may have more than one string module. Currently '0' is the only valid parameter
modulecount mc none Returns the number of modules in the Ekdahl FAR. Currently always returns '1'
debugprint dp [command|usb|hardware|undefined|priority|error|inforequest|expressionparser|debug]:[0|1] Used to turn on or off whether the instrument will return certain information over USB-Serial. The first parameter is the category, the second parameter is a boolean value.
version ver none Returns the current firmware version
globalsaveallparameters gsap none Saves all current data into the internal flash memory
globalloadallparameters glap none Loads all data saved into flash, effectively overwriting any changed parameters included in the last save
globalresetparameters grap none Resets all saved data in the flash memory, requires a immediate reset to be enacted
globaluservariable guv [variable number (0-9)]:[value (float)] Sets or returns the user variable defined in the first parameter, if used to set the variable, the second parameter is the value.
midiconfiguration mcf [config (0-9)] Sets or returns the current MIDI configuration
midiconfigurationadd mcfa none Adds a new MIDI configuration
midiconfigurationremove mcfr [config (0-9)] Removes the MIDI configuration denoted by the parameter passed. If there are MIDI configurations with a higher number, these are moved down the list. The current configuration may be changed during the execution of this command
midiconfigurationcount mcfc none Returns the number of MIDI configurations available
midiconfigurationname mcfn [config|name] When used as a 'set'-command, the first parameter sets the name of the current MIDI configuration. When used to retrieve information, the first parameter sets which MIDI configuration to return the name for
midieventhandler mev [noteon|noteoff|pat|cc[:0-127]|cat|pb|pc]:[command string] Used to set the command string executed when a certain MIDI event occurs. The first parameter is the type of MIDI event. With exception for the 'cc' MIDI event the second parameter is the command string. For 'cc' the second parameter is the controller number and the third parameter is the command string
midiconfigurationdefaults mcfd none Reverts all settings of the current MIDI configuration to default values and remove any added continuous controllers
midireceivechannel mrc [channel (0-16)] Sets which MIDI channel the instrument will respond to. 1-16 sets the MIDI channel while all other values sets the instrument to 'Omni' (the instrument responding to all channels)
midiallnotesoff mano [conditional (0|1)] Clears the entire MIDI buffer of notes held and turns off any bowing
adccommandmap acm [channel]:[command string] Sets the command string associated with the analog-to-digital converter channel of the Control box
adcdefaults acd none Sets all command strings associated with all analog-to-digital converter channels to their default values
adcread adcr [channel]:[return only: value] Returns the last value read by the analog-to-digital converter of the Command box on the channel given. This value is sent automatically any time a change in data is read
adcsettings adcs [channel]:[averages]:[interrupterrorthreshold]:[continuouserrorthreshold]:[continuoustimeout] Sets the settings for the averager used for the given Control box analog-to-digital channel. Averages denote number of values read and averaged, interrupterrorthreshold sets the value change required for the Control box to report a new value. The continuouserrorthreshold and continuoustimeout are used to allow for continuous changes. See the firmware for more information
expressionparserevaluate epev [expression] Evaluates the given expression and returns the calculated value. Used for debugging
testadclatency tal [value (0 - 65535)] Debugging command to test ADC latency
testadclatencyreturn talr none Stops ADC latency testing started with tal
testadcminmac tamm [channel] Debugging command to test the min/max value for a given channel

The local commands as of this writing (2025-01-26) are:

Long name Short name Parameters Description
bow bow [bow (0)] Sets the current bow. This command is intended for future versions of the Ekdahl FAR that may have more than one bow per string module. Currently '0' is the only valid parameter
bowpid bpid [conditional (0|1)] Sets whether the Proprtional-Integral-Deriviate controller is on or off. For all normal operation, the PID should be turned on. If it is turned off the instrument will not be able to play specific frequencies, but will only respond to bowmotordirectpwm-commands
bowpidki bpki [float] Sets the ki-value of the PID
bowpidkp bpkp [float] Sets the kp-value of the PID
bowpidkd bpkd [float] Sets the kd-value of the PID
bowpidintegratorerror bpie [float] Sets the minimum error value required in between the set point and the process variable for the integrator part of the PID to initiate correction
bowpidmaxerror bpme [float] Sets the maximum error correction attempted in each call to the PID loop
bowpidr bpir none Resets all data stored by the PID
bowpidpeakerror bpperr none Returns the last error value measured in between the set point and the process variable
bowcontrolfrequecy bcf [float] Sets the frequency (in Hertz) that the bowing motor should attempt to run at
bowcontrolfundamental bcu [float] Sets the fundamental frequency that all harmonics are using as its base for calculations
bowcontrolharmonic bch [float] Sets the harmonic number to use to calculate the motor speed. See bowcontrolharmonicadd and bowcontrolharmonicbase
bowcontrolharmonicadd bcha [float] Sets the number of harmonic numbers to add or remove to the value given in bowcontrolharmonic and bowcontrolharmonicbase. Can be negative values
bowcontrolharmonicbase bchb [float] Sets the harmonic number to use to calculate the motor speed but uses the value set by bowcontrolharmonicbasenote as its base. Includes any value set by bowcontrolharmonicadd and overwrites any value set by bowcontrolharmonic
bowcontrolharmonicbasenote bchbn [midi key (0-127)] Sets the MIDI key to use as the base for bowcontrolharmonicbase
bowcontrolharmonicshift bchsh [value (-32767 - 32767)] Sets how much to shift the motor speed away from the harmonic number set by bowcontrolharmonic or bowcontrolharmonicbase. The harmonic shift is dependent on the range set by bowcontrolharmonicshiftrange. Also see bowcontrolharmonicshift5
bowcontrolharmonicshiftrange bchsr [harmonics (0-36)] Sets the range of the bowcontrolharmonicshift-command. The parameter given denotes how many harmonic numbers to shift from the current harmonic number when the maximum harmonic shift has been set.
bowcontrolharmonicshift5 bchs5 [value (-32767 - 32767)] Sets how much to shift the motor speed away from the harmonic number set by bowcontrolharmonic or bowcontrolharmonicbase. Unlike bowcontrolharmonicshift this value is always calculated on a range of 5 octaves, meaning a maximum harmonic shift will equal 5 times the amount of harmonic ratios in the current harmonic table. This value is added to the harmonic shift set by bowcontrolharmonicshift
bowcontrolspeedmode bcsm [mode (0|1)] Sets the speed mode where 0 = Automatic and 1 = Manual. The only difference in between these two modes is that Automatic will automatically turn off the motor when the bow has been set in its rest position and no frequency changing commands have been sent within the time period given by bowmotortimeout

a