Browse Source

Stuff

master
Konrad Beckmann 1 year ago
parent
commit
0f32c376c9
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      app.js

+ 5
- 5
app.js View File

@ -1,6 +1,6 @@
var ham = new HamJS();
var cw = new HamJS.modulators.cw({frequency: 1000, gain:1.0});
var cw = new HamJS.modulators.cw({frequency: 750, gain:0.5});
document.getElementById('message').addEventListener('keypress', function(event) {
if (event.keyCode == 13) {
@ -10,10 +10,10 @@ document.getElementById('message').addEventListener('keypress', function(event)
var attack = document.getElementById('attack').value;
var decay = document.getElementById('decay').value;
if (frequency > 0) cw.setFrequency(frequency);
if (wpm > 0) cw.setWPM(wpm);
if (attack > 0) cw.setAttack(attack / 1000.0);
if (decay > 0) cw.setDecay(decay / 1000.0);
if (frequency != '') cw.setFrequency(frequency);
if (wpm != '') cw.setWPM(wpm);
if (attack != '') cw.setAttack(attack / 1000.0);
if (decay != '') cw.setDecay(decay / 1000.0);
ham.use(cw);
ham.transmit(text, event.shiftKey);


Loading…
Cancel
Save