Giter VIP home page Giter VIP logo

Comments (14)

onlaj avatar onlaj commented on May 28, 2024

Hello.
Update your repository to the latest version, just in case.
Type aconnect -l in console and paste the response here.
Try to run visualizer.py and this time copy and paste whole console output.

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

aconnect -l give's me the following response when i run sudo btmidi-server -v -n "RPi Bluetooth" in another terminal.

1. pi@raspberrypi:~ $ aconnect -l
2. client 0: 'System' [type=kernel]
3.     0 'Timer           '
4.     1 'Announce        '
5. client 14: 'Midi Through' [type=kernel]
6.     0 'Midi Through Port-0'
7. client 128: 'RPi Bluetooth' [type=user,pid=1943]
8.     0 'RPi Bluetooth   '

and this response when i am just connected with my laptop

1. pi@raspberrypi:~ $ aconnect -l
2. client 0: 'System' [type=kernel]
3.     0 'Timer           '
4.     1 'Announce        '
5. client 14: 'Midi Through' [type=kernel]
6.     0 'Midi Through Port-0'

This is the whole output when trying to run visualizer

1. pi@raspberrypi:~/Downloads/Piano-LED-Visualizer-master/Piano-LED-Visualizer-master $ sudo -E python visualizer.py
2. Traceback (most recent call last):
3.   File "visualizer.py", line 733, in <module>
4.     midipending = midiports.inport.iter_pending()
5. AttributeError: MidiPorts instance has no attribute 'inport'

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

So you don't have connected keyboard to RPI, right? I will make an exception so it won't crash when there is no input set.

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

I dont have a piano midi keyboard connected to my rpi.

I do have a computer keyboard connected

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

By default it tries to set keyboard as input, if you want to set your PC as input you have to run visualizer.py and then change input in menu. I just made an update, download new version.

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

Thanks!
When i run the updated version, there is no output/response. Nothing happends

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

Yes, because there are no ports set yet.
Go to "Ports Settings" -> "Refresh ports"
and then to "Input" and choose RPI-Bluetooth.
Now the keys should light up when you play midi files with Synthesia (if you configured everything correctly in Synthesia)

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

I mean when i try to run the updated version.

1. pi@raspberrypi:~/Downloads/Piano-LED-Visualizer-master $ sudo -E python visualizer.py
2. 
3. 
4. 

This is the response when i press keyboard interrupt after some minutes


1. ^CTraceback (most recent call last):
2.   File "visualizer.py", line 733, in <module>
3.     menu.show()
4.   File "visualizer.py", line 341, in show
5.     self.LCD.LCD_ShowImage(self.image,0,0)          
6.   File "/home/pi/Downloads/Piano-LED-Visualizer-master/LCD_1in44.py", line 310, in LCD_ShowImage
7.     pix = pix.flatten().tolist()
8. KeyboardInterrupt
9. 

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

What exactly you are trying to achieve? You don't have a keyboard connected to RPI so I guess you want to light up LEDs with Synthesia, right?

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

Yes, i want to play a midi file on my laptop on synthesia, send the midi data over bluetooth to rpi and light up LEDS.

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

Do you have screen on your RPI? If yes then refresh the ports and then set RPI-Bluetooth as input. Then it should work. This is how it looks when I disconnected the keyboard to recreate your setup: https://gfycat.com/pl/shockedcarefreebighornedsheep

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

Ah, i dont have the small LCD screen, instead i have a 27 inch HDMI screen connected to it :) can i use that?

from piano-led-visualizer.

onlaj avatar onlaj commented on May 28, 2024

No, I'm afraid you will have to edit the visualizer.py :D
Replace line 665 in latest version with
if "RPi" in port:
It will set RPI-Bluetooth device as input.

from piano-led-visualizer.

AbrahamWisman avatar AbrahamWisman commented on May 28, 2024

Thanks a lot, that works!
I also have a midi cable connection. I can see that the bluetooth midi data is not as steady as the midi cable. All the data is correct, but there is a delay of +-half a second sometimes.

from piano-led-visualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.