Loading lessons...
The REPL & Code Fields
The REPL & Code Fields
Strudel lives in an interactive editor called the REPL (read-evaluate-play-loop). In this course, every code block is a miniature REPL.
How to use a code field
- Click into the text field.
- Press
Ctrl+Enter(Windows/Linux) orCmd+Enter(Mac) to play. - Edit the code while it plays - the music updates live.
- Press
Ctrl+.to stop.
Try it now
- Click into the box above.
- Press
Ctrl+Enterto play. - Change
casiotometal. - Press
Ctrl+Enteragain - the sound changes instantly.
Change one thing at a time
Live coding works best when you make small changes. Play a sound, then change just one word, then play again. Compare how the sound changes.
The code field is a mini-editor
- You can type and delete text freely.
- The code loops automatically once playing.
Ctrl+.stops everything.- You can also
Ctrl+Zto undo while experimenting.
TL;DR
- Press
Ctrl+Enterto play,Ctrl+.to stop. - Click into a field first to focus it.
- Edit while it plays - updates are live.
- Make small changes and listen carefully.