Package: jupylet
JupyletJupyletis a Python library for programming 2D and 3D games, graphics, music
and sound synthesizers, interactively in a Jupyter notebook. It is intended
for three types of audiences:Computer scientists, researchers, and students of deep reinforcement learning.Musicians interested in sound synthesis and live music coding.Kids and their parents interested in learning to program.Jupylet for KidsA Jupyter notebook is in essence a laboratory for programming. It is the ideal
environment for playing around with code, experimenting, and exploring ideas.
It is used by professional machine learning scientists who come every day to
play at work, so why not by kids?Jupyletis wonderfully easy to use for creating simple 2D and 3D games and
music interactively and experimentally. Change a variable or a function and
see how the game is affected immediately while running.Jupylet for Deep Reinforcement LearningJupyletmakes it is super easy to create and modify environments in which to
experiment with deep reinforcement learning algorithms and it includes the API
to programmatically control multiple simultaneous games and render thousands
of frames per second.Consider for example the pong game included in this code base. With a few
lines of code you can modify the colors of the game to experiment with transfer
learning, or turn the game into 4-way pong with agents on all four sides of the
game court to experiment with cooperation between multiple agents. And since you
can modify the game interactively in Jupyter this process is not only easy but
also fun.Check out theProgramming Graphicsand theReinforcement Learningchapters in the Jupylet Programmer's Reference Guide.Jupylet for MusiciansJupyletimports ideas and methods from machine learning into the domain
of sound synthesis to easily let you create sound synthesizers as wild as you
can dream up - it includes impulse response reverb effects, colored noise
generators, resonant filters with cutoff frequency sweeping, oscillators with
LFO modulation, multi sampled instruments, and much more... And all of it in
pure Python for you to modify and experiment with.In additionJupyletdraws inspiration from the wonderfulSonic Piand brings live loops and live music coding to Jupyter and Python. Hook up
your MIDI keyboard and take off.Check out theProgramming Sound and Musicand theProgramming Synthesizerschapters in the Jupylet Programmer's Reference Guide.RequirementsJupyletshould run on Python 3.9 and up on Windows, Mac, and Linux.How to Install and Run JupyletIf you are new to Python, I recommend that you install and use theMiniconda Pythondistribution.On Windows– download and run the 64-bit installer for Python 3.11. Once
Miniconda is installed press the⊞ Winkeyand then typeMinicondaand
press theEnterkey. This should open a small window that programmers callconsoleorshellin which you can enter commands and run programs.On macOS with M1 processor– download and run "Miniconda3 macOS Apple M1 64-bit pkg"
for Python 3.11. Once installed click the Spotlight icon🔍and in the search
field typeterminaland press theEnterkey to open the console. Then you need
to run the following command:pip install --extra-index https://github.com/nir/jupylet/releases/download/v0.9.2/ moderngl glcontextOn macOS with Intel processor– download and run "Miniconda3 macOS Intel x86 64-bit pkg"
for Python 3.11. Once installed click the Spotlight icon🔍and in the search
field typeterminaland press theEnterkey to open the console.On Linux– download "Miniconda3 Linux 64-bit". This should download the file
Miniconda3-latest-Linux-x86_64.sh. Install it by running the following command
in a bash shell (once installed start a new bash shell):bash Miniconda3-latest-Linux-x86_64.shOnce Miniconda is installed it is time to installjupyletby typing the
following command in the console:pip install jupyletNext, to run the example notebooks, download thejupyletsource code.
If you haveGitinstalled type the following command:git clone https://github.com/nir/jupylet.gitAlternatively, you can download the source code with the following command:python -m jupylet downloadNext, enter thejupylet/examples/directory with the change directory
command:cd jupylet/examples/And start a jupyter notebook with:jupyter notebook 11-spaceship.ipynbRun the notebook by following the instructions in the notebook and a game
canvas should appear with the spaceship example:Alternatively, you can run the same game as a Python script from the console
with:python spaceship.pyDocumentationTo get started with Jupylet head over to theJupylet Programmer's Reference
Guidewhich you can find atjupylet.readthedocs.io.To complement the online guide check out the growing collection ofexample notebooksthat you can download and run on your
computer as explained above.ContactFor questions and feedback send an email toNir Aidesorjoin the discussion.Spread the WordJupylet is a new library and you can help it grow with a few clicks -
if you like it let your friends know about it!AcknowledgementsEinar Forselv- The programmer behind ModernGL
for his endless help in the trenches of OpenGL programming.Alban Fichet- For kindly licensing his
sound visualizer Shadertoy as CC BY 4.0 license.What's New in Version 0.9.1Support for Python 3.10 and Python 3.11 with MIDI functionality.Seamlessly track changes to audio devices on macOS.Workaround PIL api change - thanks to@misolietavec.Bug fixes.What's New in Version 0.8.9Support for Python 3.10 and Python 3.11 - except for MIDI functionality.Support for macOS M1.Spectrum analyzer.Bug fixes.What's New in Version 0.8.8Support for Python 3.9.What's New in Version 0.8.7Workaround auto-completion bug in Jupyter notebooks.What's New in Version 0.8.6Support for rendering Shadertoy OpenGL shaders.Shadertoyis an awesome online platform forprogramming and sharing OpenGL shaders online, and now you canuse and render shadertoy shaders in Jupylet!