Hi Eelke, 

You can certainly use pyglet for this kind of project. I would recommend 
getting a prototype going first, using PC keyboard input. Most of the work 
will be graphical, so you can add a library for reading Midi commands after 
you get something going. To start, you will need to understand some OpenGL, 
but the pyglet.graphics module will take most of the pain out of working 
with the actual OpenGL primitives. Give this a read over, and post back if 
you have any questions. We're always interested in improving the 
documentation : 

You can also check out this example in the repo as well:  
You might want to make some template classes for the various shapes, 
similar to the Torus. For a project of this scale, keep it simple and just 
use GL_LINES and GL_TRIANGLES for everything.

This is an interesting sounding project. If you plan to make this open 
source, you should post a link to your repository. 


On Monday, February 5, 2018 at 2:53:27 AM UTC+9, Eelke Johnson wrote:
> Hi community!
> I'm a newbie and a muscician and I want to programm a live python midi 
> interface to visualize my favourite song when I play it on my keyboard. 
> I've started learning python, installed Ubuntu, configured my 
> environnement and searched for online libraries.
> I found here <https://wiki.python.org/moin/GuiProgramming> those 
> libraries:
> *-pygame-pyglet-pyopengl*My purpose was to use pygame's midi librairies 
> to listen to my keyboard and use pyopengl for the graphics. 
> The problem was that I didn't found anywhere sufficient documentation for 
> learning pyopengl and I gave up until I discovered Piglet!
> I'm not sure if I can implement the pygame's midi library and integrate it 
> with piglet. Is this possible? or should I use pygame with pyopengl instead?
> My question is : *Can I use piglet to programme my app with pygame's midi 
> library?*
> *What I want to do:*
> Here is an animation more or less simillar than my idea ( I only want 12 
> sectors and of course map it with my midi keyboard)
> https://www.youtube.com/watch?v=4kkNbtbWbm8
> First step,
> I want to draw a circle with sector like this (in 2d or 3d)
> <https://fr-images.tuto.net/tuto/thumb/648/288/49140.jpg>
> But first thing first,
> I started with hello world and then writed a simple app who draw a circle (
> https://www.youtube.com/watch?v=dEZDPjVegT4)
> But then,
> I want to do this shape with 12 sectors and I don't know how to proceed. I 
> looked for the GL_POLYGON method but I don't know how to implement it.
> Can someone help me with a basic example or procedure to follow? 
> *(for instance :*
>    1. *make an array with all vertices *
>    2. *draw a polygon shape with GL *
>    3. *fill it *
>    4. *change the camera projection*
>    5. *etc...*
> *)*
> I'm motivated to learn piglet, opengl and python but I seek for 
> ressources, example and support
> Sorry for my bad english I'm not native.
> Eelke Johnson

You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to