Giter Site home page Giter Site logo

Comments (4)

onlaj avatar onlaj commented on June 9, 2024

Hey, sorry for the late response.

Check if the start_recording() method is being called by adding a print statement there, and then check the console to see if it's being displayed when you start recording.

If you're trying to declare self.messages_to_save under __init__, you have to declare it as a dictionary first:

self.messages_to_save = dict()
self.messages_to_save["main"] = []

Just to be sure, are you using the latest version of the code?

from piano-led-visualizer.

monkshoody avatar monkshoody commented on June 9, 2024

Hey @onlaj,

Since the new update doesn't solve my problem about recording the Midi files, I manually debugged the code again. The problem is neither rooted in the __init__ nor in the start_recording()-function, but in the save()-function of your savemidi.py file.

In the start_recording(), you initialise the self.messages_to_save like this:

self.messages_to_save = dict()
self.messages_to_save["main"] = []

But in the save()-function (line 71) you reinitialise it like:

self.messages_to_save = []

which means, that messages_to_save is no longer a dict, but an array. However, at this point you need to reinitialise it like:

self.messages_to_save["main"] = []

I manually updated my code and now everything works perfectly.

from piano-led-visualizer.

onlaj avatar onlaj commented on June 9, 2024

I used self.messages_to_save = [] to only clear the content inside. I guess better way would be to just use clear(). It shouldn't matter tho because in the start_recording() it is reinitialised back to dictionary with self.messages_to_save = dict().
I have no clue why it's not working for you.

from piano-led-visualizer.

monkshoody avatar monkshoody commented on June 9, 2024

I see. Well, I don't know what's going on either. But now it works, so feel free to close the issue.
Great work by the way. I really love your project.

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.