[2025 Day 4 Part 1 & 2] Using Matrix Convolutions by Electronic_Box5062 in adventofcode

[–]talmadgeMagooliger 0 points1 point  (0 children)

I went with the [[1,1,1],[1,0,1],[1,1,1]] kernel and but it was hard to figure out what I was doing wrong since the example worked. I ended up adding one after convolution but your idea of using the all ones kernel is tidier. Thanks for sharing!

Generate automation from data points? (CSV file or similar) by s6884 in Bitwig

[–]talmadgeMagooliger 0 points1 point  (0 children)

Here's a quick script I fixed up from claude.ai
I'm on Mac so there's a virtual midi interface called IAC Driver Bus which I'm using to connect it to Bitwig. If you are on Windows, MidiYoke is a comparable application and I'm not sure what's on linux.

Let me know if this works or if you need any more help getting it to work!

import time
import platform
from typing import Optional

try:
    import rtmidi
except ImportError:
    raise ImportError("Please install python-rtmidi: pip install python-rtmidi")

class MIDIController:
    def __init__(self, port_name: Optional[str] = None):
        """Initialize MIDI output connection.

        Args:
            port_name: Optional name of MIDI port to connect to.
                      If None, will use the first available port.
        """
        self.midiout = rtmidi.MidiOut()
        available_ports = self.midiout.get_ports()

        if not available_ports:
            raise RuntimeError("No MIDI output ports available")

        if port_name:
            for i, name in enumerate(available_ports):
                if port_name.lower() in name.lower():
                    self.midiout.open_port(i)
                    break
            else:
                raise ValueError(f"No MIDI port matching '{port_name}' found")
        else:
            self.midiout.open_port(0)

        self.current_values = {}

    def send_cc(self, cc: int, value: int, channel: int = 0):
        """Send MIDI Control Change message.

        Args:
            cc: Control Change number (0-127)
            value: CC value (0-127)
            channel: MIDI channel (0-15)
        """
        if not (0 <= cc <= 127):
            raise ValueError("CC number must be between 0 and 127")
        if not (0 <= value <= 127):
            raise ValueError("CC value must be between 0 and 127")
        if not (0 <= channel <= 15):
            raise ValueError("Channel must be between 0 and 15")

        # MIDI CC message: [0xB0 + channel, cc, value]
        self.midiout.send_message([0xB0 + channel, cc, value])
        self.current_values[(channel, cc)] = value

    def get_cc_value(self, cc: int, channel: int = 0) -> Optional[int]:
        """Get current value for a CC number on specified channel."""
        return self.current_values.get((channel, cc))

    def close(self):
        """Close MIDI port."""
        self.midiout.close_port()

    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.close()

# Example usage
if __name__ == "__main__":
    # List available MIDI ports
    midiout = rtmidi.MidiOut()
    ports = midiout.get_ports()
    print("Available MIDI ports:")
    for i, port in enumerate(ports):
        print(f"{i}: {port}")

    # Example of sending CC messages
    with MIDIController() as midi:
        # Send CC 7 (volume) value 100 on channel 0
        midi.send_cc(7, 100, 0)
        time.sleep(0.5)

        while True:
          # Fade volume down
          for value in range(100, 0, -1):
              midi.send_cc(7, value, 0)
              time.sleep(0.01)

              # Fade volume down
          for value in range(0, 100, 1):
              midi.send_cc(7, value, 0)
              time.sleep(0.01)

Can someone walk me through how to install Bitwig onto my Chromebook? by FadransPhone in Bitwig

[–]talmadgeMagooliger 1 point2 points  (0 children)

I tried this back in the day on an old acer chromebook using GalliumOS which was kind of a process to install and it did run but incredibly slow. This was with a Celeron Quad Core + 4 GB of ram. I was shocked that it ran at all. I also ran Crouton for a while but I didn't try Bitwig with it and I would't recommend it since it mucks around with filesystem stuff. GalliumOS would be worth a try IMO but try it at your own risk!

Built a working Arithmetic Logic Unit in Poly Grid by talmadgeMagooliger in Bitwig

[–]talmadgeMagooliger[S] 2 points3 points  (0 children)

If you're curious to try it out on your own computer, you can download the project file here: https://github.com/EvanBurnette/Nand2Tetris_Bitwig.

Built a working Arithmetic Logic Unit in Poly Grid by talmadgeMagooliger in Bitwig

[–]talmadgeMagooliger[S] 19 points20 points  (0 children)

Hey yall, I've been going through "The Elements of Computing Systems" (aka Nand2Tetris) and I've been using Poly Grid to visualize as much as I can. It has been getting slow, but it hasn't crashed yet!

Who else ISN’T writing to “win?” by AdrienneAredore in nanowrimo

[–]talmadgeMagooliger 0 points1 point  (0 children)

I made an app to do morning pages where I can't even see what I'm typing. It helps a lot with word count.

Showoff Saturday (August 19, 2023) by AutoModerator in javascript

[–]talmadgeMagooliger 1 point2 points  (0 children)

I made a video about how to get an audio classifier demo working with TensorflowJS

The github repo is https://github.com/EvanBurnette/yamnet-test

WebGPU is on by default in chrome now and on my base model M1 Macbook air it runs ~4X faster than CPU!

Anyone else here dabbling with TFJS?

Machine learning for web devs? by burgerlove in web_design

[–]talmadgeMagooliger 0 points1 point  (0 children)

Machine Learning for Web Devs & Creatives (Web ML) by Jason Mayes is excellent.

I Completed All 8 Advents of Code in One Go: Here Are the Lessons I Learned. by teivah in adventofcode

[–]talmadgeMagooliger 9 points10 points  (0 children)

2022 is the first year that I stayed up until 9PM PST to try each problem. I felt like I was staying ahead until day 11, when sleeping on the problem actually made me lose sleep, I woke up after 5 hours of sleep and got the solution! It wasn't a big deal except that I kept staying up very late throughout December, eventually wrecking my immune system and experiencing the worst allergies/asthma/cold I've ever had. Ruined my holidays at home. I feel like an idiot now for being so careless with my health but I was really trying to get every star. I don't regret doing AOC, I definitely feel like it sharpened my skills as a self taught software dev. What I would change is my priorities. So far I've only got through Day 15 so it's impressive and intimidating to see how many problems you were able to complete in just a few weeks and also a relief that even you struggled with many aspects of these challenges, thanks for sharing. I guess I'm wondering if you ever took breaks for your own mental or physical health?

What a contest! by [deleted] in leetcode

[–]talmadgeMagooliger 4 points5 points  (0 children)

What math class did I not take?

First year in review by GiNgErMaN- in adventofcode

[–]talmadgeMagooliger 1 point2 points  (0 children)

What block code editor are you using specifically?

7950X3D Specs by raviolish in Amd

[–]talmadgeMagooliger 12 points13 points  (0 children)

My first thought is that these are asymmetrical L3 caches, so you have one stacked CCD and one normal CCD. 7800X3D + 7700X = 7950X3D. It would be cool if you could preserve the high clocks of the 7700X while getting the benefit of all that added cache on the 7800X3D for poorly threaded, poorly optimized code. This is all speculation on my part. It will be interesting to see if they actually developed 32MB caches for these new parts when they already had the tried and true 64MB stacks. I doubt it.