Aw, shucks.

It’s nice to get recognition for your work especially when it’s unexpected.

This week the littleBits project page is featuring my Arduino tone sequencer project. This is a good project for people just starting out with the littleBits Arduino and sound. Not very much hardware is absolutely required — just a littleBits Arduino, a power module and a synth speaker module.

littleBits is building an on-line community of builders, coders and inventors. They want to make hardware and software technology accessible to as many people as possible. This is a terrific goal and something that I believe in as well. It’s the main reason for this site, too.

If you build a project with littleBits, I encourage you to add your project to their site. Click on the “Upload your invention” button on their project page and the site takes you to a user interface (UI) that guides you through the process of uploading your invention. The UI puts your project into a standard project format. You are free to add as much or as little to your project page. I had the most success (and fun) with the new UI which littleBits are introducing.

Helpful hint: Browse a few of the existing projects before entering one of your own. Get an idea of the kind of information that is published on a project page. Create a rough draft in a text editor. Being prepared let’s you concentrate on learning the ins and outs of the UI without worrying about content at the same time.

My project page at the littleBits site provides just enough information to get rolling. The tone sequencer project page on this site provides more information about the software design and it has links to the latest code. (Yeah, I do update things when I find bugs.)

I’m using this project as a base for a more advanced tone sequencer that generates envelope trigger and filter modulation signals. The advanced sequencer integrates the Arduino with littleBits synth modules. Stay tuned!

NAND flash data retention

In my previous post, I raised the issue of NAND flash data retention. Even though vendors describe NAND flash memory as “non-volatile,” data can and will eventually be lost. The issue is “When?”

If this question peeks your interest — and it should — please read the Spansion Practical Guide to Endurance and Data Retention . This is a very well-written, easy-to-read white paper.

Basically, reprogrammable non-volatile memory is rated for endurance and data retention. Endurance is the number of sector erase operations that may be performed before failure. Erase operations are performed on a sector basis (i.e., not per-byte or per-bit.) Software can alleviate this problem by distributing erasures evenly across sectors, marking out failed sectors, data refresh, etc.

The Spansion 8Gbit NAND flash device (Spansion S34ML08G1) is rated for 100,000 erasures. Fortunately, we don’t write (and thereby erase) locations in wave memory very often. Further, we don’t write (erase) locations in voice, performance, pattern, etc. memory very often either. (Please don’t forget that user data is often stored in reprogrammable non-volatile memory, too!) As given in the table in the Spansion article, you could write (erase) a sector every 53 minutes (average erase frequency) or 27 times per day and still attain a 10 year device lifetime.

Data retention is the period of time for which data are reliably retained and retrieved. Data retention is affected by “temperature and voltage, electrostatic environment,
exposure to radiation, cumulative erase cycles, etc.” That’s right, data retention decreases with the number of erase cycles, too. Erasure introduces minute defects into memory cell structure and these defects accumulate. Fortunately, again, we’re looking at relatively low erasure frequency for wave and user data memory.

Quoting the article, “Spansion single-bit-per-cell floating-gate flash devices are designed to provide 20 years of data retention after initial programming when exposed to a 55°C environment.” Data retention time is 10 years when the cumulative erase cycles per sector is 1,000 erasures or less.

So, should you worry that your synth or arranger workstation will lose its contents? Probably not. I would worry more about pressing the wrong button at the wrong time and accidentally losing my work! (You are backed up? Right?) However, as a manufacturer, I would definitely anticipate some data failures in the long run and have a means to restore original factory programming through a field service program. The PSR/Tyros products, for example, do a quick wave memory self-check at start-up. One or two such failures have been reported on the PSR Forum. Presumably, the memory devices can be replaced and reflashed by a qualified service technician.

Sleep tight, but don’t forget to back up your data. Overall, you are your own worst enemy when it comes to data loss!

Yamaha MOX6: Retrospective

Yamaha are inviting MOX/MOXF owners to sign up for interview sessions about their experience with the MOX/MOXF series instruments. Participants must fill out a pre-interview survey. I decided to sign up and just completed the pre-interview survey. (It’s not too different from the recent public Motif/MOX customer survey, BTW.) This got me thinking about playing, programming and using the MOX6 and I realized that I have never posted retrospective comments about the MOX6. So, here goes.

The MOX6 is currently my “go to” keyboard for live performance. I like the portability of the MOX6 (a major pre-sales consideration) and take it to my weekly church gig. The MOX6 replaced my previous go to keyboard, the Roland XP-60.

Our church group plays a wide spectrum of liturgical music. About one third of our repertoire is “soft pop”, one third is “contemporary classical,” and the remaining third is split between Gospel and traditional church music. I use sounds that range from soft pads, to strings, to classical woodwinds, to B-3 and pipe organ. That’s a lot of sonic territory and the MOX6 does a good job covering it. I would definitely recommend the MOX6 and its younger sisters in the MOXF series.

I have two banks of Voice Mode patches. I rarily, if ever, use Performance Mode or Master Mode live. The 16 voices in each bank are the sounds that I rely on for 95% of the repertoire. Sounds in the Favorites Category handle the remaining 5% of the tunes. I need to make quick voice changes while playing and the next sound I need is only one button press away. This is great!

There is one major downside to changing voices. The MOX6 cuts off the notes being played with the current voice when the next voice is selected (i.e., when the voice selection button is pressed). This is really bad. For example, I might be playing and holding a string pad at the end of a verse while selecting the voice for an upcoming solo. Nothing shouts “Phony” like a string section that gets turned off like a light switch!

I use quite a few classical instruments such as oboe, French horn, string section and brass. Generally, these instrument sounds are very good. The classical flute, however, could use some work. I would love to have Super Articulation voices come to the MOX/MOXF series. Yes, yes, I know I can program my own SA-like voices using Extended Articulation (XA), but SA and SA2 voices are so darned playable and expressive right out of the box. I wonder how many musicians have either the technical expertise or time to program SA-like voices? Providing the tools to make an SA-like voice is good, but it is really only part of Yamaha’s job. Yamaha’s sound designers are much better and clever than we are.

I generally don’t use factory voices. At the very least, I reduce the effect levels to get a cleaner sound for the natural acoustic environment of the church. I also build a set of layered voices (e.g., horns+woods, flute+clarinet) that I’ve come to depend upon over the years. Deep voice editing is essential.

I realize that I could create layers using Performance Mode and then select either voices or performances through Master Mode. Voice Mode layers may be a case of personal inertia although it means that I do not need to learn or deal with Master Mode. Yeah, laziness could be at play, here.

Quite a bit of repertoire is Gospel-inspired or flat out Gospel. That means B-3 organ. The MOX6 organ is sample-based, not modeled. I have several go to patches that have “my B-3 sound”. These patches use the Assignable Function (AF) buttons to bring in additional footages. The assignable foot pedal controls the rotary speaker speed. By and large, this gets the job done.

I still own and play a Nord Electro 2 (NE2). Ideally, I would have both the MOX6 and NE2 at the gig. Unfortunately, I do not have much time to set up and tear down, plus there is the added schlep factor of a second keyboard. I genuinely miss being able to play the drawbars. The NE2 rotary speaker effect is more visceral than the MOX6 rotary speaker effect even though the NE2 is an older and less current keyboard. Kicking the Leslie on the NE2 lights up faces; the MOX6, not so much. I hope that Yamaha migrates the Reface YC technology and controllability into the Motif/MOX workstations. We desperately need “scanner vibrato” emulation and rotary speaker improvements are always welcome. I would love to see the next Yamaha workstation threaten B-3 clones.

Speaking of organs, the MOX6 pipe organ is weak. It sounds fine on its own for relatively mellow organ pieces. Unfortunately, the sound gets lost in the rest of our ensemble (especially when we have two 12-string guitars drenching the spectrum). The Yamaha synth engineers need to visit the folks that produced the Church Organ expansion pack for the S-series arrangers or the folks who created the Tyros Organ World. These are some pretty fine pipe organs!

My other main use for the MOX is producing styles for the PSR/Tyros arrangers. The Motif/MOX series have a wonderful, built-in library of musical phrases (arpeggios). The factory performances (based on the library phrases) are well-programmed and are darned fun to play. Occasionally, a comment will pop up on a user forum wishing that the MOX was more “arranger like” with auto fill-in, etc.

This user-want prompted me to translate and create PSR/Tyros styles from MOX performances. I use Performance Record to put down the patterns for the four main tracks in the style and write the result to a Standard MIDI File (SMF). I transfer the SMF to a PC-based DAW (SONAR) where I insert the markers, program change, and effect selection MIDI messages for the style. Finally, I use a few of the third party tools available on the Web to insert proprietary style-specific information (e.g., the CASM and/or OTS sections) into the style file. The end result is a performance that plays like a style — on the target arranger, of course.

I enjoy this kind of “content creation” as much as playing. (This feeling should be plain from the posts and content on this site.) Each activity exercises different parts of my brain. I also get to explore the funkier, jazzier corners of my cranium.

One thing that is clear in either the synth or arranger user communities, is that people want to be able to add new musical content like phrases (arpeggios) or styles. A musician can create an MOX6 arpeggio, but this process is not for the faint of heart. Nor is this process at all efficient when a new “full” performance needs 24 new arpeggios! Future workstations should have an easier path for adding new user phrases.

The Motif/MOX Performance Editor app for iPad is a real boon for creating performances. This app lets me pull together a set of arpeggios in a user friendly and fun way. I would really miss this app because the MOX display is rather small and sometimes crowded. There is also a well-known learning curve when it comes to navigating the screens, menus and buttons. The app recreates much of the information and control implemented in the Motif series with its larger screen. (I have tried editing through the Motif screen recently and it is much better than the MOX. You get what you pay for.)

Performance Record is a great feature for song creation. Once learned, one can work really work fast. Currently, the musician switches arpeggios using the special function (SF) buttons below the display. The position of the buttons makes for awkward gestures when recording. It’s much easier to switch sections on an arranger where the buttons are located at the bottom left just above the keyboard. Perhaps synth workstations need a (programmable) row of buttons just above the keyboard, too.

My work process produces an SMF that I transfer to PC via USB flash drive. Clearly, I’m not using the DAW integration features of the MOX6. I think the market has passed by this aspect of the MOX6. There are many inexpensive MIDI controllers (like the Korg Taktile) that have a larger number of programmable buttons, sliders, knobs and pads. Further, these controllers integrate with DAWs like Ableton Live and are not focused on Cubase. If the DAW features were removed from the MOX6, I wouldn’t miss them. (I’m currently learning Ableton Live and use a Korg Triton Taktile as a controller.)

The MOX6 has been ultra reliable. Many people complain about “plastic synths.” The MOX has been robust enough although I try not to handle it too roughly. (Good advice for any electronics.) Metal may be reassuring, but that sense of security is heavy! I schlep the MOX6 at least once a week and often move it in and out of my studio. I like its light weight. The only reliability concern has been making sure that the AC adapter plug cannot be pulled out during performance. I usually wrap the power chord around the keyboard stand once or twice.

Overall, I’m a satisfied customer. I purchased the MOX6 approximately one year before the release of the MOXF series. MOXF features that I would appreciate are the additional options for assigning the knobs and the sample expansion memory. I purchased the PSR-S950 knowing that I could expand its sound set through its expansion memory and that its Church Organ expansion pack is first rate. If I had a MOXF, I would add pipe organ samples/voices. (BTW, I created and distribute a “scat voice” expansion pack for the S750/S950.)

I really enjoy playing the MOX6! Since I skipped the MOXF, I’m keenly interested in the next generation of Yamaha synth workstations.

How to import new MIDI phrases into MMS

The Yamaha Mobile Music Sequencer (MMS) app for iPad is a fun tool, but it cannot import MIDI files or new musical phrases. This limits its real-world usefulness. One way to import MIDI is to slave MMS to another sequencer and play MIDI track by track into MMS. If your goal is new phrases for remixing or composition, you then face the laborious task of cutting, pasting and editing new phrases. Overall, this process involves a lot of manual work!

I just finished experimenting with a backdoor method for importing new MIDI-based musical phrases into MMS. See this page for all of the gory details.

MMS phrases are stored in Apple binary property list files (plist) with the “yms2” extension. The Apple plutil tool prints plist file contents and converts a plist file between XML and binary form. The XML provides a way into the guts of a phrase file and lets you change phrase properties or, ta da!, replace the MIDI data with your own MIDI data. The MIDI data in the binary yms2 file is a Standard MIDI File (SMF). The MIDI data must be encoded in base64 text format when working with XML. Fortunately, there are plenty of base64 conversion tools available on the web.

Once you have a new yms2 file in hand, use Apple iCloud or iTunes file sharing to transfer the yms2 file to your iPad and MMS. Be patient, though. Sync’ing is not instantaneous and it may take several minutes for the phrase file to make its way into MMS.

As a test, I converted the main and fill sections of the PSR-S950 “Jazz Funk” style to 60 (!) new MMS phrases in yms2 format. As Lou would say, here’s your sweet taste. The ZIP file decompresses into 60 phrase files with the “yms2” extension. Through iCloud, you’ll need to transfer these files to the mobile documents folder belonging to MMS. When you launch MMS, it will import the new files and update its internal catalog of phrases.

Giving DetroitBeat “Soul”

I decided to have another go at Yamaha audio style conversion. This time I converted the PSR-S950 “DetroitBeat” audio style to an all-MIDI style called “DetroitSoul”. The name “DetroitSoul” seemed appropriate since most of the MIDI rhythm parts are taken from the Yamaha preset style “Soul”.

The conversion process was a little different.

  • Load DetroitBeat to set up the mixing console and the DSP effects.
  • Enter Style Creator and create a new style. Turn off the audio part.
  • Copy all non-rhythm parts from the MAIN and FILL IN sections of DetroitBeat into the new style.
  • Identify candidate donor styles for the MIDI rhythm parts. The “Soul” and “MotorCity” styles sounded the best (e.g., similar groove, no conflicting beats, etc.)
  • Audition the candidate MAIN and FILL IN sections. “Soul” was the best fit.
  • Copy the RHY1 and RHY2 parts from “Soul” into the new style (DetroitSoul).
  • Build a table of possible donor styles for the INTRO and ENDING sections.
  • Audition donor INTRO and ENDING sections which have the same length as the INTRO and ENDING sections in DetroitBeat.
  • Copy the donor INTRO and ENDING sections into the new style.
  • Double check and fix up the variation effect (DSP1).
  • Copy the OTS settings for DetroitBeat into the new style.

The process was smooth, but still required a lot of button pressing!

Here is a table with INTRO and ENDING section lengths. This table could come in handy when converting other audio styles to MIDI.

Section   DetroitBeat  Soul  MotorCity  FranklySoul  70sChartSoul
-------   -----------  ----  ---------  -----------  ------------
INTRO 1        1        (1)      1           1            1
INTRO 2        4        (4)     (4)          5            4
INTRO 3        8         4      (8)          8            8
INTRO 4        1         1       1           1            1

ENDING 1       2         1      (2)          2            2
ENDING 2       5         3       3           2            3
ENDING 3       5         4      (5)          4            4
ENDING 4       1        (1)      1           1            1

The parenthesized items in the table indicate the source rhythm sections that were copied to the new style. Please note that nothing was copied into ENDING 2. I couldn’t find an appropriate replacement and the ending sounded good enough by itself. Sometimes the right thing to do as a musician is lay out!

ENDING 3 ran on a little too long and the extraneous beats sounded like the drummer made a mistake. I shortened the section length to 4 bars.

DSP1 is configured as a SYSTEM variation effect. Here are the effect settings and parameters:

Category: REAL DIST
Effect: ST AMP VT

COMP SW          ON
COMP SUSTAIN     0.4
COMP LEVEL       6.0
DIST TYPE        Crunch
DIST DRIVE       7.8
DIST EQ          Mid Boost
DIST TONE        7.0 
DIST PRESENCE    6.0
DIST OUTPUT      24

Overall, the end result is musical. The Soul beat is not quite the classic Motown groove. (Think “I Can’t Help Myself (Sugar Pie Honey Bunch” by the Four Tops.) I have a few phrases from the old Yamaha QY70 that might fit and someday I’ll look into it. In the meantime, enjoy the new style DetroitSoul.

Way back in ’97…

Way back in the 1990s, Yamaha developed and sold the QY series of ultra-portable MIDI sequencers. The penultimate model in the QY series is my pal the QY-70 (purchased in 1997). I still occasionally use the QY today and this post is my mini-shrine.

The QY-70 combines a MIDI sequencer, a tone module, a Chiclet keyboard, and arranger-like chord recognition, styles and controls. The QY is about the size of a chunky video game controller and that’s a lot of functionality for a small box of that size! The tone module is a complete XG-compatible sound generator which still interoperates with XG-compatible software and hardware (like the Yamaha Mobile Music Sequencer iPad app). The QY can be attached to a standard MIDI keyboard (or computer) through 5-pin DIN plugs. This makes it easier to enter notes and controller data. You can also split the keyboard and play the QY like an arranger with chord recognition in the left hand.

The QY-70 has a lot of content: 128 styles based upon an internal library of 4,167 phrases. A musician can create new phrases from MIDI data and can create new styles from the built-in phrases and user phrases. The QY-70 can import and export Standard MIDI Files (SMF) through the PC-/Mac-based QY Filer program.

Of course, in many ways, the QY-70 shows its age. The XG sounds suffer from short loops and the effects are not up to the quality of modern day algorithms. Chord recognition is a little bit rocky although one can split the keyboard into three zones such that “On Bass” (slash chords) can be played. The QY lacks a true auto-fill, auto-start and auto-stop which are essential for live performance. The QY styles also sound dated. Certain styles (rock and pop) were pretty lame back in 1997 and probably did a lot to give arranger keyboards a bad name.

However, the QY does a great job integrating the sequencer, tone module, arranger functions and content. Workflow is smooth. If necessary, the musician can drill down and edit MIDI event and controller data in scrollable “event list” format. In fact, the QY’s editing support was comparable to computer-based sequencing programs of its day such as Opcode Musicshop or MOTU Freestyle. The editing facilities exceed those of some contemporary, high-end arranger keyboards such as the Yamaha Tyros.

I still use the QY-70 from time to time because its workflow is compatible with my musical process. I don’t really write original tunes, but quite often, I have the lead sheet for a new song that I need to learn. This is where the QY’s pattern and chord tracks come into play. I first annotate the lead sheet with measure numbers, main sections (A or B) and fills. Then I enter the chords, choice of style and style sections (main A, fill-AB, etc.) into the QY. The editor is simple and easy to use although it forces one to scroll linearly through the song. In literally ten minutes, I have a basic accompaniment and then can play (and possibly record) the melody against the backing track.

This is the kind of process that I wish I could use on the Yamaha MOX. The MOX is not an arranger keyboard and does not have the same notion of pattern and chord tracks. The QY’s pattern and chord tracks are independent such that I can easily change the choice of style or style section. This capability is great for trying out a tune with a whole different style/attitude. The style and chords are cooked into a MOX pattern section when the section is recorded and experimenting with style means re-recording entire sections.

You can see QY-like technology at work in modern arranger keyboards and the Yamaha Mobile Music Sequencer. The Motif, MOX, PSRs, and Tyros all have a built-in library of musical phrases although they use these phrases quite differently. The Motif/MOX expose the phrases as playable arpeggios while the PSR/Tyros keyboards embed the phrases into styles. It’s fun to MIDI the QY to the MOX and play the QY styles through the MOX sound engine. It’s amazing how much better some of those old styles sound when played through a decent sound engine! Unfortunately, you lose the power of an integrated tone module and sequencer.

The Yamaha Mobile Music Sequencer (MMS) strips away the concept of a style and is 100% phrase-oriented. Songs are broken into sections where each section is a group of phrases that play concurrently. MMS follows the chord progression that is programmed into a song section and harmonizes the phrases in the section. The musician arranges the sections into a full song arrangement. Sounds are produced through software virtual instruments that are better than the QY, but not as good as the MOX.

MMS comes with a library of rock and pop phrases. Yamaha sells the QYPACK that, holy smokes, is a subset of the old QY-70 phrases! Thus, a small part of the QY-70 lives on. The QY phrases get a sonic bump from the virtual instruments. The MOX phrases (arpeggios) are vastly superior since they are derived from later, better-played arranger styles (circa 2007) and the superb MOX sound engine.

All in all, the QY-70 is still a fun, useful tool for song writing and arranging. If there’s a computer science lesson in all of this, it’s the power of good standards like 5-pin MIDI, XG and General MIDI. 5-pin MIDI lets musicians mix and match hardware and software — something which is lost with MIDI-over-USB.

I’ll have more to say about MMS and arranger keyboards in future posts.

Science!

And shout that word like Thomas Dolby!

I’m in the process of transitioning the site to its new domain name, sandsoftwaresound.net. So, here’s just a few philosophical thoughts in the meantime.

I’ve been reading “Weird Life” by David Toomey. His book is very well written — one of the best bits of science writing that I’ve read. He teaches nonfiction writing at UMass and deserves a tip o’ the hat for bringing this aspect of biology to a mass audience.

In one paragraph, he summarizes the essential elements of an experimental science. A science is a body of theory which is testable and verifiable through experimentation. Robust theory allows us to make predictions and to design new experiments. BTW, if the theory is valid, then experiments should be reproducible, too.

I like program profiling and performance analysis as a field because it is one of the few areas in computer science that exemplify experimental science. Performance events and counters give us the means to observe and measure the behavior of our programs in interesting ways.

I especially love it when I can predict an outcome such as the number of operations performed by a program. On the flip side, I especially hate it when I cannot make predictions. This is the main reason that I dislike performance events with ill-defined behavior or hardware that doesn’t provide a stable time reference. This situation is like giving an astronomer a rusty telescope with a crummy warped lens. How can an experimental scientist make observations and take measurements with a broken instrument?

These limitations aside, I would still encourage teachers and students to study performance measurement and analysis. These activities are a fun and different way to think about programs and the underlying computational engines. If enough of us band together, we even may be able to convince computer manufacturers about the need for well-defined, reliable performance monitoring and measurement!

If you’re looking for another good read, please consider Lance Fortnow’s “The Golden Ticket.” It’s an introduction to the P-NP problem and is also geared toward a broad audience. If a high school student (or anyone else!) thinks that computer science is “just programming,” please point them toward this book.

What’s this all about?

Electronics and computing are great hobbies. You can even make a career out of them!

I’m a computer scientist and engineer who is exploring Raspberry Pi, Arduino, Papilio and other terrific, low-cost toys. I’m hoping to share my knowledge and discoveries as I go along so that you can benefit from my experience, too. Students and educators are especially welcome! In addition to new information and activities, I will eventually post classroom material about data structures, computer architecture, and computer design which I used when teaching these subjects.

Thanks for visiting this site and I hope that you will check back often for updates. For the moment, comments are closed. Once I gain a little more expertise with WordPress, I will open the site for comments. Thanks, again.