creating music / compositions (chiptunes) with Mozzi

680 views
Skip to first unread message

Eric F.

unread,
Sep 24, 2014, 3:19:56 PM9/24/14
to mozzi...@googlegroups.com
Hello,

I see interesting Mozzi projects which are about creating synth so you can use them for live performance for example. But I can't find any project or sample for actually composing / playing premade music. Would it be possible to use a soundtracker such as milkytracker and then convert it to notes for the arduino + Mozzi? Are there some sample projects for just playing some tunes in Mozzi?

Michael Bunsen

unread,
Sep 24, 2014, 5:52:58 PM9/24/14
to mozzi...@googlegroups.com
Miditones is a script that will convert a midi file into a list of bytestrings that you can play polyphonic melodies with using Arduino Playtune. 

Miditones script:

Playtune project:

Both are old projects, but I've used Miditones recently and it worked great. Here's an example for Teensy that manually loops through the notes from Miditones without Playtune:

I would love to see simpler examples of programming sequences as well.

On Wed, Sep 24, 2014 at 3:19 PM, Eric F. <efor...@gmail.com> wrote:
Hello,

I see interesting Mozzi projects which are about creating synth so you can use them for live performance for example. But I can't find any project or sample for actually composing / playing premade music. Would it be possible to use a soundtracker such as milkytracker and then convert it to notes for the arduino + Mozzi? Are there some sample projects for just playing some tunes in Mozzi?

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mozzi-users/1be62a72-c272-4243-95d9-2b53d1a63269%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric F.

unread,
Sep 30, 2014, 8:06:50 AM9/30/14
to mozzi...@googlegroups.com
thank you for the links. I don't own a Teensy, but the playtune tool is working quite well. I didn't manage to get it to work in the first place, and I had to change some of the syntax. I've posted an updated version there: https://bitbucket.org/farvardin/playtune-arduino

Now I'm wondering how it's possible to use the notes we got with miditones with some sounds generated by Mozzi...

Tim Barrass

unread,
Sep 30, 2014, 9:16:44 AM9/30/14
to mozzi...@googlegroups.com
Hi,
great work updating the playtune library.
"The score bytestream" section of the docs in Playtune.cpp gives all the info needed to play Mozzi sounds.
The simplest version could have an instrument for each playtune "generator", which could just be an oscillator with a gain parameter to turn it on and off.
Mozzi's midi to frequency conversion functions are documented here: https://sensorium.github.io/Mozzi/doc/html/group__midi.html.
From there it would be possible to add envelopes etc. and build more interesting voices.


On 30 September 2014 22:06, Eric F. <efor...@gmail.com> wrote:
thank you for the links. I don't own a Teensy, but the playtune tool is working quite well. I didn't manage to get it to work in the first place, and I had to change some of the syntax. I've posted an updated version there: https://bitbucket.org/farvardin/playtune-arduino

Now I'm wondering how it's possible to use the notes we got with miditones with some sounds generated by Mozzi...

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.

Tim Barrass

unread,
Sep 30, 2014, 9:24:02 AM9/30/14
to mozzi...@googlegroups.com
Oh, and a Mozzi EventDelay() would be needed for each channel to time the noteon/noteoff events...
mmm it might be a bit more complicated... sorry I don't have time at the moment to spend on it, but am happy to offer suggestions if you get stuck...
tim

Tim Barrass

unread,
Oct 1, 2014, 9:03:06 AM10/1/14
to mozzi...@googlegroups.com
One more thought - it would probably be easier, more flexible, and make more sense to design your own tracker-like system than to convert midi files... something like Arduino Beats by Sebastian Tomczak could be a beginning point: http://little-scale.blogspot.com.au/2008/04/arduino-beats.html

Eric F.

unread,
Oct 12, 2014, 2:37:21 PM10/12/14
to mozzi...@googlegroups.com
interesting this Arduino Beats... I'll have a look at it, thank you.


PaulStoffregen

unread,
Oct 15, 2014, 9:26:40 AM10/15/14
to mozzi...@googlegroups.com
On Wednesday, September 24, 2014 2:52:58 PM UTC-7, Michael Bunsen wrote:
Here's an example for Teensy that manually loops through the notes from Miditones without Playtune:

I would love to see simpler examples of programming sequences as well.


Yeah, sorry about the complexity.  That example started out pretty simple, but then grew to 16 polyphonic voices and 16 envelopes and a patch to Miditones for velocity data.  It's actually not much Arduino sketch code, after you scroll past the 16 waveform objects, 16 envelopers, 6 mixers and 42 patch cords!  Would you believe all those audio processing objects use up only about 33% CPU time on a Teensy 3.1?

Here's a much simpler tone example that generates a USA telephone busy signal.  It simply generates the 2 sine waves and adds them with a mixer, using a timer to turn them on/off every half second.

http://forum.pjrc.com/threads/26788-Audio-library-sine-output-duration?p=56048&viewfull=1#post56048

Eric F.

unread,
Nov 9, 2014, 9:27:07 AM11/9/14
to mozzi...@googlegroups.com
I've just found this example which can be modified for a kind of sequencer:
https://github.com/fakebitpolytechnic/cheapsynth/blob/master/CheapSynth_SeqMode_v0_9_0.ino

Reply all
Reply to author
Forward
0 new messages