Skip to content

Commit fc0822e

Browse files
Update README.md
Update screenshot to new version Added info about built-in preset loader Other minor changes and improvements
1 parent 90aac9d commit fc0822e

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# WavePlayerJS
22
WavePlayerJS is a simple web app that allows you to enter a math formula for a custom waveform and hear what it sounds like. Everything is in a single `.html` file (including the CSS and JavaScript), so you don't need to download multiple files (and you can just save the program in your Downloads folder if you want - it doesn't create other files).\
3-
ChatGPT created the code for this program and I made a few modifications.
3+
ChatGPT helped me with a lot of this program.
44

5+
<!-- OUTDATED SCREENSHOT - COMMENTED OUT
56
<img width="1269" height="800" alt="screenshot" src="https://github.com/user-attachments/assets/58fcd5a6-5bf1-456f-a9f9-2bff6e8651fe" />
7+
-->
8+
9+
<img width="1339" height="652" alt="screenshot" src="https://github.com/user-attachments/assets/adde6428-6801-414c-bbeb-04a5ddc296a7" />
610

711
## Using the Program
8-
Type or paste your wave formula into the big text box. Make sure you include the variables `vf` and `va` in your formula (these are for setting frequency and amplitude). If you want to, you can also include an optional parameter variable in your formula with `vp`. This can do whatever you want and is usually used to change the shape of the wave.
12+
Type or paste your wave formula into the big text box. Make sure you include the variables `vf` and `va` in your formula (these are for setting frequency and amplitude). If you want to, you can also include an optional parameter variable in your formula with `vp`. This can do whatever you want, but it's usually used to change the shape of the wave.
913

1014
## Using Presets
1115
Inside the `presets` folder, you will find some markdown files that contain some wave formulas that you can try. For the preset that you want to use, copy the formula labelled as _JS_ and paste it into the web app.\
1216
If you want to see what one of these preset waveforms looks like, open [GeoGebra](https://www.geogebra.org/) in your web browser (or use the desktop app) and copy the formula labelled _GGB_ into the input box in the left sidebar.
1317

18+
You can also access some of the presets with the _Load Preset_ button, but not all presets are included in this feature.
19+
1420
## Converting GGB to JS
1521
Converting a GeoGebra formula into JavaScript that this web app will recognize is pretty easy. I recommend looking at the `Presets.md` file and comparing the GGB and JS versions of one of the presets, but here's a quick guide:
1622
- Change `sin()` to `Math.sin()`
@@ -24,4 +30,4 @@ Converting a GeoGebra formula into JavaScript that this web app will recognize i
2430
- GeoGebra uses the caret symbol (`^`) for exponents, but JavaScript uses 2 asterisks. JS treats `^` as a bitwise XOR operation.
2531
- Add extra brackets (if you need to)
2632

27-
Again, it's probably best to compare GGB and JS versions of the same formula in the `Presets.md` file. It will probably be easier to learn that way.
33+
Again, it's probably best to compare GGB and JS versions of the same formula in the `Presets.md` file. I found it easier to learn that way.

0 commit comments

Comments
 (0)