MUSICAL ANDROID
  • BLOG
  • REVIEWS
  • INTERVIEWS
  • ARTICLES
  • DOWNLOADS
  • CONTEST
  • CONTEST MUSIC
  • CONTEST WINNERS
  • Contact

Syntheogen- Article by the developer Jeremy Neal Kelly

7/29/2013

3 Comments

 
Picture
I am proud to present this article written by the developer regarding his application Syntheogen which is the latest of the greatest. 
As this is a Application that is still in BETA it is interesting to read where it comes from and where it is going and what was going on in his mind developing the application Syntheogen. 
This article will be interesting for a lot of people for different reasons and am very grateful that Jeremy took the time to write this for all of us to read...

(He still calls it BETA but have not encountered any bugs and think that it is more a question of how and what extra functions will be added...)
Picture
Syntheogen Article for Musical Android

Jeremy Neal Kelly


DESIGN

Syntheogen ultimately was inspired by a second-hand drum machine I bought some twenty years ago. The machine was a Yamaha RY-10; it had a row of sixteen tiny buttons in the middle, each with a red LED above, and it was the first step sequencer I had used.

Though I love hearing music, I've rarely enjoyed making it; practice is a bore, synthesizer interfaces are maddening, and I always seem to lack the one cable I need to record my amazing riff. Step sequencers are the exception to that rule. They are fun, easy, and immediate; the step sequencer is the only interface I've seen where pressing buttons at random is actually a great idea.

They do have limitations, however. The hardware sequencers I've used offer only one row of buttons, so you cannot view or edit multiple tracks at once. Work on the 'vertical' axis — whether pitch, volume, or whatever — is neither convenient nor enjoyable, especially when bending notes. Worst of all, traditional step sequencers perform poorly outside of quadruple time, since you cannot use odd-numbered meters without losing some of your buttons. I started to make a dub track on my EMX-1, but I had to give up because triplets were such a pain.

Syntheogen is an attempt to escape those limitations. Despite the popularity of skeuomorphism, I say that software can and should transcend the limitations of hardware. In software, we can have as many buttons as we want, and those buttons can even move or change shape. At the beginning of this project, I knew I wanted a two-dimensional array of steps that would allow all tracks to be viewed and edited together. Pitched tracks would occupy multiple rows, allowing melodies and chords to be entered straightforwardly. I wanted an easy way to bend notes or entire chords. I wanted a way to divide the grid into different lengths, so that triplets and unusual time signatures could be used. I also wanted to have patterns with different lengths in the same grid, so that polyrhythms could be programmed easily. These are all things I had tried to do with hardware sequencers, but found to be difficult or impossible.

The result of all this was the Syntheogen LOOP STEPS dialog:
Picture
Where sequencing is concerned, Syntheogen offers some advanced features that (as far as I know) other Android apps lack; on the other hand, certain 'standard' features like controller automation aren't implemented at all. In some cases, I haven't had time to develop what I want, but so far I've excluded automation intentionally for reasons that relate to my design philosophy for this project.

Generally, I don't like the way automation is implemented in the applications and hardware I've used. The typical approach — where the user places the device in an automation record mode, then manipulates the control in real time — does not satisfy me. Usually there is no way to view the data without playing back and watching the controller, and no way to edit it without recording again. This design hides automation data the same way one-line step sequencers hide pitch and volume data, and that's not what Syntheogen is about.

Unfortunately, I haven't found a better way to implement this. In my work developing 'line of business' software, elegance is not required or typically even noticed. If a feature is requested, I must implement it, one way or another, even if the result is a bit awkward.

But this is a different type of project. I'm not a professional musician, and I don't expect Syntheogen to be used by many who are. My users and I make music for fun, so I think Syntheogen itself should be fun. Therefore, in this app, I would rather omit a feature if I cannot implement it in a fun and direct way. Not everything in Syntheogen meets this standard right now, but that is my goal. This approach will limit the app, in a sense, but I would rather do a few things well than do many things poorly. So, if I find a good way to implement automation, or any other feature, I will add it; otherwise, I plan to stick to the things I can do well.

DEVELOPMENT

Syntheogen was written in C++, which I know and like better than any other language. C++ supports object-oriented development, which is important for larger projects, yet it lets the developer work very close to the machine when performance is important. It also supports a resource-management strategy called RAII (Resource Acquisition Is Initialization) that is better and more flexible than the garbage collection offered by Java.

Unfortunately, Android is very much a Java platform, and does not give first-class status to C++ apps. Parts of the platform are represented in the Android NDK (Native Development Kit) with 'native' libraries that provide direct access to Android features from C or C++ code. Most platform features cannot be accessed this way, however; they can only be reached by passing through a layer called JNI (Java Native Interface) that 'translates' function calls to and from the format used by Java. JNI is difficult to use, and somewhat dangerous, as even small mistakes can crash your application. For this reason, many native developers use JNI — and by extension, much of Android — as little as possible.

This issue required that I implement my own window-management and UI control library, since using Android's controls would have required hundreds of JNI calls between the UI and the synthesis engine. Developing a full-featured UI framework is a big task, but it's something I've done before, and by relying on Android as little as possible, I was able to make Syntheogen largely platform-independent. In fact, Syntheogen was mostly developed in Windows, with Visual Studio. Even aside from the UI framework, this created a lot of extra work, but I've developed mobile and embedded applications this way for many years, and it's always turned out to be worth it. In this case, it allowed me to do most of my debugging in Visual Studio, which is fortunate, as the Android NDK debugger is almost unusable.

One regrettable early decision was to use version 1.1 of OpenGL ES rather than version 2.0. Version 1.1 is simpler, and I had used it before, but to do any serious work with OpenGL you really have to use shaders, an advanced technique provided with version 2.0 for filling shapes with images or patterns. Having chosen version 1.1, I was forced to use stencils when clipping patterns to round corners, and that is a poorly-documented, convoluted, and slow solution to an otherwise simple problem.

Another questionable decision was to make the UI layout completely independent of the display aspect ratio, to the extent that black bars are not displayed, yet the images used to render controls are never distorted horizontally or vertically by stretching. I wanted to use as much of the display area as possible, and to render all straight lines with pixel-perfect sharpness, but this complicated the way controls are laid-out and rendered while simultaneously limiting the sort of patterns and gradients I could use to decorate them. A few years ago, when it was possible to see the pixels on an average display, this might have made a noticeable difference, but today it is worthless unless you're using a jeweler’s loupe. I will have to replace a lot of the rendering code before I can improve the application's appearance much further.

SYNTHESIS

The sequencing and synthesis engine presented numerous challenges.

Sequencing is much harder than it looks; in Syntheogen, patterns repeat within loops, loops repeat within songs, and a particular step may be tied on one or both sides to other steps, even steps in other pattern iterations. Simply determining what steps will play in a given span is very difficult, and I'm surprised sometimes that it works at all.

Syntheogen is my first audio application, and I developed the synthesis engine from scratch, so there was a lot of theory to be learned. I studied Dodge and Jerse's 'Computer Music', and I read much of Curtis Roads' 'The Computer Music Tutorial'. The Dodge and Jerse book was useful, but it contains serious gaps that a working synthesis developer must fill elsewhere. It also contains frustrating math errors that were especially aggravating given the book's ridiculous price. The Roads book is very popular, but I found it only occasionally worthwhile. Though it's very large, the book's coverage is surprisingly superficial, and I can't forgive an author who wastes my shelf space with a full-page photograph showing me what a compact disc looks like. I had to go to the KVR Audio forums to find a good general-purpose filter, and to learn more about reverberation algorithms.

There's a rule that warns software developers not to optimize any length of code unless they know with certainty that a bottleneck exists there. Normally I'm careful to honor this rule, but I rarely felt I had that luxury when developing Syntheogen. In most applications, the processor spends much of its time idling while waiting for user input. In a synthesis app, during playback, the processor receives a constant stream of lengthy tasks, and it can idle only if it finishes a given block before receiving the next. My constant worry was that, if I did not optimize everything in the synthesis path, I would end up with an app that perhaps contained no bottlenecks, but was instead everywhere too slow. In a sense, the entire synthesis engine constitutes a bottleneck, simply because of the way it is used. Optimizing so liberally created a lot of code that was difficult to write and remains difficult to read. I've been pleased with Syntheogen's performance, though, so I think that was the right approach.

PLANS

I'm generally happy with how Syntheogen has turned out. It's interesting to compose a song with a synthesizer you wrote yourself, and to know in detail that everything you hear is the output of some relatively simple math operations.

There is still a great deal of work to be done, though. Some obvious omissions, like chorus and phase effects, must be remedied. Advanced users will want sample editing and MIDI export capabilities. None of these things are especially difficult, just time-consuming.

Now that I've used Syntheogen awhile, I find some tasks to be a bit awkward. When setting up a new loop, the user must create many loop elements and tracks, and I would like a way to automate that. Also, when setting synthesis parameters, there is no way to hear your changes without playing a pattern, which you may not have yet. I would like some way to audition the patch from the TRACK SYNTH and TRACK EFFECTS dialogs, but I'm not sure I want to sacrifice the display area needed for even a small keyboard. These and other issues will be addressed, and naturally, I'll be raising the price as I do so.

I could attempt to produce a full-featured DAW, but I don't think that's a realistic goal for mobile devices, and it's also not what I want to use. What I really want is something like a harmonica. The harmonica can't do everything, but what it does do, it does better than anything else, and it does it in a way that it is compact, durable, inexpensive, easy, and fun. Hopefully, by narrowing my focus, I can approach that standard with Syntheogen.

---------------------------------------------------------------------------------------------------------------------------------------------------

So what more is there to say than support the developer!!!
The application is good already and will be better- 
Have functions that does not exist in other multi track applications and sound wise it comes with quality and implementations you won't find in other Android applications- 
All for the price of a coffee.

Playstore link:
Syntheogen

Homepage:
http://www.syntheogen.com/about.html

PDF file of the article:
syntheogen_article.pdf
File Size: 311 kb
File Type: pdf
Download File

3 Comments
Rej Poirier link
7/29/2013 11:18:20 am

Nice article Jeremy. Thanks to Frank for putting it up.

I share many of your development methods and philosophies. I've said it before on KVR but I really like that you've chosen a visual style all your own, it's very clean and inviting.

Most of my stuff is C/C++ NDK too and I debug primarily on Windows with VStudio. So ... now that you've told us you have it working on Windows... are you going to release it for Windows? :D

I don't doubt you're capable of writing chorus and phaser effects, but hit me up if you need some basic code for them, save you some time looking / designing...

Reply
Jeremy Kelly link
7/29/2013 12:46:52 pm

Thank you, once again, that's very generous. I think I'm okay on coding the effects-- especially the flanger and chorus -- the challenge is mostly finding time for them. It would be interesting to compare notes some time, though. The phaser seems more challenging; I'd like to do 'proper' sub-sample time shifting with all-pass filters, and those are a bit mysterious to me. However, I got some promising books recently (Miller Puckette's 'The Theory and Technique of Electronic Music' and Will Pirkle's 'Designing Audio Effect Plug-Ins in C++'), and they appear to offer the sort of detail that my other books lack. With both synthesis and effects, it seems like the hard part is not coding the algorithms, but understanding and selecting which of the many techniques to use. That, and producing something that's actually useful and musical. It's not hard to clip a waveform or chain a few delays to create reverb, but designing something that sounds decent over a range of inputs? That's a lot harder than I thought it would be.

As for releasing the Windows build... Well, I'm not against it. I use multitouch gestures in the sequencer, and I'm not sure how to make those usable with a mouse. Also, I'd have to do some work to make the Windows version of my Asset Manager abstraction less ugly. People seemed really excited about running Caustic on Windows when you released it; have they been using that a lot? The Windows build is great during development, but I think both our apps are more fun on a tablet.

The stuff I'm seeing about Caustic 3 has about knocked me on the floor, by the way. That is amazing work, especially what I heard in those demos from EIPStudios. How do you do it?

Reply
Rej Poirier link
7/29/2013 03:28:31 pm

It's hard to tell how much people use my Windows version as I don't have any metrics code or anything in there to see how/if people use it. I just had more and more requests asking if I was going to "port" Caustic to windows so I decided to bite the bullet, clean up my mobile-specific things and release (well, mostly. some thing like File mangement UI would have been better using the windows dialog, instead I just plugged into the filesystem using my own). I agree it's more fun on tablet.

Multitouch is another issue. When I started Caustic, the few multitouch devices out could barely differentiate between two points correctly so I wrote around it. I'm only starting to add stuff like that with V3.

Caustic 3 is the result of years of bits and pieces that never fit into any other release lumped together. It's more than just the 6 months of work. Most of the new synths and features come from users' suggestions, studying other apps, reading up on how things work and converting whitepapers to code. I'm learning as I go along too. :-)




Leave a Reply.

    Please, pretty please make a donation to
    ​Musical android You can do it! It will feel amazing afterwards!!!

    RSS Feed

    Follow @MusicalAndroid1

    MAIN BLOG 

    All
    1 Bit
    303
    4 Bit
    7Pad
    8 Bit
    Ableton Link
    Ambient
    Android Emulator
    Animation
    Anmation
    Apk
    Arduino
    Art
    Article
    Audio Editing
    Audio Evolution Mobile
    Audioroute
    Audiotool
    Augmented Reality
    BandLab
    Bass
    Beatonal
    Beat Snap
    Beta
    Binaura
    Blacbeard
    Bluestacks
    Bluetooth
    Bytebeat
    Caustic 2
    Caustic 3
    Caustic Core
    Chiptune
    Chiptune Sunday
    Choir
    Collaboration
    Collaborative
    Common Fm
    Composing
    Contest
    Controller
    Cosmo Koroly
    Csound
    DAW
    Design
    DIY
    D.I.Y.
    DJ
    Documentary
    Downloads
    DRC
    Drone
    Drum Machine
    Drums
    Dub
    Easy Sundays
    Eclipse
    Effects
    EiPStudios
    Emulator
    Experimental
    Film Making
    Films
    Fl Studio Mobile
    FM Synthesis
    Forums
    Frank Malm
    Game
    Generative
    Gilzad
    Glitch
    Google
    Granular
    Graphic
    Groove Box
    Groove Machine Mobile
    G Stomper
    G-stomper
    Gstomper 3
    G Stomper Producer
    G-Stomper Producer
    G Stomper Rhythm
    G-Stomper Rhythm
    G Stomper Studio
    G Stomper Studio
    Guitar
    Happy Sunday
    Hardware
    Ideas
    Ideas-to-develop
    Ik Multimedia
    Imageline
    Interesting
    Interview
    Jasuto Modular
    Korg
    Laweffect
    Loopstack
    Magick
    Mastering
    Mazetools Soniface
    Metamodules
    Microtonal
    Midi
    Mikrowave
    Mixing
    Mobile Devices
    Mobmuplat
    Modular
    Monthly Compilations
    Moon Dub Media
    Multi Media
    Multi Track
    Musical Android
    Musical Interlude
    Music Band
    Music Maker Jam
    Music Releases
    Music Reviews
    Music Studio
    Music Theory
    Mysterious Saturday
    Mysterious Saturday
    Nanoloop
    Nature Oscillator
    Nightradio
    Ninja Jamm
    Noise
    Notation
    Note Recognition
    N Track Studio
    N-track Studio
    On Sale
    Oscilab
    Other
    Palm Sounds
    Phase 84
    PhonoPaper
    Photo
    Physical Modeling
    Piano
    Pixelwave
    Pixilang
    Pixitracker
    Pixivisor
    Playstore
    PPP
    Practice
    Presets
    Production
    Programming
    Promo Codes
    Promotional
    Pure Data
    PureSynth
    Quantum VJ HD
    Radio
    Ramblings
    Rd 4
    Reactable
    Recording
    Record Label
    Reloop
    Remixlive
    Roli Noise
    Sample Instrument
    Sampler
    Samples
    Samsung
    Sequencer
    SFZ
    Skarabee
    Software
    Songtree
    Soundcamp
    Soundcloud
    Sound Design
    Sound Effects
    Soundfont
    Soundtestroom
    Soundtrap
    SpaceCraft
    SpaceCraft Granular
    Spc Music Sketchpad
    Spectrumgen
    Stagelight
    Strings
    Sunday Film
    Sunday Relax
    Sundays
    SunVox
    Supreme Mpa
    Syntheogen
    Synthesizer
    The-hidden-master-samples
    Theremin
    Training
    Tuner
    Tutorial
    Ufxloops
    Updates
    USB
    Utilities
    VA Beast Synthesizer
    VA Beast Synthesizer
    Va-beast Synthesizer
    Video
    Virtual ANS
    Virtual Instrument
    Virtual Reality
    Visuals
    Vocal
    Vocoder
    VST
    Vsti
    VuKNOB
    Waveforms
    Websites
    Wejaam Sequencer
    Wotja
    Yellofier
    Zombie Queen

    Archives

    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013

Picture

Home page

Copyright of everything published on this website belongs to the creators unless mentioned otherwise.