7 ms·
I made a guitar tuner app using Flutter and Rust
- vhanda 4y agoDo you have any plans on open sourcing the code?
- zduny 4y agoNot at the moment. Sorry. I'm planning to create a simpler free version of the app for the sake of cross-promotion, I may open source that one (but I can't make any promises currently, both regarding creating the actual app and open sourcing it).
- thatguyagain 4y agoCool, good job! :)
- andrewon 4y agoThis is surprisingly useful. Thanks! I used an iPhone app with similar interface but couldn't find one that's as intuitive on web until this one.
- RHSman2 4y agoAs an alternate tuning person I’d love a simple ‘this is the note you are playing’ I hate having to pick the tuning as I just wanna know a c#, g#, c#, f, g#, c# Please :)
- munro 4y agoThe movement is really choppy on my iPhone 13 Pro. Did you use requestAnimationFrame for the tuning movement? & CSS animations for switching instruments? Kinda just wondering how the performance could be so bad. Reminds me of PhoneGap circa 2013
- alvarlagerlof 4y agoFlutter is not web-based. It's all custom.
- veidr 4y agoThat is true (that Flutter builds natively on all platforms it supports, and controls every pixel on the screen, unlike React Native and similar). But I suspect these people were trying the web version of this (pretty neat, IMO) app. Flutter does build for the web but then it does (of course) use web technologies to deliver the UI. To get the native experience on iOS, you'd have to download the iOS version from the App Store or something like that.
- panzerboiler 4y agoI can confirm. It is extremely choppy and resource hungry for what it does. Since they use Flutter, the UI is rendered using 119 canvas elements. The same thing could be implemented using the web platform (no flutter and no rust) with better results.
- naet 4y agoI was thinking the same thing- I've seen many mobile performant, web based tuners before, it's a very common personal project. If the intention was to make a web based tuner from the start, Flutter and Rust was a big step down from just using HTML and JS. I know the trend on HN is to upvote any project with Rust in the title, and to hate on native JS, but projects like this that have to use a bunch of tooling to eventually compile down to JS would have almost always been better just using JS in the first place IMO.
- deleted 4y ago[deleted]
- renewiltord 4y agoEnjoying humming the tune to make it hit haha
- zduny 4y agoIt's available free (and no ads) for desktop browsers and as a $1 Android app (on mobile needs to be an app for performance reasons and I believe it's a fair price).
- bicarbonato 4y agoIs the app the same as the desktop version feature wise?
- KMnO4 4y agoWhile $1 is certainly far less than the value this app provides, it’s going to be a hard sell when there are several free apps which do the same thing.
- tyingq 4y agoThe intersection of "free", "no ads", and "works right" is often pretty bad. This at least has the web interface where you can see roughly what you would be getting.
- izietto 4y agoYes, but to be fair it's awfully hard to find a free app that does the same without bloat due to any kind of ads. I'm going to buy this app just because of frustration due to that.
- planede 4y agoThere are several such apps on f-droid.
- berkes 4y agoF-droid often has nice apps, but too often, they are just not good enough for what I want or need[1]. In that case, I'll gladly pay on the play-store because the paid version is nearly always (but certainly not guaranteed to) have less or no trackers ads, and malware included. The free apps far too often do. I use https://exodus-privacy.eu.org/ https://exodus-privacy.eu.org/ to check for trackers, ads and "malware". [1] Far too often, the apps there are "OK, but...", clearly the work of a someone building a quick "works for me" or someone learning how to build apps. For some tasks, "just OK" is good enough. More often it just isn't.
- davidkuennen 4y agoVery cool. Looks great.
- audio_stuff 4y agoLooks very nice, would you tell us a little bit about what you used to build this? I am just getting started with Rust and it would be cool to hear what approach you went and what you would recommend when starting today.
- zduny 4y agoFlutter for the UI. Rust for the listening, and pitch detecting backend. Connected the former with the latter using flutter_rust_bridge. More details on Rust backend: For listening (getting audio signal from microphone) I used: - Android: https://crates.io/crates/oboe https://crates.io/crates/oboe - native desktop/iOS (not currently released): https://crates.io/crates/clap https://crates.io/crates/clap - Web: https://crates.io/crates/web-sys https://crates.io/crates/web-sys (so basically JS Web Audio API called from Rust compiled to WASM). For pitch detection: - https://crates.io/crates/pitch-detection https://crates.io/crates/pitch-detection
- bobajeff 4y ago>Flutter for the UI. Rust for the listening, and pitch detecting backend. Connected the former with the latter using flutter_rust_bridge. It's good to see that there is a active project to help with making Android apps using rust.
- frr149 4y agoWhy not just dart?
- mkss 4y agoDart being a GC'd runtime makes it quite hard to use for low latency audio applications, probably not as critical for audio input as output, but still potential issue, for more details see: https://github.com/dart-lang/sdk/issues/46943 https://github.com/dart-lang/sdk/issues/46943
- pjmlp 4y ago
- psuedo_uuh 4y agoI would love to see the source code, or at least a simplified version. Audio input in rust and rust talking with flutter on mobile device. Such a cool project.
- tyingq 4y agoI don't think it's related, but a post from someone showing a simplified version of the same idea (pitch detection with WASM/Rust), with detail and source: https://www.toptal.com/webassembly/webassembly-rust-tutorial-web-audio https://www.toptal.com/webassembly/webassembly-rust-tutorial...
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- zduny 4y agoWell, all the Rust crates I've mentioned in other comment have comprehensive examples attached, so it's just a matter of connecting their functionality together :)
- its_bbq 4y agoBeautiful! Can I request banjo and chromatic modes?
- j_m_b 4y agoSo how do you tune 7 string guitars? :)
- zduny 4y agoMaybe in future version :)
- mgsk 4y agoCool! What's the deal with `DADGAd` being `D#ADGA#D#`?
- criddell 4y agoWhen I click through, all I get is a black screen that says "Failed to start listening thread."
- tyingq 4y agoFirefox maybe? This bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1572644 https://bugzilla.mozilla.org/show_bug.cgi?id=1572644
- zduny 4y agoAndroid or Web? If web - well, it sadly requires modern browser on relatively modern hardware - it has some performance problems currently in browsers, I'm not happy about that fact, I am considering improving it if the app catches enough interest. If Android - please consider returning the app and getting your money back as long as you still can - I'm afraid I won't be able to solve it in quick fashion.
- indigoabstract 4y agoDoes not work on my Galaxy Note 9 unfortunately(I granted the recording permission, but it can't pick up any sound). However, it works fine on desktop Firefox. I think a try before you buy option would be useful.
- throwaway019254 4y agoNice! We’re you inspired by the GuitarTuna iPhone app?
- zduny 4y agoYes, I did the app mostly for myself as I was getting disappointed with them adding too many unnecessary (IMO) features to it.
- boomskats 4y agoThis looks _very_ GuitarTuna. I've not come across another app which uses the (IMHO very effective) vertical scrolling pitch visualisation. This is great though OP. It's the best browser-based tuner I've ever used. I really hope you don't get sued.
- lvl102 4y agoiStrobosoft is the best tuning app. No contest.
- drukenemo 4y agoIt is. It’s just a pity they haven’t updated it in a while.
- jibbit 4y agothe idea of a 'virtual' strobe tuner is a curious one - a strobe tuner being such a material thing. I'm not contesting that Peterson's is the best, but the 'strobe' aspect of it has to be marketing guff, doesn't it?
- cge 4y agoThere was one strobe-like tuner for Android years ago that seemed to be something other than a visual representation of a standard digital tuner. My understanding of the way it worked is that it took the waveform over some set N/frequency time, converted it to a 1D horizontal line of black→white pixels, and then stacked subsequent lines to create a 2D image, with new lines being added at the top and moving down. In tune (or a multiple of the root frequency for the image), you'd see a series of vertical black and white bars; out of tune, these bars would slant to the left or right, and move over time. This method was actually somewhat like a strobe tuner in mechanism, replacing the persistence-of-vision appearance of the bars moving with a spatial representation of the audio waveform moving in comparison to the reference frequency. Presumably, this could also have been done without the stacked 2D representation, but that doesn't seem to be what apps like iStroboSoft do, as the bars are far too clean and even. While the app didn't do it, harmonic partials could have been added by having multiple simultaneous 2D images, each with a different reference frequency. Unfortunately, the app and its developer disappeared years ago, and while I might still have the apk somewhere. I haven't seen anything like it since.
- cge 4y agoI now recall that this was Pitchlab / Pitchlab Pro. The app still seems to work on Android 11, but isn't available through Google. The last version's release notes, combined with the subsequent discontinuation and disappearance, suggest that there may have been patent problems that led to its demise.
- zduny 4y agoI don't know if it is allowed here: Please reply if you would be interested in free promo codes for the Android app, I will post some.
- deleted 4y ago[deleted]
- account-5 4y agoThis might have an obvious answer for the more experienced here, but (potentially stupid question) why didn't you use dart for this? Nothing against rust, just interested is all considering the dart/flutter relationship.
- n4bz0r 4y ago
- timeon 4y ago[flagged]
- zduny 4y agoWhat is that anger about Rust on internet forums about? I started learning Rust because it's a language with interesting characteristics and welcoming documentation. Only then I've discovered it's apparently "controversial" for some reason...
- zdragnar 4y agoMembers of the rust community were often accused of being overly-enthusiastic in recommending that things be rewritten in rust, so much to the point it more or less became a meme unto itself. Now, visceral anti-rust gut reactions are more commonplace than inappropriate suggestions to use rust are. Even that is petering out, though.
- n4bz0r 4y agoDammit. Was writing a similar yet a bit more extensive elaboration on my phone, but accidentally refreshed the page a-a-and... it's gone :') Truly a RRRRREEEEEEEEEEEEEEE moment. Basically, 'this ^', but wanted to add that the post was a lighthearted jab and a comical insinuation. Which, by the way, according to the little rollercoaster of upvotes and downvotes, seem to have raised a micro controversy of it's own. Which adds another layer of comedy to the entire situation. A-A-ANYWAY. Since I was a bit upsetting, adding a (hopefully) evening out, on-topic suggestion. For tuning my guitars, I often use gStrings app [0]. For some reason it's much better at 'catching' freqencies than the alternatives. Can't recall all the names, but I've tried most of the popular ones (such as Guitar Tuna, the Fender's one, etc). Might wanna check it out and see if there are some tricks to borrow :) [0]: https://play.google.com/store/apps/details?id=org.cohortor.gstrings https://play.google.com/store/apps/details?id=org.cohortor.g...
- mattmaroon 4y agoCan you add Ukulele to the drop down? There are only a few common tunings.
- RHSman2 4y agoBen Howard and Nick Drake tunings. That’s funny!
- RHSman2 4y agoAnd wow! He really does use it a lot!!!!
- phdelightful 4y agoAs an undergrad I made a guitar tuner using a PIC32 microcontroller to do time-series correlation to figure out the frequency (FFT was too slow for real-time) and a state machine embodied in a stratix FPGA to control a stepper motor to turn the pegs. A different era of “mobile app” I guess.
- blobbers 4y agoHello Rust Music World!
- LocalPCGuy 4y agoPurchased for Android, love Flutter and been trying to learn guitar off/on, so this could be helpful. Question re: web (where I have not been impressed with Flutter as a platform) - I just get "Failed to start listening thread." I tried both Firefox and Chrome, latest versions. Side note: Also noticed I can't highlight/copy the text (common usability/accessibility issue with Flutter Web. I believe it's not that hard to allow?)
- slfnflctd 4y agoYou may already be aware, but having a small clip-on digital hardware tuner you can use anywhere without involving a phone is a life upgrade if you're playing guitar on a regular basis. Of course, this is a cool project for more insight into the technologies involved regardless.
- LocalPCGuy 4y agoYah, I keep meaning to get one of those, just haven't remembered to do it. And I'm super bad at guitar, so probably not playing anywhere outside of my basement for a while :P
- solatic 4y agoThe developer is supposed to use a SelectableText widget: https://api.flutter.dev/flutter/material/SelectableText-class.html https://api.flutter.dev/flutter/material/SelectableText-clas...
- whispersnow 4y agoSuper cool! Also, love the UI!
- taylodl 4y agoThere are two Drop D tunings listed and one is actually Drop C. There is no Drop D♭, you call it Drop C♯ which while it's technically the same set of tones, it's now how guitar players think of it. You have the same issue with E♭ Standard. Each of your notes in these tunings are listed as sharps instead of flats, which is not how guitar players think of the notes in these tunings. Also, you might want to consider polyphonic tuning. That's what would set you apart from everybody else. I bought a TC Electronic PolyTune earlier this year and it's been a game changer. It's much faster and easier to get tuned
- RHSman2 4y agoWhy is it good? Interested
- taylodl 4y agoBecause you can see the tuning of all the strings at once. You strum and they all show up. Then you can see which ones are more out of tune than others and tune them together. Prevents problems where changing the tuning (tension) of one string throws another string out of tune. I call it "global tuning." It gives you precise tuning extremely fast.
- someweirdperson 4y agoDoes the tuning of one string affect the others on guitars with hard tails, or is this mostly a tremolo induced issue?
- pravus 4y agoYes, for hard-tails. Neck construction doesn't matter either. I notice it on both bolt-on and neck-through instruments. My method is to tune the highest strings first and work down to the lowest since that seems to minimize this effect.
- themarkn 4y agoI believe the issue is due to small changes in the overall tension on the instrument caused by changing one string’s tension.
- iwebdevfromhome 4y agoThis is very cool! Is there a way to contribute or something to have support for ukulele ? I'm just starting to learn the uke and this could be very useful.
- jaywalk 4y agoThere's a Ukulele switch at the bottom left of the window.
- iwebdevfromhome 4y agoOh man, somehow I missed this on desktop. Thanks a lot!
- sirjaz 4y agoAre you going to release it on Windows 11?
- copperx 4y agoWhat algorithm are you using? I've been tempted to write a tuner using autocorrelation, because in my experience it picks up pitch wonderfully.
- zduny 4y agoLook at this crate: https://crates.io/crates/pitch-detection https://crates.io/crates/pitch-detection It has documentation attached mentioning pitch detection algorithms it implements.
- Narishma 4y agoHow do you scroll the list on the left? It doesn't have any scroll bar or scroll buttons that I can see.
- rglover 4y agoNice work, going to put this to use tonight! P.S.: you've got a customer if you plan to port this to iOS.
- taraparo 4y agoThe app looks great, but since no source code is provided knowing that it's made with Flutter and Rust isn't really of much use for anyone (esp. for learning purposes). For anyone interested, I found a nice open source tuner for Android https://github.com/thetwom/Tuner https://github.com/thetwom/Tuner
- notfed 4y agoEvil plan: 1. Create closed-source app in some boring language 2. Promote on hacker news as "written in Rust"
- eyelidlessness 4y ago3. Rust is a boring language. 4. Recurse!
- bibanez 4y agoThis is the tuner I use! It works great, definetely recommend it.
- coletonodonnell 4y ago+1, just as effective as in other phone tuner without all the obnoxious ads.
- bsder 4y agoAgreed. Without source code, this is just Yet Another Guitar Tuner App(tm) this time with Magic Rust Pixie Dust(tm) (take our word for it). If they release source code, I'll toss them money. Until then, pass.
- elecush 4y ago"toss them money" ? i'm confused. Also, if you view-source you can see some boilerplate that strongly suggests it's flutter
- tonypags 4y agoAssuming you're using A440. I do not see a way to change it to my preferred reference frequency A432.
- zduny 4y agoI'm considering adding that feature in future versions depending on interest.
- lightedman 4y agoThis is pretty handy, though my usual tuning method is to play a pure tone and match to that. Makes getting right there so much easier when you hear the warbling between guitar and tone stop.
- mbroncano 4y agoReally nice
- pjmlp 4y agoWhat does Rust add to the whole user experience that couldn't be done in Dart?
- tabtab 4y agoI'm looking for JavaScript library that would allow me to build a hobbyist autoharp tuner. I can program the UI, but need a note generator library. It just needs one API function or equivalent: soundNote(noteNum, duration); Note-number is the MIDI note number, and duration is the duration of the note in micro-seconds. (It can be in "beats" when the beat unit is defined via another function.)