Playing Guitar Tablatures in Rust
A tablature player named Ruxguitar is being developed in Rust to parse and display guitar tablatures effectively. The project involves handling tablature file formats, creating a user interface with the Iced library, and generating sound through MIDI events. Challenges like format variations and library selection are addressed. Code examples demonstrate file parsing, UI creation, and MIDI synthesis. Testing, UI interaction, and audio management are discussed, aiming to offer a robust tablature player for guitarists using Rust's strengths.
Read original articleThis blog post discusses the creation of a tablature player in Rust called Ruxguitar. The project aims to parse and display guitar tablatures in a user-friendly way. The post details the process of parsing binary tablature files, building a user interface using the Iced library, and synthesizing MIDI events to produce sound. The author explains the challenges faced, such as handling different versions of tablature file formats and selecting appropriate libraries for GUI and audio processing. The post includes code snippets illustrating the parsing of tablature files, drawing tablature on a canvas, and playing MIDI events using a synthesizer. The author also shares insights into testing the parser, handling UI interactions, and managing audio output using the cpal crate. Overall, the project aims to provide a functional and interactive tablature player for guitar enthusiasts, leveraging Rust's capabilities for efficient parsing and audio processing.
Related
Eight million pixels and counting: improving texture atlas allocation in Firefox (2021)
Improving texture atlas allocation in WebRender with the guillotiere crate reduces texture memory usage. The guillotine algorithm was replaced due to fragmentation issues, leading to a more efficient allocator. Visualizing the atlas in SVG aids debugging. Rust's simplicity and Cargo fuzz testing are praised for code development and robustness. Enhancements in draw call batching and texture upload aim to boost performance on low-end Intel GPUs by optimizing texture atlases.
Alphatab.net
The website promotes alphaTab, a versatile tool for creating music notation applications on web, desktop, and mobile. It offers responsive display, audio playback synced with notation, and a customizable API. Users can access detailed music sheet data through alphaTab APIs for tailored UI components.
Racket Plot Cookbook
The Racket Plot Cookbook on GitHub showcases various plot examples using the Racket Plot library, including graphs, violin plots, sine curves, logos, and more. It serves as a valuable resource for individuals interested in crafting plots with Racket. Access the cookbook for details.
Show HN: Create Music with R
The "gm" package on GitHub allows music creation in R with code snippet, installation guide, and extra details. It supports music generation in the R environment.
Common Expression Language interpreter written in Rust
The GitHub repository features a Common Expression Language (CEL) implementation in Rust, offering a CEL-parser and interpreter for evaluating expressions. It emphasizes simplicity, speed, safety, and portability, providing examples and guidance in Rust, Java, Go, and TypeScript. Detailed documentation is available on the GitHub page.
- Security concerns were raised about a potential false positive trojan detection in the Windows download.
- Users expressed excitement about the project, especially those interested in both guitar and Rust programming.
- Some comments highlighted the advantages of sheet music over tablature for musical notation.
- Suggestions were made for potential features, such as displaying chords over measures and creating an open-source alternative to Rocksmith+.
- There were nostalgic reflections on past guitar tab formatting tools and the challenges of using ASCII tabs.
I've been using TuxGuitar for years and I hate the UI so much. The ergonomics around basic functionality like "loop this section" and "speed up / slow down the tempo" are so bad. I feel like it was designed by people who are only interested in writing tabs. The user experience for practice is so crappy. I'm sitting here with a guitar in my lap and I absolutely cannot be bothered to navigate some really poorly-laid out drop down menus just to do basic stuff. I want to have keys on the keyboard do all the basic stuff so it's just a single tap with one hand.
I looked into TuxGuitar's Java source...it's incredibly complicated for what it does. I literally had no idea how I'd alter to make it better or even extract part of it to make my own UI.
If the author reads this: more power to you! And one thing that would be very useful is to make the font REALLY BIG so that players can read it very easily. Squinting at TuxGuitar's default tiny font size sucks so much.
The development of TuxGuitar has recently resumed
So I wrote this https://ctan.math.utah.edu/pub/ctan/tex-archive/support/psta... (linking to the manual not the code - the manual is itself a program using the code I wrote to do the formatting) - a thing for formatting guitar tab that _ran on our Apple LaserWriter_, because we had pretty much nothing else that could do graphics. I learned postscript to write this, and because I needed to do some diagrams for my PhD, and wrote it in a week... so it's rough. But after the first couple of days I realised, that not only could I get it to format tab typed in the format I could type quickest, but I could get it to parse the ascii tab and reformat it to fit on a page, with nicely drawn lines not minus signs.
It also does stuff like printing verses with chords annotated, chord tables, and suchlike.
I recall going back to this 10 or 15 years later and the output in ghostscript was fugly, but at the time, I got a message from someone who'd used it to publish a book of banjo music in New Zealand - because it was the only thing that handled variable numbers of strings that he'd found!
Of _purely historical_ interest, I wouldn't recommend plumbing the code for any insights, since like I say I was very new to the language, and the stuff I wrote in the manual with my opinions about code are fairly embarrassing. But hey, the past is past.
It's also the second time that iced has caught my attention today. The first was when I ran into an issue installing sniffnet on a new machine and had to revisit the docs. This led me to iced.rs and I eventually wound up playing with the Halo shader edit for a bit. It looks like a nice library and I'm itching to give it a try.
Update: looks like some papers got into it last year:
Rock Guitar Tablature Generation via Natural Language Processing: https://arxiv.org/pdf/2301.05295
GTR-CTRL: Instrument and Genre Conditioning for Guitar-Focused Music Generation with Transformers: https://arxiv.org/abs/2302.05393
Happy to answer any questions.
RS+ is great for quickly memorizing new riffs and songs, but when they discontinued RS2014, they cut over to a yearly subscription service, AND made it incompatible with the tens of thousands of user-notated songs created with the old API. Just a lot of back catalog stuff now.
My 8yo niece is so disappointed she can’t use it learn Taylor Swift songs on the little Strat Mini I gifted her.
Would love to see how this can be extended for general purpose tab player. That would be awesome.
Thanks!
Related
Eight million pixels and counting: improving texture atlas allocation in Firefox (2021)
Improving texture atlas allocation in WebRender with the guillotiere crate reduces texture memory usage. The guillotine algorithm was replaced due to fragmentation issues, leading to a more efficient allocator. Visualizing the atlas in SVG aids debugging. Rust's simplicity and Cargo fuzz testing are praised for code development and robustness. Enhancements in draw call batching and texture upload aim to boost performance on low-end Intel GPUs by optimizing texture atlases.
Alphatab.net
The website promotes alphaTab, a versatile tool for creating music notation applications on web, desktop, and mobile. It offers responsive display, audio playback synced with notation, and a customizable API. Users can access detailed music sheet data through alphaTab APIs for tailored UI components.
Racket Plot Cookbook
The Racket Plot Cookbook on GitHub showcases various plot examples using the Racket Plot library, including graphs, violin plots, sine curves, logos, and more. It serves as a valuable resource for individuals interested in crafting plots with Racket. Access the cookbook for details.
Show HN: Create Music with R
The "gm" package on GitHub allows music creation in R with code snippet, installation guide, and extra details. It supports music generation in the R environment.
Common Expression Language interpreter written in Rust
The GitHub repository features a Common Expression Language (CEL) implementation in Rust, offering a CEL-parser and interpreter for evaluating expressions. It emphasizes simplicity, speed, safety, and portability, providing examples and guidance in Rust, Java, Go, and TypeScript. Detailed documentation is available on the GitHub page.