morsecode
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| morsecode [2026/05/05 14:32] – frchris | morsecode [2026/05/05 14:40] (current) – frchris | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ==== ToneTester ==== | ==== ToneTester ==== | ||
| This demonstrates how to generate a morse code tone. The timing is all based on the length of the " | This demonstrates how to generate a morse code tone. The timing is all based on the length of the " | ||
| + | |||
| + | ToneTester demonstrates how to use the javax sound | ||
| + | | ||
| + | which is what a HAM radio operator will | ||
| + | call to seek out a conversation from | ||
| + | | ||
| <code java ToneTester.java> | <code java ToneTester.java> | ||
| - | |||
| import javax.sound.sampled.AudioFormat; | import javax.sound.sampled.AudioFormat; | ||
| import javax.sound.sampled.AudioSystem; | import javax.sound.sampled.AudioSystem; | ||
| import javax.sound.sampled.SourceDataLine; | import javax.sound.sampled.SourceDataLine; | ||
| - | |||
| public class ToneTester { | public class ToneTester { | ||
| Line 42: | Line 46: | ||
| int[] c = {dah, di, dah, dit}; | int[] c = {dah, di, dah, dit}; | ||
| int[] q = {dah, dah, di, dah}; | int[] q = {dah, dah, di, dah}; | ||
| + | int[][] cq = {c,q}; | ||
| for (int i = 0; i < 2; i++) { | for (int i = 0; i < 2; i++) { | ||
| - | play(c); | + | playWord(cq); |
| - | play(q); | + | |
| } | } | ||
morsecode.1778005940.txt.gz · Last modified: by frchris
