ijc
1
I’ll post weekly updates for this GSoC project here.
More information about the project is available in the proposal.
ijc
3
Updates:
- Created an introductory video
- Experimented a bit with difflogic and different ways of representing data for input to/output from networks
- Got setup with Google Colab Pro for GPU access
- Created a trivial Pure Data external, started the process of embedding a compiled difflogic network inside it
- Received shipment with BeagleBone Black and peripherals
Blockers: none at the moment! just debugging the Pd external.
Upcoming goals:
- Get Pd external working with embedded difflogic network
- Setup Bela (BeagleBone Black + Bela cape)
- Run difflogic network on Bela
- Try running on PRU
- Performance comparison? (laptop CPU vs. BB CPU vs. BB PRU)
ijc
4
Updates:
- Did a bit more experimenting with difflogic
- Setup Bela (BeagleBone Black + Bela cape); got a project to build and got audio out
- Debugged Pd external with embedded difflogic network; got it running at audio rate (on a laptop)
- Compiled Pd external to run on Bela; updated build script to work on both laptop and Bela
- Started investigating performance of simple difflogic network on Bela; running at audio rate, it does not keep up with real-tme
- Ran example project on PRU
Blockers: none; currently debugging performance.
Upcoming goals:
- Get simple difflogic network running at audio rate on Bela
- Run difflogic network on PRU
- Start work on additional wrappers (beyond Pd): C++, SuperCollider
ijc
5
Updates:
- Resolved performance issues with difflogic network on Bela, which is now keeping up with audio rate (both in standalone C++ project and as Pd external)
- Took basic performance measurements (e.g. observing CPU usage at different block sizes, timing different sections with
std::chrono::steady_clock)
- Modified PRU example project to send custom values between CPU & PRU
- Wasn’t able to get PRU->CPU interrupts working; currently relying on shared memory to signal status
- Got PRU to perform a trivial calculation on-demand from CPU
- Set up TI toolchain for compiling C for PRU (
clpru & co.)
- Got batching working in colab notebook (CUDA)
- Started bringing compiled difflogic network into PRU project
Blockers: currently trying to fit generated assembly into my existing PRU code, which is proving to be a hacky endeavor that involves some toolchain headaches (e.g. disagreements between clpru, dispru, pasm)
Upcoming goals:
- Get difflogic network running on PRU
- Make process for doing so less hacky
- Write basic wrappers for C++, SuperCollider, CSound (or perhaps Faust)
ijc
6
Updates:
- Spent some time trying to get difflogic network running on PRU using pipeline involving generating C via
difflogic library, compiling C with clpru, disassembling with dispru, and finally including in some other (preexisting) assembly compiled with pasm (and finally loaded on to PRU with prussdrv_exec_code() per Bela example project).
- This approach caused a lot of headaches. After resolving numerous issues, the results obtained by the CPU and PRU still disagreed, and there were a few discrepancies in the intermediate computed values with no obvious cause.
- So, rather than continuing to debug
clpru/dispru output, I went ahead and wrote a custom PRU assembly exporter for difflogic models (based on difflogic’s CompiledLogicNet, which generates some C). This sufficed to get my 8-bit identity network running on the PRU and producing the same results as the C-export version running on the CPU.
- Wrote basic wrapper for C++.
- Started on basic wrapper for SuperCollider.
Blockers: none at the moment 
Upcoming goals:
- Clean up & generalize PRU assembly exporter
- Finish basic wrapper for SuperCollider
- Write basic wrapper for CSound or Faust
ijc
9
Updates:
- Trained new identity model based on unary encoding, following experiment last week
- Created custom pytorch layers for input/output conversions
- These can go in the model itself, rather than having to be known by the caller
- Later, we can also generate the appropriate code for these layers in the C & assembly exporters, rather than needing to bake the input/output conversion code into the various network wrappers.
- Per discussion with mentors, decided to refocus on demo applications for the time being
Blockers: for combining difflogic with non-logic layers (e.g. for DDSP), still thinking about how to make the input conversion (e.g. from floats to unary-encoded bits) differentiable.
Upcoming goals:
- Train some networks to do audio synthesis as a function of time, bytebeat-style
- Create some interface for visualizing and/or manipulating synthesis networks
- Record a brief demo video
ijc
14
Updates:
- Bidirectional communication between web client and Bela via websocket
- Web client sends network changes (due to load, masking, or randomization) to Bela
- Bela sends touch data to web client for visual feedback
- Web client includes setting for whether to connect to Bela or run standalone (in the browser)
- Trill Square connected to Bela for network bending by touch
- Bela project can (nearly) run standalone, without web client
- Web client displays selected gate for visual feedback
- Network masking logic (temporarily replacing touched gates with constant 0’s) reimplemented in Bela project
Blockers: for OLED support (to get visual feedback without a browser), lack of Qwiic cable for I2C daisy-chaining
Upcoming goals:
- Add “pseudo-buttons” to Bela interface by delineating certain regions on the Trill Square
- If time & sourcing allows, connect OLED screen to Bela for visual feedback sans browser
- General cleanup; address most pressing “TODOs” and reduce code duplication
- Record demo video; write & submit final report
1 Like