Excellent. Now you can play with the parameters to make different noises.
Ronin.setParameter(parameter,value) sets the different parameters. Parameters are:
PARM_SG1
PARM_SG2
Value between 0 and 9 to select the signal type for signal generators 1 and 2
PARM_F1
PARM_F2
Value between 0 and 32768 for the "frequency" of the two signal generators - not measured in Hz, but depends on clock speed.
PARM_MOD
Modulation type - Value is one of: MOD_ADDITION, MOD_AM, MOD_FM, MOD_SIG1, MOD_SIG2, MOD_STEREO
PARM_PWM_DUTY
PARM_PWM_FREQ
PWM duty cycle and frequency - both between 0 and 65535 - only applicable when the PWM output module is enabled.
PARM_F1Q
PARM_F2Q
Frequency quantization, between 0 and 65535 - only applicable when incrementer set to a quantizing mode.
PARM_INCREMENTER
Wave incrementer method. 0 = f1 and f2 independent. 1 = f2 is f1 plus f2's frequency. 2 and 3 are as 0 and 1 but with quantization.
PARM_VOLUME
Output volume - only when the Volume output module is enabled.
PARM_OPSG1
PARM_OPSG2
Feedback control signal generator type - between 0 and 5.
PARM_OPF1
PARM_OPF2
Feedback control signal frequencies.
PARM_BALANCE
Volume balance when balance module is loaded. Between 0 and 4095 with 2047 being center.
PARM_SSTRIGGER
PARM_SSATTACK
PARM_SSHOLD
PARM_SSDECAY
PARM_SSSUSTAIN
Single shot envelope. All between 0 and 65535 except trigger which is set to 1 to play the single shot sound - automatically resets to 0. Requires the single shot output module to be loaded.
PARM_VOICES
Number of single-shot voices.
PARM_MODDEPTH
Modulation depth - between 0 and 1000.
Output modules can be loaded with Ronin.addOutput(module).
Modules are:
OUT_PWM
Pulse-width gating of the sound.
OUT_VOLUME
Provide overall volume control.
OUT_BALANCE
Allow setting of the sound's balance.
OUT_SINGLESHOT
Operate in single-shot mode. Do not enable this and OUT_CONSTANTPLAY at the same time.
OUT_CONSTANTPLAY
Plays the sound constantly. Do not enable this and OUT_SINGLESHOT at the same time.
At least OUT_CONSTANTPLAY or OUT_SINGLESHOT must be loaded to get any sound.
I'll let you play with those for now, and tell you about programming inputs later.