Let's play oscilloscope music!

SEE Source Code In Github

head

Install

make a directory in GameShell

mkdir /home/cpi/launcher/Menu/GameShell/11_Oscillofun

clone source code to GameShell

cd /home/cpi/launcher/Menu/GameShell
git clone https://github.com/WangTingZheng/oscillofun 11_Oscillofun

Requirements

cd /home/cpi/launcher/Menu/GameShell/11_Oscillofun
pip3 install -r requirements.txt

Note: If requirements do not install successfully, please do it manually by installing .whl file!

Play

refresh launcher in GameShell though executing reload app, after that, execute Oscillofun app in launcher, you will see a video displaying wave in Oscilloscope(simulation).

only for desktop? you can execute

python(3) oscillofun.py

or

./Oscillofun.sh

Creation

want to create amazing oscilloscope music? Maybe you should get software, tutorial from this man(software and works need to buy) or listen music by Atom Delta!

Refences

Oscillofun: a magical audio, which can be viewed on the oscilloscope with download link

6 Likes

Hi! I tried to install it, but got Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-bflc3vlb/pygame/ after executing pip3 install -r requirements.txt is there a way to fix it?

you can use

sudo apt-get install python-pygame

if fall too, you can search “raspberrypi pygame python3” in Google, GameShell is simillar with raspberrypi

or maybe, you can add “sudo” in front of pip3

sudo pip3 install -r requirements.txt

If you still have issue about this, you can create a Github issue to let me know your issue as soon as possible, because I can get email from Github but can’t from GameShell forum.

1 Like

this didn’t work. now trying to build pygame as described in this article

$ sudo apt-get install mercurial
$ hg clone https://bitbucket.org/pygame/pygame
$ cd pygame

$ sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
$ sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
$ sudo apt-get install python3-dev python3-numpy

$ python3 setup.py build
$ sudo python3 setup.py install

I’ll get back here with the results
Thanks

This is so strange, I tried this in my GameShell just now, It worked. How about sudo pip3 install -r requirements.txt ?

1 Like

Thanks, It worked with the sudo, but running Oscillofun from the launcher does not work. I’ll try to investigate later

I got your error when I reinstall pygame lol


Is pygame really install, what’ s the reslut after run?

python3
import pygame

maybe we should install pygame use whl file, (I install pygame with whl when I test this app

result seems fine to me

yes, it seem that pygame has been installed. If the application is stuck, restart GameShell, It doesn’t seem to perform well enough to run the application very smoothly. :cry:

I got similar error while running pip3 install -r requirements.txt, however, when sudo apt install python3-pygame did the trick, it looks that I still need to do pip3 install pyaudio to run Oscillofun.sh. Finally I am stuck with the invalid output device error:

ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to create IPC semaphore
Traceback (most recent call last):
  File "oscillofun.py", line 52, in <module>
    output=True)
  File "/home/cpi/.local/lib/python3.7/site-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "/home/cpi/.local/lib/python3.7/site-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid output device (no default output device)

What’s your OS version? And can your microphone work well in other app? I never got error likes this before. I will try my best to fix that :face_with_monocle:

Thanks! I’m on the latest 0.5 OS.

some information:

  1. modify Oscillofun.sh from:
python3 oscillofun.py

to

sudo python3 oscillofun.py

and run this app in GameShell Menu

  1. check your audio default device, more information can be found in StackOverflow. Because I can not catch your bug( It’s probably not my code problem), I can not test those for you, so I have no idea if those actions can fix your bug.

I tried the test in the StackOverflow in my GameShell, my reslut is:


If you can not get default audio device after run pa.get_default_input_device_info(), It means that your linux or driver have some problem, or pyaudio has some bug, you can follow the instruction in the answer to try to fix that.

Those are some ref:
The Music Server not pausing when processing another query
I can’t run a simple code using pyaudio - [Errno -9996] Invalid output device (no default output device)
PyAudio IOError: No Default Input Device Available