Casual Computing https://casualcomputing.info/ Recent content on Casual Computing Hugo en-us Thu, 18 Sep 2025 15:54:46 +0200 Playhead Movement Fully Working Again https://casualcomputing.info/posts/playhead-movement-fully-working/ Thu, 18 Sep 2025 15:54:46 +0200 https://casualcomputing.info/posts/playhead-movement-fully-working/ <p>Playhead movement is now fully working with the new native C++ sequencer code, as can be seen in this video:</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/mZVdI0LsqTI?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe> </div> <p>Implementing movement of the playhead is not as straightforward as it might seem. This is functionality is often taken for granted and it is hard to fathom on the surface how hard and complex this problem really is. I will attempt to explain:</p> Native Sequencer Progress https://casualcomputing.info/posts/native-sequencer-progress/ Thu, 07 Aug 2025 16:16:46 +0200 https://casualcomputing.info/posts/native-sequencer-progress/ <p>It suddenly occured to me that there has not been a blog post in a long time. Work is still going on with the <a href="https://casualcomputing.info/posts/invisible-changes/">native C++ rewrite of the sequencer engine</a>. As mentioned in the <a href="https://casualcomputing.info/posts/native-sequencer-first-contact/">previous post</a> I have been reimplementing the code for playhead movement. This is not as easy as it might seem, and is actually one of the more complex parts of Sputter.</p> <p>The implementation in the current version actually works quite well, but on the inside it is all <a href="https://en.wikipedia.org/wiki/Spaghetti_code">spaghetti code</a>.</p> Native Sequencer First Contact https://casualcomputing.info/posts/native-sequencer-first-contact/ Tue, 07 Jan 2025 15:01:15 +1000 https://casualcomputing.info/posts/native-sequencer-first-contact/ <p>As you can see from the video below, first contact has been made between the new native sequencer code written in C++ and the GUI code written in Java. There are now no crossings of the <a href="https://casualcomputing.info/posts/invisible-changes/">horrid JNI bridge</a> which causes severe performance penalties in the audio process.</p> <video src="https://casualcomputing.info/videos/nativeseq-firstcontact.webm" poster="" controls style="max-width: 100%; border-radius: 10px; margin: 20px 0px 20px 0px"> </video> <p>As you can also spot in the video the playhead is not moving. At this time there is still a lot missing, but the fact that it is compiling and actually running as intended is a substantial milestone.</p> Sputter 1.5.2 Released https://casualcomputing.info/posts/sputter-1.5.2-released/ Thu, 05 Dec 2024 18:56:42 +0100 https://casualcomputing.info/posts/sputter-1.5.2-released/ <p>While fiddling around with Sputter one of the recent days, I discovered three bugs and shortcomings which are now fixed in the latest version 1.5.2.</p> <p>Some (most?) of you might not be aware of it, but the grid in Sputter is actually three times taller than what is shown on screen at any given time:</p> <p><img src="https://casualcomputing.info/images/grid-whole-major-c3.png" alt="Actual grid is three times as big"></p> <p>The way you move through the range of notes is to slide up and down with two fingers, as described in the help screen:</p> Sputter 1.5.1 Released https://casualcomputing.info/posts/sputter-1.5.1-released/ Sat, 12 Oct 2024 10:02:58 +0200 https://casualcomputing.info/posts/sputter-1.5.1-released/ <p>Sputter version 1.5.1 is now available on <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">Google Play</a>.</p> <p>As the version number implies this is in no way a major release. However, it does contain some under the hood changes which paves way for the <a href="https://casualcomputing.info/posts/invisible-changes/">new sequencer backend written in C++</a>.</p> <p>Still, there are some changes you might find useful:</p> <ul> <li>Logarithmic filter cutoff frequencies</li> <li>Position lock now locks at playing position, not currently viewed position</li> <li>Improved audio performance</li> <li>Upgraded to latest version of <a href="https://libgdx.com/">LibGDX</a>, the graphics library powering Sputter&rsquo;s GUI</li> <li>A few minor bug fixes</li> </ul> <p>Logarithmic cutoff frequencies was proposed by a user and is a surprisingly big improvement. As it were, the cutoff frequency would sound too sensitive at one end of the slider and very unresponsive in the rest of the range. The sliders now feel more evenly distributed and it is way easier to dial in the setting you want.</p> Overlapped/Seamless Looping https://casualcomputing.info/posts/pure-data-loop-overlap/ Wed, 06 Mar 2024 14:45:46 +0100 https://casualcomputing.info/posts/pure-data-loop-overlap/ <p>Lately I have been putting the <a href="https://casualcomputing.info/posts/new-version-is-taking-time/">C++ rewrite of the sequencer logic</a> a bit on hold and implemented overlap (or seamless) looping into <a href="https://casualcomputing.info/spitback/">Spitback</a>, the Pure Data patch responsible for playing sounds in Sputter.</p> <p>As can be seen in the video below, this will make it vastly easier to make looped instrument presets in Sputter.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/bFztDyxNh7s?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe> </div> <h3 id="when-will-it-arrive-in-sputter">When will it arrive in Sputter?</h3> <p>With the technical solution in place, what&rsquo;s left is to reorganize the UI to accomodate the new functionality and integrate it into Sputter&rsquo;s code. At this time I am not 100% sure wether to prioritize this or continuing work on the <a href="https://casualcomputing.info/posts/new-version-is-taking-time/">C++ rewrite</a>. Another great improvement could be to have seperate waveforms for each octave, or possibly ranges of notes, instead of just one as it currently stands. This would be highly beneficial for many types of instruments, for example piano.</p> New Version of Sputter is Taking Time, Here's Why https://casualcomputing.info/posts/new-version-is-taking-time/ Wed, 13 Dec 2023 16:56:40 +0100 https://casualcomputing.info/posts/new-version-is-taking-time/ <p>For the last couple of months I have been working on solving some of Sputter&rsquo;s underlying weaknesses. As described in the <a href="https://casualcomputing.info/posts/invisible-changes/">previous blog post</a> this involves converting the sequencer and logic code from <a href="https://en.wikipedia.org/wiki/Java_(programming_language)">Java</a> to <a href="https://en.wikipedia.org/wiki/C%2B%2B">C++</a> while incorporating <a href="https://en.wikipedia.org/wiki/Test-driven_development">Test Driven Development</a>. This has been going on since summer this year, so what is taking so long time?</p> <h3 id="c-is-harder-than-java">C++ is hard(er than Java)</h3> <p>Java was designed with focus on simplicity and abstracts away much of what is going on under the hood when running a computer program. C++ on the other hand exposes the &ldquo;bare metal&rdquo; in order to make specific optimizations and memory management possible. In other words, C++ is more suited in situations where performance is a requirement. This also makes programming in C++ more like walking on a razor&rsquo;s edge. Here are some examples:</p> Invisible Changes Coming to Sputter https://casualcomputing.info/posts/invisible-changes/ Wed, 27 Sep 2023 11:18:24 +0200 https://casualcomputing.info/posts/invisible-changes/ <p>I have a confession to make: The code for audio and sequencer logic in Sputter is really unoptimized. According to <a href="http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing">the holy grail of audio programming</a>, and a lot of other general optimization advice, pretty much everything is done wrong. This means that it uses more CPU power and battery life than is really needed. Audio latency is also unreasonably long, which is evident when notes are played back as they are inserted in the grid.</p> Sputter 1.5.0 Released https://casualcomputing.info/posts/sputter-1.5.0-released/ Mon, 10 Jul 2023 15:15:25 +0200 https://casualcomputing.info/posts/sputter-1.5.0-released/ <p>Sputter version 1.5.0 has finally been uploaded and released on <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">Google Play</a>.</p> <p>This release brings a not so exciting but very important feature: Backup functionality. This is very important on the Android platform to mitigate <a href="https://www.xda-developers.com/android-q-storage-access-framework-scoped-storage/">storage access restrictions</a> in later versions of the operating system. These restrictions already led to <a href="https://casualcomputing.info/posts/user-lost-all-files/">one user losing all songs</a>.</p> <p>As a result of this, the global file menu has been reworked and now includes a backup option:</p> [SOLVED] Active Track Instrument https://casualcomputing.info/posts/active-instrument-solved/ Thu, 29 Jun 2023 09:50:20 +0200 https://casualcomputing.info/posts/active-instrument-solved/ <p>As <a href="https://casualcomputing.info/posts/what-is-the-current-instrument/">discussed before</a> highlighting the currently used instrument on a track in Sputter presents some challenges. What if the instrument is tweaked beyond recognition or a different wave is imported or recorded to it? Is the instrument used in the track then the same instrument which is highlighted? And what if a song is shared between two users and the receiving user does not have some of the instruments used in the song? In that case there would not be any highlighted and active instrument on some of the tracks.</p> Backup capabilities coming to Sputter https://casualcomputing.info/posts/sputter-gets-backup/ Fri, 19 May 2023 16:53:25 +0200 https://casualcomputing.info/posts/sputter-gets-backup/ <p>Because of <a href="https://casualcomputing.info/posts/user-lost-all-files/">limited file access in newer versions of Android</a>, songs and instruments in Sputter has to be saved to the app&rsquo;s internal storage. This means that when the app is uninstalled the user&rsquo;s files are deleted with it, which of course can be disastrous. It also means that there is no simple way to migrate all your songs and instruments from one device to another.</p> <p>To mitigate these issues there is now a backup feature in Sputter version 1.5.0-alpha2 which should now be available in the beta channel on Google Play.</p> What's Wrong With Sputter? https://casualcomputing.info/posts/what-is-wrong-with-sputter/ Tue, 04 Apr 2023 20:07:10 +0200 https://casualcomputing.info/posts/what-is-wrong-with-sputter/ <p>A few days ago one of those highly encouraging one star reviews was posted on Google Play. As usual it did not go into any detail and was more along the lines of &ldquo;This sucks!&rdquo;.</p> <p>Of course one should not take things like this too personal and <a href="https://www.reddit.com/r/androiddev/comments/11vgi6n/its_not_easy_to_be_an_indie_developer_but_then/">I am certainly not the only one experiencing incidents like this</a>. All in all Sputter is actually in quite good shape when it comes to ratings.</p> Reorganizing Sputter's File Handling https://casualcomputing.info/posts/reorganizing-file-handling/ Wed, 01 Feb 2023 19:32:17 +0100 https://casualcomputing.info/posts/reorganizing-file-handling/ <p>After experiencing <a href="https://casualcomputing.info/posts/user-lost-all-files/">the horror of having a user loose all files</a>, I have been considering ways to reorganize the way Sputter handles saving, exporting and importing songs and instruments. With that horror story in mind it seemed obvious that some kind of backup facilities are needed. In the same run it would also be nice to clean up the file handling UI, which for the time being is a bit all over the place.</p> Sputter 1.4.0 Released https://casualcomputing.info/posts/sputter-1.4.0-released/ Mon, 28 Nov 2022 22:07:04 +0100 https://casualcomputing.info/posts/sputter-1.4.0-released/ <p>Sputter version 1.4.0 has been uploaded and released on <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">Google Play</a>. It brings sample audio recording, which is quite fun to play around with.</p> <p><img src="https://casualcomputing.info/images/sputter-screenshot-recording.png" alt="Sputter recording interface"></p> <p>What surpises me is that even with the limited quality phone microphone, when using effects and other tweaks to the sound it can actually sound quite good in a song.</p> <p>Also quite apparent is the need for a method of tuning the recorded samples. Right now it is possible, but admittedly a bit cumbersome. One user had an interesting proposal and even made this mockup:</p> Sputter 1.4.0 Alpha1 Released https://casualcomputing.info/posts/sputter-1.4.0-alpha1-released/ Wed, 19 Oct 2022 19:45:19 +0200 https://casualcomputing.info/posts/sputter-1.4.0-alpha1-released/ <p>Sputter 1.4.0-alpha1 has been released to the beta channel in Google Play. The star of the show in this release is sample recording through microphone or other audio input device. I have already had much fun with it on my own, and I am sure many of you will too. The interface is a Snapchat-style recording button with a finite allowed recording duration:</p> <p><img src="https://casualcomputing.info/images/sputter-screenshot-recording.png" alt="Sputter recording interface"></p> <p>As you probably can spot the wave editor has also been touched up a bit:</p> The Horror: User Lost All Songs https://casualcomputing.info/posts/user-lost-all-files/ Sat, 13 Aug 2022 22:48:49 +0200 https://casualcomputing.info/posts/user-lost-all-files/ <p>A day earlier this summer I woke up to a message containing these emojies:</p> <p><img src="https://casualcomputing.info/images/user-lost-all-files-emojies.png" alt="Angry emojies"></p> <p>It turned out that a user had lost all Sputter song files. After discovering a bug the user had attempted to fix that bug by uninstalling and reinstalling the app.</p> <p>Sputter was originally designed to save song files to the phones &ldquo;external&rdquo; storage, i.e SD-card or local file storage available to all apps. These files are persistent and will remain after the app is removed.</p> Sputter 1.3.2 Released https://casualcomputing.info/posts/sputter-1.3.2-released/ Thu, 02 Jun 2022 18:08:54 +0200 https://casualcomputing.info/posts/sputter-1.3.2-released/ <p>I just received notification from Google Play that Sputter 1.3.2 has gone through all security checks and is now live in the store. This release brings several bug fixes and minor usability improvements as well as a new drum kit preset called &ldquo;Voltage&rdquo;.</p> <p>From the developer&rsquo;s perspective it is the beginning of a major refactoring to allow for optimizations with regards to performance, audio latency and battery usage. This work will be going on for some time, but it will be done in batches and there will be new features dripping in from time to time along the way.</p> Code Cleaning, Roadmap and new Demo Song https://casualcomputing.info/posts/code-cleaning-roadmap/ Wed, 16 Mar 2022 20:40:15 +0100 https://casualcomputing.info/posts/code-cleaning-roadmap/ <p>With <a href="https://casualcomputing.info/posts/sputter-1.3.0-released/">distortion and bitcrusher effects landed</a> I have determined that the time is right for a revision and cleanup of some of the code in Sputter. The outcome of that will be easier to maintain code, so that new features and improvements can be made quicker and better. As a part of that I have also planned making several optimizations so Sputter will run better on older and cheaper devices, as well as reducing audio output latency. The latter will also pave way for potential &ldquo;live&rdquo; playing and recording in the future, for example an on-screen keyboard or drum pad.</p> Sputter 1.3.0 Released https://casualcomputing.info/posts/sputter-1.3.0-released/ Wed, 02 Mar 2022 14:42:28 +0100 https://casualcomputing.info/posts/sputter-1.3.0-released/ <p>Sputter 1.3.0 has been released. This version brings much requested Distortion and Bitcrusher plugins. They make use of the <code>lowshelf~</code>, <code>highshelf~</code>, <code>downsample~</code>and <code>quantizer~</code> Pure Data externals from the <a href="https://github.com/porres/pd-else">pd-else library</a> by Alexandre Torres Porres. Also they were made with advice from <a href="https://www.youtube.com/watch?v=oIChUOV_0w4">an interesting talk on YouTube</a> by Ivan Cohen about how to make distortion effects.</p> <p>There has been made some subjective decisions in the making of these effects. Without the help and very useful feedback from the internal testers, this would have been way harder and probably would not end up as good.</p> Sputter 1.3.0 Alpha1 Released to Internal Testers https://casualcomputing.info/posts/sputter-1.3.0-alpha1-released/ Wed, 09 Feb 2022 19:13:44 +0100 https://casualcomputing.info/posts/sputter-1.3.0-alpha1-released/ <p>Today I uploaded version 1.3.0-alpha1 of Sputter to the internal testers track on Google Play. This version finally brings Distortion and Bitcrusher effects which has been requested on several occasions. They make use of the <code>lowshelf~</code>, <code>highshelf~</code>, <code>downsample~</code>and <code>quantizer~</code>from the <a href="https://github.com/porres/pd-else">pd-else library</a> by Alexandre Torres Porres. There have been some subjective decisions made, though, so feedback is highly appreciated.</p> <p>Had it not been for the many open source resources out there, like <a href="https://puredata.info/">Pure Data</a>, <a href="https://faust.grame.fr/">Faust</a> and many others, as well as many <a href="https://www.youtube.com/watch?v=oIChUOV_0w4">interesting</a> and <a href="https://www.youtube.com/watch?v=3VXA8nL4IWo">useful talks</a>, there would be no Sputter.</p> Distortion for Dummies by Dummy https://casualcomputing.info/posts/distortion-for-dummies/ Wed, 15 Dec 2021 20:56:33 +0100 https://casualcomputing.info/posts/distortion-for-dummies/ <p>The by far most requested feature for Sputter is distortion and bitcrushing. While bitcrushing is relatively easy to implement, distortion is a whole field by itself. You are not going to get a top of the line distortion plugin in Sputter, but I am aiming for a little bit more than the most basic and straightforward stuff.</p> <p>The simplest and crudest distortion algorithm is to just multiply the signal by a large amount, then hard cut it. When running through a sine wave, it looks something like this:</p> Sputter 1.2.0 Released with MIDI Song File Export https://casualcomputing.info/posts/sputter-1.2.0-released/ Thu, 18 Nov 2021 15:37:54 +0100 https://casualcomputing.info/posts/sputter-1.2.0-released/ <p>The new version 1.2.0 of Sputter is <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">now available on Google Play</a>. This version brings the long awaited MIDI song file export feature, which makes it possible to use Sputter as an on-the-go sequencer in combination with your favourite DAW.</p> <p>As a part of this the <a href="https://casualcomputing.info/posts/getting-octaves-right/">note and octave numbering has been revised</a>. Although it is <a href="https://computermusicresource.com/midikeys.html">not always</a> <a href="https://www.midi.org/forum/830-midi-octave-and-note-numbering-standard">clear</a> what octaves note numbers should correspond to, I think I got it right and in accordance with most widely available MIDI song files I have listened to. It also seems to work well with Ableton Live, Reaper and Bitwig.</p> Sputter 1.2.0 Released to Beta Channel https://casualcomputing.info/posts/sputter-1.2.0-beta-released/ Wed, 27 Oct 2021 19:13:11 +0200 https://casualcomputing.info/posts/sputter-1.2.0-beta-released/ <p>Yesterday the shiny new version 1.2.0 of Sputter was published to the Beta track on Google Play. This release brings long awaited MIDI song file export, and it means that Sputter can now be used as an on-the-go pocket music sequencer which can export songs to a desktop DAW.</p> <p>For now the MIDI song files consists of mainly the note data, BPM and velocities. There may be further improvements added down the road.</p> Getting the Octaves Right https://casualcomputing.info/posts/getting-octaves-right/ Wed, 15 Sep 2021 21:23:50 +0200 https://casualcomputing.info/posts/getting-octaves-right/ <p>The MIDI export functionality is now at a point where all notes are exported correctly, in the correct time signature and tempo. However, while I was working on this and testing MIDI file exports, I discovered a shortcoming which has been with us all along: the octaves written at the beginning of each pattern are not correct.</p> <p>For example, say you have a C note in the 5th octave like this:</p> MIDI Export: First Notes https://casualcomputing.info/posts/midi-first-notes/ Wed, 25 Aug 2021 20:56:49 +0200 https://casualcomputing.info/posts/midi-first-notes/ <p>There has been some progress made with regards to MIDI file export, and the challenge described in <a href="https://casualcomputing.info/posts/midi-export-not-so-fast/">the previous post</a> has now been solved. Actually the first MIDI file containing actual notes, with all events lined up correctly, has been exported from Sputter:</p> <p><img src="https://casualcomputing.info/images/midi-export-firstnotes-midieditor.png" alt="MIDI file exported from Sputter"></p> <p>The original song in Sputter looks like this:</p> <p><img src="https://casualcomputing.info/images/midi-export-firstnotes-sputter.png" alt="Original song in Sputter"></p> <p>As you can see the first group repeats twice, and the longest note does not retrigger, so the exported MIDI file is correct.</p> MIDI File Export... Not So Fast! https://casualcomputing.info/posts/midi-export-not-so-fast/ Sun, 22 Aug 2021 19:04:59 +0200 https://casualcomputing.info/posts/midi-export-not-so-fast/ <p>So I have looked a bit more into bringing MIDI file export to Sputter. This could be very useful, making it possible to use Sputter as an on-the-go drafting tool.</p> <p>This summer I have been reading up on and implementing code for the MIDI file format. This has gone really well. By this point it is a quite old and simple format, so writing the code for it was quite easy.</p> Sputter 1.1.4 Released, MIDI Export in the Works https://casualcomputing.info/posts/sputter-1.1.4-and-midi-export/ Wed, 18 Aug 2021 19:30:47 +0200 https://casualcomputing.info/posts/sputter-1.1.4-and-midi-export/ <p>Yesterday Sputter 1.1.4 was made public on <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">Google Play</a>. This release fixes some cringeworthy glitches in the UI, as well as an attempted fix for file export issues.</p> <p>Additionally I am happy to report that work on MIDI file export has finally begun. This has been a frequently requested feature, and would make Sputter become a decent on-the-go sketching tool for ideas to bring back home to a fully featured DAW.</p> What Is the Current Instrument in Sputter? https://casualcomputing.info/posts/what-is-the-current-instrument/ Wed, 30 Jun 2021 19:25:09 +0200 https://casualcomputing.info/posts/what-is-the-current-instrument/ <p>Initially I had intended to implement a feature suggested by several users, which I also sometimes feel the need for when using Sputter: Highlighting the currently &ldquo;active&rdquo; instrument, something like this:</p> <p><img src="https://casualcomputing.info/images/mockup-active-instrument.png" alt="Active instrument highlighted in red"></p> <p>My first thought was that this would not make 100% sense since after making a change to the &ldquo;current&rdquo; instrument, like adjusting ADSR, you are not strictly speaking on that specific instrument any longer since it has been altered. The solution proposed from a user was to mark it as &ldquo;edited&rdquo;, something like this:</p> Sputter 1.1.3 Released https://casualcomputing.info/posts/sputter-1.1.3-released/ Wed, 30 Jun 2021 19:15:09 +0200 https://casualcomputing.info/posts/sputter-1.1.3-released/ <p>At last, the changes made to Sputter during the last 10 months has been made public in the form of version 1.1.3!</p> <p>The planned automatic detection of output latency for both bluetooth and internal speakers has boiled down to a settings screen where it can be set quite easily, although manually, like this:</p> <video src="https://casualcomputing.info/videos/latency-setting.webm" poster="" controls style="max-width: 100%; border-radius: 10px; margin: 20px 0px 20px 0px"> </video> <p>Later I am planning on porting the audio engine of Sputter to the <a href="https://github.com/google/oboe">Oboe</a> library, which will allow for lower output latency, possibly also for bluetooth. In the meantime you will have to adjust it manually.</p> Sputter 1.1.2: A Dumb Release https://casualcomputing.info/posts/sputter-1.1.2-released/ Wed, 02 Jun 2021 20:37:33 +0200 https://casualcomputing.info/posts/sputter-1.1.2-released/ <p>Some days ago, this crash report was sent to my Google Play Developer Console:</p> <p><img src="https://casualcomputing.info/images/play-exception.png" alt="Crash report from Google Play"></p> <p>For those not in the know it basically means that the UI is requesting a sequence position which does not exist in the sequencer logic. This was not unheard of before <a href="https://casualcomputing.info/posts/status-next-version/">the great refactoring</a>, but I thought I had taken care of it and that it couldn&rsquo;t really happen anymore.</p> <p>I first thought this was caused by some unlikely but possible condition in which two or more threads do operations on the same data in parallel. That is a classic case in software in general, but I did not find anywhere where it seemed likely to happen.</p> Bluetooth: The good, the Bad and the Compromise https://casualcomputing.info/posts/bluetooth-compromise/ Wed, 26 May 2021 20:57:23 +0200 https://casualcomputing.info/posts/bluetooth-compromise/ <p>After a lot of messing around an researching the issue, it seems like automatically determining latency for bluetooth audio is a long shot. Not only is it hard to determine the latency, but it seems like it can vary during a session too. <a href="https://play.google.com/store/apps/details?id=com.planeth.rhythm">Various</a> <a href="https://play.google.com/store/apps/details?id=com.singlecellsoftware.caustic">other</a> <a href="https://play.google.com/store/apps/details?id=com.meteaure.polaris">sequencers</a> I have tried do not seem to attempt to do this.</p> <p>Nevertheless, I think there should be an option for adjusting this manually, in a user friendly and simple way. You might think that using bluetooth headphones is not the way to go for music making, and you&rsquo;d be right, but especially since phone vendors have been removing the headphone jack from many models, it will probably come in handy.</p> Sputter 1.1.1 Released https://casualcomputing.info/posts/sputter-1.1.1-released/ Wed, 05 May 2021 19:52:12 +0200 https://casualcomputing.info/posts/sputter-1.1.1-released/ <p>Finally, after way too much refactoring, experimenting and re-thinking, Sputter 1.1.1 finally went out the door to Google Play today. This release will probably seems quite subtle to most users, with the movement of the playhead indicator being the only visible change. However, this will pave way for <a href="https://casualcomputing.info/posts/bluetooth-latency/">better A/V sync with regards to audio latency</a>, which will be tackled in a forthcoming release.</p> <p>If Sputter is going to live a long and healthy life, it is crucial that a good foundation is layed and we don&rsquo;t end up with <a href="https://www.youtube.com/watch?v=7EmboKQH8lM&amp;t=1534s">an unrecoverable mess</a>. I realize that some of the code structures used in previous versions were not optimal and actually quite dumb. This was the reasons for several crash reports I have received through Google Play. Starting from version 1.1.1 code quality has been vastly improved, and will be cleaned up further during the next couple of releases.</p> Sputter 1.1.1-beta2 (and beta1) Released https://casualcomputing.info/posts/1.1.1-beta2-and-1-released/ Wed, 07 Apr 2021 22:00:25 +0200 https://casualcomputing.info/posts/1.1.1-beta2-and-1-released/ <p>Sputter 1.1.1-beta1 was released today. Within hours I discovered several bugs which I was able to fix, so I uploaded an additional beta2. At the time of writing beta2 is still under review by Google Play, but I assume it will be available shortly.</p> <p>The plan for me going forward is to attempt to make another demo tune and video. The smoothly moving playhead indicator brings a quite improved look and feel to the app, so this should be showcased in the video on the <a href="https://play.google.com/store/apps/details?id=info.casualcomputing.sputter">Google Play product page</a>. Another good reason for taking a break from coding to make music is being able to proper beta test the app myself. It is amazing how many bugs float to the surface only when actually using the app as opposed to just testing specific features.</p> Sputter 1.1.1-alpha1 Released to Internal Testers https://casualcomputing.info/posts/1.1.1-alpha1-released/ Wed, 10 Mar 2021 22:12:51 +0100 https://casualcomputing.info/posts/1.1.1-alpha1-released/ <p>After way too long of a development period, I am finally releasing Sputter 1.1.1-alpha1 to internal testers on Google Play. As you already know if you have been reading this blog, this version features a smooth moving playhead as opposed to the current stable version which moves 1/16th at a time. This makes for a much nicer visual look, and allows for forthcoming improved A/V sync.</p> <p>There will probably be a couple of bugs, but possibly less crashes than on the current stable version. With some luck the only faults you will experience are some minor glitches on the (smoothly moving) playhead when deleting tracks, using the Copy To function, playing with undo etc.</p> Sputter: Another Update https://casualcomputing.info/posts/sputter-another-update/ Wed, 03 Mar 2021 15:40:17 +0100 https://casualcomputing.info/posts/sputter-another-update/ <p>In the last post I mentioned I did not want to post updates unless there is something substantial to report like a new version. Quite a while has gone since then and no new updates has been made to Sputter, so I thought a status update would be appropriate in any case.</p> <p>First and foremost, there has been significant progress in making the playhead move smoothly. Here is a video showing the current working revision (sorry about lack of sound):</p> Sputter: Status of Next Version https://casualcomputing.info/posts/status-next-version/ Wed, 18 Nov 2020 21:09:54 +0100 https://casualcomputing.info/posts/status-next-version/ <p>It has been a while since I did the previous blog post. One reason is that I felt it got boring writing about incremental enhancements in the same areas week after week. The main purpose of this blog is to have a developer log of Sputter, Spitback and other developments at Casual Computing, as opposed to being a news outlet. So perhaps I should have reported some more the last weeks even if there was nothing really newsworthy going on. Also, we had a tight deadline at work the last weeks and I could not take my usual day off to work on Sputter.</p> Refactoring Madness https://casualcomputing.info/posts/refactoring-madness/ Wed, 30 Sep 2020 20:10:54 +0200 https://casualcomputing.info/posts/refactoring-madness/ <p><img src="https://casualcomputing.info/images/refactor-meme.jpg" alt="refactor-meme.jpg"></p> <p>In <a href="https://casualcomputing.info/posts/latency-compensation-preview/">the previous blog post</a>, it was described how some refactoring was needed to get the smooth playhead with latency compensation working properly. Well, it turns out that big parts of what controls song position and how it is presented in the UI has to get a relatively major overhaul. On the plus side this will fix some minor quirks and awkward code in addition to solving latency issues.</p> <p>The refactoring is necessary so that the grid playhead, groups and main menu timeline can show the same smooth, latency compensated playhead. Additionally, the notes has to draw sparks at the same time the playhead crosses them, which can be in the future relative to when they were sent to the audio hardware. The grid also might show non-retriggered notes differently, and with different velocities, depending on wether they are currently playing in the speakers or not. This makes the issue a bit more complex, as there has to be maintained a log of notes and what happened when those notes got played.</p> Preview: Latency Compensation https://casualcomputing.info/posts/latency-compensation-preview/ Wed, 23 Sep 2020 19:11:31 +0200 https://casualcomputing.info/posts/latency-compensation-preview/ <p>Today further progress has been made with smooth movement of the playhead, so that it is now possible to have it working with a fixed and hard coded latency compensation. Take a look at the following video, where the app is playing on a bluetooth speaker. Compare the playhead in the grid (left) and the playhead on the pattern (right) to the timing of the audio:</p> <video src="https://casualcomputing.info/videos/latencycompensation-hardcoded.webm" poster="/videos/latencycompensation-hardcoded.png" controls style="max-width: 100%; border-radius: 10px; margin: 20px 0px 20px 0px"> </video> <p>This seems like a big improvement over <a href="https://casualcomputing.info/posts/bluetooth-latency/">the current version</a>.</p> Smooth Playhead https://casualcomputing.info/posts/smooth-playhead/ Wed, 16 Sep 2020 21:03:26 +0200 https://casualcomputing.info/posts/smooth-playhead/ <p>As part of implementing latency compensation I thought I&rsquo;d do something about the erratic movement of the playhead in Sputter. Since the app considers a generated chunk of audio currently playing, there can be more than one sixteenth measures generated in one go. This makes for uneven speed of the playhead, especially on devices with large audio buffers.</p> <p>Today I have begun rectifying this. In a coming version the playhead will be moving smoothly along at 60 FPS, in contrast to jumping directly from one sixteenth measure to the next.</p> Bluetooth Latency Issues https://casualcomputing.info/posts/bluetooth-latency/ Wed, 09 Sep 2020 20:44:50 +0200 https://casualcomputing.info/posts/bluetooth-latency/ <p>About a week ago I was horrified to find a one star review on Google Play:</p> <p><img src="https://casualcomputing.info/images/review_outofsync.png" alt="Audio is out of sync. Sputter is a good name for it."></p> <p>At first I thought it was something wrong with the app, but then it struck me: The user is probably using bluetooth headphones, and there has not been made any effort in the app to compensate for the latency introduced by these.</p> Sputter 1.1.0 Released! https://casualcomputing.info/posts/1.1.0-released/ Sun, 06 Sep 2020 13:45:09 +0200 https://casualcomputing.info/posts/1.1.0-released/ <p>After a lot of back and forth, Sputter version 1.1.0 is finally released. Compared to the last stable version (1.0.2), this release brings:</p> <ul> <li>Possibility to select multiple notes while adjusting note properties</li> <li>Note velocity and retrigger mode are now visualized on notes</li> <li>Improved contrast on note names in the grid</li> <li>Fixed note velocities not being set when loading songs</li> <li>Fixed faulty graphics after adjusting &ldquo;Display size&rdquo; on some devices</li> <li>Some crash and bug fixes</li> </ul> <p>In addition, the note velocities are now shown in numbers on the notes themselfes:</p> Sputter 1.1.0-beta1 Released! https://casualcomputing.info/posts/1.1.0-beta1-released/ Wed, 02 Sep 2020 20:40:07 +0200 https://casualcomputing.info/posts/1.1.0-beta1-released/ <p>Finally I am pleased to announce that Sputter version 1.1.0-beta1 is released to all open beta testers on Google Play. It features the changes to the note properties functionality mentioned <a href="https://casualcomputing.info/posts/improved-note-properties/">several</a> <a href="https://casualcomputing.info/posts/note-properties-postponed/">times</a> <a href="https://casualcomputing.info/posts/note-properties-progress/">before</a>. Additionally the color of the note names in the grid are now more visible, something which has been requested from several users.</p> <p>The reason this is not in production is that there are a few minor additions I would like to make. Also, <a href="https://libgdx.badlogicgames.com/">LibGDX</a> has been upgraded to a new version in this release, and I want to make sure everything runs smoothly.</p> Sputter 1.1.0-alpha1 Released to Alpha Testers https://casualcomputing.info/posts/1.1.0-alpha1-released/ Wed, 26 Aug 2020 21:47:42 +0200 https://casualcomputing.info/posts/1.1.0-alpha1-released/ <p>The seemingly everlasting work on new note properties functionality has finally made its way into a release. Note velocities and retrigger status is now visible on the notes themselves, which makes it much easier to work with and what they actually do clearer.</p> <p>This release is only available to alpha testers. Wanna become one? Pop me an email to <a href="mailto:[email protected]">[email protected]</a> and include the gmail address you use on Google Play.</p> <p><img src="https://casualcomputing.info/images/noteproperties-velocity.png" alt="Note velocities and retrigger status are now visible"></p> Pixel Ratio Quirks https://casualcomputing.info/posts/pixelratio-quirks/ Wed, 19 Aug 2020 21:02:29 +0200 https://casualcomputing.info/posts/pixelratio-quirks/ <p>On all modern devices has a <a href="https://stackoverflow.com/questions/8785643/what-exactly-is-device-pixel-ratio">device pixel ratio</a> property. It describes how many physical screen pixels corresponds to one logical pixel in the development platform. For example, the first iPhone had a pixel ratio of 1, which corresponds to a 160dpi screen. The iPhone 4 had a pixel ratio of 2 with a screen of 320dpi. This makes it easier for developers to handle different screen resolution with regards to the physical sizes of UI elements.</p> Note Properties Progress https://casualcomputing.info/posts/note-properties-progress/ Wed, 12 Aug 2020 19:40:38 +0200 https://casualcomputing.info/posts/note-properties-progress/ <p>Finally I had the opportunity to work with the improved note properties functionality <a href="https://casualcomputing.info/posts/improved-note-properties">previously</a> <a href="https://casualcomputing.info/posts/note-properties-postponed">described</a>. This is what I have achieved so far:</p> <p><img src="https://casualcomputing.info/images/noteproperties-progress.png" alt="Current progress"></p> <p>There now is a visual representation of wether or not a note is retriggered, which will hopefully make them easier to use as well as more obvious what they do. Also, the color of the notes will be lighter on notes with lower velocity. These changes will make it unnecessary to open the note properties to inspect the velocity and retrigger status of a note. Best of all, it will be possible to select and operate on more than one note at a time, which has been a major niggle of mine.</p> New Subreddit for Sputter! https://casualcomputing.info/posts/new-subreddit-for-sputter/ Wed, 05 Aug 2020 20:03:24 +0200 https://casualcomputing.info/posts/new-subreddit-for-sputter/ <p>So I am proud to present the new subreddit for Sputter! You can visit it here:</p> <p><a href="https://www.reddit.com/r/SputterApp/">https://www.reddit.com/r/SputterApp/</a></p> <p>Hopefully people will come over there and share ideas, issues, questions or songs with each other. I will certainly keep an eye on it and will also be posting news items from this blog.</p> <p>Today I have expanded the bug reporting dialog to include links to this blog as well as the new subreddit, which is included in the new release 1.0.2:</p> Back From Vacation https://casualcomputing.info/posts/back-from-vacation/ Wed, 29 Jul 2020 19:36:24 +0200 https://casualcomputing.info/posts/back-from-vacation/ <p>After four weeks of vacation, I am finally back to my day job and of course working one day a week on <a href="https://casualcomputing.info/sputter">Sputter</a>. This year was spent within the borders of Norway (given the current circumstances) and it consisted for the most part of visiting relatives and enjoying the great nature of our country.</p> <p><img src="https://casualcomputing.info/images/vacation-fjord.jpg" alt="On the ferry"></p> <p>During this time I have also thought more about the note properties upgrade, <a href="https://casualcomputing.info/posts/note-properties-postponed/">previously mentioned</a>. There is now a complete sketch which will be implemented in the foreseeable future. But first I want to work a bit with user engagement, so the next version will feature links to social media channels in addition to the current option for reporting bugs.</p> Note Properties Postponed... For the Better? https://casualcomputing.info/posts/note-properties-postponed/ Sat, 27 Jun 2020 18:07:36 +0200 https://casualcomputing.info/posts/note-properties-postponed/ <p>UI design is a complex task, and when you have an idea which seems to make 100% sense while out and about, once you sit down and begin implementing it the devils in the details become clearer. Also, sometimes better options reveal themselves which opens up new possibilities.</p> <p>As I worked on the new note properties as described in <a href="https://casualcomputing.info/posts/improved-note-properties/">the previous blog post</a> I realised that the velocity value would not make sense on notes which have retrigger off. So I added functionality for a note to adjust its velocity while it is playing. The problem is that in real life scenarios one would probably want velocity changes to be stepless over time, so one can fade individual notes in and out, for example.</p> Improved Note Properties https://casualcomputing.info/posts/improved-note-properties/ Wed, 17 Jun 2020 20:13:17 +0200 https://casualcomputing.info/posts/improved-note-properties/ <p>If you longpress a note in the grid editor of Sputter, you are presented with options for note length, velocity and retriggering:</p> <p><img src="https://casualcomputing.info/images/noteproperties-old.png" alt="Current note properties"></p> <p>The current implementation has several downsides:</p> <ul> <li>The main menu button is obscured, so it is not easy to reach undo, redo, transport controls, etc.</li> <li>Only one note can be selected at a time.</li> <li>Velocity of notes are not visible after you close the dialog.</li> <li>There is no indication on the notes wether or not retrigger is enabled.</li> </ul> <p>So with this in mind, I designed a mockup:</p> Sputter Announced https://casualcomputing.info/posts/sputter-announced/ Wed, 10 Jun 2020 18:23:38 +0200 https://casualcomputing.info/posts/sputter-announced/ <p>Sputter was published to Google Play silently a couple of weeks ago. There was no fanfare and no announcements. This was because there was only a limited number of testers in the alpha and beta stages, and I wanted to catch as many bugs as possible before the &ldquo;big day&rdquo;. Today I have notified some relevant news sites, blogs and reddits about its existance. Already, there is a news item up on <a href="https://www.kvraudio.com/news/casual-computing-releases-sputter-music-sequencer-for-android-48879">KVR</a>, and hopefully there will be others too.</p> Developing With an Audience https://casualcomputing.info/posts/developing-with-audience/ Fri, 05 Jun 2020 13:00:18 +0200 https://casualcomputing.info/posts/developing-with-audience/ <p>Development of <a href="https://casualcomputing.info/sputter">Sputter</a> has gone on in my spare time over the last seven years or so. Before that I was working on <a href="https://casualcomputing.info/vibrafun">Vibrafun</a>, <a href="https://casualcomputing.info/kalimba">Kalimba</a>, and a couple of other apps, soon totaling to ten years of development.</p> <p>All these years I kept development to myself and a couple of friends and family until the &ldquo;big day&rdquo; of release. Posting on my blog and to social media was not prioritized and usually only (hastily) done when something was released.</p> Spitback https://casualcomputing.info/spitback/ Wed, 03 Jun 2020 17:31:30 +0200 https://casualcomputing.info/spitback/ <p>Spitback is the <a href="https://puredata.info/">Pure Data</a> patch powering <a href="https://casualcomputing.info/sputter">Sputter</a>. It is meant to be used with <a href="https://github.com/libpd">LibPD</a> in mobile apps or embedded applications.</p> <p>You can download it on <a href="https://github.com/funkyfourier/spitback">the github page</a>, under the permissive MIT license.</p> <p><img src="https://casualcomputing.info/images/spitback01.png" alt="Spitback screenshot"></p> Vibrafun https://casualcomputing.info/vibrafun/ Wed, 03 Jun 2020 16:14:37 +0200 https://casualcomputing.info/vibrafun/ <p>Vibrafun is a vibraphone, marimba and children&rsquo;s xylophone app. It can help you play several popular songs by showing you when to hit the different notes. This makes it great as an educational tool or a children&rsquo;s toy.</p> <p><img src="https://casualcomputing.info/images/vibrafun01.png" alt="Vibrafun screenshot"></p> <div class="playstorebadge"> <a href='https://play.google.com/store/apps/details?id=com.apploudable.vibrafun'> <img width="300px" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' /> </a> </div> Sputter https://casualcomputing.info/sputter/ Wed, 03 Jun 2020 13:15:30 +0200 https://casualcomputing.info/sputter/ <p>Sputter is an easy to use but capable mobile music making app. It has a mobile friendly user interface and does not require previous knowledge of music to create great tracks.</p> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/fskkvxNiOyQ?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe> </div> <div class="playstorebadge"> <a href='https://play.google.com/store/apps/details?id=info.casualcomputing.sputter'> <img width="300px" alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' /> </a> </div> About https://casualcomputing.info/about/ Wed, 03 Jun 2020 13:03:50 +0200 https://casualcomputing.info/about/ <p>Casual Computing makes simple mobile apps for sharp minds. Our apps are intended to be easy to get into, but gives you more to discover as you dive in.</p> <p>Casual Computing is for the most part run by Johannes Mario Ringheim, with some help from family and friends. I started making music in the Amiga scene in the 90s. Later I got into producing music and sound effects, as well as DJ&rsquo;ing and playing drums and percussion. At some point I got a computer science education, and the last decade or so I have made various music apps for the Android platform.</p>